From: Tom Lane <tgl@sss.pgh.pa.us>
To: Gergely Czuczy <phoemix@harmless.hu>
Cc: Jan Klostermann <klostermann@rhf.de>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: DataType OID for PQexecParams-call in libpq
Date: Tue, 16 Mar 2004 10:40:52 -0500
Message-ID: <24982.1079451652@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.44.0403161435200.22549-100000@localhost>
References: <Pine.LNX.4.44.0403161435200.22549-100000@localhost>
Gergely Czuczy <phoemix@harmless.hu> writes:
> please take a look at the documentation at
> http://www.postgresql.org/docs/7.4/static/libpq-exec.html
> at the point "PQftype", where it's said:
> " The OIDs of the built-in data types are defined in the file
> src/include/catalog/pg_type.h in the source tree."
Also, you can get the OID on the fly, eg with
SELECT oid FROM pg_type WHERE typname = ...
For standard built-in types it's okay to hard-wire OID values into your
code, but if you want to be able to deal with user-defined types you
shouldn't rely on the OID being constant.
regards, tom lane
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: tgl@sss.pgh.pa.us, phoemix@harmless.hu, klostermann@rhf.de
Subject: Re: DataType OID for PQexecParams-call in libpq
In-Reply-To: <24982.1079451652@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox