BUG #1733: Function visibility in transactions error - Mailing list pgsql-bugs

From Robert Grabowski
Subject BUG #1733: Function visibility in transactions error
Date
Msg-id 20050627150700.40D27F0B19@svr2.postgresql.org
Whole thread Raw
Responses Re: BUG #1733: Function visibility in transactions error
List pgsql-bugs
The following bug has been logged online:

Bug reference:      1733
Logged by:          Robert Grabowski
Email address:      grabba@env.pl
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.

pgsql-bugs by date:

Previous
From: satish reddy
Date:
Subject: Reg No Error Information Available
Next
From: Tom Lane
Date:
Subject: Re: BUG #1733: Function visibility in transactions error