Is any way to check a database is already exists or not in PostgreSQL?
Iam a new one in PostgreSQL. And also need to check it from my java application via jdbc driver.
Is any way to check a database is already exists or not in PostgreSQL? Iam a new one in PostgreSQL. And also need to check it from my java application via jdbc driver. |
||||
There is no You can check You would need to do this via dblink, because of the limitation Frank points out in the comments:
|
|||||||||
|
I found an alternate solution for this problem. By using the following query :
Its work fine |
|||
|
\h CREATE DATABASE
in psql - no need to even open the manual. – Craig Ringer Nov 15 '12 at 11:42