Re: PL/pgSQL 2 - Mailing list pgsql-hackers

From David Johnston
Subject Re: PL/pgSQL 2
Date
Msg-id CAKFQuwbaERqT_bUxKp8VpzDNJs9R7gyZhq8z6ouzMBwd=b5ESg@mail.gmail.com
Whole thread Raw
In response to Re: PL/pgSQL 2  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: PL/pgSQL 2
List pgsql-hackers
On Mon, Sep 1, 2014 at 11:12 PM, Craig Ringer <craig@2ndquadrant.com> wrote:
On 09/02/2014 09:40 AM, David G Johnston wrote:
> Random thought as I wrote that: how about considering how pl/pgsql
> functionality can be generalize so that it is a database API that
> another language can call?  In that way the server would drive the core
> functionality and the language would simply be an interpreter that
> enforces its specific notion of acceptable syntax.

That's pretty much what we already have with the SPI and procedural
language handler infrastructure. PL/Perl, PL/Python, etc exist because
we have this.

What do you see as missing from the current infrastructure? What can't
be done that should be able to be done in those languages?


​Yet pl/pgsql does not have to use SPI-interface type calls to interact with PostgreSQL at the SQL level...

​I don't have an answer to your questions but the one I'm asking is whether a particular language could hide all of the SPI stuff behind some custom syntax so that it in effect looks similar to what pl/pgsql does today?  Or, more to the point, does pl/pgsql use the same SPI interface behind the scenes as PL/Perl or does it have its own special interface?

David J.

pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: PL/pgSQL 2
Next
From: Craig Ringer
Date:
Subject: Re: PL/pgSQL 2