Re: [HACKERS] Fixing pg_dump

2004-06-27 Thread Christopher Kings-Lynne
Yeah, that's still on my should-fix-for-7.5 list (and I think Fabien was going to, or already did, submit some ACL-hacking code to help). That is, ALTER OWNER should adjust the ACL so that grants made by/to the former owner now appear to be by/to the new owner. However, there's still the problem t

Re: [HACKERS] Fixing pg_dump

2004-06-27 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > ... The acl is still there from when brett used to own that table? > Do you still plan to fix that? Yeah, that's still on my should-fix-for-7.5 list (and I think Fabien was going to, or already did, submit some ACL-hacking code to help). That

Re: [HACKERS] Fixing pg_dump

2004-06-27 Thread Christopher Kings-Lynne
* Drop commands for TYPEs have 'CASCADE' on the end (has that always been true) Yeek. That's got to be a hangover from pre-dependency-chasing days. Let's lose it in our current output, at least. I think it's necessary due to the circular dependency between types and their I/O functions. Chris -

Re: [HACKERS] Fixing pg_dump

2004-06-27 Thread Christopher Kings-Lynne
I don't buy it. There's a tradeoff here between certainty of doing what you want and having a script that is easy to edit. DROP is a dangerous weapon and we should be circumspect about applying it, but ALTER OWNER etc are much less so. Also, the point about qualifying the DROP is that you do not

Re: [HACKERS] Fixing pg_dump

2004-06-27 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > We currently fully qualify DROP command with the namespace so that drops > will not accidentally modify the system catalogs. Shouldn't this also > be necessary on ALL non-CREATE commands? > Otherwise, if the create table command associated wi

Re: [HACKERS] Fixing pg_dump

2004-06-27 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > Actually, this brings up another point - people occasionally complain on > the list that pg_dump is not considered important enough :( ie. Is > there any good reason we cannot backport the entire new pg_dump to the > 7.4 branch, and change t

Re: [HACKERS] Fixing pg_dump

2004-06-27 Thread Christopher Kings-Lynne
* Do we no longer worry about the SCHEMA AUTHORIZATION clause? I might set it to keep being issued in 'sql standard mode', but otherwise we cannot use it in dumps any more. Actually, that's not true - I'm being silly. We can use the AUTHORIZATION clause instead of ALTER SCHEMA ... OWNER TO :)

Re: [HACKERS] Fixing pg_dump

2004-06-27 Thread Christopher Kings-Lynne
Ugh. Definitely an oversight. Don't suppose you want to think about pulling the name out of the DROP command ;-) ? Yeah, I've already done it - it's ugleeey, but it works :P I'm running out of time unfortunately, and I need to know from you whether I should go back to my work on making owner and

Re: [HACKERS] Fixing pg_dump

2004-06-27 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > I tried adding the extra scan in and it as all well and good up until > the second where I realised that the TocEntry struct has no field that > allows me to know the correct way of finding the full descriptor of each > object. Ugh. Definit

Re: [HACKERS] Fixing pg_dump

2004-06-27 Thread Christopher Kings-Lynne
But...it seems kind of hacky to scan it again for owners and privs - are you sure you want me to go that way? If there's not a big performance penalty, sure. Being fully compatible with existing archive files is a sufficient win to justify sins much worse than this one. Ah, crap. I tried adding t

Re: [HACKERS] Fixing pg_dump

2004-06-24 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > Out of interest - have you developed an opinion on the > pg_get_serial_sequence thing? Will apply as soon as I get a chance --- I'd intended to clean out the patch queue today, but didn't get past Magnus' stuff. > Also, what's the latest I ca

Re: [HACKERS] Fixing pg_dump

2004-06-24 Thread Christopher Kings-Lynne
If there's not a big performance penalty, sure. Being fully compatible with existing archive files is a sufficient win to justify sins much worse than this one. Out of interest - have you developed an opinion on the pg_get_serial_sequence thing? Also, what's the latest I can get pg_dump fixes i

Re: [HACKERS] Fixing pg_dump

2004-06-24 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > But...it seems kind of hacky to scan it again for owners and privs - are > you sure you want me to go that way? If there's not a big performance penalty, sure. Being fully compatible with existing archive files is a sufficient win to justify

Re: [HACKERS] Fixing pg_dump

2004-06-24 Thread Christopher Kings-Lynne
I intend to make new archives created with 7.5 pg_dump have the fix, and restoring pre 7.5 binary dumps will have exactly the previous behaviour. The reason for this is that extracting the acls and owners to the end requires scanning the entire archive twice - not necessarily something we wan

Re: [HACKERS] Fixing pg_dump

2004-06-24 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > I intend to make new archives created with 7.5 pg_dump have the fix, and > restoring pre 7.5 binary dumps will have exactly the previous > behaviour. The reason for this is that extracting the acls and owners > to the end requires scanning

[HACKERS] Fixing pg_dump

2004-06-23 Thread Christopher Kings-Lynne
OK, I think it might save me some time if I get some guidance on how we should modify pg_dump to fix the owner/grants issue. I intend to make new archives created with 7.5 pg_dump have the fix, and restoring pre 7.5 binary dumps will have exactly the previous behaviour. The reason for this is