CREATE TABLE AS statement in PostgreSQL