Re: Why isn't Java support part of Postgresql core? - Mailing list pgsql-general

From Pavel Stehule
Subject Re: Why isn't Java support part of Postgresql core?
Date
Msg-id CAFj8pRCoWpqpv+9AKBXV1QFGiy7pytiiN4uF_L6ve2jNfGyt0g@mail.gmail.com
Whole thread Raw
In response to Re: Why isn't Java support part of Postgresql core?  (cowwoc <cowwoc@bbs.darktech.org>)
List pgsql-general


2014-09-15 19:49 GMT+02:00 cowwoc <cowwoc@bbs.darktech.org>:
Hi Pavel,

On 15/09/2014 1:40 PM, Pavel Stehule wrote:
The main drivers are:
  1. Not having to learn yet another language. I find the expressiveness and readability of the other scripting languages very clunky compared to Java.

PLpgSQL is different, it is based on Ada language

I'm sure it's a very lovely language, but it is yet another language most people are not familiar with and will have to learn.

you need one day learning only .. it contains only necessary functionality for stored procedures, nothing more.

It is like Java in 90 years - just simple


 

  1. Ease of porting triggers across databases. The only thing that really changes across databases is how triggers interact with input/output parameters. The main body remains the same (thanks to JDBC). This is quasi portability in the sense that the underlying SQL is itself quasi portable, but I find it a much more compelling approach than having to rewrite the triggers for each database type.
any time plpgsql will be faster then Java probably due a type compatibility with Postgres and execution as inprocess

There is a few task, that can be done in database, that will be faster in PL/Java than PL/pgSQL

I think developers choosing this route (myself included) are willing to pay the price in exchange for improved readability/maintainability (the assumption being that the resulting performance will be "good enough"). There seem to be plenty of people heading in this direction otherwise other languages (like pl/v8) wouldn't enjoy the popularity they do.

I know a situation in Czech Republic well and in Europe little bit

My estimation is about PostgreSQL applications

95% applications is wrote without stored procedures
4% applications is wrote with PL/pgSQL
.9% is combination PL/pgSQL with PL/Perl or PL/Python (Perl is older with CPAN, Python is popular in GIS community)
0.01% has all other .. pl/v8 was used mainly for JSON manipulation, because this possibility was not in PG, PL/R, PL/Lua, PL/PHP, PL/v8 has very small user community

For typical Java or Javascript users the stored procedures are devil still.



 

Gili

pgsql-general by date:

Previous
From: "pba@mailme.dk"
Date:
Subject: BDR DML Only
Next
From: cowwoc
Date:
Subject: Re: Why isn't Java support part of Postgresql core?