X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id BB37BD1E2AA for ; Tue, 16 Mar 2004 15:41:01 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 10183-05 for ; Tue, 16 Mar 2004 11:41:01 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 24484D1E28A for ; Tue, 16 Mar 2004 11:40:56 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i2GFeqNI024983; Tue, 16 Mar 2004 10:40:52 -0500 (EST) To: Gergely Czuczy Cc: Jan Klostermann , pgsql-interfaces@postgresql.org Subject: Re: DataType OID for PQexecParams-call in libpq In-reply-to: References: Comments: In-reply-to Gergely Czuczy message dated "Tue, 16 Mar 2004 14:36:45 +0100" Date: Tue, 16 Mar 2004 10:40:52 -0500 Message-ID: <24982.1079451652@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/14 X-Sequence-Number: 4793 Gergely Czuczy 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