Re: [PHP-DB] postgresql field size information

2004-05-27 Thread Cornelia Boenigk
Hi Try select attname, format_type(atttypid, atttypmod), col_description(attrelid, attnum) from pg_attribute, pg_class c where c.oid = attrelid and attnum > 0 and c.relname = 'tablename' ; Regards Conni -- Datenbanklösungen + PostgreSQL + Webdesign http://www.cornelia-boenigk.de | http://www.pg

[PHP-DB] postgresql field size information

2004-05-27 Thread Scot L. Harris
I need to get the size of the fields defined in a postgresql table for use in my PHP script. For instance: $fieldname = pg_field_name($stat,$i); $size = pg_field_size($stat,$i); $type = pg_field_type($stat,$i); I tried using pg_field_size but for char type fields it returns a -1 indicating the f