Re: storing intermediate results in recursive plpgsql functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fran Fabrizio <ffabrizio(at)mmrd(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: storing intermediate results in recursive plpgsql functions
Date: 2002-03-05 15:53:09
Message-ID: 15708.1015343589@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Fran Fabrizio <ffabrizio(at)mmrd(dot)com> writes:
> If that's the case, then this is the second time in a week I've found
> huge errors in this darn PostgreSQL Developer's Handbook I bought. I'm
> coming very close to tossing this thing in the garbage.

> "When a PL/pgSQL function locks a table, the lock is released when the
> PL/pgSQL function returns".

This is bogus...

> "You can't have transactions in PL/pgSQL functions. Every function is
> executed in one transaction."

This is perfectly true: the transaction in which the calling query is
contained also contains the operations executed in the called function.
However, evidently the context misled you to think it meant that the
function has its own transaction.

> This book is really starting to tick me off. Grr. I'm amazed that
> there are errors of this magnitude. The authors are Ewald Geschwinde
> and Hans-Jurgen Schonig, does anyone know their credentials?

Can't say that I recognize either name. But you might as well let them
know of the mistakes you find, so that they can fix 'em in future
editions (if any).

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-03-05 15:56:56 Re: vacuum statistics
Previous Message Ashley Clark 2002-03-05 15:49:28 Re: PL/pgSQL Syntax Problem