views:

3093

answers:

2

Is there a good tutorial or something similar for learning how to write Stored Procedures (for a PostgreSQL database). I'm a definite newbie when it comes to writing Stored Procedures at all, so the clearer and simpler things are explained, the better...

Thanks in advance...

+1  A: 

Note that obviously, here's a good place to start: http://www.postgresql.org/docs/current/static/sql-createfunction.html

Epaga
+5  A: 

You almost had it, but better start here - http://www.postgresql.org/docs/current/static/plpgsql.html

Some will point that PL/pgSQL is not the only way to write SP for PostgreSQL and they will be right (that's one of the advantages of Postgres), but on the other hand PL/pgSQL is nice and relatively easy to start with.

Milen A. Radev