On Sun, Sep 27, 2009 at 2:36 AM, Ricky Tompu Breaky <ricky.bre...@uni.de> wrote:
> Welcome to psql 8.3.7, the PostgreSQL interactive terminal. > > Type: \copyright for distribution terms > \h for help with SQL commands > \? for help with psql commands > \g or terminate with semicolon to execute query > \q to quit > > postgres=# createdb ivia 1: This is not the SQL command, it's the command line command. SQL is: create database dbname; Note the semicolon (or you can use \g to execute the buffer) > postgres-# \du Note that your prompt has postgres-# not postgres=# the - tells you there's already something in the buffer. Also, \du shows you users. \l shows you databases. > List of roles > Role name | Superuser | Create role | Create DB | Connections | Memberof > -----------+-----------+-------------+-----------+-------------+----------- > <<hidden>>| yes | yes | yes | no limit | {} > ivia | no | no | no | no limit | {} > postgres | yes | yes | yes | no limit | {} > ricky | yes | yes | yes | no limit | {} > (4 rows) > > postgres-# commit Again, no ;. Note that pgsql doesn't start an open transaction automagically like oracle. you need an explicit begin; to open a transaction block or all your commands will be individual transactions executed immediately when \g or a semi colon is used. > postgres-# \q > sussy:~ # psql -h 127.0.0.1 -U ivia -W > Password for user ivia: > psql: FATAL: Datenbank »ivia« existiert nicht (my translation: > Database does not exist. Look!!! It does not make difference although > I created a database named 'ivia') Nope, you only thought you did. Go back and try again. :) -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general