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: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, kate(at)cats(dot)meow(dot)at
Subject: Re: Function proposal to find the type of a datum
Date: 2007-02-02 07:17:51
Message-ID: 25763.1170400671@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
"Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com> writes:
> you can identify type via operator OF.

>   IF a IS OF INTEGER THEN
>     RAISE NOTICE 'Parametr a is numeric';

Yeah, that is the SQL-standard syntax, but I think our implementation
doesn't work the way Kate would like: if "a" is an ANYELEMENT function
parameter then (I think) only IS OF ANYELEMENT would succeed.  Would it
conform to the SQL spec for the test to "look through" ANYELEMENT to the
actual parameter type?  Would it be reasonably implementable to do that?

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Kate FDate: 2007-02-02 07:31:13
Subject: Re: Function proposal to find the type of a datum
Previous:From: David FetterDate: 2007-02-02 06:55:18
Subject: Re: writing new regexp functions

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