View Single Post
  #2   (View Single Post)  
Old 1st April 2014
LeFrettchen's Avatar
LeFrettchen LeFrettchen is offline
Marveled user
 
Join Date: Aug 2012
Location: France
Posts: 387
Default

You can do the same with the PostgreSQL function CURRENT_DATABASE() :

Code:
postgres=# select current_database() ;
 current_database
------------------
 postgres
(1 row)

postgres=#
Oh, and... well, the title is not really good, isn't it ?
That's not the default database, but the current database, right ?
__________________
ThinkPad W500 P8700 6GB HD3650 SSD
ThinkStation P700 2x2620v3 32GB 1050ti SSD 3xHDD
Reply With Quote