|
PL/PgSQL
CREATE OR REPLACE FUNCTION test() returns text as '
DECLARE
[variables]
BEGIN
[statements]
END;'
LANGUAGE plpgsql;
- BEGIN/END not to be confused with transactions (note: no ';' after BEGIN!)
- Nested sub-blocks
- Escaping of quotes: "''" for "'"
Page 31
|