dbTalk Databases Forums  

Base type OIDs

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss Base type OIDs in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dan Sugalski
 
Posts: n/a

Default Base type OIDs - 10-26-2004 , 01:26 PM






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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: Base type OIDs - 10-26-2004 , 02:41 PM






Dan Sugalski <dan (AT) sidhe (DOT) org> writes:
Quote:
DB error is: ERROR: unsupported format code: 1043
You're putting it in the format parameter, not the datatype parameter
....

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html



Reply With Quote
  #3  
Old   
Dan Sugalski
 
Posts: n/a

Default Re: Base type OIDs - 10-26-2004 , 02:59 PM



At 3:41 PM -0400 10/26/04, Tom Lane wrote:
Quote:
Dan Sugalski <dan (AT) sidhe (DOT) org> writes:
DB error is: ERROR: unsupported format code: 1043

You're putting it in the format parameter, not the datatype parameter
D'oh! Darned reused array pointers...

Thanks.
--
Dan

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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.