Error in pgaccess (parse error at or near """) on create new user with password

Started by Thomas Swanalmost 26 years ago5 messagesbugs
Jump to latest
#1Thomas Swan
tswan@olemiss.edu

============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name :Thomas Swan
Your email address :tswan@ics.olemiss.edu

System Configuration
---------------------
Architecture (example: Intel Pentium) :Intel Celeron

Operating System (example: Linux 2.0.26 ELF) : Linux 2.2.15 ELF

PostgreSQL version (example: PostgreSQL-6.5.1): PostgreSQL-7.0 Release

Compiler used (example: gcc 2.8.0) : egcs-2.91.66

Please enter a FULL description of your problem:
------------------------------------------------
When using pgaccess to create a new user the followin error results.

Error executing query
CREATE user "whomever" WITH PASSWORD "foo" CREATEDB CREATEUSER

PostgreSQL error message:
ERROR: parser: parse error at or near """

PostgreSQL status: PGRES_FATAL_ERROR

{any variation of rights reproduces the error}

Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

Try to create a new user with a password

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

The with password doesn't like the double quote characters however, writing the same query by hand and using single quotes works... just change the query or check and make sure the parser will expect double quotes if that is what's expected. So either it's pgaccess using the wrong SQL statement to create a user or the statement is being incorrectly handled.

-
- Thomas Swan
- ________________________________________
- Graduate Student - Computer Science
- The University of Mississippi
-
- "People can be sorted into two fundamental groups,
- those that divide people into two groups and
- those that don't."

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Thomas Swan (#1)
Re: Error in pgaccess (parse error at or near """) on create new user with password

On Tue, 9 May 2000, Thomas Swan wrote:

When using pgaccess to create a new user the followin error results.

Error executing query
CREATE user "whomever" WITH PASSWORD "foo" CREATEDB CREATEUSER

PostgreSQL error message:
ERROR: parser: parse error at or near """

The password must be single-quoted nowadays. Put that on the 7.0.1 list
...

--
Peter Eisentraut Sernanders v�g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#2)
Re: Error in pgaccess (parse error at or near """) on create new user with password

Peter Eisentraut <e99re41@DoCS.UU.SE> writes:

On Tue, 9 May 2000, Thomas Swan wrote:

CREATE user "whomever" WITH PASSWORD "foo" CREATEDB CREATEUSER

ERROR: parser: parse error at or near """

The password must be single-quoted nowadays. Put that on the 7.0.1 list

I'd say single quotes is correct behavior for the password, actually.
Double quotes are only appropriate in a position where an SQL name is
wanted. The underlying syntax is really
CREATE USER <name> WITH PASSWORD <string>

regards, tom lane

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Tom Lane (#3)
Re: Error in pgaccess (parse error at or near """) on create new user with password

Tom Lane writes:

The password must be single-quoted nowadays. Put that on the 7.0.1 list

I'd say single quotes is correct behavior for the password, actually.
Double quotes are only appropriate in a position where an SQL name is
wanted. The underlying syntax is really
CREATE USER <name> WITH PASSWORD <string>

Yes, that's why we made that change. I was more referring to the pgaccess
"list". Sorry.

--
Peter Eisentraut Sernanders v�g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden

#5Bruce Momjian
bruce@momjian.us
In reply to: Peter Eisentraut (#4)
Re: Error in pgaccess (parse error at or near """) on create new user with password

[Charset ISO-8859-1 unsupported, filtering to ASCII...]

Tom Lane writes:

The password must be single-quoted nowadays. Put that on the 7.0.1 list

I'd say single quotes is correct behavior for the password, actually.
Double quotes are only appropriate in a position where an SQL name is
wanted. The underlying syntax is really
CREATE USER <name> WITH PASSWORD <string>

Yes, that's why we made that change. I was more referring to the pgaccess
"list". Sorry.

Peter, is this a pgaccess bug? If so, can you contact the author?

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026