I am using PostgreSQL 9.3 pg_dump
tool for extracting only the public schema definition using:
pg_dump -s -n public -h host -U postgres --dbname=db > ./schema.sql
but when I check schema.sql
one of our views appears in a CREATE TABLE
statement instead of a CREATE VIEW
statement.
But, if I pg_dump
the specific view using:
pg_dump -s -t myview -h host -U postgres --dbname=db > ./schema.sql
then schema.sql
contains the actual view definition.
So, why is this happening? Thank you guys!