Thursday , November 21 2024

Create Database In Postgresql Command Line

In today’s article, we will create and delete a database without using the Psql client.

We go to the /usr/pgsql-13/bin/ directory. With the help of the programs here, we can create a database without using the psql client, create and delete users, take backups, take dumps and more.

Yes, let’s create a database as an example.

And let’s check \l+ by connecting again

Yes, as you can see, our database has been created, now let’s delete it. Let’s delete the database we created using dropdb in the same folder.

If you want to be a database administrator, you need to think twice and check and press each drop operation.

If you delete the database or object in running systems, it will be difficult and tedious to return. Yes, we are deleting the database after much thought.

Yes, after deleting our database, let’s check it with the \l+ command.

 

Loading

About Faruk Erdem

Leave a Reply

Your email address will not be published. Required fields are marked *