From: | Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Transactions and "create or replace function" |
Date: | 2005-04-22 07:53:30 |
Message-ID: | 4268AD7A.4030703@cheapcomplexdevices.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
I have a long query something like
select slow_function(col) from large_table;
and half way through the query, in a separate connection, I
CREATE OR REPLACE slow_function ....
I was surprised to see that some of the rows in my select
were processed by the old definition and some by the new.
I would have expected that since the CREATE OR REPLACE was
in a separate connection, and hense a separate transaction,
that all the results of the select() will have been processed
by the same function.
If it matters, it's postgresql 8.0.2; the function was
actually a 3-step pl/perl function, where each step uses
spi_exec_query() to call the other steps. Right now my
test case is large and ugly; but if this is unexpected
behavior I'm happy to make a smaller one that I can post here.
Ron
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2005-04-22 08:03:17 | Rules and Permissions docs change (was Re: BUG #1610: rewrite rule and sequence) |
Previous Message | Olleg Samoylov | 2005-04-22 06:33:10 | Re: BUG #1610: rewrite rule and sequence |