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

Search Discussions

  • Tom Lane at Oct 1, 2009 at 4:25 pm

    Mary Anderson 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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedOct 1, '09 at 4:02p
activeOct 1, '09 at 4:25p
posts2
users2
websitepostgresql.org
irc#postgresql

2 users in discussion

Mary Anderson: 1 post Tom Lane: 1 post

People

Translate

site design / logo © 2022 Grokbase