I need to access the structure of a table in a python script, so \d is not available -- I need to access the structure of a table using sql commands. (Also, \d is not working from psql anyway, because my workstation has the postgresql 8.2 client, while the server is running postgresql 7.4.)
In sqlite, for all tables, this is easy:
SELECT * FROM sqlite_master WHERE type='table'
I have looked up and down the internet for a postgresql answer, but so far with no luck.
I would appreciate the answer or some inspiration.
Thanks,
In sqlite, for all tables, this is easy:
SELECT * FROM sqlite_master WHERE type='table'
I have looked up and down the internet for a postgresql answer, but so far with no luck.
I would appreciate the answer or some inspiration.
Thanks,
Comment