pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matyas Novak <logik@centrum.cz>
To: pgsql-bugs@postgresql.org
Subject: BUG #5920: SQL function are probably "overoptimized"
Date: Tue, 8 Mar 2011 03:49:19 GMT
Message-ID: <201103080349.p283nJjf074026@wwwmaster.postgresql.org> (raw)


The following bug has been logged online:

Bug reference:      5920
Logged by:          Matyas Novak
Email address:      logik@centrum.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...



view thread (2+ messages)  latest in thread

Message-ID: <201103080349.p283nJjf074026@wwwmaster.postgresql.org>
Permalink:  ../201103080349.p283nJjf074026@wwwmaster.postgresql.org/
Also on:    postgresql.org/message-id/201103080349.p283nJjf074026@wwwmaster.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: logik@centrum.cz
  Subject: Re: BUG #5920: SQL function are probably "overoptimized"
  In-Reply-To: <201103080349.p283nJjf074026@wwwmaster.postgresql.org>
  References: <201103080349.p283nJjf074026@wwwmaster.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox