Psql - 'database does not exists' while it does and was created in Valentina Studio

I have started to learn about SQL and installed Valentina Studio & PSQL on my Ubuntu.

I have defined a password via sudo -u postgres psql postgres and then \password postgres.

Then I have entered Valentina Studio and connected to this server with 'discover localhost server- it found thePostgresSQL` and I entered the password that I set up before in the terminal and it looked ok and like it was connected.

I have created 4 empty new databases in the VStudio and tried to import to them some databases which are located on my desktop.

I got the database does not exist while it sure does as you can see in the screenshot. When I tried to do the same with template1 the skelton database of psql, it worked.

But why the Vstudio and the PSQL are not connected to each other?

enter image description here

1 answer

  • answered 2021-10-23 15:13 Adrian Klaver

    Example of recreating template1 database in psql as postgres user.

    update pg_database set datistemplate = 'f' where datname = 'template1';
    drop database template1;
    create database template1 template template0 is_template true ;

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum