Обсуждение: Change or get currentdb

Поиск
Список
Период
Сортировка

Change or get currentdb

От
"Sergiy Ovcharuk"
Дата:
Hi, All!
Sorry for newby question...

How can I change and/or get to know a current db name using sql script in
PostgreSQL?

Thanks,
Sergiy.

P.S. it seems use <db_name> doesn't work :-(






Re: Change or get currentdb

От
David Olbersen
Дата:
From \?\c[onnect] [dbname|- [user]]                connect to new database (currently '<db you're in>')

so typing "\c" gives you the database you're currently connected to and
"\c <database>" would connect you to that database.


On Thu, 25 Jan 2001, Sergiy Ovcharuk wrote:

->How can I change and/or get to know a current db name using sql script in
->PostgreSQL?

-- Dave