Skip site navigation (1) Skip section navigation (2)

Re: sqlDescribeCol not setting null flag correctly for sqlDescribeCol

From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: the6campbells <the6campbells(at)gmail(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: sqlDescribeCol not setting null flag correctly for sqlDescribeCol
Date: 2009-09-30 06:22:24
Message-ID: 4AC2F920.1000403@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-odbc
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


In response to

pgsql-odbc by date

Next:From: Hiroshi InoueDate: 2009-09-30 12:53:56
Subject: Re: PsqlODBC with a SSL connection
Previous:From: Ramon DiscuaDate: 2009-09-29 20:35:41
Subject: Re: cannot find pg_hba.conf file

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group