Re: My troubles with test PostgreSQL 8.1

Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> Wed, 9 Nov 2005 14:29:52 -0700
Newsgroups gmane.lisp.clsql.devel
Message-ID <[email protected]>
Yaroslav Kavenchuk wrote:
> some troubles with test postgresql 8.1 under windows:

CLSQL is untested on postgresql 8.1

> 1. On attempt to drop database ask password for current user (not for 
> user from specs). May be need set db-backend-has-create/destroy-db? to nil?
> current user not have rights to drop/create database usually (may be 
> even for connect :)

If you look at db-postgresql/postgresql-sql.lisp, you'll see that 
database-destory invokes the shell command dropdb to drop the
database. That has the limitation you identified. AFAIK, postgresql
doesn't allow the ability to idenify the spec user/password for
dropping the database.

Due to the concepts of dropping and creating databases is outside of
the SQL statements, those commands in CLSQL aren't completely
supported in ways that one might expect.

> 2. truncate-database:
> *** - While accessing database #<POSTGRESQL-DATABASE 
> localhost/test/postgres OPEN #x19FBFB5D>
>      with expression "DROP VIEW table_privileges":
>      Error 7 / view "table_privileges" does not exist
>      has occurred.
> [...]
> (list-views :database database)
> ("table_privileges" "tables" "triggered_update_columns" "triggers" 
> [...]

I suspect this is a postgresql 8.1 issue. In your list-views command
below, you see the entry for "table_privileges". Yet, when you try to
drop that view postgresql returns an eror. Likely, because this is
some system view that shouldn't be dropped from the database. There
may well be other views in postgresql 8.1 that are work similarly.

-- 
Kevin Rosenberg
kevin-HJRc7zDS/[email protected]