Re: [gnome-db] Postgres: listing tables in a database
- From: Murray Cumming <murrayc murrayc com>
- To: gnome-db-list <gnome-db-list gnome org>
- Subject: Re: [gnome-db] Postgres: listing tables in a database
- Date: Thu, 25 Nov 2004 22:07:19 +0100
On Thu, 2004-11-25 at 21:32 +0100, Murray Cumming wrote:
> I am trying to get a list of the tables in each database on my Postgres
> server. I'm not sure how I'm meant to do this. I see two possibilities:
>
> 1. Use gda_connection_get_schema() with GDA_CONNECTION_SCHEMA_TABLES.
> According to this page, it takes a "name" parameter:
> http://www.gnome-db.org/docs/libgda/libgda-provider-class.html
>
> The page says that the parameter is a table name, but that makes no
> sense to me, so I hope it's actually a database name, but it seems to
> return the same list of tables regardless of the name parameter.
>
>
> 2. Use gda_connection_set_database(), hoping that it changes the
> behaviour of gda_connection_get_schema() with
> GDA_CONNECTION_SCHEMA_TABLES. But that does not seem to be implemented
> for Postgres:
>
> ** (libgdamm example:8312): CRITICAL **: file gda-server-provider.c:
> line 276 (gda_server_provider_change_database): assertion `CLASS
> (provider)->change_database != NULL' failed
I have now got phppgadmin working and I see that glom (using my libgda
code) has been putting all my tables into the user's default database,
so I guess this set_database() thing is important for more than just
listing the tables in a database.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]