BUG #5051: SQLNumResultCols returns 0 for common table expression

From: "the6campbells" <the6campbells(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5051: SQLNumResultCols returns 0 for common table expression
Date: 2009-09-12 23:13:41
Message-ID: 200909122313.n8CNDf2M057987@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 5051
Logged by: the6campbells
Email address: the6campbells(at)gmail(dot)com
PostgreSQL version: 8.4.1
Operating system: windows
Description: SQLNumResultCols returns 0 for common table expression
Details:

"PostgreSQL 8.4.1, compiled by Visual C++ build 1400, 32-bit". Using 8.4.0.1
UNICODE ODBC driver.

sqlnumresultcols returns 0 for queries using common table expression.

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

using odbctest

sqlPrepare
with t_cte ( cte1, cte2 ) as ( select tset1.c1, tset1.c2 from tset1 )select
* from t_cte

SQLPrepare:
In:StatementHandle = 0x00841B10, StatementText = "with t_cte ( cte1, cte2 )
as ( select tset1.c1, ts...", TextLength = 88
Return: SQL_SUCCESS=0

SQLNumResultCols:
In:StatementHandle = 0x00841B10, ColumnCountPtr = 0x0009ED90
Return: SQL_SUCCESS=0
Out:*ColumnCountPtr = 0

Browse pgsql-bugs by date

  From Date Subject
Next Message Joe Conway 2009-09-12 23:22:32 Re: dblink generates orphaned connections
Previous Message Tom Lane 2009-09-12 19:58:20 Re: BUG #5050: text to timestamp failure