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