From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
Cc: | 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 10:28:09 |
Message-ID: | alpine.DEB.2.20.1803041104190.12500@lancre |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello Craig,
> 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.
ISTM that what you are asking for cannot work well: Pg needs a client the
primary language of which is SQL, so that:
calvin> SELECT * FROM Stuff;
Does what you expect.
How would you mix/embedded another language with that? The answer is not
obvious to me because you need some lexical convention to switch between
SQL and the "other" language. PHP-looking solution or putting all SQL in
strings would not be that great in interactive mode.
Moreover, I do not think that a full language (including loops) is
desirable for interactive scripting and simple database creations. The
needed level is more like cpp, i.e. not really a "full" language.
Also, which language should it be? I've been practicing perl, tcl, python,
bash... do I want to learn lua as well?
So ISTM that the current solution is the reasonable one: limited
SQL-language tools (psql & pgbench) for basic and interactive operations,
and if you really need scripting you can always write a script in your
favorite language which is interfaced with SQL through some API.
The limit between what can be done with the client tool and with scripting
is a fuzzy one.
--
Fabien.
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2018-03-04 10:30:33 | Re: All Taxi Services need Index Clustered Heap Append |
Previous Message | Ants Aasma | 2018-03-04 10:05:35 | Re: All Taxi Services need Index Clustered Heap Append |