PL/pgSQL is the default procedural language for PostgreSQL.
I need to create a function in Postgres and one of the variables I declare is a predefined text array, …
arrays function postgresql plpgsql declareIt must be simple, but I'm making my first steps into Postgres functions and I can't find anything that works... …
function postgresql variables plpgsql dynamic-sqlI'm not sure how to achieve something like the following: CREATE OR REPLACE FUNCTION fnJobQueueBEFORE() RETURNS trigger AS $$ DECLARE shadowname …
postgresql triggers dynamic-sql plpgsqlI want to execute some pgScript directly from the pgAdmin editor UI. FOR i IN 1..10 LOOP PRINT i; -- i …
postgresql plpgsql pgadminI have a Postgres function: create function myfunction(integer, text, text, text, text, text, text) RETURNS table(id int, match …
postgresql null postgresql-9.1 plpgsql dynamic-sqlUsing PostgreSQL, column values from a table for 1st record are stored in a record variable. for ex: let the …
postgresql types plpgsql dynamic-sql hstoreI keep all my functions in a text file with 'CREATE OR REPLACE FUNCTION somefunction'. So if I add or …
postgresql plpgsql dynamic-sql sql-dropGiven this type: -- Just for testing purposes: CREATE TYPE testType as (name text) I can get the value of …
postgresql stored-procedures types composite plpgsqlHow to map below query to postgres function. WITH RECURSIVE source (counter, product) AS ( SELECT 1, 1 UNION ALL SELECT counter + 1, product * (…
postgresql plpgsql postgresql-9.2 recursive-queryI writing a stored procedure in postgres where I need to check if a row exists then act accordingly. something …
postgresql stored-procedures plpgsql exists