Re: user defined function

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: user defined function
Дата
Msg-id
19162.1138118200@sss.pgh.pa.us
Ответ на
Re: user defined function (Richard Huxton)
Список
Дерево обсуждения
user defined function Yl Zhou <andrew.ylzhou@gmail.com>
Re: user defined function Tom Lane <tgl@sss.pgh.pa.us>
Re: user defined function "Gevik" <gevik@xs4all.nl>
Re: user defined function Richard Huxton <dev@archonet.com>
Re: user defined function Tom Lane <tgl@sss.pgh.pa.us>
Re: user defined function Yl Zhou <andrew.ylzhou@gmail.com>
Re: user defined function Tom Lane <tgl@sss.pgh.pa.us>
Re: user defined function Yl Zhou <andrew.ylzhou@gmail.com>
Re: user defined function Tom Lane <tgl@sss.pgh.pa.us>
Re: user defined function Scott Marlowe <smarlowe@g2switchworks.com>
Re: user defined function andrew <andrew.ylzhou@gmail.com>
Re: user defined function Tom Lane <tgl@sss.pgh.pa.us>
Re: user defined function andrew <andrew.ylzhou@gmail.com>
Re: user defined function Tom Lane <tgl@sss.pgh.pa.us>
Re: user defined function andrew <andrew.ylzhou@gmail.com>
Re: user defined function Tom Lane <tgl@sss.pgh.pa.us>
Re: user defined function andrew <andrew.ylzhou@gmail.com>
Re: user defined function andrew <andrew.ylzhou@gmail.com>
Re: user defined function Yl Zhou <andrew.ylzhou@gmail.com>
Re: user defined function Thomas Hallgren <thomas@tada.se>
Richard Huxton  writes:
> Tom Lane wrote:
>> You could do that in C, but none of the available PLs support it.

> How would you define the signature for the function? One parameter of 
> type anyelement?

Type RECORD would be a better choice --- ANYELEMENT allows scalar types
which is not what you want here.  (You could probably still do it with
a function declared that way, but it'd have to take extra steps to
defend itself against being passed, say, an integer.)

If you're looking for a coding model, stripping down record_out() to
just count nulls should get you there.

			regards, tom lane
В списке pgsql-general по дате отправления
От: Magnus Hagander
Дата:
От: Tom Lane
Дата:
Сообщение: Re:
FAQ