Recent patch breaks ...-exists-p functions on postgresql 7.4

"Marijn Haverbeke" <[email protected]> Mon, 24 Jul 2006 16:24:16 +0200
Newsgroups gmane.lisp.clsql.devel
Message-ID <[email protected]>
I haven't looked too deeply into which patch exactly does this, but I guess
it has something to do with the message to this list at
http://lists.b9.com/pipermail/clsql-devel/2006-June/000601.html . When I try
to do (table-exists-p 'foo) I get:

While accessing database #<POSTGRESQL-DATABASE localhost/bitt_site_1/bitt
> OPEN
> {CFD2181}>
>
>   with expression
> "
>
>  SELECT c.relname
>
>  FROM pg_catalog.pg_class
> c
>
>       LEFT JOIN pg_catalog.pg_roles r ON r.oid = c.relowner
>
>       LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
>
>  WHERE c.relkind IN
> ('r','')
>
>        AND n.nspname NOT IN ('pg_catalog',
> 'pg_toast')
>
>        AND pg_catalog.pg_table_is_visible(c.oid)
>
>         AND (NOT
> (relowner=1))":
>
>   Error 7 / relation "pg_catalog.pg_roles" does not
> exist
>
>   has occurred.
>    [Condition of type SQL-DATABASE-DATA-ERROR]
>

Other functions, like sequence-exists-p, do the same. Which makes sense,
because my database has no pg_catalog.pg_roles table. I suppose that's
something specific to version 8.0. I know I should be upgrading already,
which I will do soon, but maybe some check to make these functions still
work on 7.4 db's would be practical.

Regards,
Marijn Haverbeke

_______________________________________________
CLSQL-Devel mailing list
[email protected]
http://lists.b9.com/mailman/listinfo/clsql-devel