Skip site navigation (1) Skip section navigation (2)

Re: Can't get list of databases with \list

From: Christopher Frank <c(dot)frank(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Can't get list of databases with \list
Date: 2009-11-02 20:34:52
Message-ID: bedec1780911021234r4872a79j636753de4b492683@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Mon, Nov 2, 2009 at 2:30 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Christopher Frank <c(dot)frank(at)gmail(dot)com> writes:
> > Issuing a query of "\list" using jdbc doesn't seem to work:
>
> Nope, it won't, because \list is a psql-ism.
>
> If you want to exactly duplicate that you could run psql with -E and
> look at the queries it issues and copy them (but beware that they are
> backend-version-dependent).  However, I was under the impression that
> JDBC had its own set of standard metadata inquiry operations.  You'd
> probably be better off using those if they cover what you need.
>
> I'm not sure how many JDBC hackers hang out here; you might be better
> advised to ask on the pgsql-jdbc list.
>
>                        regards, tom lane
>

Thanks Tom. Your recommendation eventually led me to this
thread<http://archives.postgresql.org/pgsql-php/2004-03/msg00002.php>.
The query mentioned there is basically what \list does, just a little
simpler. It looks like I can probably use that without worrying about
different versions.

As for JDBC, there may be something that gives equivalent information, but I
couldn't find it.

In response to

Responses

pgsql-novice by date

Next:From: Michael WoodDate: 2009-11-02 20:43:39
Subject: Re: Install problems for postgresql-8.4.1
Previous:From: Mark H. NicholsDate: 2009-11-02 19:41:37
Subject: Re: Install problems for postgresql-8.4.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group