Re: psql Feature request \set query - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: psql Feature request \set query
Date
Msg-id 877i7zgat8.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: psql Feature request \set query  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:

> Josh Berkus wrote:
>> Hackers,
>> 
>> Just had a feature request from Wheeler, and I don't see why it shouldn't 
>> go on our todo list.
>
> I think you're asking for more scriptability in psql.  Personally I
> think that would be a great idea, but we need a lot more than what's
> being proposed here.  We'll also need loops, conditionals, etc.  We've
> had patches for those submitted over the years, but one at a time they
> are easily rejected because they're so obviously incomplete.

FWIW I disagree. I think that's a recipe for ending up with a hacky
turing-complete but awkward-as-hell language.

If you want a language to write arbitrary database driving code with loops,
conditionals, etc then I would recommend going with any of the existing fully
functional languages. You can write your scripts in perl, python, ruby, or
whatever.

If we do it ourselves we'll always have a terrible half-baked language.
Building a whole language with clean syntax and consistent semantics is a lot
of work.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support!


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Deriving Recovery Snapshots
Next
From: Tom Lane
Date:
Subject: Re: Can anyone explain to me how the "ps_OuterTupleSlot" in PlanState is being used in implementing HashJoin?