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'