Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id AA86E1F02EF8 for ; Thu, 26 Apr 2012 13:02:36 -0300 (ADT) Received: from mahout.postgresql.org ([98.129.198.123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SNR9P-0007Lk-3X for pgsql-bugs@postgresql.org; Thu, 26 Apr 2012 16:02:36 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SNR9C-0005cF-3K for pgsql-bugs@postgresql.org; Thu, 26 Apr 2012 16:02:22 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1SNR9B-0001iZ-OE for pgsql-bugs@postgresql.org; Thu, 26 Apr 2012 16:02:21 +0000 Date: Thu, 26 Apr 2012 16:02:21 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #6617: FETCH FIRST syntax accepts only constants and not parameters To: pgsql-bugs@postgresql.org From: dodobas@geoinfo.geof.hr X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/154 X-Sequence-Number: 32905 The following bug has been logged on the website: Bug reference: 6617 Logged by: Dra=C5=BEen Odoba=C5=A1i=C4=87 Email address: dodobas@geoinfo.geof.hr PostgreSQL version: 9.1.3 Operating system: Linux 3.3.3 Description: = When tried setting FETCH FIRST parameter dynamically in RETURN QUERY EXECUTE some_query USING param1 it resulted with a syntax error on FETCH FIRST parameter. Apparently, it only accepts constants so it works with ($1) = Bug example: https://pgsql.privatepaste.com/1e3ef786a5