Re: Single-Transaction Utility options - Mailing list pgsql-patches

From Simon Riggs
Subject Re: Single-Transaction Utility options
Date
Msg-id 1134766191.2964.65.camel@localhost.localdomain
Whole thread Raw
In response to Re: Single-Transaction Utility options  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Single-Transaction Utility options
List pgsql-patches
On Fri, 2005-12-16 at 13:59 -0500, Tom Lane wrote:
> Simon Riggs <simon@2ndquadrant.com> 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 single-letter abbreviation at
> all than one that has zero relationship to the function of the switch.

Almost. Stands for traNsaction....

> 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.

> Also, I don't actually see any point to this in psql, as you can
> always do
>     begin;
>     \i file
>     end;
> It's only pg_restore that you really need it for.  Dropping the psql
> part of the patch might give us a little more maneuvering room as far
> as the switch name goes.

Of course, you're right... and that is all the patch does in fact.

It seemed easier to do -1 than the SQL above, especially when doing it
from a single command line. But the main reason was to make all the
utilities work the same, if possible. Having different options on each
utility makes it easier to make mistakes, so I'd rather have the same
option everywhere that it could apply. I couldn't see any reason not to
do it, either.

Best Regards, Simon Riggs




pgsql-patches by date:

Previous
From: Qingqing Zhou
Date:
Subject: Win32 gettimeofday() comment patch
Next
From: Simon Riggs
Date:
Subject: Re: Single-Transaction Utility options