Re: PostgreSQL::PLPerl::Call - Simple interface for calling SQL functions from PostgreSQL PL/Perl

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Martijn van Oosterhout <kleptog@svana.org>
Cc: "David E. Wheeler" <david@kineticode.com>, Tim Bunce <Tim.Bunce@pobox.com>, Greg Sabino Mullane <greg@endpoint.com>, Richard Huxton <dev@archonet.com>, pgsql-hackers@postgresql.org
Date: 2010-02-16T23:01:34Z
Lists: pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> On Tue, Feb 16, 2010 at 09:11:24AM -0800, David E. Wheeler wrote:
>>> An extra source of puzzlement is that the oid of the 'unknown' type is
>>> 705 not 0, and the unknown type isn't discussed in the docs (as far as I
>>> could see).
>> 
>> Yes, I noticed that, too. Greg, do you know the answer to that?

> My guess is that, semantically, 0 means the datatype is unknown,
> whereas 705 means the datatype is known to be type "unknown".

I think the reason the client-side docs recommend using zero is to avoid
having clients know about the unknown type explicitly (in particular, to
discourage people from hardwiring "705" into their code).  AFAIR there's
not a lot of difference in terms of what the parser will do with it.

			regards, tom lane