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
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.
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'
"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
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
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
"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
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
-=-=-=-=-=-=-=-=-=-=-=