Skip site navigation (1) Skip section navigation (2)

Re: Connection without database name

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: PostgreSQL Hacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Connection without database name
Date: 2004-12-23 15:35:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Michael Meskes <meskes(at)postgresql(dot)org> writes:
> Very early in its existance ecpg got an oracle compat hack that enabled
> it to do a connect with just the username and use the database as
> specified via PGDATABASE. It appears that this feature is not really
> used as it seems it segfault for quite some amount of releases. 

> While trying ot fix it I found that the libpq function does not seem to
> look for the environment anymore.

Sure it does.

$ PGDATABASE=foo psql
psql: FATAL:  database "foo" does not exist
$ PGDATABASE=template1 psql
Welcome to psql 8.0.0rc2, the PostgreSQL interactive terminal.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: strkDate: 2004-12-23 15:41:47
Subject: Re: join selectivity
Previous:From: Tom LaneDate: 2004-12-23 15:13:03
Subject: Re: join selectivity

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group