DEV Community


"use database_name" with PostgreSQL

Linh Truong Cong Hong
・1 min read

I want to write a SQL file that when we run the SQL Script, it will create the database with its tables and insert values into those tables.

However, with PostgreSQL, it is impossible to use the systax "use database_name" after creating the database. Therefore, it is impossible for me to switch the database and start creating table.

Is there any way to solve this problem? Why PostgreSQL development team decide to eliminate this function from this interesting ORDBMS?

Discussion (0)

Forem Open with the Forem app