How to retreive data type, size, precision and scale of all columns of a particular table in postgresql with a single sql statement?
The table can have columns of the data types ( 'int2','int4','int8','float4','float8','numeric','varchar','char','date','timestamp'). If precision/scale are not applicable for a particular data type we can leave it as null.
I should not use INFORMATION_SCHEMA for this because though this schema is built-in we can drop this schema. SO i wrote code using this schema and if some how the customer drops this schema my code breaks. I just want to use pg_catalog
tables/views.
INFORMATION_SCHEMA
. Can someone explain?