Mabye I made myself not clear enough- sorry for that...
What I want is having a statement like:
PROCEDURE MyProcedure(Value1 int, Value2 text, Value3 varchar(30))
BEGIN
---check if something is valid
---compute something
---store values I got via THIS query and put them in table A, B and C
---see wether everything is ok
COMMIT;
...which I execute from a client like: exec MyProcedure(Value1, Value2, Value3)
Sorry for beeing not exact enough...
Thanks in advance,
Chris
> -----Ursprüngliche Nachricht-----
> Von: Chris Mair <chrisnospam@1006.org>
> Gesendet: 05.10.06 18:43:23
> An: kaspro@web.de
> CC: pgsql-general@postgresql.org
> Betreff: Re: [GENERAL] storing transactions
>
> > Iâve been studying the whole evening and donât seem to find an answer:
> > I want to âstoreâ transactions on the server- like viewâs, or, (sorry) as in M$ SQL Server CREATE OR REPLACE
TRANSACTIONxyz()........
>
> Of course, it's possible.
> What you need is
> CREATE OR REPLACE FUNCTION xyz() RETURNS trigger AS ...
> then
> CREATE TRIGGER ... EXECUTE PROCEDURE xyz();
>
>
> Look here for an example:
> http://www.postgresql.org/docs/8.1/static/plpgsql-trigger.html
>
> Bye,
> Chris.
>
>
_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000066