Bug #445: SQLDescribeCol() returns "wrong" info - Mailing list pgsql-bugs

From pgsql-bugs@postgresql.org
Subject Bug #445: SQLDescribeCol() returns "wrong" info
Date
Msg-id 200109091458.f89Ew4U23871@hub.org
Whole thread Raw
List pgsql-bugs
Jim Dickenson (dickenson@cfmc.com) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
SQLDescribeCol() returns "wrong" info

Long Description
Running PostgreSQL 7.0.3 on Red Hat Linux 7.1 system using
gcc 2.96.

When I call SQLDescribeCol() for a column that has been  defined as decimal(10,3) or numeric(10,3), as an example, I
wouldexpect the values in ColumnSizePtr and DecimalDigitsPtr to be 10 and 3, not 655363 and 0. Additionally I would
expectDataTypePtr to be 2 and not 12. 

I need to be able to find an accurate description for the attributes
of each column returned for a select statement. It seems to me that SQLDescribeCol() should do that.

It seems to me that in order for ODBC to work with different data sources all ODBC drivers need to conform to a
standard.If one driver returns one set of values and another driver returns another set of values, for what I think is
thesame basic table column, then the point of ODBC to be data source neutral is lost. 



Sample Code
I create a table in psql. I write an application that opens the database containing the table. I call SQLPrepare with
"select * from tabname".
I call SQLDescribeCol() to get the resulting meta data.


No file was uploaded with this report

pgsql-bugs by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #444: create table xy as select a,b from t_a left join t_b on cond fails in PL/pgSQL
Next
From: Alessandro Rossi
Date:
Subject: BUG in 7.1.3 (fwd)