On 11/29/2011 11:41 PM, Tom Lane wrote: > Another way to say that is that the type int4 can be specified in two > ways: > > int4 (an identifier) > INTEGER (a keyword) > > Quoting "int4" is no problem, because it's still an identifier, but > quoting "integer" takes away its keyword nature, so it doesn't get > recognized. > > The fact that INTEGER is a keyword, and not an identifier, is per SQL > specification. We could perhaps hack things so that "integer" as an > identifier would also work, but I doubt that we'd go so far as to make > "INTEGER" (a different identifier) also work, and we'd certainly not > be able to do much about the spec's more exciting deviations from > identifier-looking type names, such as CHARACTER VARYING or DOUBLE > PRECISION. > > Or to put it more pithily: the SQL committee's ideas of good syntax > seem to have been frozen around the time COBOL was invented.
Thanks Tom and Robert. I think I understand the problem now. I guess I'll have to work around this "quirk" by dealing specially with type names and not quote them when they're in the shorter list of SQL Standard reserved words. Joe -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers