| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Ed L(dot)" <pgsql(at)bluepolka(dot)net> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: rowset-returning function mismatch |
| Date: | 2005-01-29 00:08:21 |
| Message-ID: | 28590.1106957301@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
"Ed L." <pgsql(at)bluepolka(dot)net> writes:
> I ask because it seems like "char" and char should match as type names,
> but don't.
No, they don't. char without any quotes is a SQL reserved word that
is equivalent to CHARACTER(1). "char" with quotes is not a reserved
word, by definition. For largely historical reasons it happens to match
a single-byte datatype that existed in the deeps of time in PostQUEL,
and is still used in our system catalogs as a sort of poor man's
enumeration type.
Note the different results here:
regression=# create table foo (a char, b "char");
CREATE TABLE
regression=# \d foo
Table "public.foo"
Column | Type | Modifiers
--------+--------------+-----------
a | character(1) |
b | "char" |
regression=#
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andre Schnoor | 2005-01-29 00:19:04 | Re: Moving from Sybase to Postgres - Stored Procedures |
| Previous Message | Tom Lane | 2005-01-29 00:03:04 | Re: Rule problem with OLD / NEW record set (repost) |