PL/pgSQL is the default procedural language for PostgreSQL.
I want to store an update's RETURNING values into a data structure so that I can use it in a …
function postgresql plpgsql sql-returningForeign key constraints are not copied when using create table table_name ( like source_table INCLUDING ALL)' in Postgres. …
postgresql foreign-keys plpgsql create-tableCREATE OR REPLACE FUNCTION getParentLtree(parent_id bigint, tbl_name varchar) RETURNS ltree AS $BODY$ DECLARE parent_ltree ltree; BEGIN …
postgresql plpgsql dynamic-sql string-concatenationI've just inherited an old PostgreSQL installation and need to do some diagnostics to find out why this database is …
sql postgresql plpgsql postgresql-8.4I have a following table: +----+----------+----------+ | id | trail_id | position | +----+----------+----------+ | 11 | 16 | NULL | | 12 | 121 | NULL | | 15 | 121 | NULL | | 19 | 42 | NULL | | 20 | 42 | NULL | | 21 | 42 | …
sql postgresql plpgsql postgresql-9.2I have this process that has to make a series of queries, using pl/pgsql: --process: SELECT function1(); SELECT function2(); …
postgresql plpgsql database-performance query-performance postgresql-performanceI would like to record the id of a user in the session/transaction, using SET, so I could be …
postgresql global-variables plpgsql postgresql-triggersAccording to the documentation (https://www.postgresql.org/docs/current/app-psql.html), even with AUTOCOMMIT set to off, PSQL issues …
postgresql transactions plpgsql commit postgresql-11I would like to write a stored procedure like this: CREATE OR REPLACE FUNCTION my_function(param_1 text, param_2 text …
postgresql stored-procedures plpgsql postgresql-9.4create table public.orders ( orderID serial PRIMARY KEY, orderdate timestamp NOT NULL ); create table public.orderdetails ( orderdetailID serial PRIMARY KEY, …
sql database postgresql plpgsql postgresql-9.4