Where I can find PL/pgSQL and Trigger Examples? - Mailing list pgsql-general

From Alessandro Bottoni
Subject Where I can find PL/pgSQL and Trigger Examples?
Date
Msg-id 200304180943.53171.alessandro.bottoni@infinito.it
Whole thread Raw
Responses Re: Where I can find PL/pgSQL and Trigger Examples?  (Adam Witney <awitney@sghms.ac.uk>)
List pgsql-general
I'm in the need (for the first time in my life) to intercept an UPDATE
operation (before it is executed) and use its parameters to perform an
equivalent INSERT operation on the same table (of course on a different row).
This small trigger is required to bybass a small bug in a third-party program
I'm using for my work.

I checked both "Postgres: introduction and concepts" and "Practical Postgres"
for examples (as well as the User's and Developer's guides of Postgres) but
I'm still confused by the PL/pgSQL sintax and by the "quotes puzzle". As a
consequence, I'm looking for real-world/working examples of Triggers and
PL/pgPSQL (in particular, examples that performs INSERT operation with
variables values).

Is there anything like a repository of PL/pgSQL examples on the Net? I mean:
something like the "cookbooks" published by ActiveState
(ASPN.activestate.com). Where I can find a (possibly _huge_) collection of
PL/pgSQL programs?

Many thanks for your attention.

---------------------
Alessandro Bottoni


pgsql-general by date:

Previous
From: Network Administrator
Date:
Subject: Re: 7.3 PDF documentation
Next
From: "Benjamin RICHARD"
Date:
Subject: Problem with the use of Array and Loop