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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mary Anderson <maryfran(at)demog(dot)berkeley(dot)edu>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Connect to database with php pg_connect, cannot find table even though it shows up on psql connection
Date: 2009-10-01 16:25:08
Message-ID: 20540.1254414308@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Mary Anderson <maryfran(at)demog(dot)berkeley(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message paresh masani 2009-10-02 11:44:33 usage of spi_prepare from PL/Perl
Previous Message dvanatta 2009-10-01 16:15:24 Moving from MS SQL Server to PostgreSql 8.3