logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: DataType OID for PQexecParams-call in libpq: msg#00012

Subject: Re: DataType OID for PQexecParams-call in libpq
Gergely Czuczy <phoemix@xxxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>