From: | Pavel Golub <pavel(at)microolap(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | PQftype implementation |
Date: | 2010-03-17 09:06:26 |
Message-ID: | 1344850905.20100317110626@gf.microolap.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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'
LANGUAGE 'internal' IMMUTABLE STRICT
COST 1;
CREATE TYPE my_varchar
(INPUT=my_varcharin, OUTPUT=my_varcharout, DEFAULT='',
INTERNALLENGTH=-1, ALIGNMENT=int4, STORAGE=EXTENDED,
TYPMOD_IN=varchartypmodin, TYPMOD_OUT=varchartypmodout);
CREATE TABLE my_varchar_test(
id serial primary key,
info my_varchar(100)
)
Here I created user-defined type "my_varchar" for internal tests. But
PQftype returns 1043 (varchar oid) for the "info" column.
I'm a little bit confused of such behaviour. What am I missing?
Ans where in the sources can I find the way server fills
res->attDescs[field_num].typid?
Thanks in advance.
--
With best wishes,
Pavel mailto:pavel(at)gf(dot)microolap(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2010-03-17 09:37:04 | Command to prune archive at restartpoints |
Previous Message | Gokulakannan Somasundaram | 2010-03-17 08:30:12 | Re: Bug in 9.0Alpha4 |