7beta3 has naughty parser bug with ALTER USER .. PASSWORD - Mailing list pgsql-bugs
From | Mike S. |
---|---|
Subject | 7beta3 has naughty parser bug with ALTER USER .. PASSWORD |
Date | |
Msg-id | 20000407151140.13005.qmail@web3806.mail.yahoo.com Whole thread Raw |
Responses |
Re: 7beta3 has naughty parser bug with ALTER USER .. PASSWORD
(Tom Lane <tgl@sss.pgh.pa.us>)
|
List | pgsql-bugs |
======================================================================= POSTGRESQL BUG REPORT TEMPLATE ======================================================================= Your name :Mike Shell Your email address :mikes1987@yahoo.com System Configuration --------------------- Architecture (example: Intel Pentium) : AMD K6-2 400 (ix86) Operating System (example: Linux 2.0.26 ELF) : Linux 2.2.14 ELF PostgreSQL version (example: PostgreSQL-6.5.1): PostgreSQL-7.0beta3 Compiler used (example: gcc 2.8.0) : gcc 2.91.66 Please enter a FULL description of your problem: ------------------------------------------------ I am unable to create users with passwords or give passwords to existing users - under pgaccess or the SQL interface! Attempting to give any user a password results in a nice parse error. Please describe a way to repeat the problem. Please try to provide a concise reproducible example, if at all possible: ---------------------------------------------------------------------- Example for pgaccess: there is a user 'tester' for the 'root' database which has a nice table (only 4 rows) 'addresses'. I then highlight user 'tester' and click [design]. A password (mypass) is entered for the user. The result is a nice parser error: ALTER user "tester" WITH PASSWORD "mypass" NOCREATEDB NOCREATEUSER PostgreSQL error message: ERROR: parser: parse error at or near """ Entering the ALTER command manually (without the quotes) via psql gives me the same result and this should work given the examples in the user.ps docs. Futhermore, when a user finally is given a password via the fix below, and you edit this user in pgaccess, pgaccess shows this user as having no password. ( ******* should appear in the password and verify password areas when editing users with existing passwords or at least a little note to indicate the password has to be reentered). Forgive me if this is corrected in beta4, but I found no mention of this problem in the bugs archives or mbox. This in itself surprises me. Everyone IS using passwords on their DB, right? Also, there are several links in mailing list archives on the postgresql.org site which aren't pointing to any valid web pages - usually the latest month. It would also be nice to put IBM's DB2 in the DB comparison chart - show 'em Postgresql is aiming high! If you know how this problem might be fixed, list the solution below: --------------------------------------------------------------------- Playing around with pgsql, I was able to determine the nature of the problem: 1.<FAILS>: ALTER USER tester with PASSWORD bigpass 2.<FAILS>: ALTER "USER" tester with PASSWORD "bigpass" 3.<FAILS>: ALTER 'USER' tester with PASSWORD 'bigpass' 4.<WORKS>: ALTER USER tester with PASSWORD 'bigpass' 5.<WORKS>: ALTER USER "tester" with PASSWORD 'bigpass' 6.<WORKS>: ALTER USER tester with PASSWORD 'bigpass' So, we seem to have some inconsistancy in what delimiter to use. user.ps indicates that the ALTER command, the USER has no quotes and neither does the PASSWORD. However, VALID UNTIL requires 'single quote' delimiters because of the white space between the elements of the date. I am VERY new to Postgresql, SQL and DB's in general, so I do not feel very secure in making judgements here IN "What is right' - pun intended. ;) However, a brief look at Don Chamberlin's DB2 Universal Database book tends to suggest that we should be able to do with either case 1 or case 3 above or any combination, except when the password contains white space in which case we need single quotes around it. (Yes, ALTER USER ... PASSWORD is not standard SQL, but borrowing from similar constructs..) pgaccess seems to be using "" double quotes, which is OK by me but not the parser. You poor folks sure are advancing PostgreSQL at a blistering pace. Ease back on the throttle a bit before something breaks (sanity ;) I would love to help more, but I have my hands full with creating the site which is gonna use the datebase! Thank you all for this wonderful, powerful database. M. Shell __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com
pgsql-bugs by date: