Search Postgresql Archives

Re: User defined data type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom Lane wrote:
Martijn van Oosterhout <kleptog@xxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux