pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedPostgreSQL 13: native JavaScript Procedural Language support ?
7+ messages / 5 participants
[nested] [flat]
* PostgreSQL 13: native JavaScript Procedural Language support ?
@ 2020-03-25 06:42 Marius Andreiana <marius.andreiana@gmail.com>
2020-03-25 14:50 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 7+ messages in thread
From: Marius Andreiana @ 2020-03-25 06:42 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hi and hope this finds you well,
PostgreSQL has state of the art JSON(B) data type and query support, and
basic updates as well, eg jsonb_set().
How about enabling users to do more advanced processing of JSON
data inside the database itself, using JavaScript?
There's the PLV8 extension https://github.com/plv8/plv8
but it's not available for many major db providers (eg Heroku), making it
hard to adopt it. Having it supported in the standard PostgreSQL
distribution, besides the existing 4 languages (
https://www.postgresql.org/docs/12/xplang.html), would be awesome!
Would you kindly consider this?
Thanks & stay safe,
Marius
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: PostgreSQL 13: native JavaScript Procedural Language support ?
2020-03-25 06:42 PostgreSQL 13: native JavaScript Procedural Language support ? Marius Andreiana <marius.andreiana@gmail.com>
@ 2020-03-25 14:50 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-03-25 15:46 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Marius Andreiana <marius.andreiana@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Tom Lane @ 2020-03-25 14:50 UTC (permalink / raw)
To: Marius Andreiana <marius.andreiana@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
Marius Andreiana <marius.andreiana@gmail.com> writes:
> How about enabling users to do more advanced processing of JSON
> data inside the database itself, using JavaScript?
> There's the PLV8 extension https://github.com/plv8/plv8
> but it's not available for many major db providers (eg Heroku), making it
> hard to adopt it. Having it supported in the standard PostgreSQL
> distribution, besides the existing 4 languages (
> https://www.postgresql.org/docs/12/xplang.html), would be awesome!
The core Postgres project doesn't have unlimited resources --- in fact,
most of the time we feel desperately short of qualified developers.
So we're not eager to pick up the maintenance burden for extensions
that seem to be doing perfectly well on their own. (The extensions
that do exist within the core distribution are largely there to make
sure we don't break extensibility by accident.)
Even if we did that, it would not automatically translate to downstream
packagers enabling the feature; they might not want the additional
dependencies.
So the right thing for you to do is to lobby Heroku to include PLV8
in their offering. You'd have to convince them to support it in
any case.
regards, tom lane
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: PostgreSQL 13: native JavaScript Procedural Language support ?
2020-03-25 06:42 PostgreSQL 13: native JavaScript Procedural Language support ? Marius Andreiana <marius.andreiana@gmail.com>
2020-03-25 14:50 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-03-25 15:46 ` Marius Andreiana <marius.andreiana@gmail.com>
2020-03-26 00:50 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 7+ messages in thread
From: Marius Andreiana @ 2020-03-25 15:46 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general@lists.postgresql.org
Thanks Tom, that makes sense. Appreciate your time to explain the context.
I'll followup with Heroku.
Have a peaceful day,
Marius
On Wed, Mar 25, 2020 at 4:50 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Marius Andreiana <marius.andreiana@gmail.com> writes:
> > How about enabling users to do more advanced processing of JSON
> > data inside the database itself, using JavaScript?
> > There's the PLV8 extension https://github.com/plv8/plv8
> > but it's not available for many major db providers (eg Heroku), making it
> > hard to adopt it. Having it supported in the standard PostgreSQL
> > distribution, besides the existing 4 languages (
> > https://www.postgresql.org/docs/12/xplang.html), would be awesome!
>
> The core Postgres project doesn't have unlimited resources --- in fact,
> most of the time we feel desperately short of qualified developers.
> So we're not eager to pick up the maintenance burden for extensions
> that seem to be doing perfectly well on their own. (The extensions
> that do exist within the core distribution are largely there to make
> sure we don't break extensibility by accident.)
>
> Even if we did that, it would not automatically translate to downstream
> packagers enabling the feature; they might not want the additional
> dependencies.
>
> So the right thing for you to do is to lobby Heroku to include PLV8
> in their offering. You'd have to convince them to support it in
> any case.
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: PostgreSQL 13: native JavaScript Procedural Language support ?
2020-03-25 06:42 PostgreSQL 13: native JavaScript Procedural Language support ? Marius Andreiana <marius.andreiana@gmail.com>
2020-03-25 14:50 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Tom Lane <tgl@sss.pgh.pa.us>
2020-03-25 15:46 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Marius Andreiana <marius.andreiana@gmail.com>
@ 2020-03-26 00:50 ` Bruce Momjian <bruce@momjian.us>
2020-03-26 07:07 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Ivan E. Panchenko <i.panchenko@postgrespro.ru>
0 siblings, 1 reply; 7+ messages in thread
From: Bruce Momjian @ 2020-03-26 00:50 UTC (permalink / raw)
To: Marius Andreiana <marius.andreiana@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-general@lists.postgresql.org
On Wed, Mar 25, 2020 at 05:46:27PM +0200, Marius Andreiana wrote:
> Thanks Tom, that makes sense. Appreciate your time to explain the context.
>
> I'll followup with Heroku.
Also, I have heard PL/V8 is very hard to build for packagers (because of
changes by Google in the way V8 is packaged), which has decreased PL/V8
adoption.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: PostgreSQL 13: native JavaScript Procedural Language support ?
2020-03-25 06:42 PostgreSQL 13: native JavaScript Procedural Language support ? Marius Andreiana <marius.andreiana@gmail.com>
2020-03-25 14:50 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Tom Lane <tgl@sss.pgh.pa.us>
2020-03-25 15:46 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Marius Andreiana <marius.andreiana@gmail.com>
2020-03-26 00:50 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Bruce Momjian <bruce@momjian.us>
@ 2020-03-26 07:07 ` Ivan E. Panchenko <i.panchenko@postgrespro.ru>
2020-03-26 10:28 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Bruce Momjian <bruce@momjian.us>
2020-03-26 11:28 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Dmitry Igrishin <dmitigr@gmail.com>
0 siblings, 2 replies; 7+ messages in thread
From: Ivan E. Panchenko @ 2020-03-26 07:07 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 26.03.2020 03:50, Bruce Momjian wrote:
> On Wed, Mar 25, 2020 at 05:46:27PM +0200, Marius Andreiana wrote:
>> Thanks Tom, that makes sense. Appreciate your time to explain the context.
>>
>> I'll followup with Heroku.
> Also, I have heard PL/V8 is very hard to build for packagers (because of
> changes by Google in the way V8 is packaged), which has decreased PL/V8
> adoption.
True.
Btw, Nginx made their own JS implementation
https://nginx.org/en/docs/njs/index.html
It might be easier in integration than V8.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: PostgreSQL 13: native JavaScript Procedural Language support ?
2020-03-25 06:42 PostgreSQL 13: native JavaScript Procedural Language support ? Marius Andreiana <marius.andreiana@gmail.com>
2020-03-25 14:50 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Tom Lane <tgl@sss.pgh.pa.us>
2020-03-25 15:46 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Marius Andreiana <marius.andreiana@gmail.com>
2020-03-26 00:50 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Bruce Momjian <bruce@momjian.us>
2020-03-26 07:07 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Ivan E. Panchenko <i.panchenko@postgrespro.ru>
@ 2020-03-26 10:28 ` Bruce Momjian <bruce@momjian.us>
1 sibling, 0 replies; 7+ messages in thread
From: Bruce Momjian @ 2020-03-26 10:28 UTC (permalink / raw)
To: Ivan E. Panchenko <i.panchenko@postgrespro.ru>; +Cc: pgsql-general@lists.postgresql.org
On Thu, Mar 26, 2020 at 10:07:48AM +0300, Ivan Panchenko wrote:
>
> On 26.03.2020 03:50, Bruce Momjian wrote:
> > On Wed, Mar 25, 2020 at 05:46:27PM +0200, Marius Andreiana wrote:
> > > Thanks Tom, that makes sense. Appreciate your time to explain the context.
> > >
> > > I'll followup with Heroku.
> > Also, I have heard PL/V8 is very hard to build for packagers (because of
> > changes by Google in the way V8 is packaged), which has decreased PL/V8
> > adoption.
>
> True.
>
> Btw, Nginx made their own JS implementation
>
> https://nginx.org/en/docs/njs/index.html
>
> It might be easier in integration than V8.
Oh, that sounds promising. :-)
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: PostgreSQL 13: native JavaScript Procedural Language support ?
2020-03-25 06:42 PostgreSQL 13: native JavaScript Procedural Language support ? Marius Andreiana <marius.andreiana@gmail.com>
2020-03-25 14:50 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Tom Lane <tgl@sss.pgh.pa.us>
2020-03-25 15:46 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Marius Andreiana <marius.andreiana@gmail.com>
2020-03-26 00:50 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Bruce Momjian <bruce@momjian.us>
2020-03-26 07:07 ` Re: PostgreSQL 13: native JavaScript Procedural Language support ? Ivan E. Panchenko <i.panchenko@postgrespro.ru>
@ 2020-03-26 11:28 ` Dmitry Igrishin <dmitigr@gmail.com>
1 sibling, 0 replies; 7+ messages in thread
From: Dmitry Igrishin @ 2020-03-26 11:28 UTC (permalink / raw)
To: Ivan E. Panchenko <i.panchenko@postgrespro.ru>; +Cc: pgsql-general@lists.postgresql.org
чт, 26 мар. 2020 г. в 10:08, Ivan E. Panchenko <i.panchenko@postgrespro.ru>:
>
>
> On 26.03.2020 03:50, Bruce Momjian wrote:
> > On Wed, Mar 25, 2020 at 05:46:27PM +0200, Marius Andreiana wrote:
> >> Thanks Tom, that makes sense. Appreciate your time to explain the context.
> >>
> >> I'll followup with Heroku.
> > Also, I have heard PL/V8 is very hard to build for packagers (because of
> > changes by Google in the way V8 is packaged), which has decreased PL/V8
> > adoption.
>
> True.
>
> Btw, Nginx made their own JS implementation
>
> https://nginx.org/en/docs/njs/index.html
>
> It might be easier in integration than V8.
Yet more lightweight JavaScript engine - https://bellard.org/quickjs/
"Small and easily embeddable: just a few C files, no external
dependency, 210 KiB of x86 code for a simple hello world program."
"Almost complete ES2019 support including modules, asynchronous
generators and full Annex B support (legacy web compatibility)."
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2020-03-26 11:28 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25 06:42 PostgreSQL 13: native JavaScript Procedural Language support ? Marius Andreiana <marius.andreiana@gmail.com>
2020-03-25 14:50 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-03-25 15:46 ` Marius Andreiana <marius.andreiana@gmail.com>
2020-03-26 00:50 ` Bruce Momjian <bruce@momjian.us>
2020-03-26 07:07 ` Ivan E. Panchenko <i.panchenko@postgrespro.ru>
2020-03-26 10:28 ` Bruce Momjian <bruce@momjian.us>
2020-03-26 11:28 ` Dmitry Igrishin <dmitigr@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox