Home  |  Linux  | Mysql  | PHP  | XML
Date:Fri Feb  3 16:52:23 2012
Subject:feature request
Hi,
I need to get the type for a column from query result, but for
Postgres user defined types (composite types) I cannot find DBD::Pg
field that contains such a info.
For example for the query:
select A as class_record from pg_class A;

in the resulting DBI statement I have:
$$sth{TYPE}[0]: 0
$$sth{pg_type}[0]: 'unknown'

when the pqlib call PQftype() returns actual OID of the pg_class type.

Currently all calls to PQftype() are wrapped around pg_type_data()
(for example pg_type_data((int)PQftype(imp_sth->result, fields)), and
pg_type_data() always returns NULL if the type is not standard.

I think if the result of PQftype() can be stored in a new pg specific
field (for example pg_type_oid) this will give a way of using composit
types without changing current behavior of the driver ?

Best regards!
Manol
Navigate in group perl.dbd.pg at sever nntp.perl.org
Previous Next





  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants