Alexander Farber <[EMAIL PROTECTED]> writes:

> but I do specify the database username:
>
>     h754814:afarber {109} psql --help | grep -w user
>       -U NAME         database user name (default: "phpbb")
>
>     h754814:afarber {110} psql -U punbb
>     psql: FATAL:  database "phpbb" does not exist
>
> And it wants to connect to a wrong database
> ("phpbb" instead of "punbb")

I was talking about the name of the database, not the user name in the
database.  The former defaults to the same as your Unix username
(e.g. if I log in as 'doug' psql will try to connect me to a database
called 'doug' if I don't supply a database name).  The PGDATABASE
environment variable overrides this.  Are you sure it's not set?

Anyway, you should always supply the database name explicitly when you
connect--it's a lot safer.

-Doug

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to