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