Re: User defined data type

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: User defined data type
Дата
Msg-id 22849.1143750060@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: User defined data type  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: User defined data type  (Don Y <pgsql@DakotaCom.Net>)
Список pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> On Thu, Mar 30, 2006 at 11:51:41AM -0700, Don Y wrote:
>> - Can *_in() be ever invoked with a NULL argument?  Or, can I
>> safely assume that the pointer I am passed is valid?

> You can't get a NULL there. Yes, the pointer is valid cstring.

To be sure about that, make sure you mark the function STRICT
when you define it.  Otherwise you can get burnt by direct user
invocation
    select int4in(null::cstring);
not to mention that we were recently considering letting non-strict
input functions get invoked on nulls in the normal course of events.

            regards, tom lane

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: User defined data type
Следующее
От: "sylsau"
Дата:
Сообщение: Use functions in Pl/Perl language