dbTalk Databases Forums  

[BUGS] minor issue in createdb 8.0.0beta4

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] minor issue in createdb 8.0.0beta4 in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Silvio Scarpati
 
Posts: n/a

Default [BUGS] minor issue in createdb 8.0.0beta4 - 11-01-2004 , 03:51 AM






Hi !

I discovered this particular feature in "createdb" tool 8.0.0beta4
running on Win32 Platform:

-------------------- Cut And Paste ---------------------------

c:\windows> createdb testdb;
CREATE DATABASE

c:\windows> psql testdb
psql: FATAL: database "testdb" does not exist

c:\windows> psql testdb;
Welcome to psql 8.0.0beta4, 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

Warning: Console codepage (850) differs from windows codepage (1252)
8-bit characters will not work correctly. See PostgreSQL
documentation "Installation on Windows" for details.

testdb;=# \l
List of databases
Name | Owner | Encoding
-----------+----------+-----------
template0 | postgres | SQL_ASCII
template1 | postgres | SQL_ASCII
testdb; | silvio | SQL_ASCII
(4 rows)

testdb;=#

-------------------- Cut And Paste ---------------------------

As you can see, createddb doesn't skip the semicolon after the
database's name, so you have a db name ending with semicolon. This is
not a problem really, but this happens only in this version/platform.

Thanks you all guys.

Regards,
Silvio Scarpati

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply With Quote
  #2  
Old   
Magnus Hagander
 
Posts: n/a

Default Re: [BUGS] minor issue in createdb 8.0.0beta4 - 11-01-2004 , 05:26 AM






Quote:
Hi !
=20
I discovered this particular feature in "createdb" tool=20
8.0.0beta4 running on Win32 Platform:

Quote:
c:\windows> createdb testdb;
CREATE DATABASE
<snip>

Quote:
testdb;=3D# \l
List of databases
Name | Owner | Encoding
-----------+----------+-----------
template0 | postgres | SQL_ASCII
template1 | postgres | SQL_ASCII
testdb; | silvio | SQL_ASCII
(4 rows)
=20
testdb;=3D#
=20
-------------------- Cut And Paste ---------------------------
=20
As you can see, createddb doesn't skip the semicolon after=20
the database's name, so you have a db name ending with=20
semicolon. This is not a problem really, but this happens=20
only in this version/platform.
I don't think this is a postgresql issue, really. It's a shell issue.

sh/bash or whatever you're running on a unix platform has ; as a command
separator. The win32 command prompt does not. (For example, run "echo
foo; echo bar" and notice the differences between bash and cmd). If you
run the command under a bash interpreter (or other shell that uses
semicolon as command separator) on win32, you will se the unix like
behaviour.

Not sure if we want to add a workaround for that? It'd be needed for
every single command, so I personally don't think it's a good idea.

//Magnus


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
  #3  
Old   
Silvio Scarpati
 
Posts: n/a

Default Re: [BUGS] minor issue in createdb 8.0.0beta4 - 11-01-2004 , 08:41 AM



Hi Magnus,

thanks for the answer.


On Mon, 1 Nov 2004 12:24:07 +0100, you wrote:

Quote:
Not sure if we want to add a workaround for that? It'd be needed for
every single command, so I personally don't think it's a good idea.

Maybe discarding semicolons in database's names passing the command to
the backend should a good idea.

Regards,
Silvio

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.