Day: May 20, 2020

Enterprise PostgreSQL Solutions

CREATE TABLE one_column_table (field INTEGER); The above SQL creates ‘one_column_table’ with only a single column. But does the table actually have only one column? Let’s query the pg_attribute catalog to find out how many columns our one_column_table has. SELECT attname, attnum, atttypid::regtype from pg_attribute WHERE attrelid = 'one_column_table'::regclass; attname | attnum