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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(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 06:58:17
Message-ID: CAFj8pRC_Tb+Up_oJ4vQ665xu2stO4jybFv=SBN9dqh+VJA04=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Regards

Pavel

>
> --
> 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 Craig Ringer 2018-03-04 07:29:15 Re: 2018-03 Commitfest Summary (Andres #1)
Previous Message David Rowley 2018-03-04 05:35:35 Re: [HACKERS] Removing LEFT JOINs in more cases