[horde] ingo.psql.sql

Johan Huldtgren johan+horde at obitus.org
Wed Mar 12 00:46:58 UTC 2008


> No, it doesn't make sense to have separate sql scripts for postgresql,
> only for the grant statements.

Fair enough.

> Also I'm still not convinced that there sre any issues with the
> scripts, because we didn't have a single complaint from a pg user
> in the last few year about those scripts that I can remember.

I'm more than willing to admit that this just comes down to me not
doing something correctly. However as far as I can tell I've followed
all the instructions to the letter, so I *hope* I'm actually doing
this right, and perhaps a clarification and improvement can come out of
this.

> But I'm not a pg user myself so I can't verify that.

Is there somebody else out there that can load up a second DB,
with all the horde tables and the following modules, and either
confirm or deny my findings?

For completeness sake:

FreeBSD 6.2-STABLE
PostgreSQL 8.2.6
Latest RC of horde and modules.

As user pgsql I load horde/scripts/sql/create.pgsql.sql
I've uncommented the ALTER USER statement and give the
'horde' user a password.

After this is done, I cd ../../<module>/scripts/sql

and (still as user pgsql):

psql -d horde2 -f <module>.sql

With the exception of kronolith and turba which both have
<module>.pgsql.sql, and there I of course use those files.

For the record, you don't really need to even connect this
DB to a live horde installation, just do:

psql -U horde horde2

Then try to do a select on a table that's not covered by
any GRANT's in the .sql files, e.g. kronolith_events:

horde2=> select * from kronolith_events;
ERROR:  permission denied for relation kronolith_events

> It should be sufficient to use a db user with the correct
> permissions when running the scripts. Since you said this
> wasn't mentioned anywhere, I'm asking  you for a patch to
> improve this.

I've attached a patch to horde/scripts/sql/README, where I
first grant "horde" user create rights on the database and
then encourage further modules to be loaded by the horde
user.

.jh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: README.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
Url : http://lists.horde.org/archives/horde/attachments/20080311/7aaf96f9/attachment.bin 


More information about the horde mailing list