While Postgres natively runs SQL, it can also run other "procedural languages".
It can be used for database functions, triggers, queries and more.
Even though the SQL code is
create extension, this is the equivalent of "enabling the extension".
To disable an extension you can call
Procedural languages are automatically installed within
pg_catalog, so you don't need to specify a schema.
Functions written in
plv8 are written just like any other PostgreSQL functions, only
language identifier set to
You can call
plv8 functions like any other Postgres function:
A scalar function is anything that takes in some user input and returns a single result.
You can execute SQL within
plv8 code using the
A set-returning function is anything that returns a full set of results - for example, rows in a table.