Re: [HACKERS] PQftype implementation

2010-03-18 Thread Pavel Golub
Hello, Tom. Yes, you are absolutely right. My bad! Sorry guys! :) You wrote: TL> Pavel Golub writes: >> Here I created user-defined type "my_varchar" for internal tests. But >> PQftype returns 1043 (varchar oid) for the "info" column. TL> Really? I tried it and got 172069, which is about rig

Re: [HACKERS] PQftype implementation

2010-03-17 Thread Tom Lane
Pavel Golub writes: > Here I created user-defined type "my_varchar" for internal tests. But > PQftype returns 1043 (varchar oid) for the "info" column. Really? I tried it and got 172069, which is about right for where the OID counter is in my database. I think you messed up your test.

[HACKERS] PQftype implementation

2010-03-17 Thread Pavel Golub
Hello, Pgsql-hackers. The script: CREATE TYPE my_varchar; CREATE OR REPLACE FUNCTION my_varcharout(my_varchar) RETURNS cstring AS 'varcharout' LANGUAGE 'internal' IMMUTABLE STRICT COST 1; CREATE OR REPLACE FUNCTION my_varcharin(cstring, oid, integer) RETURNS my_varchar AS 'varcharin'

Re: [HACKERS] PQftype()

2001-04-30 Thread Tom Lane
"Magnus Naeslund\(f\)" <[EMAIL PROTECTED]> 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 cou

Re: [HACKERS] PQftype()

2001-04-30 Thread Magnus Naeslund\(f\)
From: "Tom Lane" <[EMAIL PROTECTED]> [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 knowledg

Re: [HACKERS] PQftype()

2001-04-30 Thread Magnus Naeslund\(f\)
From: "Tom Lane" <[EMAIL PROTECTED]> > "Magnus Naeslund\(f\)" <[EMAIL PROTECTED]> 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

Re: [HACKERS] PQftype()

2001-04-29 Thread Tom Lane
"Magnus Naeslund\(f\)" <[EMAIL PROTECTED]> writes: > Where do get a listing of what PQftype() can return to me? select oid, typname from pg_type regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through U

[HACKERS] PQftype()

2001-04-28 Thread Magnus Naeslund\(f\)
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 -=-=-=-=-=-=-=-=-=-=-=