Re: BUG #1215: Call sql function from plpgsql results vary.

From: "Robert Henkel" <bob(at)teamhenkel(dot)com>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1215: Call sql function from plpgsql results vary.
Date: 2004-08-12 03:41:28
Message-ID: BAY9-F57hsM8qIPsD2F0001bee1@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

That fixed it, it works now as I had hoped. Thanks again

>From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
>To: "Bob Henkel" <bob(at)teamhenkel(dot)com>
>CC: pgsql-bugs(at)postgresql(dot)org
>Subject: Re: [BUGS] BUG #1215: Call sql function from plpgsql results vary.
>Date: Wed, 11 Aug 2004 23:06:09 -0400
>
>"PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> writes:
> > I was playing around seeing what new things I could do in stored
>procedures.
> > Here is the statment I'm using to get the issue.
> > select * from f_trap_error();
> > I expect the above statement to alway return 1 which it does.
> > The issue is I expect the trapped_error table to contain a seq id and
>than a
> > 999 899
>
>I think the problem is you declared f_test_sql as IMMUTABLE, which
>entitles the planner to execute it once and bind the result as a
>constant. Functions with side-effects should *never* be marked
>immutable (nor stable for that matter).
>
> regards, tom lane

Browse pgsql-bugs by date

  From Date Subject
Next Message Christian 2004-08-12 03:43:01 postgres 7.1.3 wth perl 5.8.0
Previous Message Tom Lane 2004-08-12 03:06:09 Re: BUG #1215: Call sql function from plpgsql results vary.