Re: 2018-03 Commitfest Summary (Andres #1)

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 2018-03 Commitfest Summary (Andres #1)
Date: 2018-03-04 07:29:15
Message-ID: CAMsr+YFiySUOJ1xXKJKKAZ7s3Q2Uv6pOveoWAq7LY-pkfFVPMw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4 March 2018 at 14:58, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>
>
> 2018-03-04 3:09 GMT+01:00 Craig Ringer <craig(at)2ndquadrant(dot)com>:
>
>> On 3 March 2018 at 17:56, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:
>>
>>>
>>> The (trivial) big picture is to allow client-side expressions in psql
>>> (which as a \if:-) by reusing pgbench expression engine, so that one could
>>> write things like
>>>
>>> \let i :j + 12 * :k
>>>
>>> or
>>>
>>> \if :VERSION_NUM < 140000
>>>
>>>
>> I still haven't really grasped why this isn't done by embedding a
>> client-side scripting language interpreter, giving us vastly greater
>> capabilities with only the maintenance of the glue instead of writing our
>> own ad-hoc scripting tool. Something confine-able like JavaScript or Lua.
>>
>
> I am primary a psql user, so I'll talk about psql. I don't need there more
> functionality, than has C macros. Not more. So \if :VERSION_NUM < x is good
> enough. && || operators are nice to have
>
> For this I don't to join any VM. It is overkill. What scripting
> functionality we can do in psql now, and probably in long future
>
> a) setting prompt
> b) some deployment - version checks
> c) implementation of some simple regress scenarios
>
> Can be different if we start new rich TUI client based on ncurses, new
> features - but it is different story.
>
> More - implementation of simple expression evaluation in psql doesn't
> break later integration of some VM. Maybe it prepare a way for it.
>
> I can imagine the psql command \lua anylua expression, with possibility to
> call any lua function with possibility to iterate over SQL result, show any
> result, and read, write from psql variables - prefer Lua against
> JavaScript, but same can be done there too.
>
> But this not against to this patch. This patch is not too big, too
> complex, too hard to maintain - and some simple today issues can be done
> simple
>
>
Fine by me so long as it remains a manageable scope, rather than
incrementally turning into some horror scripting language.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-03-04 07:32:22 Re: 2018-03 Commitfest Summary (Andres #1)
Previous Message Pavel Stehule 2018-03-04 06:58:17 Re: 2018-03 Commitfest Summary (Andres #1)