Re: [BUGS] BUG #14460: ecpg dynamic describe data types incorrect - Mailing list pgsql-bugs

From Michael Meskes
Subject Re: [BUGS] BUG #14460: ecpg dynamic describe data types incorrect
Date
Msg-id 1481988771.2224.16.camel@postgresql.org
Whole thread Raw
In response to [BUGS] BUG #14460: ecpg dynamic describe data types incorrect  (gary.cowell@gmail.com)
List pgsql-bugs
> Then run an ecpg program to select and describe the data, the data
> types
> come back as:
> 
> a = var (type: 1)
> b = text (type: 1)
> c = char       (type: 1)
> d = 1 (type: 5)
> 
> I.e. the sqlda data types for the CHAR , VARCHAR and TEXT columns, is
> all
> type 1.

CHAR and TEXT should be the same. However, varchar should be different
IIRC. There is definitely a case that maps VARCHAROID
to SQL3_CHARACTER_VARYING which equals 12. Does the log file, if you
enable debugging, show the same type information?

> According to ecpgtype.h
> ...

ecpgtype.h is PostgreSQL internal type information, the descriptor is
supposed to handle types as defined by the standard. Those definitions
are in sql3types.h.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: Alexey Ermakov
Date:
Subject: Re: [BUGS] BUG #14469: Wrong cost estimates for merge append planwith partitions.
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #14469: Wrong cost estimates for merge append plan with partitions.