Questions tagged [plv8]

A Javascript procedural language add-on for PostgreSQL

A procedural language add-on for PostgreSQL that embeds Google's v8 Javascript interpreter in the PostgreSQL RDBMS, allowing you to write native Javascript functions and stored procedures.

Project page: http://code.google.com/p/plv8js/

56 questions
1
vote
1 answer

How to install plv8 in postgresql 9.5 on CentOS 6.7?

I installed PG 9.5 on CentOS 6.7 following this link. Then I downloaded plv8-1.4.4.zip from GitHub and followed instruction from these links: https://github.com/plv8/plv8 and http://pgxn.org/dist/plv8/ and README. I did make static and it seems it…
ALZ
  • 1,997
  • 2
  • 27
  • 44
1
vote
0 answers

How to handle PSQLException deadlock in Java+Hibernate

I have to manage an client-server application (written using Java8, Hibernate4, Spring4, postgresql 9.3.3) and face deadlock situation. I need to catch exactly deadlock situation (distinguish deadlock from other errors) and convert it to…
ALZ
  • 1,997
  • 2
  • 27
  • 44
1
vote
1 answer

plv8 disable execute and prepare function in eval()

How could I deactivate the access to plv8 functions in my eval? create or replace function js(src text, input json) returns json as $$ plv8.elog(NOTICE, 'test'); //--plv8 = null; // this would disable permanently plv8, also after another call of…
Alexandre
  • 3,088
  • 3
  • 34
  • 53
1
vote
2 answers

Splitting words in a variety of ways with Regex

Working on something similar to Solr's WordDelimiterFilter, but not in Java. Want to split words into tokens like this: P90X = P, 90, X (split on word/number boundary) TotallyCromulentWord = Totally, Cromulent, Word (split on…
Neil McGuigan
  • 46,580
  • 12
  • 123
  • 152
1
vote
1 answer

Implement custom comparison in postgresql

I have some data in a postgres table with one column called version (of type varchar). I would like to use my own comparison function to to order/sort on that column, but I am not sure what is the most appropriate answer: I have an JS…
David Cournapeau
  • 78,318
  • 8
  • 63
  • 70
0
votes
0 answers

Build error plv8 - using the make command

After downloading source code by executing commands: $ wget https://github.com/plv8/plv8/archive/v3.0.0.tar.gz $ tar -xvzf v3.0.0.tar.gz $ cd plv8-3.0.0 $ make Getting an error after running the make command mkdir -p build cd build; git clone…
Ishaan Adarsh
  • 197
  • 1
  • 11
0
votes
1 answer

Supabase Postgre / Database Function how to log and debug?

Does someone know how to see my logs coming from my database function using plv8 in supabase? I tried searching the docs but could not seem to find any answers to solve the issue I am facing. So far i am only seeing Error messages within supabase…
jmsandiegoo
  • 413
  • 4
  • 14
0
votes
0 answers

Preserving parameter type info when calling a plv8 function in postgres

I am trying to get plv8 3.x working in Postgres v14. I am trying to preserve the type information when calling a plv8 function, but everything ends up being just "object". This is affecting my ability to do equality comparisons between two…
Peter Rilling
  • 323
  • 3
  • 7
0
votes
1 answer

unable to build the docker image with postgres11 with plv8

Below is the docker file i am using to build an image. but i get the error when trying to build. FROM postgres:11.14 RUN apt-get update && apt-get install -y --no-install-recommends \ postgresql-$PG_MAJOR-plv8 \ python-setuptools \ python-wheel…
Sparc Splunk
  • 93
  • 1
  • 1
  • 5
0
votes
1 answer

Can't install plv8: /usr/include/postgresql/12/server/pg_config*.h': No such file or directory

Linux Mint 20.2, Postgres 9.6 I need to install plv8 I try this: wget https://github.com/plv8/plv8/archive/v2.0.0.tar.gz tar -xvzf v2.0.0.tar.gz cd plv8-2.0.0 make static make install But I get error: cat:…
Alexei
  • 14,350
  • 37
  • 121
  • 240
0
votes
2 answers

Is something like PLV8 exist in Microsoft SQL Server?

Is something like PLV8 exist in Microsoft SQL Server (JavaScript procedural language add-on for Microsoft SQL Server)?
Vy Do
  • 46,709
  • 59
  • 215
  • 313
0
votes
1 answer

Calling stored function in postgres 12 with json type argument by SQL query from pgAdmin results in error

I'm trying to call a stored function in postgres 12 DB which takes 1 parameter of json type and returns result of json type. The function is like this: CREATE OR REPLACE FUNCTION public.get_users( data json, OUT result json) RETURNS…
Vind Iskald
  • 345
  • 3
  • 14
0
votes
0 answers

How to terminate a long running postgres query (in plv8 extension)?

I have executed a plv8 function on pgadmin 4, that uses nested for loops and some array functions. This query was stopped using pgadmin cancel query (stop) button in GUI. 24 hours later, This query still shows up as active and running. I have…
0
votes
1 answer

plv8 query example with IN operator

I am having trouble executing this query var insurers = []; var valid_insurer_query = plv8.execute('select * from table_name where row_id IN $1', [insurers]) It is giving syntax error Error: syntax error at or near "$1" It works fine if I use…
S.K
  • 480
  • 1
  • 4
  • 19
0
votes
1 answer

Converting basic JS to Perl

I'm currently trying to convert a PostgreSQL function from JS to Perl since the PLV8 extension isn't available in my environment. The original JS/PLV8 code I have is: CREATE OR REPLACE FUNCTION plays_users_stats_trigger() RETURNS trigger AS $$ …
Curtis
  • 2,646
  • 6
  • 29
  • 53