Re: proposal: condition blocks in psql - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: proposal: condition blocks in psql
Date
Msg-id 55900321.2020105@2ndquadrant.com
Whole thread Raw
In response to Re: proposal: condition blocks in psql  (Pavel Stehule <pavel.stehule@gmail.com>)
List 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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: drop/truncate table sucks for large values of shared buffers
Next
From: Tom Lane
Date:
Subject: Re: Semantics of pg_file_settings view