pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Richard Jones <rich@annexia.org>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Find out if a parameter/return field is NULLABLE
Date: Mon, 30 Jan 2006 18:37:10 -0500 (EST)
Message-ID: <Pine.BSO.4.61.0601301834500.19902@leary.csoft.net> (raw)
In-Reply-To: <24078.1138659114@sss.pgh.pa.us>
References: <20060130203822.GA16111@furbychan.cocan.org>
	<24078.1138659114@sss.pgh.pa.us>



On Mon, 30 Jan 2006, Tom Lane wrote:

> Richard Jones <rich@annexia.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



view thread (3+ messages)

Message-ID: <Pine.BSO.4.61.0601301834500.19902@leary.csoft.net>
Permalink:  ../Pine.BSO.4.61.0601301834500.19902@leary.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.61.0601301834500.19902@leary.csoft.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: books@ejurka.com, tgl@sss.pgh.pa.us, rich@annexia.org
  Subject: Re: Find out if a parameter/return field is NULLABLE
  In-Reply-To: <Pine.BSO.4.61.0601301834500.19902@leary.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox