Re: [HACKERS] quoting problem?

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Terry Mackintosh <terry(at)terrym(dot)com>
Cc: PostgreSQL-development <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] quoting problem?
Date: 1998-11-05 15:07:07
Message-ID: 3641BF1A.515B95C0@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> REVOKE ALL on 'board' from PUBLIC;
> ERROR: parser: parse error at or near "'"
> GRANT ALL on "board" to "nobody";
> CHANGE
> It would seem that the single quotes should be double quotes?

It looks like that is now correct in the v6.4beta and v6.4final trees.
The program uses a single function, FmtId(), to evaluate strings and to
do the quote/noquote thang.

> I have notice that most all names now are quoted in dumps, but will
> work just fine with out any quotes, so why the quotes?

The primary reason that is that you are allowed on table creation to use
reserved keywords if you surround them with double quotes. pg_dump
doesn't know about reserved words, so would not be able to selectively
apply double quotes.

You can suppress most of the double quotes by using the new "-n"
argument to pg_dump (n == no quotes). This gives you essentially the old
behavior of applying double quotes only if there is upper case or
whitespace in the identifier.

- Tom

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sferacarta Software 1998-11-05 15:11:35 int8 size
Previous Message Thomas G. Lockhart 1998-11-05 14:53:40 Re: [HACKERS] Open the flood gates...v6.4 is tag'd...