can you retrieve data type and length from PostgreSQL?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
myleow
Forum Contributor
Posts: 194
Joined: Mon Jun 21, 2004 7:05 pm
Location: California

can you retrieve data type and length from PostgreSQL?

Post by myleow »

I know you can retrieve column names using pg_fieldname. Has anyone been able to retrieve the data type associated to that column and the data length contrain of that column?

It would make much better error checking if that is possible.

Thank you in advance.

Regards
Mian
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

pg_meta_data()
Post Reply