Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 0C931650004 for ; Sun, 10 Aug 2008 14:11:24 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 48896-02 for ; Sun, 10 Aug 2008 14:11:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from obelix.askesis.nl (laudanum.demon.nl [82.161.125.16]) by postgresql.org (Postfix) with ESMTP id C52CB64FD2E for ; Sun, 10 Aug 2008 14:11:20 -0300 (ADT) thread-index: Acj7DBh4qvVSPAstQCKNcogzRV5z7Q== X-PMWin-Version: 2.6.1, Antivirus-Engine: 2.74.1 Received: from [172.31.1.1] ([172.31.1.1]) by obelix.askesis.nl with Microsoft SMTPSVC(5.0.2195.6713); Sun, 10 Aug 2008 19:11:14 +0200 Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 Subject: c type of int8 / serial8? From: "Joost Kraaijeveld" Reply-To: To: Content-Type: text/plain; charset="iso-8859-1" Organization: Askesis B.V. Date: Sun, 10 Aug 2008 19:11:14 +0200 Message-ID: <1218388274.4064.48.camel@panoramix.askesis.nl> MIME-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 10 Aug 2008 17:11:14.0770 (UTC) FILETIME=[1867E320:01C8FB0C] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/7 X-Sequence-Number: 9567 Hi, I wonder what the C type of int8 / serial8 is. If I use SQLGetTypeInfo() to get all the supported type is says that int8 is of SQL type SQL_BIGINT. It does not show any values for serial8 but I suppose that that is a user defined type and the driver is not required to show those (is that correct?). If I use SQLColumns() and get the data type from that function, is says for both int8 and serial8 that the SQL type is SQL_BIGINT. There is however not mapping for SQL_BIGINT to a C type. There is a mapping to a signed or unsigned 8 byte integer (SQL_C_SBIGINT or SQL_C_UBIGINT). From the docs (http://www.postgresql.org/docs/8.3/interactive/datatype.html , table 8.1) I see that int8 is a "signed eight-byte integer". For serial8 it only says "autoincrementing eight-byte integer". So I assume that int8 is actually SQL_C_SBIGINT, but I am unsure about serial8: is it signed or unsigned? Shouldn't both SQLGetTypeInfo and SQLColumns return SQL_C_SBIGINT for int8, and/or return SQL_C_SBIGINT/SQL_C_UBIGINT for serial8,. depending on the signed-ness? TIA -- Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 web: www.askesis.nl