Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amJvh-0003np-Ax for pgsql-bugs@arkaria.postgresql.org; Sat, 02 Apr 2016 11:41:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1amJvg-0005Lp-7B for pgsql-bugs@arkaria.postgresql.org; Sat, 02 Apr 2016 11:41:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1amJvf-0005Lb-M7 for pgsql-bugs@postgresql.org; Sat, 02 Apr 2016 11:41:23 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1amJvQ-0005tM-R5 for pgsql-bugs@postgresql.org; Sat, 02 Apr 2016 11:41:17 +0000 MIME-Version: 1.0 Subject: BUG #14059: BUG? function in select clause called more times when use offset To: pgsql-bugs@postgresql.org From: digoal@126.com Date: Sat, 02 Apr 2016 11:40:03 +0000 Message-ID: <20160402114003.4804.46227@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 14059 Logged by: digoal Email address: digoal@126.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? -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs