CREATE USER vs. createuser
With createuser I managed to create users like 12345 and John Doe (with a
space).
It did not work with CREATE USER.
Aren't they supposed to do the same?
Thank you all,
Mihai Gheorghiu
"Mihai Gheorghiu" wrote:
With createuser I managed to create users like 12345 and John Doe (with a
space).
It did not work with CREATE USER.
Aren't they supposed to do the same?
Such users need to be double-quoted -- which is how createuser does it:
QUERY="CREATE USER \"$NewUser\""
...
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Behold, I stand at the door, and knock; if any man
hear my voice, and open the door, I will come in to
him, and will sup with him, and he with me."
Revelation 3:20
On Wed, Sep 05, 2001 at 11:57:48AM -0400, Mihai Gheorghiu wrote:
With createuser I managed to create users like 12345 and John Doe (with a
space).
It did not work with CREATE USER.
Aren't they supposed to do the same?
The createuser is a simple script and use SQL query "CREATE USER" too.
CREATE USER "John Doe";
...quotation marks is the thing that you search.
Karel
--
Karel Zak <zakkr@zf.jcu.cz>
http://home.zf.jcu.cz/~zakkr/
C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz