pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
To: pgsql-odbc@postgresql.org
Subject: c type of int8 / serial8?
Date: Sun, 10 Aug 2008 19:11:14 +0200
Message-ID: <1218388274.4064.48.camel@panoramix.askesis.nl> (raw)

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




view thread (4+ messages)  latest in thread

Message-ID: <1218388274.4064.48.camel@panoramix.askesis.nl>
Permalink:  ../1218388274.4064.48.camel@panoramix.askesis.nl/
Also on:    postgresql.org/message-id/1218388274.4064.48.camel@panoramix.askesis.nl

 · 

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-odbc@postgresql.org
  Cc: J.Kraaijeveld@Askesis.nl
  Subject: Re: c type of int8 / serial8?
  In-Reply-To: <1218388274.4064.48.camel@panoramix.askesis.nl>
  References: <1218388274.4064.48.camel@panoramix.askesis.nl>

* 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