Re: Data type OIDs - Mailing list pgsql-novice

From Greg
Subject Re: Data type OIDs
Date
Msg-id 21863.31084.qm@web24305.mail.ird.yahoo.com
Whole thread Raw
In response to Re: Data type OIDs  (Thom Brown <thombrown@gmail.com>)
Responses Re: Data type OIDs
List pgsql-novice

Hi Thom, well, it relates to reading/writing data using PostgreSQL protocol (v3). For example RowDescription message uses type OID to identify data type of the field. Same as with Parse message I need to specify OID of the parameter data type. As a result I want to declare an enum of all used data types and assignd PostgreSQL data type OID to appropriate value  - so development could be a little more intuitive.

Background: as part of my summer project I have to create fast .NET (C#) provider to work with PostgreSQL database. Right now I have implemented connectivity and simple query handling. So now it all about extended query handling.

Oh and I have another question (that may not realate to this post as all): Is it possible to send Parse,  Bind and Execute messages in a single batch to the database without sending them one by one and  waiting for appropriate result?


Thanks!


--- On Tue, 6/7/10, Thom Brown <thombrown@gmail.com> wrote:


From: Thom Brown <thombrown@gmail.com>
Subject: Re: [NOVICE] Data type OIDs
To: "Greg" <grigorey@yahoo.co.uk>
Cc: pgsql-novice@postgresql.org
Date: Tuesday, 6 July, 2010, 23:15

On 6 July 2010 23:12, Greg <grigorey@yahoo.co.uk> wrote:
Hi all, just a very quick question: Does OID of each data type stays the same in any installation of PostgreSql and when database is used e.g. OID for data type "bool" is 16, "char" is 18 etc. Or is the case that this identifiers can change?

Thanks!


I'm worried that the reason that you're asking is because you wish to use the oids elsewhere.  Don't rely on oids.  Those are for internal use only.  Have a look at pg_type for information on data types.

Why exactly are you asking?  What are you trying to do?

Thom

pgsql-novice by date:

Previous
From: Jesper Krogh
Date:
Subject: Re: Dropped table, no backup, restore from file system backup or WAL files?
Next
From: "CJ Combrink"
Date:
Subject: Tablespaces