Re: Can't "EXTRACT" from a field? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Can't "EXTRACT" from a field?
Date
Msg-id 2182.1006479197@sss.pgh.pa.us
Whole thread Raw
In response to Re: Can't "EXTRACT" from a field?  (Brent Verner <brent@rcfile.org>)
List pgsql-hackers
Brent Verner <brent@rcfile.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Further open item (Was: Status of 7.2)
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: TOAST performance (was Re: [GENERAL] Delete Performance)