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, pavel(dot)stehule(at)hotmail(dot)com
Subject: Re: Function proposal to find the type of a datum
Date: 2007-02-02 07:41:15
Message-ID: 26410.1170402075@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Kate F <kate(at)cats(dot)meow(dot)at> writes:
> ... OF takes a list of types; it needs parentheses:
>     IF a IS OF (INTEGER) THEN

Oh, right, minor detail.

> Meanwhile, I still think the function David proposed is a worthy
> addition (and I still have a user-case for it!), as using just the OF
> operator for something similar, one would have to explictly test
> against every type required.

Um, but what would you do differently with an OID result?  The nice
thing about the SQL-spec syntax is that it avoids depending on anything
so implementation-specific as a pg_type OID.  So if it covers the
territory then I'd be inclined to go that way.  What useful
functionality does it lack?

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2007-02-02 07:47:22
Subject: ToDo: add documentation for operator IS OF
Previous:From: Kate FDate: 2007-02-02 07:31:13
Subject: Re: Function proposal to find the type of a datum

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