Questions about anonymous procedure/function.

From: Ying Lu <ying_lu(at)cs(dot)concordia(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Questions about anonymous procedure/function.
Date: 2005-08-02 18:01:48
Message-ID: 42EFB50C.7020204@cs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

I have a question about whether I am able to create an *anonymous*
procedure/function under postgreSQL 8. Something like:

Begin
... ...
update ...
IF ... THEN
rollback
END IF;
... ...
END;

I'd like to do a series of operations. If any one of the opers failed,
all previous operation will rollback. Actually, I do not want to create
named functions. Just used the structure for different tables with minor
changes.

Another question is about how to create a function/procedure do not need
a return value (void for return value). It seems that postgreSQL forces
to return some value?

Thanks a lot!
Emi

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dr NoName 2005-08-02 18:05:24 Re: indexes are farked
Previous Message Gregory Youngblood 2005-08-02 17:55:22 Re: Slow Inserts on 1 table?