Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W4fw2-0004D1-77 for pgsql-bugs@arkaria.postgresql.org; Sun, 19 Jan 2014 00:08:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W4fw1-0007KR-KG for pgsql-bugs@arkaria.postgresql.org; Sun, 19 Jan 2014 00:08:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W4fw0-0007KL-Sw for pgsql-bugs@postgresql.org; Sun, 19 Jan 2014 00:08:16 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W4fvy-0007yH-DM for pgsql-bugs@postgresql.org; Sun, 19 Jan 2014 00:08:16 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 8FEAE5F7A9; Sat, 18 Jan 2014 19:08:35 -0500 (EST) Date: Sat, 18 Jan 2014 19:08:35 -0500 From: Stephen Frost To: Tom Lane Cc: marko@joh.to, pgsql-bugs@postgresql.org Subject: Re: BUG #8870: PL/PgSQL, SELECT .. INTO and the number of result columns Message-ID: <20140119000835.GB31026@tamriel.snowman.net> References: <20140118232509.26700.59523@wrigleys.postgresql.org> <25794.1390089578@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="s/l3CgOIzMHHjg/5" Content-Disposition: inline In-Reply-To: <25794.1390089578@sss.pgh.pa.us> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.8.0-35-generic (x86_64) X-Uptime: 19:05:28 up 10 days, 21:19, 4 users, load average: 0.04, 0.06, 0.06 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -2.3 (--) 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 --s/l3CgOIzMHHjg/5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline * Tom Lane (tgl@sss.pgh.pa.us) wrote: > ISTM what you're really asking for is a compile time (not run-time) check > that the number of INTO targets matches the nominal number of output > columns of the query. Not sure how difficult that is, but it'd be more > likely to be successful than messing with the run-time behavior in > exec_move_row. For my 2c- a compile-time check would be even better than a run-time one in this case as it would provide pl/pgsql authors notice that they've goof'd something up. Regardless, I don't see how we can claim to be respecting what the documentation calls for here and it's causing pain for our users. I'm on the fence about if we can feel comfortable back-patching such a change, but I do feel we should figure out a way to fix it for 9.4. Thanks, Stephen --s/l3CgOIzMHHjg/5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJS2xeDAAoJEO1sijiDR2RV8BgP/ip6ZgGn9V66evDMYcVDk8rk a4Ig21KPtKvfl+Ad0jAFf2ieBikYGoS5/RjZMxlSlbNSJsxekf7HaRoCqZSgSbPO YoV1RpTjWft+yfbrdVW4WVH7Coz08/1lIp3G7RqZpLT2XeSfvz2alcji9ow1gF3K b8Bwree2L2hEvnCrr8UWWLZb/Xj2g1M7O2OMA4+8sCtl0VQHOVlGLmIY3ohnJDtU 9EK2SJst79T3ZmLeMNPXcI0mOkj+XpHrkOIFcvg0nj/kVwG42Gkp2Nyt37D7ZeCi Q7IKzCaLklWOFzZAoYmzLmhcikk18nVxXfIb2HHivGGCVpGh6Zq5X4Y6L4mLJrph RUIhnvnb1NFZTSVMAuGQNCEWpwMznz3zM0eJ5qQUqbqZdLJrQtAxSmwRUJIirYQh +VzyTwSqKoz/JP441mFU4Wk1JWZEe5qHcXb6X+A47BXyc3DMXnjcct/B0++gtGxO MPWDRdEMziw1PTW9k8MTkvjWTpBc0JtW3c01QakJocNQWiv0iZExnhfOfGBtGw43 rvNJ9M89tkMIN24gizsFS1a49pTopAf/28qocAWWfGMApIbH17KNBzxkXXlGuR4T zRZq+2KHx/83y8fwAVzvGwoR9sBhn0GY514TYnkG5axzRACh64oJZ7303QeQOaBs 1HDEYbxj6qxyenRFyYbQ =mIw1 -----END PGP SIGNATURE----- --s/l3CgOIzMHHjg/5--