Question

I have a basic question. I don't know how to specify the version of the database I want to create using pgadmin3. I'm running pgadmin3 version 1.16.1 and i thought I could create databases that were version 9.2 pgsql. But everytime I create a new database using the GUI and then I check the version, it's only at 9.1. Sorry for the remedial question, but I'm just new at postgresql and pgadmin3. thanks.

EDIT 1

One problem was that I didn't have the 9.1 version of postgres installed. so i just updated that package from 9.1 to 9.2... Then I used pgadmin3 to create a new database... and from the command-line, I connected to the new db to see what version it is and here's what I got:

me@mydevserver:~$ psql -U username testdb -h 127.0.0.1
Password for user openser: 
psql (9.2.4, server 9.1.9)
WARNING: psql version 9.2, server version 9.1.
         Some psql features might not work.
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.

testdb=# select version();
                                               version                                               
-----------------------------------------------------------------------------------------------------
 PostgreSQL 9.1.9 on i686-pc-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 32-bit
(1 row)

testdb=#

As you can see, the new testdb is still at 9.1.9. Can you tell me what I'm missing?

Thanks.

Was it helpful?

Solution

You can't create PostgreSQL database with version you want using SQL or any tool like PgAdmin. Database version is a PostgreSQL server software version and can be changed only by upgrading or downgrading it. This task is sometimes tricky because of some incompatibilities between versions - especially when downgrading.

It's possible to have two or more PostgreSQL running servers (the same or different version) on the same machine - they must listen on different sockets/ports.

To summarize - when you make a connection to specific PostgreSQL server, all databases you create and access are in the same version as PostgreSQL server version.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top