How to find the database name during run-time

From: Dave Blasby <dblasby(at)refractions(dot)net>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: How to find the database name during run-time
Date: 2001-08-01 17:58:40
Message-ID: 3B684350.45CA9812@refractions.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have a function (plpgsql) and would like it to have access to the name
of the current database. Unfortunately, I dont know how to ask the
question.

I've look in the documentation, and I can get a list of possible
databases from pg_database, but I dont know which one I'm currently in.

dave

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Padgett 2001-08-01 17:58:45 Patch for Improved Syntax Error Reporting
Previous Message Dave Blasby 2001-08-01 17:55:11 Accessing different databases in a cluster