--- a/postgres.rst Thu Jan 03 21:52:00 2019 +0200
+++ b/postgres.rst Thu Jan 03 22:03:33 2019 +0200
@@ -347,3 +347,23 @@
https://jdbc.postgresql.org/download.html
Java/JDBC/Postgres compatibility table.
+plpgsql
+=======
+
+Simple function::
+
+ CREATE OR REPLACE FUNCTION incx(x INTEGER)
+ RETURNS INTEGER STABLE AS $$
+ BEGIN
+ RETURN x + 1;
+ END;
+ $$ LANGUAGE plpgsql;
+
+Support for procedures is added only in Postgres v11.
+
+https://www.postgresql.org/docs/current/sql-createfunction.html
+ ``CREATE FUNCTION``.
+https://www.postgresql.org/docs/current/plpgsql-control-structures.html
+ plpgsql control structures.
+https://www.postgresql.org/docs/current/errcodes-appendix.html
+ PostgreSQL Error Codes.
\ No newline at end of file