Help for this page

Select Code to Download


  1. or download this
    CREATE TABLE students (
        name TEXT NOT NULL PRIMARY KEY,
    ...
        grade TEXT,
        data JSONB NOT NULL DEFAULT '{}'::jsonb
    );
    
  2. or download this
    use Mojo::Pg;
    
    ...
        }
    }
    $res->finish;
    
  3. or download this
    $ docker run --rm -p54321:5432 --name pgtestdb -e POSTGRES_PASSWORD=Fo
    +oBar -d postgres:13
    # wait a few seconds for it to start
    ...
    # run the above Perl script
    $ PGPASSWORD=BarFoo psql postgres://localhost:54321/testing -c 'SELECT
    + * FROM students'
    $ docker stop pgtestdb