Get the default values of table columns in Postgres?
问题 I'm looking for a way to run a query to find the default values of the columns of a table in Postgres. For example, if I made a table with the following query: **Editor's note: I fixed the table definition as it has no impact on the question. CREATE TABLE mytable ( integer int DEFAULT 2, text varchar(64) DEFAULT 'I am default', moretext varchar(64) DEFAULT 'I am also default', unimportant int ); I need a query that would tell me, in some format, that the default for integer is 2, text is 'I