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

Поиск
Список
Период
Сортировка
Искать

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

От:
Thomas 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."

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

От:
Peter Eisentraut <e99re41@DoCS.UU.SE>
Дата:
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

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

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Peter Eisentraut  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  WITH PASSWORD 

			regards, tom lane

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

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
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  WITH PASSWORD 

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

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

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
[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  WITH PASSWORD 
> 
> 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
FAQ