BUG #5920: SQL function are probably "overoptimized"

From: "Matyas Novak" <logik(at)centrum(dot)cz>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5920: SQL function are probably "overoptimized"
Date: 2011-03-08 03:49:19
Message-ID: 201103080349.p283nJjf074026@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 5920
Logged by: Matyas Novak
Email address: logik(at)centrum(dot)cz
PostgreSQL version: 9.0.1
Operating system: linux
Description: SQL function are probably "overoptimized"
Details:

create table a(a integer);
create or replace function f1 (a varchar) returns void volatile language
plpgsql as
$$
begin
insert into a values(1);
end
$$;

create or replace function f2 () returns void volatile language sql as
$$
select f1(tmp) from (values ('aa'), ('bb')) _tmp(tmp);
$$;
select f2();

As a result, only one row appears in table a, although two should be
there...

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Itagaki Takahiro 2011-03-08 04:27:03 Re: BUG #5920: SQL function are probably "overoptimized"
Previous Message Mark Kirkwood 2011-03-08 03:14:42 Re: Hung Vacuum in 8.3