agora inbox for pgsql-interfaces@postgresql.org  
help / color / mirror / Atom feed
From: Hoon H. <drawtree@gmail.com>
To: pgsql-interfaces@postgresql.org
Cc: Hoon H. <drawtree@gmail.com>
Subject: Is it safe to use fundamental type OIDs defined in server/catalog/pg_type.h from client?
Date: Fri, 6 Dec 2013 05:43:13 +0900
Message-ID: <69AD5777-82E3-4442-8EB6-DC7395C3D4BD@gmail.com> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-interfaces>

Hello folks.

I am writing a C/C++ program which uses `libpq`. I am stuck at getting result from PQresult because I want to parse text from result automatically by its type OID value. But it's unclear how I should handle type informations. 
What I need is only fundamental built-in types - boolean, int, float, text, timestamp, binary. Maybe adding some system required system - such as OID type itself. The problem is OID constant values for built-in types are not defined in client-side.

According to some mailing list entries, 

http://www.postgresql.org/message-id/20080708000535.GA10491@cuci.nl
http://www.postgresql.org/message-id/AANLkTimiNjQa7ws1tyR_W6RQPec6RlxQtWfACNMnZ_1P@mail.gmail.com

It seems safe to use macros defined in `server/catalog/pg_type.h`, but I still doubt because I couldn't find any official policy on these values. 
Though I agree people on the mailing list entries, but still this is completely up to dev-team's decision. Can I ask some official policy on these values - OID values for built-in types?

If there's some publicly existing policy, please drop me some link. It's too hard to find it.

-- 
Sent via pgsql-interfaces mailing list (pgsql-interfaces@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-interfaces



view thread (2+ messages)  latest in thread

Message-ID: <69AD5777-82E3-4442-8EB6-DC7395C3D4BD@gmail.com>
Permalink:  ../69AD5777-82E3-4442-8EB6-DC7395C3D4BD@gmail.com/
Also on:    postgresql.org/message-id/69AD5777-82E3-4442-8EB6-DC7395C3D4BD@gmail.com

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: drawtree@gmail.com
  Subject: Re: Is it safe to use fundamental type OIDs defined in server/catalog/pg_type.h from client?
  In-Reply-To: <69AD5777-82E3-4442-8EB6-DC7395C3D4BD@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox