Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: User defined data type


  • From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
  • Cc: Don Y <pgsql(at)DakotaCom(dot)Net>, pgsql-general(at)postgresql(dot)org
  • Subject: Re: User defined data type
  • Date: Thu, 30 Mar 2006 15:21:00 -0500
  • Message-id: <22849(dot)1143750060(at)sss(dot)pgh(dot)pa(dot)us>

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.

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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group