BUG #3582: CREATE USER via ODBC
BUG #3582: CREATE USER via ODBC
От:
"Zoltan Szmutku" <szmutku.zoltan@freemail.hu>
Дата:
The following bug has been logged online:
Bug reference: 3582
Logged by: Zoltan Szmutku
Email address: szmutku.zoltan@freemail.hu
PostgreSQL version: 8.2
Operating system: Win XP
Description: CREATE USER via ODBC
Details:
Hi ,
I use VFoxpro 9 client program via Postgre ODBC driver.
I see a problem with CREATE USER command.
See bellow:
1.
SQLSTRINGCONNECT("DRIVER=Postgresql
ANSI;Database=postgres;PWD=nincsen;PORT=5432;SERVER=localhost;UID=root;;CA=d
;A6=;A7=100;A8=4096;B0=255;B1=8190;BI=0;C2=dd_;CX=1b503bb;A1=7.4")
It is a root account , then I get a handle.
I try save a new account:
?SQLEXEC(1,"CREATE ROLE TESZT LOGIN ENCRYPTED PASSWORD 'nincsen' SUPERUSER
CREATEDB NOCREATEROLE")
I get a 1 value of return , it is ok the new account is saved.
Now I try connect with my new account.
?SQLSTRINGCONNECT("DRIVER=Postgresql
ANSI;Database=postgres;PWD=nincsen;PORT=5432;SERVER=localhost;UID=TESZT;;CA=
d;A6=;A7=100;A8=4096;B0=255;B1=8190;BI=0;C2=dd_;CX=1b503bb;A1=7.4")
Unfortunately I get a -1 value of return , and the error message is :
'..password autenthication failed'
Then I drop the new account :
?SQLEXEC(1,"drop role TESZT")
Return 1, it's ok.
Try again, now with lower characters:
?SQLEXEC(1,"CREATE ROLE teszt LOGIN ENCRYPTED PASSWORD 'nincsen' SUPERUSER
CREATEDB NOCREATEROLE")
Return 1, it's ok.
Now I try connect again with my new account.
?SQLSTRINGCONNECT("DRIVER=Postgresql
ANSI;Database=postgres;PWD=nincsen;PORT=5432;SERVER=localhost;UID=teszt;;CA=
d;A6=;A7=100;A8=4096;B0=255;B1=8190;BI=0;C2=dd_;CX=1b503bb;A1=7.4")
and bingo , I get return 1 ! Connection succesfull.
Thanks your patiente
with best regards : ZoltanRe: BUG #3582: CREATE USER via ODBC
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Zoltan Szmutku" writes: > I try save a new account: > ?SQLEXEC(1,"CREATE ROLE TESZT LOGIN ENCRYPTED PASSWORD 'nincsen' SUPERUSER > CREATEDB NOCREATEROLE") This isn't a bug. Since you didn't double-quote the role name, it's converted to lower case, the same as any other unquoted SQL identifier. So CREATE ROLE TESZT does the same thing as CREATE ROLE teszt. Whether to smash a supplied username to lowercase at login time is the decision of the client-side software. Most doesn't, and it looks like that includes ODBC. regards, tom lane