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
0
votes
0 answers

How to install plv8 in postgresql 12 on Windows10?

I have followed instruction given in How to install PLV8 on Windows? and Can't create extensions plv8 postgresql questions, but I am getting below error: ERROR: could not load library "C:/Program Files/PostgreSQL/12/lib/plv8.dll": The specified…
vaibhav shanker
  • 173
  • 2
  • 10
0
votes
0 answers

plv8 binaries copied to respective folders but error in loading libaries as specified procedure not found

ERROR: could not load library "C:/POSTGR~1/pg94/../pg94/lib/postgresql/plv8.dll": The specified procedure could not be found. SQL state: XX000 I have installed postgres 9.4.15, and want to install plv8 1.4.3. I have copied the binary files from…
0
votes
0 answers

plv8 on Postgres 9.6: previous INSERT results not available later

Our database in PostgreSQL 9.6 consists of a very complicated structure of hundreds of PostgreSQL functions of which most are written in plv8/JavaScript (if that structure makes sense, is a different point. But a complete rewrite is out of the…
cis
  • 1,259
  • 15
  • 48
0
votes
0 answers

can i somehow detect that a new statement has started

I have a plv8 function (but I assume the same thing applies to any language). It could be called a lot in one statement (select say). It computes expensive stuff so I dont want to recompute every time. But the stuff it computes depends on the…
pm100
  • 48,078
  • 23
  • 82
  • 145
0
votes
1 answer

Postgres GROUP BY, SUBSTRING and SUM Query Issue

I am trying to write a GROUP BY query but I am struggling to achieve the desired result. I am including A JSON object that represent the DB table with some data. SELECT * FROM tb_transaction "tb_transaction": [ { "id": "121", …
Marius
  • 25
  • 5
0
votes
0 answers

Parameterized queries broken with plv8

I've been trying to get plv8 working on PostgreSQL 10 (completely clean install, never used it before). I've created a function like so: CREATE OR REPLACE FUNCTION FindActivitiesJS(_id integer) RETURNS Text AS $BODY$ var queryResult =…
Mike Christensen
  • 88,082
  • 50
  • 208
  • 326
0
votes
0 answers

Performance and index usage for function based queries and function calls inside functions

I'm trying to improve the performance of PostgreSQL functions and function calls inside functions. In our application, PostgreSQL (9.6) queries are totally based on functions. For example, in order to fetch a lot of "items" some code as the lines…
cis
  • 1,259
  • 15
  • 48
0
votes
1 answer

How to invoke additional SQL before each query?

I have a database that uses plv8 engine and have stored procedures written in coffescript. When I use jDBI, in order to call those procedures, after I open connection I have to run: SET plv8.start_proc = 'plv8_init'; Can I do a similar thing when…
bodziec
  • 574
  • 1
  • 6
  • 23
0
votes
0 answers

postgres memory issue in transaction

We have a postgres process that works as follows:- 1) CSV file split into a table with a row per record 2) pagent runs a postgres function that reads each record and writes it to a new table as either a new record or an update 3) a trigger runs on…
user1331131
  • 427
  • 6
  • 20
0
votes
1 answer

pvl8.control file in postgresql is not present

I'm trying to execute a ./run sentence, but when I try to execute it I get this error: ERROR: could not open extension control file "C:/Program Files/PostgreSQL/9.4/share/extension/plv8.control": No such file or directory Is that problem related to…
fablexis
  • 578
  • 7
  • 18
-1
votes
1 answer

How to install plv8 in postgresql 14 for windows?

I tried installing plv8 from [1]: https://martendb.io/v3/documentation/admin/installing-plv8-windows but it did not work.
DARK
  • 13
  • 1
1 2 3
4