Re: [BUGS] Permissions problem with sequences

2004-09-25 Thread Michael Fuhr
On Thu, Sep 23, 2004 at 07:29:47PM -0400, Tom Lane wrote: > Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > > There is, however, an ownership problem with restoring sequences > > in 8.0.0beta. In 7.4.5, for example, pg_dump issues a SET SESSION > > AUTHORIZATION command and then creates a ta

Re: [BUGS] Permissions problem with sequences

2004-09-23 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > There is, however, an ownership problem with restoring sequences > in 8.0.0beta. In 7.4.5, for example, pg_dump issues a SET SESSION > AUTHORIZATION command and then creates a table, so implicitly-created > sequences are restored with the corre

Re: [BUGS] Permissions problem with sequences

2004-09-10 Thread Christopher Kings-Lynne
Hmm ... I hadn't thought of that approach, but it seems pretty reasonable offhand ... comments? What if they change the owner of the serial sequence independently anyway? Then dumps will be restored incorrectlynot that it matters perhaps... Chris ---(end of broadcast

Re: [BUGS] Permissions problem with sequences

2004-09-10 Thread Christopher Kings-Lynne
What if they change the owner of the serial sequence independently anyway? I suppose a complete solution would involve forbidding that. We don't allow you to alter the owner of an index independently of its parent table ... Problem is existing dump files. Oh, hang on - this is new for 8.0. Hmmm

Re: [BUGS] Permissions problem with sequences

2004-09-10 Thread Christopher Kings-Lynne
There is, however, an ownership problem with restoring sequences in 8.0.0beta. In 7.4.5, for example, pg_dump issues a SET SESSION AUTHORIZATION command and then creates a table, so implicitly-created sequences are restored with the correct ownership. In 8.0.0beta2, however, pg_dump doesn't issue

Re: [BUGS] Permissions problem with sequences

2004-09-10 Thread Christopher Kings-Lynne
However, of course the best thing is to just fix it, which I guess I'll have a crack at... Given that pg_dump does put out GRANT/REVOKE operations on the sequence, it's certainly aware that the sequence exists. I suspect this is just a fixable bug (ie, suppression of output of the sequence CREAT

Re: [BUGS] Permissions problem with sequences

2004-09-08 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > I've got a mostly working fix for the bug that involves alter owner on > the sequence, but let me know if you want me to finish it. Please. We need to see the alternatives ... regards, tom lane --

Re: [BUGS] Permissions problem with sequences

2004-09-08 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: >> Hmm ... I hadn't thought of that approach, but it seems pretty >> reasonable offhand ... comments? > What if they change the owner of the serial sequence independently > anyway? I suppose a complete solution would involve forbidding that. W

Re: [BUGS] Permissions problem with sequences

2004-09-08 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > ... DROP TABLE cascades to implictly-created sequences -- why > shouldn't ALTER TABLE OWNER TO cascade as well? Hmm ... I hadn't thought of that approach, but it seems pretty reasonable offhand ... comments? regards, tom lane --

Re: [BUGS] Permissions problem with sequences

2004-09-08 Thread Michael Fuhr
On Mon, Sep 06, 2004 at 11:41:48PM -0400, Tom Lane wrote: > Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > >> Given that pg_dump does put out GRANT/REVOKE operations on the sequence, > >> it's certainly aware that the sequence exists. I suspect this is just a > >> fixable bug (ie, suppressi

Re: [BUGS] Permissions problem with sequences

2004-09-06 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: >> Given that pg_dump does put out GRANT/REVOKE operations on the sequence, >> it's certainly aware that the sequence exists. I suspect this is just a >> fixable bug (ie, suppression of output of the sequence CREATE command is >> being done at th

Re: [BUGS] Permissions problem with sequences

2004-09-05 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > However, of course the best thing is to just fix it, which I guess I'll > have a crack at... Given that pg_dump does put out GRANT/REVOKE operations on the sequence, it's certainly aware that the sequence exists. I suspect this is just a fixa

Re: [BUGS] Permissions problem with sequences

2004-09-05 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > There is, however, an ownership problem with restoring sequences > in 8.0.0beta. In 7.4.5, for example, pg_dump issues a SET SESSION > AUTHORIZATION command and then creates a table, so implicitly-created > sequences are restored with the correct ownershi

Re: [BUGS] Permissions problem with sequences

2004-09-04 Thread Michael Fuhr
On Sat, Sep 04, 2004 at 06:18:00PM -0400, Tom Lane wrote: > "Gary Doades" <[EMAIL PROTECTED]> writes: > > I have a problem with permissions on sequences when restored to > > another PC. > > This is not a dump/restore bug, because in fact you would have had the > same behavior before dumping. You

Re: [BUGS] Permissions problem with sequences

2004-09-04 Thread Gary Doades
On 4 Sep 2004 at 18:18, Tom Lane wrote: > "Gary Doades" <[EMAIL PROTECTED]> writes: > > I have a problem with permissions on sequences when restored to > > another PC. > > This is not a dump/restore bug, because in fact you would have had the > same behavior before dumping. You never granted per

Re: [BUGS] Permissions problem with sequences

2004-09-04 Thread Tom Lane
"Gary Doades" <[EMAIL PROTECTED]> writes: > I have a problem with permissions on sequences when restored to > another PC. This is not a dump/restore bug, because in fact you would have had the same behavior before dumping. You never granted permissions on the c1 sequence to user1_test in the firs