Re: proposal: condition blocks in psql

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: condition blocks in psql
Date: 2015-06-28 14:22:25
Message-ID: 55900321.2020105@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 06/28/2015 02:50 PM, Pavel Stehule wrote:
>
> <b>I don't propose psql scripting.</b>
>
> I propose simple statement for conditional statement execution. The
> core of my proposal are commands

That's a matter of opinion, I guess ...

While you may propose only two simple conditional statements at the
moment, I think it'll either get unused (and then why implement it?), or
people will use that in various ways - and in that case I'd expect more
request for more and more statements, additional scripting features etc.
And that's a direction of more extensive scripting support in psql,
which I think is a bad one.

I'm already dealing with awful script mashups, and this seems like a
great way to make it even messier. I can't really imagine using any of
those commands in practice, actually.

I'd always choose a per-version script, for example. Or something that
actually builds the SQL script ...

--
Tomas Vondra http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-06-28 15:01:12 Re: Semantics of pg_file_settings view
Previous Message Andres Freund 2015-06-28 14:01:13 Re: drop/truncate table sucks for large values of shared buffers