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

Re: Find out if a parameter/return field is NULLABLE

From: Kris Jurka <books(at)ejurka(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Richard Jones <rich(at)annexia(dot)org>, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Find out if a parameter/return field is NULLABLE
Date: 2006-01-30 23:37:10
Message-ID: Pine.BSO.4.61.0601301834500.19902@leary.csoft.net (view raw or flat)
Thread:
Lists: pgsql-interfaces

On Mon, 30 Jan 2006, Tom Lane wrote:

> Richard Jones <rich(at)annexia(dot)org> writes:
>> It doesn't seem to be possible to find out if a parameter or result
>> field is nullable using the Describe protocol.
>
> This isn't something that the backend tracks at all, so changing the
> wire protocol would be the least of your problems in making it happen...
>

Well, the protocol does attempt to return the resulting columns' source 
table and column number which may then be used to determine the 
nullability of the field.  This won't work in all cases, but for the 
simple select example given, it will.

Kris Jurka

In response to

pgsql-interfaces by date

Next:From: Judith RetiefDate: 2006-01-31 09:42:36
Subject: sql listen fails using libpgtcl
Previous:From: Tom LaneDate: 2006-01-30 22:11:54
Subject: Re: Find out if a parameter/return field is NULLABLE using Describe

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group