![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
From: Tom Lane <tgl (AT) sss (DOT) pgh.pa.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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |