Re: Function proposal to find the type of a datum - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Function proposal to find the type of a datum
Date
Msg-id 25396.1170433066@sss.pgh.pa.us
Whole thread Raw
In response to Re: Function proposal to find the type of a datum  (Kate F <kate@cats.meow.at>)
Responses Re: Function proposal to find the type of a datum  (Kate F <kate@cats.meow.at>)
List pgsql-hackers
Kate F <kate@cats.meow.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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: --enable-debug does not work with gcc
Next
From: Kate F
Date:
Subject: Re: Function proposal to find the type of a datum