Re: User defined data type

From: Don Y <pgsql(at)DakotaCom(dot)Net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: User defined data type
Date: 2006-04-05 06:19:34
Message-ID: 44336176.20307@DakotaCom.Net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Martijn van Oosterhout <kleptog(at)svana(dot)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.

Yes, STRICT IMMUTABLE, in my case, so not a problem.

> 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.

Thanks!
--don

In response to

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2006-04-05 07:33:56 Re: database design questions
Previous Message Don Y 2006-04-05 06:18:18 Re: User defined data type