Re: Questions about parsing boolean and casting to anyelement - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Questions about parsing boolean and casting to anyelement
Date
Msg-id 6993.1234900207@sss.pgh.pa.us
Whole thread Raw
In response to Re: Questions about parsing boolean and casting to anyelement  (Brendan Jurd <direvus@gmail.com>)
List pgsql-hackers
Brendan Jurd <direvus@gmail.com> writes:
> On Wed, Feb 18, 2009 at 2:40 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> After thinking about it for awhile, I don't like the notation anyway
>> --- it's not immediately obvious that a cast to anyelement should mean
>> something like that.  What seems more sensible to me is to introduce
>> a function to get the type of an expression, so that you could write
>> something like

> We already have such a function, pg_typeof().

No, pg_typeof is a more-or-less ordinary function that delivers an OID
at runtime.  What we need here is something that will work as a CAST
target, ie, it has to be treated as a type name at parse time.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Brendan Jurd
Date:
Subject: Re: Questions about parsing boolean and casting to anyelement
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Good Delimiter for copy command