Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id A8965633283 for ; Tue, 29 Sep 2009 12:25:16 -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 18844-05 for ; Tue, 29 Sep 2009 15:25:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-vw0-f181.google.com (mail-vw0-f181.google.com [209.85.212.181]) by mail.postgresql.org (Postfix) with ESMTP id 80B036322D5 for ; Tue, 29 Sep 2009 12:25:08 -0300 (ADT) Received: by vws11 with SMTP id 11so1247130vws.28 for ; Tue, 29 Sep 2009 08:25:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=1rSK2oUTwnx0jQQVU3ThWUnUprppC3hM0pgYQub+gJ0=; b=yActl7jXeELmzbDHUbvKRPtjVLJ9eHGJ+w3AMeWHsIP9D2CAq8d4XIjOj8JISwCSUM ODhWns9VUd/r9yjfP4bkbj+vckG6reQyCfgMhuQC7aNm23cpBPm5lopmMH6JUZjlsjtO Zp1Z5QPPQz+AVUuiHiWSPwW9peJDKUUmXrmyA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ZCRWPPCBNdTbmjw7KDw9GA1YNFYBoPn2PjhbRgdAhWddyYluWAXnJUcNVa8bcsB1oQ eI6jjsE4mDkSLeBCrGzhndHQ0P5LvYKGUvKkUS43JBBa/iuB/Hm8HTYWIfR5KPVi51jA mXGDT0MbrQQS6sKVguz14oYy0IKBk4nLBmc7s= MIME-Version: 1.0 Received: by 10.220.104.212 with SMTP id q20mr8050967vco.107.1254237907424; Tue, 29 Sep 2009 08:25:07 -0700 (PDT) Date: Tue, 29 Sep 2009 11:25:07 -0400 Message-ID: <22431f1b0909290825o42e55baahe3d514ad1f918867@mail.gmail.com> Subject: sqlDescribeCol not setting null flag correctly for sqlDescribeCol From: the6campbells To: pgsql-odbc@postgresql.org Content-Type: multipart/alternative; boundary=0016e6471bdaef96a30474b904eb X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.109 tagged_above=-10 required=5 tests=BAYES_05=-1.11, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200909/31 X-Sequence-Number: 10017 --0016e6471bdaef96a30474b904eb Content-Type: text/plain; charset=ISO-8859-1 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. SQL_DRIVER_NAME=6, 30, "PSQLODBC35W.DLL" SQL_DRIVER_ODBC_VER=77, 10, "03.51" SQL_DRIVER_VER=7, 20, "08.04.0100" Describe Column All: icol, szColName, *pcbColName, *pfSqlType, *pcbColDef, *pibScale, *pfNullable 1, rnum, 4, SQL_INTEGER=4, 10, 0, SQL_NO_NULLS=0 2, cnum, 4, SQL_NUMERIC=2, 7, 2, SQL_NULLABLE=1 Describe Column All: icol, szColName, *pcbColName, *pfSqlType, *pcbColDef, *pibScale, *pfNullable 1, rnum, 4, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1 2, cnum, 4, SQL_NUMERIC=2, 7, 2, SQL_NULLABLE=1 --0016e6471bdaef96a30474b904eb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

A basic table is described where one column has a null = constraint:=A0create table TNUM( RNUM integer not null, CNUM numeric(7,2) = =A0)
A simple view is defined that projects all the columns of sa= id table:=A0create view VNUM as select * from TNUM
A query which projects the columns of the table or the view will retur= n inconsistent null flags when you call sqlDescribeCol after sqlPrepare

Does not matter if you have parse, server side prepar= e etc enabled/disabled.=A0

Looks like another bug to me.=A0

SQL_DRIVER_NAME=3D6, 30, &= quot;PSQLODBC35W.DLL"
SQL_DRIVER_ODBC_VER=3D77, 10, "03.51"
SQL_DRIVER_VER=3D7, 20, "= ;08.04.0100"


Describe Column A= ll:=A0
icol, szColName,= *pcbColName, *pfSqlType, *pcbColDef, *pibScale, *pfNullable=A0
1, rnum, 4, SQL_INTEGER=3D4,= 10, 0, SQL_NO_NULLS=3D0=A0
2, cnum, 4, SQL_NUMERIC=3D2, 7, 2, SQL_NULLABLE=3D1=A0

Describe Column All:=A0
icol, szColName, *pcbColName, *pfSqlType, *pcbColDef,= *pibScale, *pfNullable=A0
1, rnum, 4, SQL_INTEGER=3D4= , 10, 0, SQL_NULLABLE=3D1=A0
= 2, cnum, 4, SQL_NUMERIC=3D2, 7, 2, SQL_NULLABLE=3D1=A0
--0016e6471bdaef96a30474b904eb--