The following bug has been logged online:

Bug reference:      1733
Logged by:          Robert Grabowski
Email address:      [EMAIL PROTECTED]
PostgreSQL version: 8.0.1
Operating system:   Linux 2.6.12-gentoo
Description:        Function visibility in transactions error
Details: 

I have problem with function visibility in transaction when I do create and
drop function. There is an example.

I have two sessions:

1: CREATE FUNCTION test () RETURNS integer AS 'select 1' LANGUAGE 'sql';
CREATE FUNCTION

1: SELECT test();
 test
------
    1
(1 row)

2: BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
BEGIN

2: SELECT test();
 test
------
    1
(1 row)

1: DROP FUNCTION test ();
DROP FUNCTION


1: CREATE FUNCTION test () RETURNS integer AS 'select 2' LANGUAGE 'sql';
CREATE FUNCTION

1: SELECT test();
 test
------
    2
(1 row)

2: SELECT test();
 test
------
    1
(1 row)

It's ok. In transaction I have old definition of test function.

2: SELECT test();
 test
------
    2
(1 row)

!!!! Strange! Second call of the same function gets  other result. 

In READ COMMITED transactions I have the same results.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to