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

From: Mary Anderson <maryfran(at)demog(dot)berkeley(dot)edu>
To: pgsql-novice(at)postgresql(dot)org
Subject: Connect to database with php pg_connect, cannot find table even though it shows up on psql connection
Date: 2009-10-01 15:40:47
Message-ID: 4AC4CD7F.9030001@demog.berkeley.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi gang,

I have a database named fubar. That database has a table named
do_s. I run a php command
pg_connect(" host=myHost user=myUsername password=myPassword
dbname=fubar")
which executes successfully. When I run a postgresql command
against do_s I am told the relation does not exist.
When I connect using psql I can find the table with no problem. The
table is in the public schema. It was not created with capital letters
in its name. Looking for public.do_s does not help.

I would like to know a postgresql command which tells me the name of
the database I am connected to.

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!

Thanks

Mary Anderson

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message dvanatta 2009-10-01 16:15:24 Moving from MS SQL Server to PostgreSql 8.3
Previous Message Ounce Snow 2009-09-30 11:57:27 error message on install