Re: Data type OIDs

From: Greg <grigorey(at)yahoo(dot)co(dot)uk>
To: Thom Brown <thombrown(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Data type OIDs
Date: 2010-07-07 08:15:39
Message-ID: 21863.31084.qm@web24305.mail.ird.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmail(dot)com> wrote:

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

On 6 July 2010 23:12, Greg <grigorey(at)yahoo(dot)co(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message CJ Combrink 2010-07-07 09:58:26 Tablespaces
Previous Message Jesper Krogh 2010-07-07 04:53:59 Re: Dropped table, no backup, restore from file system backup or WAL files?