Where do get a listing of what PQftype() can return to me?
(that is what type the field/col has, need a list of Oid's i believe)

Magnus

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Programmer/Networker [|] Magnus Naeslund
 PGP Key: http://www.genline.nu/mag_pgp.txt
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Sun, 29 Apr 2001 00:13:20 +0200
"Magnus Naeslund\(f\)" <mag@fbab.net>
PQftype()
"Magnus Naeslund\(f\)" <mag@fbab.net> writes:
> Where do get a listing of what PQftype() can return to me?

select oid, typname from pg_type

			regards, tom lane

Mon, 30 Apr 2001 00:31:42 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: PQftype() 
From: "Tom Lane" <tgl@sss.pgh.pa.us>
> "Magnus Naeslund\(f\)" <mag@fbab.net> writes:
> > Where do get a listing of what PQftype() can return to me?
> 
> select oid, typname from pg_type
> 
> regards, tom lane

Does these change often?
Or could i do like the ODBC driver, autogenerate a .h out of that table.

Magnus

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Programmer/Networker [|] Magnus Naeslund
 PGP Key: http://www.genline.nu/mag_pgp.txt
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Tue, 1 May 2001 00:06:03 +0200
"Magnus Naeslund\(f\)" <mag@fbab.net>
Re: PQftype() 
"Magnus Naeslund\(f\)" <mag@fbab.net> writes:
> Where do get a listing of what PQftype() can return to me?
>> 
>> select oid, typname from pg_type

> Does these change often?

The system type OIDs are stable.  User-defined types would probably have
a new OID after a dump and reload.

> Or could i do like the ODBC driver, autogenerate a .h out of that table.

I would not recommend relying on compiled-in OID knowledge for any types
other than the system-defined datatypes.  If you expect to have to deal
with user-defined types, it's best to cache the results of pg_type
lookups at the client end.  You need not worry about OIDs changing
during a single client connection.

			regards, tom lane

Mon, 30 Apr 2001 18:11:54 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: PQftype() 
From: "Tom Lane" <tgl@sss.pgh.pa.us>
[snip]
>
> The system type OIDs are stable.  User-defined types would probably have
> a new OID after a dump and reload.
>
> > Or could i do like the ODBC driver, autogenerate a .h out of that table.
>
> I would not recommend relying on compiled-in OID knowledge for any types
> other than the system-defined datatypes.  If you expect to have to deal
> with user-defined types, it's best to cache the results of pg_type
> lookups at the client end.  You need not worry about OIDs changing
> during a single client connection.
>
> regards, tom lane
>

Ok, then i can use static thing for my application (for now atleast).
Thanks..

Magnus


Tue, 1 May 2001 00:13:49 +0200
"Magnus Naeslund\(f\)" <mag@fbab.net>
Re: PQftype() 