Skip site navigation (1) Skip section navigation (2)


From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: Postgres Hackers List <hackers(at)postgresql(dot)org>
Subject: pg_dump
Date: 1998-09-29 04:39:04
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
We need to think about whether to surround all identifiers with double
quotes all the time in pg_dump output. 

The reason is that Postgres allows reserved keywords to be specified as
table and column names if they are surrounded by the double quotes, but
pg_dump doesn't know whether an identifier also happens to be a reserved
keyword. afaik it's now only using DQs if there is upper case or funny
characters in the identifier. Instead it should probably surround the
fields with DQs all the time. It could perhaps have a command-line
switch to turn off that feature if necessary.

The alternative to always using the DQs is to have pg_dump use the
keywords.c routine available in the backend. But I don't think that is
as reliable since it isn't guaranteed to be in sync with the backend
version and since there are non-reserved keywords in that file which
test the same as the reserved ones.

This should probably be a "must do" for v6.4...


                      - Tom

pgsql-hackers by date

Next:From: Thomas G. LockhartDate: 1998-09-29 05:28:58
Subject: ecpg parser
Previous:From: Thomas G. LockhartDate: 1998-09-29 04:30:36
Subject: Re: [HACKERS] Little parser question

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group