Base type OIDs

From: Dan Sugalski <dan(at)sidhe(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Base type OIDs
Date: 2004-10-26 18:26:49
Message-ID: a0620050abda441dec326@[172.24.18.155]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to properly tag the types of the parameters I'm passing
into PQexecParams, as it seems to be the right thing to do, and it's
not that big a deal given my existing code base. Unfortunately I'm
running into a problem figuring out what I should be using for the
tag numbers.

I originally thought that the enum in include/ecpgtype.h was the
place to go, but no joy there -- those numbers weren't right. (Or at
least they threw errors) So instead I tried
src/include/catalog/pg_type.h for the type numbers. (Which seemed a
better bet, as the docs for PQftype say to reference this file)
Unfortunately this isn't working either. I'm trying to use these base
type numbers:

text data: 1043
numbers: 1700
dates: 1082

which correspond to the VARCHAROID, NUMERICOID, and DATEOID
constants. It *seems* right, but when I do I get back the error:

DB error is: ERROR: unsupported format code: 1043

I'm at a bit of a loss right now. What *should* I be using here? (Or
is there something simple that I'm missing?)
--
Dan

--------------------------------------it's like this-------------------
Dan Sugalski even samurai
dan(at)sidhe(dot)org have teddy bears and even
teddy bears get drunk

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Barnard 2004-10-26 18:32:25 Re: what could cause inserts getting queued up and db locking??
Previous Message Tim Vadnais 2004-10-26 17:55:00 field incrementing in a PL/pgSQL trigger