Question

I've been looking around the net trying to find good resources for learning PostgreSQL's procedural programming language, PL/pgSQL.

So far the only thing I've managed to dig up is the tutorial in the PostgreSQL documentation. While that is good, I've been looking for something more in-depth. Can you recommend anything?

Was it helpful?

Solution

The best free intro to use along the official docs is at PL/pgSQL and its associated tricks page of non-trivial examples, although the translation is a bit rough in spots. More useful examples can be found rooting through the snippets page.

There are also decent chapters on PL/pgSQL inside "PostgreSQL Developer's Handbook" by Geschwinde/Schonig and "PostgreSQL" by Korry Douglas, both of which are a bit gentler intro to the language than the official docs. Those are both excellent general PostgreSQL books you might find useful for other reasons too.

OTHER TIPS

I think that that best introduction are:

  1. the docs
  2. trying
  3. trying
  4. trying

With steps 2 - 4, you can usually get a pretty good help on irc - #postgresql on irc.freenode.net, and mailing lists.

http://www.postgres.cz/index.php/PL/pgSQL_%28en%29

plpgsql is simple - and it is very similar to PL/SQL (from Oracle).

I think it because of the way postgreSQL is structured and developed, the best place to search for tutorials is the on-line documentation.

The problem here is that the documentation assumes that you know what you want to do, you know the concepts, but you don't know how. Therefore you need to add a general database book in the mix in case you want to dwell into the concepts.

That's my taste of postgreSQL so far. It is different than MySQL or SQLServer where there are thousands of resources available, but quantity is matched here with the quality of the documentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top