Re: pg reserved words - Mailing list pgsql-sql

From Markus Schaber
Subject Re: pg reserved words
Date
Msg-id 44117AA5.2020801@logix-tt.com
Whole thread Raw
In response to pg reserved words  (Irina Gadassik <igadassik@standardbredcanada.ca>)
List pgsql-sql
Hi, Irina,

Irina Gadassik wrote:

> I am trying to create a table freeze and it seems "freeze" is a reserved
> word, but I don't see it in
> the list. Also in a different table I cann't create a column freeze.
> However it is possible in MySQL and Ingres.

It is a PostgreSQL specific reserved word, see
http://www.postgresql.org/docs/current/interactive/sql-keywords-appendix.html

However, it is possible to use it quoted:

postgres=# create table freeze (foo int);
ERROR:  syntax error at or near "freeze" at character 14
LINE 1: create table freeze (foo int);                    ^
postgres=# create table "freeze" (foo int);
CREATE TABLE
postgres=# select * from "freeze";foo
-----
(0 rows)

postgres=# DROP TABLE "freeze" ;
DROP TABLE

HTH,
Markus


-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org


pgsql-sql by date:

Previous
From: Markus Schaber
Date:
Subject: Re:
Next
From: Markus Schaber
Date:
Subject: Re: dbLink Query