BUG #14059: BUG? function in select clause called more times when use offset

From: digoal(at)126(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14059: BUG? function in select clause called more times when use offset
Date: 2016-04-02 11:40:03
Message-ID: 20160402114003.4804.46227@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14059
Logged by: digoal
Email address: digoal(at)126(dot)com
PostgreSQL version: 9.5.2
Operating system: CentOS 6.x x64
Description:

postgres=# create or replace function f() returns void as $$
declare
begin
raise notice 'called';
end;
$$ language plpgsql strict volatile;
CREATE FUNCTION

postgres=# select f(),* from ( values(1),(2),(3),(4),(5),(6) ) t(id) offset
3 limit 2;
NOTICE: called
NOTICE: called
NOTICE: called
NOTICE: called
NOTICE: called
f | id
---+----
| 4
| 5
(2 rows)

offset skip 3 tuple, but function f() called with 5 times, can we tuning
this .
or this is a bug?

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2016-04-02 14:49:26 Re: BUG #14059: BUG? function in select clause called more times when use offset
Previous Message David G. Johnston 2016-04-01 15:36:33 Re: how to regenerate pg_control file ?