createdb buggy?

Started by zammon@libero.itover 24 years ago6 messagesgeneral
Jump to latest
#1zammon@libero.it
zammon@libero.it

Hi all,

I'm using postgresql 6.5.3 and I think I found a bug in createdb tool.

take a look...
verde:/home/coblib/beta$ createdb THISDB
verde:/home/coblib/beta$ psql THISDB
Connection to database 'thisdb' failed.
FATAL 1: Database thisdb does not exist in pg_database

verde:/home/coblib/beta$ psql -l
datname |datdba|encoding|datpath
----------+------+--------+----------
template1 | 31| 5|template1
THISDB | 31| 5|THISDB

Is this a known bug?

Jose

#2Noname
wsheldah@lexmark.com
In reply to: zammon@libero.it (#1)
Re: createdb buggy?

Try typing
psql "THISDB"

so that it won't convert your database name to lower case before it tries to
look it up in the system catalog. You also might want to upgrade to 7.1.3 or so
if possible; a lot has changed since 6.5.3.

"zammon@libero.it" <zammon%libero.it on 09/06/2001 09:59:50 AM

To: pgsql-general%postgresql.org@interlock.lexmark.com
cc: (bcc: Wesley Sheldahl/Lex/Lexmark)
Subject: [GENERAL] createdb buggy?

Hi all,

I'm using postgresql 6.5.3 and I think I found a bug in createdb tool.

take a look...
verde:/home/coblib/beta$ createdb THISDB
verde:/home/coblib/beta$ psql THISDB
Connection to database 'thisdb' failed.
FATAL 1: Database thisdb does not exist in pg_database

verde:/home/coblib/beta$ psql -l
datname |datdba|encoding|datpath
----------+------+--------+----------
template1 | 31| 5|template1
THISDB | 31| 5|THISDB

Is this a known bug?

Jose

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

#3zammon@libero.it
zammon@libero.it
In reply to: Noname (#2)
Re: createdb buggy?

wsheldah@lexmark.com wrote:

Try typing
psql "THISDB"

$ psql "THISDB"
Connection to database 'thisdb' failed.
FATAL 1: Database thisdb does not exist in pg_database

Sorry, it doesn't work to

Jose

Show quoted text

so that it won't convert your database name to lower case before it tries to
look it up in the system catalog. You also might want to upgrade to 7.1.3 or so
if possible; a lot has changed since 6.5.3.

"zammon@libero.it" <zammon%libero.it on 09/06/2001 09:59:50 AM

To: pgsql-general%postgresql.org@interlock.lexmark.com
cc: (bcc: Wesley Sheldahl/Lex/Lexmark)
Subject: [GENERAL] createdb buggy?

Hi all,

I'm using postgresql 6.5.3 and I think I found a bug in createdb tool.

take a look...
verde:/home/coblib/beta$ createdb THISDB
verde:/home/coblib/beta$ psql THISDB
Connection to database 'thisdb' failed.
FATAL 1: Database thisdb does not exist in pg_database

verde:/home/coblib/beta$ psql -l
datname |datdba|encoding|datpath
----------+------+--------+----------
template1 | 31| 5|template1
THISDB | 31| 5|THISDB

Is this a known bug?

Jose

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

#4Steve Wampler
swampler@noao.edu
In reply to: Noname (#2)
Re: createdb buggy?

wsheldah@lexmark.com wrote:

Try typing
psql "THISDB"

Shouldn't this be

psql \"THISDB\"

so the shell doesn't strip the " off?

so that it won't convert your database name to lower case before it tries to
look it up in the system catalog.

--
Steve Wampler- SOLIS Project, National Solar Observatory
swampler@noao.edu

#5Peter Eisentraut
peter_e@gmx.net
In reply to: zammon@libero.it (#1)
Re: createdb buggy?

zammon@libero.it writes:

I'm using postgresql 6.5.3 and I think I found a bug in createdb tool.

Please upgrade to the latest stable release (7.1.3). I'm pretty sure the
behaviour you describe is fixed there.

--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#2)
Re: createdb buggy?

wsheldah@lexmark.com writes:

You also might want to upgrade to 7.1.3 or so
if possible; a lot has changed since 6.5.3.

Indeed. I get

$ psql THISDB
psql: FATAL 1: Database "THISDB" does not exist in the system catalog.

so recent versions of psql don't do the bogus case adjustment.

I believe we agreed awhile back that names typed on the Unix command
line should always be taken literally, not case-folded as they would
normally be within SQL commands. I'm not sure that we have fixed every
single script and program to adhere to that convention, but that's the
current plan.

regards, tom lane