pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Meskes <meskes@postgresql.org>
To: pgsql-bugs@postgresql.org
Cc: gary.cowell@gmail.com
Subject: Re: BUG #14460: ecpg dynamic describe data types incorrect
Date: Sat, 17 Dec 2016 16:32:51 +0100
Message-ID: <1481988771.2224.16.camel@postgresql.org> (raw)
In-Reply-To: <20161212153603.14901.48046@wrigleys.postgresql.org>
References: <20161212153603.14901.48046@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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



view thread (2+ messages)

Message-ID: <1481988771.2224.16.camel@postgresql.org>
Permalink:  ../1481988771.2224.16.camel@postgresql.org/
Also on:    postgresql.org/message-id/1481988771.2224.16.camel@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: meskes@postgresql.org, gary.cowell@gmail.com
  Subject: Re: BUG #14460: ecpg dynamic describe data types incorrect
  In-Reply-To: <1481988771.2224.16.camel@postgresql.org>
  References: <20161212153603.14901.48046@wrigleys.postgresql.org> <1481988771.2224.16.camel@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox