Re: Why isn't Java support part of Postgresql core?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: cowwoc <cowwoc(at)bbs(dot)darktech(dot)org>
Cc: Chris Travers <chris(dot)travers(at)gmail(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why isn't Java support part of Postgresql core?
Date: 2014-09-15 17:40:56
Message-ID: CAFj8pRDZc9-Mox1oZQc+H1a2_ZWiDDuFJaO-YQPtT8bOY1C0bg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2014-09-15 19:34 GMT+02:00 cowwoc <cowwoc(at)bbs(dot)darktech(dot)org>:

> On 15/09/2014 7:03 AM, Chris Travers wrote:
>
> I have a few questions on this, the answers of which may help answer your
> question:
>
> 1. How well does having a server-side JVM work, resource-wise, when you
> have a forked process model like PostgreSQL? Does having the additional
> JVM's pose performance and competition for resources that lighter languages
> would not?
>
>
> I don't think this is really a concern when connection pooling is used
> (otherwise you end up creating a new JVM per connection which is indeed
> problematic).
>
> 2. What is your specific use case for a trigger in Java?
>
>
> 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

>
> 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

Regards

Pavel

>
>
> Gili
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jay at Verizon 2014-09-15 17:43:52 Re: Pgpool starting problem
Previous Message cowwoc 2014-09-15 17:37:16 Re: Why isn't Java support part of Postgresql core?