From: | Bill Moran <wmoran(at)potentialtech(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Questions regarding interaction of stored functions |
Date: | 2005-03-27 23:39:42 |
Message-ID: | 20050327183942.100df4c4.wmoran@potentialtech.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Bill Moran <wmoran(at)potentialtech(dot)com> writes:
> > Let's take the following fictional scenerio:
>
> > BEGIN;
> > INSERT INTO table1 VALUES ('somestring');
> > INSERT INTO table1 VALUES ('anotherstring');
> > SELECT user_defined_function();
> > COMMIT;
>
> > In this case, user_defined_function() does a lot more table manipulation.
> > I don't want that to be done if any statement prior fails, but it seems as
> > if it's always done, regardless. It seems as if the second INSERT is not
> > executed if the first fails, but the function is always called.
>
> Sorry, I don't believe a word of that. If the first insert fails,
> everything will be rejected until COMMIT.
>
> Possibly you need to show a less fictionalized version of your problem.
You're right, Tom. I can't get a simplified reproduction of the problem.
That means that the problem is occurring somewhere else in my program.
--
Bill Moran
Potential Technologies
http://www.potentialtech.com
From | Date | Subject | |
---|---|---|---|
Next Message | Guy Rouillier | 2005-03-27 23:42:58 | Re: dblinks? |
Previous Message | Bricklen Anderson | 2005-03-27 23:34:11 | Re: plpgsql no longer exists |