views:

332

answers:

4

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?

+3  A: 

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.

Greg Smith
Okay, thanks for the suggestions :)
mikl
+1  A: 

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.

depesz
+1  A: 

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.

dimitris mistriotis
Okay, I think I'm going to just bite the bullet and dig through it, even though it looks a bit intimidating.
mikl
Really you should not worry, it's just to make the "switch", then you will see that it is sometimes more preferable.
dimitris mistriotis
+1  A: 

http://www.postgres.cz/index.php/PL/pgSQL%5F%28en%29

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

Pavel Stehule