X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 0388D9DC98B for ; Mon, 30 Jan 2006 19:37:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 03305-05 for ; Mon, 30 Jan 2006 19:37:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by postgresql.org (Postfix) with SMTP id 6896F9DC9D9 for ; Mon, 30 Jan 2006 19:37:07 -0400 (AST) Received: (qmail 30375 invoked by uid 1112); 30 Jan 2006 23:37:10 -0000 Date: Mon, 30 Jan 2006 18:37:10 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Tom Lane cc: Richard Jones , pgsql-interfaces@postgresql.org Subject: Re: Find out if a parameter/return field is NULLABLE In-Reply-To: <24078.1138659114@sss.pgh.pa.us> Message-ID: References: <20060130203822.GA16111@furbychan.cocan.org> <24078.1138659114@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.077 required=5 tests=[AWL=0.077] X-Spam-Score: 0.077 X-Spam-Level: X-Archive-Number: 200601/46 X-Sequence-Number: 5962 On Mon, 30 Jan 2006, Tom Lane wrote: > Richard Jones 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