Re: plan invalidation vs stored procedures - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: plan invalidation vs stored procedures
Date
Msg-id 162867790808050600l263038c5xe5d68586a71c2097@mail.gmail.com
Whole thread Raw
In response to Re: plan invalidation vs stored procedures  (Martin Pihlak <martin.pihlak@gmail.com>)
Responses Re: plan invalidation vs stored procedures  ("Asko Oja" <ascoja@gmail.com>)
List pgsql-hackers
2008/8/5 Martin Pihlak <martin.pihlak@gmail.com>:
> Pavel Stehule wrote:
>> Hello
>>
>> try version 8.3. There lot of dependencies are solved.
>>
>
> Yes, 8.3 was the version I was testing with. Same results on the HEAD:
>
> $ psql -e -f test.sql
> select version();
>                                                         version
>
>
--------------------------------------------------------------------------------------------------------------------------
>  PostgreSQL 8.4devel on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.3 20070929 (prerelease)
> (Ubuntu 4.1.2-16ubuntu2)
> (1 row)
>
> create function foo() returns integer as $$ begin return 1; end; $$ language plpgsql;
> CREATE FUNCTION
> prepare c1 as select * from foo();
> PREPARE
> execute c1;
>  foo
> -----
>   1
> (1 row)
>
> drop function foo();
> DROP FUNCTION
> create function foo() returns integer as $$ begin return 2; end; $$ language plpgsql;
> CREATE FUNCTION
> execute c1;
> psql:test.sql:11: ERROR:  cache lookup failed for function 36555
>
> regards,
> Martin
>

use CREATE OR REPLACE FUNCTION syntax without DROP FUNCTION, CREATE FUNCTION ..

Regards
Pavel Stehule


pgsql-hackers by date:

Previous
From: "Asko Oja"
Date:
Subject: Re: plan invalidation vs stored procedures
Next
From: "Asko Oja"
Date:
Subject: Re: plan invalidation vs stored procedures