Re: pgbench \for or similar loop

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Christopher Browne <cbbrowne(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench \for or similar loop
Date: 2011-04-19 16:56:03
Message-ID: BANLkTikrnbZMYRx3Q=0pmofHb7vRKK9-gA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 19, 2011 at 11:49 AM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> Excerpts from Robert Haas's message of mar abr 19 13:33:27 -0300 2011:
>> On Tue, Apr 19, 2011 at 12:27 PM, Christopher Browne <cbbrowne(at)gmail(dot)com> wrote:
>> > On Tue, Apr 19, 2011 at 12:22 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> >> Yeah.  I was wondering if anyone was gung-ho enough about this to
>> >> implement some kind of library that both programs could draw on.
>> >>
>> >> It probably wouldn't be super-hard, if we could agree on a rough design.
>> >
>> > It seems to me that the Mo Betta answer would be to implement the
>> > fabled "stored procedure" language, that has, as its distinctive, the
>> > capability to control transactions.  That would have the capability of
>> > being used in places other than just inside psql.
>> >
>> > And it would be a good way for scripting things like specialized
>> > vacuum and analyze regimens, which cannot be done inside stored
>> > functions today.
>>
>> Well, I'm all good with that, too, but am not fired up about either
>> one to implement it myself.  So I think it's going to come down to
>> what the person doing the work feels most strongly about.
>
> I'm not at all fired up about stored procedures.  The \for pgbench
> feature I'm proposing is 2 orders of magnitude less code than that.

...and gets you some of the same benefits. are you sure it belongs in
pgbench though, and not psql? it would be pretty weird to have to
switch to pgbench to do fancy sql scripting...i'd happily do it
though.

merlin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2011-04-19 16:57:40 Re: REINDEX vs broken HOT chains, redux
Previous Message Alvaro Herrera 2011-04-19 16:49:38 Re: pgbench \for or similar loop