Re: [PATCHES] Single-Transaction Utility options

2006-02-11 Thread Bruce Momjian
Patch applied. Thanks. --- Simon Riggs wrote: On Fri, 2005-12-16 at 15:56 -0500, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: On Fri, 2005-12-16 at 13:59 -0500, Tom Lane wrote: Would -1 work, or just

Re: [PATCHES] Single-Transaction Utility options

2006-02-11 Thread Bruce Momjian
Patch applied. Thanks. --- Simon Riggs wrote: On Sat, 2005-12-17 at 20:03 +0100, Peter Eisentraut wrote: Simon Riggs wrote: Changes as discussed. singletransaction.patch attached. I meant to ask, why is this

Re: [PATCHES] Single-Transaction Utility options

2005-12-18 Thread Simon Riggs
On Sat, 2005-12-17 at 20:03 +0100, Peter Eisentraut wrote: Simon Riggs wrote: Changes as discussed. singletransaction.patch attached. I meant to ask, why is this not the default or only behavior? Historically, it didn't work that way, so I hadn't thought to change that behaviour. We could

Re: [PATCHES] Single-Transaction Utility options

2005-12-18 Thread Peter Eisentraut
Tom Lane wrote: I believe Peter's question was rhetorical: what he meant to point out is that the documentation needs to explain what is the reason for having this switch, ie, in what cases would you use it or not use it? Just saying what it does isn't really adequate docs. I once considered

Re: [PATCHES] Single-Transaction Utility options

2005-12-18 Thread Simon Riggs
On Sun, 2005-12-18 at 14:04 -0500, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: On Sat, 2005-12-17 at 20:03 +0100, Peter Eisentraut wrote: I meant to ask, why is this not the default or only behavior? Historically, it didn't work that way, so I hadn't thought to change that

Re: [PATCHES] Single-Transaction Utility options

2005-12-18 Thread Simon Riggs
On Sun, 2005-12-18 at 21:51 +0100, Peter Eisentraut wrote: Tom Lane wrote: I believe Peter's question was rhetorical: what he meant to point out is that the documentation needs to explain what is the reason for having this switch, ie, in what cases would you use it or not use it? Just

Re: [PATCHES] Single-Transaction Utility options

2005-12-18 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: I once considered implementing this myself but found it infeasible for some reason I don't remember. Nevertheless I always thought that having an atomic restore ought to be a non-optional feature. Are there situations where one would not want to

Re: [PATCHES] Single-Transaction Utility options

2005-12-17 Thread Simon Riggs
On Fri, 2005-12-16 at 15:56 -0500, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: On Fri, 2005-12-16 at 13:59 -0500, Tom Lane wrote: Would -1 work, or just confuse people? That was my preference, I just thought it wouldn't be popular... So I'll happily change that. OK. While

Re: [PATCHES] Single-Transaction Utility options

2005-12-17 Thread Peter Eisentraut
Simon Riggs wrote: Changes as discussed. singletransaction.patch attached. I meant to ask, why is this not the default or only behavior? Your patch does not contain a documentation update, and so the user has no information about why to use this option or not. -- Peter Eisentraut

Re: [PATCHES] Single-Transaction Utility options

2005-12-16 Thread Tom Lane
Simon Riggs [EMAIL PROTECTED] writes: The following patches add a -N option to psql and pgrestore. -N seems an entirely random name for the switch ... can't we do better? I see that -t, -T, -s, -S, -x and -X are all taken, which lets out the obvious choices ... but I'd rather have no

Re: [PATCHES] Single-Transaction Utility options

2005-12-16 Thread Alvaro Herrera
Simon Riggs wrote: The following patches add a -N option to psql and pgrestore. This option adds a BEGIN at the start and a COMMIT at the end of all commands, causing all statements to be executed as a single transaction. Why use it around the whole file and not only around that particular

Re: [PATCHES] Single-Transaction Utility options

2005-12-16 Thread Simon Riggs
On Fri, 2005-12-16 at 13:59 -0500, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: The following patches add a -N option to psql and pgrestore. -N seems an entirely random name for the switch ... can't we do better? I see that -t, -T, -s, -S, -x and -X are all taken, which lets out

Re: [PATCHES] Single-Transaction Utility options

2005-12-16 Thread Simon Riggs
On Fri, 2005-12-16 at 16:04 -0300, Alvaro Herrera wrote: Simon Riggs wrote: The following patches add a -N option to psql and pgrestore. This option adds a BEGIN at the start and a COMMIT at the end of all commands, causing all statements to be executed as a single transaction. Why

Re: [PATCHES] Single-Transaction Utility options

2005-12-16 Thread Tom Lane
Simon Riggs [EMAIL PROTECTED] writes: On Fri, 2005-12-16 at 13:59 -0500, Tom Lane wrote: Would -1 work, or just confuse people? That was my preference, I just thought it wouldn't be popular... So I'll happily change that. OK. While you're at it, I didn't like the long name either ;-). We do

Re: [PATCHES] Single-Transaction Utility options

2005-12-16 Thread Alvaro Herrera
Simon Riggs wrote: On Fri, 2005-12-16 at 16:04 -0300, Alvaro Herrera wrote: Simon Riggs wrote: The following patches add a -N option to psql and pgrestore. This option adds a BEGIN at the start and a COMMIT at the end of all commands, causing all statements to be executed as a

Re: [PATCHES] Single-Transaction Utility options

2005-12-16 Thread Tom Lane
Simon Riggs [EMAIL PROTECTED] writes: Why use it around the whole file and not only around that particular table's operations? You could. That just behaves slightly differently. pg_dump does not always produce all the commands affecting a single table together, so I don't think you can

Re: [PATCHES] Single-Transaction Utility options

2005-12-16 Thread Alvaro Herrera
Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: Why use it around the whole file and not only around that particular table's operations? You could. That just behaves slightly differently. pg_dump does not always produce all the commands affecting a single table together, so I