From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Merlin Moncure <mmoncure(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgbench \for or similar loop |
Date: | 2011-04-20 18:10:17 |
Message-ID: | 20110420181017.GB17008@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Apr 20, 2011 at 01:35:03PM -0400, Robert Haas wrote:
> On Wed, Apr 20, 2011 at 10:46 AM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
> > On Wed, Apr 20, 2011 at 9:14 AM, Alvaro Herrera
> > <alvherre(at)commandprompt(dot)com> wrote:
> >> Excerpts from David Fetter's message of mié abr 20 10:54:56 -0300 2011:
> >>> On Wed, Apr 20, 2011 at 08:05:07AM +0200, Pavel Stehule wrote:
> >>> > Hello
> >>> >
> >>> > I played with psql extensions two years ago - it can do it
> >>>
> >>> It's interesting, but it doesn't solve the fundamental problem, which
> >>> is to allow every client, not just psql, to do this.
> >>
> >> Why is this problem fundamental?
> >
> > I happen to like your idea, even if we had stored procedures...they
> > have a lot of overlap but so what?. We have server side \copy and
> > client side COPY -- both are useful. Likewise, (getting back to the
> > original point of the thread), bechmarking via client scripting and
> > via procedure are also both useful. Nobody will gripe if psql gets
> > more features like this -- some people really want to do this on the
> > client side and there are valid reasons to do that, say, to intermix
> > client local shell commands between sql lines.
>
> Yep, I agree. However, I think it's completely reasonable, as I said
> upthread, to ask people not to implement \for as a loop over an
> integer range in pgbench without answering questions like:
>
> 1. What happens if someone wants the other kind of for loop, that
> iterates until a condition is met?
>
> 2. Are we going to get a different and incompatible implementation in psql?
It is precisely this kind of issue that leads me to believe it would
be counter-productive to come up with any client-specific hacks.
Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-04-20 18:12:25 | Re: pgbench \for or similar loop |
Previous Message | Bruce Momjian | 2011-04-20 17:59:53 | Re: pgindent weirdnessf |