Re: [gnome-db]Not all tables in PostgreSQL
- From: Vivien Malerba <malerba TorresQuevedo HispaLinux es>
- To: Rodrigo Moya <rodrigo gnome-db org>
- Cc: adam morrison-ind com, awilliam whitemice org, gnome-db-list gnome org
- Subject: Re: [gnome-db]Not all tables in PostgreSQL
- Date: Thu, 26 Jul 2001 17:01:32 +0200
On Thu, Jul 26, 2001 at 01:46:46PM +0200, Rodrigo Moya wrote:
> On 26 Jul 2001 07:24:12 -0400, Adam Tauno Williams wrote:
> > >>Is there a known problem with table enumeration? I create a new
> > >>PostgreSQL database with one table and one sequence. I attached with
> > >>gnomedb-fe and gASQL to see if it worked and it did! Then I added a few
> > >>more tables and sequences and .... they don't show up in either
> > >>gnomedb-fe or gASQL. I can see them in psql using "\d". I've restarted
> > >>the applications, logged out and back in, etc... but can't get the
> > >>tables.
> > >I have never seen this problem before.
> > >
> > > " SELECT a.realname AS \"Name\" "
> > > " FROM pg_class a, pg_user b "
> > > "WHERE ( relkind = 'r') and relname !~ '^pg_' "
> > > "AND relname !~ '^xin[vx][0-9]+' AND "
> > > "b.usesysid = a.relowner AND "
> > > "NOT (EXISTS (SELECT viewname FROM pg_views "
> > > "WHERE viewname=a.relname)) ");
> > >That's the query the postgres provider does to get the list of tables
> > >from the postgres server. Maybe the names of your tables don't match the
> > >"AND relname !~ '^xin[vx][0-9]+'" condition?
> >
> > ~ $ cat test.sql
> > SELECT a.relname AS Name
> > FROM pg_class a, pg_user b
> > WHERE ( relkind = 'r') and relname !~ '^pg_'
> > AND relname !~ '^xin[vx][0-9]+' AND
> > b.usesysid = a.relowner AND
> > NOT (EXISTS (SELECT viewname FROM pg_views
> > WHERE viewname=a.relname));
> > ~ $ psql maindb < test.sql
> > name
> > ------------------
> > applications
> > data_tags
> > application_tags
> > data_values
> > (4 rows)
> >
> > Only the "applications" table shows up through gnome-db. Notice that I had to
> > change a.realname to a.relname, as the realname column doesn't seem to exist
> > in pg_class (don't know if that is just a type, or not). These tables can be
> > enumerated via unixODBC.
> >
> I did copy/paste from the sources, except for the SELECT line, so yes,
> it's a typo from my part, it should be a.relname.
>
> Vivien, do you know what's happening? What Postgres version are you
> using?
The postgres provider can work with postgres 6.5.x and 7.0.x; I have not tested it yet
with versions 7.1.x, so there may be some problems here.
Also, the provider can only treat some data types, and maybe (I'll have to check on this)
your tables were left out because of some strange data types.
To further analyse this problem, could you send me the exact tables and sequences names and
the structure of the tables?
Thanks,
Vivien
>
> For me, it has worked since the beginning :-)
>
> cheers
>
> --
> Rodrigo Moya <rodrigo gnome-db org> - <rodrigo ximian com>
> http://www.gnome-db.org/ - http://www.ximian.com/
>
> _______________________________________________
> gnome-db-list mailing list
> gnome-db-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-db-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]