Skip site navigation (1) Skip section navigation (2)

Re: Function proposal to find the type of a datum

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kate F <kate(at)cats(dot)meow(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Function proposal to find the type of a datum
Date: 2007-02-02 16:17:46
Message-ID: 25396.1170433066@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Kate F <kate(at)cats(dot)meow(dot)at> writes:
> (And whatever the decision regarding ANYELEMENT of, I believe this
> should behave the same as IS OF)

In the light of morning I think it may be a non-problem.  The way that a
plpgsql function with an ANYELEMENT parameter really works is that on
first invocation with a parameter of a specific type, we generate a new
parse-tree on the fly with the parameter being taken as of that type.
So the IS OF or equivalent operation would never see ANYELEMENT, and
there's nothing to "look through".  (You might check this by seeing if
IS OF behaves sanely, before you go and spend time on a type_of function
...)

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Kate FDate: 2007-02-02 16:32:44
Subject: Re: Function proposal to find the type of a datum
Previous:From: Kate FDate: 2007-02-02 16:10:38
Subject: Re: Function proposal to find the type of a datum

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group