Re: Reserved words and delimited identifiers

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Joe Abbate" <jma(at)freedomcircle(dot)com>
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Pg Hackers" <pgsql-hackers(at)postgresql(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Reserved words and delimited identifiers
Date: 2011-11-30 18:34:37
Message-ID: 4ED622DD0200002500043666@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joe Abbate <jma(at)freedomcircle(dot)com> wrote:
> On 11/30/2011 11:26 AM, Kevin Grittner wrote:
>> You are prepared to handle the difference between char and
>> "char", I hope.

> Pyrseas depends on the ultimate type verifier: the
> PostgreSQL parser (and related routines).

OK. I just wanted to be sure that you were aware of that one; it
surprises people sometimes that PostgreSQL includes both a char
reserved word for a type and a "char" type which is completely
different:

test=# create table x (noq char, withq "char");
CREATE TABLE
test=# \x on
Expanded display is on.
test=# select attnum, attname, atttypid, atttypid::regtype,
(select typname from pg_type where oid = atttypid),
attlen, atttypmod, attbyval, attstorage, attalign
from pg_attribute
where attrelid = 'x'::regclass and attnum > 0;
-[ RECORD 1 ]---------
attnum | 1
attname | noq
atttypid | 1042
atttypid | character
typname | bpchar
attlen | -1
atttypmod | 5
attbyval | f
attstorage | x
attalign | i
-[ RECORD 2 ]---------
attnum | 2
attname | withq
atttypid | 18
atttypid | "char"
typname | char
attlen | 1
atttypmod | -1
attbyval | t
attstorage | p
attalign | c

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-11-30 18:45:15 Re: Large number of open(2) calls with bulk INSERT into empty table
Previous Message Pavel Stehule 2011-11-30 18:34:07 Re: review: CHECK FUNCTION statement