[gnome-db] Postgres: listing tables in a database
- From: Murray Cumming <murrayc murrayc com>
- To: gnome-db-list gnome org
- Subject: [gnome-db] Postgres: listing tables in a database
- Date: Thu, 25 Nov 2004 21:32:51 +0100
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
--
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]