Re: [GENERAL] how to auto GRANT custom ACL on a new table?

2008-03-03 Thread Richard Huxton
Maciej Sieczka wrote: Isn't there a ready to use sort of addon for PgSQL which could intercept the CREATE TABLE that eg. Base (or any other client) issues, appdend GRANT to it and forward such a modified instruction to the server? I looked a lot in list archives, PgFoundry, Google and can't

Re: [GENERAL] how to auto GRANT custom ACL on a new table?

2008-03-01 Thread Maciej Sieczka
Maciej Sieczka pisze: Richard Huxton pisze: 1. Add a proxy in front of PostgreSQL and have it intercept the CREATE TABLE statements and follow them with the correct GRANT statements. I'd probably modify the code for pgpool/pgbouncer (http://pgfoundry.org/) That should do it seems! Thanks

Re: [GENERAL] how to auto GRANT custom ACL on a new table?

2008-02-26 Thread Richard Huxton
Maciej Sieczka wrote: I need to modify this default PostgreSQL's behaviour, so that the ACL on a new table in this schema is set to SELECT, INSERT, UPDATE, DELETE, REFERENCES for editors, and SELECT for viewers, without having to manually GRANT rights each time a new table is created. I can't

Re: [GENERAL] how to auto GRANT custom ACL on a new table?

2008-02-26 Thread Maciej Sieczka
Richard Huxton pisze: Maciej Sieczka wrote: I need to modify this default PostgreSQL's behaviour, so that the ACL on a new table in this schema is set to SELECT, INSERT, UPDATE, DELETE, REFERENCES for editors, and SELECT for viewers, without having to manually GRANT rights each time a new

Re: [GENERAL] how to auto GRANT custom ACL on a new table?

2008-02-26 Thread Richard Huxton
Maciej Sieczka wrote: Richard Huxton pisze: Afraid not. You can't add a trigger to a system table. Too bad, but thanks much for clarifying this. The only real solution is to have your own function do both - create the table and then grant relevant permissions. Only allow client

Re: [GENERAL] how to auto GRANT custom ACL on a new table?

2008-02-26 Thread Maciej Sieczka
Richard Huxton pisze: Maciej Sieczka wrote: Richard Huxton pisze: Afraid not. You can't add a trigger to a system table. Too bad, but thanks much for clarifying this. The only real solution is to have your own function do both - create the table and then grant relevant permissions. Only

Re: [GENERAL] how to auto GRANT custom ACL on a new table?

2008-02-26 Thread Richard Huxton
Maciej Sieczka wrote: I'd like to prevent concurrent editing of a table. For example PostGIS tables, which are going to be stored in the database too: once a user starts editing the table in QGIS [1], it should be locked (for writing at least), until he turns the edit mode off and commits

Re: [GENERAL] how to auto GRANT custom ACL on a new table?

2008-02-26 Thread Maciej Sieczka
Richard Huxton pisze: Maciej Sieczka wrote: In PG experts opinion, could/should a PostGIS editing software lock table for writing to prevent concurent editing? The application should either: 1. Take an advisory lock (see the functions/admin functions chapter) so that it can use another

[GENERAL] how to auto GRANT custom ACL on a new table?

2008-02-25 Thread Maciej Sieczka
Hello, I have asked the question on novice ML but it seems there is not much traffic there. I hope nobody minds I'm re-asking here, on a much more active list. The problem is as follows: There are 2 role groups in my cluster: editors and viewers. In each group there are several users. In