Re: Function proposal to find the type of a datum

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Function proposal to find the type of a datum
Дата
Msg-id 26410.1170402075@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Function proposal to find the type of a datum  ("Pavel Stehule" <pavel.stehule@hotmail.com>)
Ответы Re: Function proposal to find the type of a datum
Список pgsql-hackers
Kate F <kate@cats.meow.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kate F
Дата:
Сообщение: Re: Function proposal to find the type of a datum
Следующее
От: "Pavel Stehule"
Дата:
Сообщение: ToDo: add documentation for operator IS OF