31

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...

Epaga
  • 38,231
  • 58
  • 157
  • 245

2 Answers2

27

You almost had it, but better start here plpgsql

Some will point that PL/pgSQL is not the only way to write Stored Procedures 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.

PresleyDias
  • 3,657
  • 6
  • 36
  • 62
Milen A. Radev
  • 60,241
  • 22
  • 105
  • 110
2

Note that obviously, here's a good place to start:sql-createfunction

PresleyDias
  • 3,657
  • 6
  • 36
  • 62
Epaga
  • 38,231
  • 58
  • 157
  • 245