On 09/01/2014 08:09 PM, Neil Tiffin wrote:
On Sep 1, 2014, at 10:45 AM, Tom Lane <t...@sss.pgh.pa.us> wrote:
What is actually being proposed, AFAICS, is a one-shot fix for a bunch
of unfortunate choices. That might be worth doing, but let's not fool
ourselves about whether it’s one-shot or not.
Well, one shot every 18 years is not so bad.
I am only a casual user and as such probably do not merit much consideration
from the experts here. I only work with PL/pgSQL occasionally, but never go
weeks without doing it and sometimes it is all I do for weeks.
That said and this being the internet, IMO working in PL/pgSQL is only slightly
better than stabbing myself in the leg with a knife compared to other
non-PL/pgSQL languages I work in. Mostly my hate is directed at the silly
quoting. But it has lots of other quirks that are not all that obvious unless
you work with it all day every day.
Now I could use other languages as was suggested upstream. Lets see, I use R
all the time, but R is not a first class language, not in core, and its slow.
Python 3 would be acceptable to me, but its untrusted. tcl I don’t know and
don’t want to learn as no one else seems to use it (in my world anyway). perl
is the only possibility left and again, no one in my world is using Perl and
it’s not clear if there is a performance penalty. The docs say the best
language for performance is PL/pgSQL after pure SQL.
Really, this is from the docs
a_output := a_output || '' if v_'' ||
referrer_keys.kind || '' like ''''''''''
|| referrer_keys.key_string || ''''''''''
then return '''''' || referrer_keys.referrer_type
|| ‘'''''; end if;'';
The docs also tell you how to avoid having to do this, using dollar quoting.
That should be enough alone to suggest postgreSQL start working on a modern, in
core, fast, fully supported language. Of course PL/pgSQL works, but so did
one-line 5k perl programs that nobody likes today. Everything can be done in
assembler, but no one suggests that today. Today, it is all about programmer
productivity. PL/pgSQL has a lot of unnecessary stuff that sucks the life out
of programmer productivity. And this should be very much a concern of the
professionals that support PostgreSQL
For example:
DECLARE
declarations
BEGIN
statements
END
This looks a lot like COBOL or Pascal, and today is mostly unnecessary.
It looks like Ada, and that's not an accident. (Nor is it a bad thing.)
The very last thing we should be doing is to invent a new language.
There are already plenty to choose from.
cheers
andrew
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers