In psql, psql>\d tableName

Query is

SELECT pg_catalog.format_type(a.atttypid, a.atttypmod) from pg_attribute a, pg_class c where a.attrelid =c.oid and c.relname='TableName' and a.attname='ColName';

Zdenek Kotala wrote:

Look at

Specially on pg_attribute, pg_class and pg_type table. Or you can use some features in the psql.


Indira Muthuswamy napsal(a):

Can anyone of you help me in finding the datatype of a particular column in a table in Postgres? Thanks and Regards,

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to