Top "Plpgsql" questions

PL/pgSQL is the default procedural language for PostgreSQL.

PL/pgSQL perform vs execute

What are the difference between perform and execute on PL/pgSQL? From the manual: Sometimes it is useful to evaluate …

postgresql plpgsql
How to create guid in PostgreSQL

How to create GUID in Windows format in Postgres 9.0+? I tried function CREATE or REPLACE FUNCTION public.getguid() RETURNS varchar …

postgresql plpgsql guid
Postgres Dynamic Query Function

I need to create a function that will run a query and return the results with the table name and …

sql postgresql plpgsql
Incrementing a number in a loop in plpgsql

I couldn't find this immediately from the examples. I want to increment a variable in a loop, in a function. …

sql postgresql increment plpgsql postgresql-8.4
Difference between language sql and language plpgsql in PostgreSQL functions

Am very new in Database development so I have some doubts regarding my following example: Function f1() - language sql …

sql function postgresql stored-procedures plpgsql
Getting Affected Rows by UPDATE statement in RAW plpgsql

This has been asked multiple times here and here, but none of the answers are suitable in my case because …

postgresql plpgsql optimistic-concurrency postgresql-9.2
How do I do large non-blocking updates in PostgreSQL?

I want to do a large update on a table in PostgreSQL, but I don't need the transactional integrity to …

postgresql transactions sql-update plpgsql dblink
Calling a function that returns a refcursor

I am using Postgresql 8.3 and have the following simple function that will return a refcursor to the client CREATE OR …

sql postgresql cursor plpgsql ref-cursor
BREAK statement in PL/pgSQL

How to have the break statement in PostgreSQL? I have the structure like this: for() { for() { if(somecondition) break; } } As …

postgresql loops plpgsql break
Debug PostgreSQL function using pgAdmin

I refer this to enable the debugger in the PostgreSQL server in order to debugging the plpgsql function by stepping …

debugging postgresql plpgsql pgadmin