PL/pgSQL is the default procedural language for PostgreSQL.
I'm trying to create a function in plpgsql like: CREATE OR REPLACE FUNCTION select_left_photo_ids(in_photo_id …
postgresql stored-procedures plpgsql select-intoI wrote a function to create posts for a simple blogging engine: CREATE FUNCTION CreatePost(VARCHAR, TEXT, VARCHAR[]) RETURNS INTEGER …
sql postgresql concurrency plpgsql upsertHow can I declare an array like variable with two or three values and get them randomly during execution? a := [1, 2, 5] …
arrays postgresql random plpgsql postgresql-9.2I need obtain table names from schema, except some tables CREATE OR REPLACE FUNCTION func(unnecessary_tables TEXT) returns void …
postgresql plpgsql postgresql-9.5For a security sensitive design, I'd like to disable DELETEs on certain tables. The DELETE should merely set a deleted …
postgresql triggers plpgsql sql-delete auditI want to update a column in table stats with the specific column being a parameter, then return the updated …
sql postgresql plpgsql dynamic-sql stored-functionsThe documentation for PL/pgSQL says, that declaration and assignment to variables is done with :=. But a simple, shorter and …
postgresql plpgsql assignment-operator colon-equalsI would like to create a function in PL/pgSQL with a couple of nested (or inner) functions within it. …
postgresql scope plpgsql postgresql-9.5What is the use of the following declarations, and where will we use these types of declarations? myrow tablename%ROWTYPE; …
postgresql plpgsql rdbms sqldatatypesHow can I write a dynamic SELECT INTO query inside a PL/pgSQL function in Postgres? Say I have a …
postgresql variable-assignment plpgsql dynamic-sql stored-functions