pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
SQL Reserved words
2+ messages / 2 participants
[nested] [flat]

* SQL Reserved words
@ 2003-04-22 15:57 DUDLEY,DONALD (HP-Boise,ex1) <donald.dudley@hp.com>
  2003-04-23 18:11 ` Re: SQL Reserved words Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 1 reply; 2+ messages in thread

From: DUDLEY,DONALD (HP-Boise,ex1) @ 2003-04-22 15:57 UTC (permalink / raw)
  To: pgsql-sql

I am importing a database from Informix (SE 7.25) on HP-UX 11i to postgres
7.3.2 on RH 8 Linux.
In running the "CREATE TABLE" scripts while building the new database, pgSQL
seems to be choking on several of the column names.
When I looked in the appendix B1 of the Users Manual, I see that some of the
column names are reserved words, either by pgSQL or by ANSI SQL.
Some of the column names are: 'desc' (for 'description', collides with
keyword for 'DESCENDING'), and 'group' (used in 'GROUP BY' clause).
I'd like not to have to alter the many queries used in scripts and programs
to change 'desc' to descr, and group to grp, for example.  
Is there a way to tell pgSQL that you're referencing a column name and not a
reserved word?  Informix handled them ok...
Thanks,
Don

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: SQL Reserved words
  2003-04-22 15:57 SQL Reserved words DUDLEY,DONALD (HP-Boise,ex1) <donald.dudley@hp.com>
@ 2003-04-23 18:11 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephan Szabo @ 2003-04-23 18:11 UTC (permalink / raw)
  To: DUDLEY,DONALD (HP-Boise,ex1) <donald.dudley@hp.com>; +Cc: pgsql-sql


On Tue, 22 Apr 2003, DUDLEY,DONALD (HP-Boise,ex1) wrote:

> I am importing a database from Informix (SE 7.25) on HP-UX 11i to postgres
> 7.3.2 on RH 8 Linux.
> In running the "CREATE TABLE" scripts while building the new database, pgSQL
> seems to be choking on several of the column names.
> When I looked in the appendix B1 of the Users Manual, I see that some of the
> column names are reserved words, either by pgSQL or by ANSI SQL.
> Some of the column names are: 'desc' (for 'description', collides with
> keyword for 'DESCENDING'), and 'group' (used in 'GROUP BY' clause).
> I'd like not to have to alter the many queries used in scripts and programs
> to change 'desc' to descr, and group to grp, for example.
> Is there a way to tell pgSQL that you're referencing a column name and not a
> reserved word?  Informix handled them ok...

You can use double quotes around the names (in all cases where you refer
to it) to use it as an identifier, but that doesn't help if you don't want
to change the queries.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-04-23 18:11 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-04-22 15:57 SQL Reserved words DUDLEY,DONALD (HP-Boise,ex1) <donald.dudley@hp.com>
2003-04-23 18:11 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox