Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cIGym-0001UZ-FR for pgsql-bugs@arkaria.postgresql.org; Sat, 17 Dec 2016 15:32:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cIGyl-0007ZZ-Na for pgsql-bugs@arkaria.postgresql.org; Sat, 17 Dec 2016 15:32:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cIGyl-0007ZC-4F for pgsql-bugs@postgresql.org; Sat, 17 Dec 2016 15:32:55 +0000 Received: from gauss.credativ.com ([93.94.130.89]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cIGyi-0002A7-PY for pgsql-bugs@postgresql.org; Sat, 17 Dec 2016 15:32:54 +0000 Received: from gauss.credativ.com (localhost [127.0.0.1]) by gauss.credativ.com (Postfix) with ESMTP id 94C7F1E18E9; Sat, 17 Dec 2016 16:32:51 +0100 (CET) Received: from feivel.credativ.lan (aftr-109-91-34-122.unity-media.net [109.91.34.122]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mme@gauss.credativ.com) by gauss.credativ.com (Postfix) with ESMTPSA id 7C6521E18E8; Sat, 17 Dec 2016 16:32:51 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by feivel.credativ.lan (Postfix) with ESMTP id 2031E1AD0; Sat, 17 Dec 2016 16:32:51 +0100 (CET) Message-ID: <1481988771.2224.16.camel@postgresql.org> Subject: Re: BUG #14460: ecpg dynamic describe data types incorrect From: Michael Meskes To: pgsql-bugs@postgresql.org Cc: gary.cowell@gmail.com Date: Sat, 17 Dec 2016 16:32:51 +0100 In-Reply-To: <20161212153603.14901.48046@wrigleys.postgresql.org> References: <20161212153603.14901.48046@wrigleys.postgresql.org> Organization: PostgreSQL Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org > 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