BUG #5056: SQLDescribeColW for function returning a result set incorrectly setting sql_nullable - Mailing list pgsql-bugs

From the6campbells
Subject BUG #5056: SQLDescribeColW for function returning a result set incorrectly setting sql_nullable
Date
Msg-id 200909150240.n8F2eLkC068974@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5056: SQLDescribeColW for function returning a result set incorrectly setting sql_nullable  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5056
Logged by:          the6campbells
Email address:      the6campbells@gmail.com
PostgreSQL version: 8.4.1
Operating system:   windows
Description:        SQLDescribeColW for function returning a result set
incorrectly setting sql_nullable
Details:

create table TSET1 (RNUM integer not null, C1 integer, C2 char(3));

create function PRES ( )
returns setof TSET1 as
'
 select RNUM, C1, C2 from TSET1;
'  LANGUAGE 'sql'
;

in ODBC test sqlPrepare { call pres } then describe the columns. first
column should be SQL_NO_NULLS not NULLABLE.

Describe Column All:
                            icol, szColName, *pcbColName, *pfSqlType, *pcbColDef, *pibScale,
*pfNullable
                                        1, rnum, 4, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1
                                            2, c1, 2, SQL_INTEGER=4, 10, 0, SQL_NULLABLE=1
                                            3, c2, 2, SQL_WCHAR=-8, 3, 0, SQL_NULLABLE=1

pgsql-bugs by date:

Previous
From: Simon Riggs
Date:
Subject: GIN needs tonic
Next
From: Robert Haas
Date:
Subject: Re: BUG #5056: SQLDescribeColW for function returning a result set incorrectly setting sql_nullable