What's the correct file extension I should be using for the newly created PostgreSQL schema that I created?

I have created a new schema for a new PostgreSQL database that I want to create (IF NOT EXISTING).

What should be the file extension for this document so that I can run it from psql, .dbu or .sql?

+3


source to share


1 answer


.dbu is used as a "Database Utility" file

You need to use .sql

Then from psql you can use something like:



SET search_path = schemaName, something_else;
SELECT * FROM tableName;        -- schemaName.tableName

      

or something like that depending on what you are trying to accomplish ...

+3


source







All Articles