Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 620AD632290 for ; Wed, 30 Sep 2009 03:22:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 29738-07 for ; Wed, 30 Sep 2009 06:22:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by mail.postgresql.org (Postfix) with SMTP id 7C22A632222 for ; Wed, 30 Sep 2009 03:22:36 -0300 (ADT) Received: (qmail 28225 invoked by uid 512); 30 Sep 2009 06:22:32 -0000 Received: from unknown (HELO ?127.0.0.1?) (100.0.32.252) by sd2.tpf-fw-c.co.jp with SMTP; 30 Sep 2009 06:22:32 -0000 Message-ID: <4AC2F920.1000403@tpf.co.jp> Date: Wed, 30 Sep 2009 15:22:24 +0900 From: Hiroshi Inoue User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: the6campbells CC: pgsql-odbc@postgresql.org Subject: Re: sqlDescribeCol not setting null flag correctly for sqlDescribeCol References: <22431f1b0909290825o42e55baahe3d514ad1f918867@mail.gmail.com> In-Reply-To: <22431f1b0909290825o42e55baahe3d514ad1f918867@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.117 tagged_above=-10 required=5 tests=BAYES_00=-2.599, DNS_FROM_RFC_BOGUSMX=1.482 X-Spam-Level: X-Archive-Number: 200909/38 X-Sequence-Number: 10024 the6campbells wrote: > > A basic table is described where one column has a null > constraint: create table TNUM( RNUM integer not null, CNUM numeric(7,2) ) > A simple view is defined that projects all the columns of said > table: create view VNUM as select * from TNUM > A query which projects the columns of the table or the view will return > inconsistent null flags when you call sqlDescribeCol after sqlPrepare > > Does not matter if you have parse, server side prepare etc > enabled/disabled. > > Looks like another bug to me. It seems very hard for the driver to get more accurate results than psql does. I see the following result via psql. xxxxx=> \d tnum Table "public.tnum" Column | Type | Modifiers --------+--------------+----------- rnum | integer | not null cnum | numeric(7,2) | xxxxx=> \d vnum View "public.vnum" Column | Type | Modifiers --------+--------------+----------- rnum | integer | cnum | numeric(7,2) | View definition: SELECT tnum.rnum, tnum.cnum FROM tnum; regards, Hiroshi Inoue