Re: Connect to database with php pg_connect, cannot find table even though it shows up on psql connection - Mailing list pgsql-novice

From Tom Lane
Subject Re: Connect to database with php pg_connect, cannot find table even though it shows up on psql connection
Date
Msg-id 20540.1254414308@sss.pgh.pa.us
Whole thread Raw
In response to Connect to database with php pg_connect, cannot find table even though it shows up on psql connection  (Mary Anderson <maryfran@demog.berkeley.edu>)
List pgsql-novice
Mary Anderson <maryfran@demog.berkeley.edu> writes:
>     I would like to know a postgresql command which tells me the name of
> the database I am connected to.

select current_database();

>      I suspect the system is doing something funny and have contacted
> our sysadmin people, who are doing all kinds of things to our network as
> a result of our being hacked a couple of weeks ago.  But it would help
> to know the name of the database I actually connected to!

You should also consider the possibility that you're connected to the
wrong server.  A network-level issue seems more likely to lead to
that...

            regards, tom lane

pgsql-novice by date:

Previous
From: Mary Anderson
Date:
Subject: Connect to database with php pg_connect, cannot find table even though it shows up on psql connection
Next
From: paresh masani
Date:
Subject: usage of spi_prepare from PL/Perl