| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Brent Verner <brent(at)rcfile(dot)org> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Can't "EXTRACT" from a field? |
| Date: | 2001-11-23 01:33:17 |
| Message-ID: | 2182.1006479197@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Brent Verner <brent(at)rcfile(dot)org> writes:
> Something is strange, tho.
The construct you're poking around the edges of here is
type-name literal-string
which is an SQLish typed constant. (Or more accurately, it's Thomas'
generalization of some type-specific constant syntaxes that appear in
SQL92. AFAIK the spec itself doesn't claim this is a type-universal
construction.)
Casting something other than a string literal requires different, more
explicit syntax; eg, CAST(foo AS type), foo::type, or if the type name
is allowable as a function name type(foo) will work.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Christopher Kings-Lynne | 2001-11-23 01:37:52 | Re: TOAST performance (was Re: [GENERAL] Delete Performance) |
| Previous Message | Tom Lane | 2001-11-23 01:26:27 | Re: Further open item (Was: Status of 7.2) |