Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGXWF-0002IQ-Gw for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Mar 2013 16:30:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UGXWE-0000E4-SJ for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Mar 2013 16:30:10 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGPRk-0005DL-0y for pgsql-bugs@postgresql.org; Fri, 15 Mar 2013 07:53:00 +0000 Received: from mail-ea0-x22a.google.com ([2a00:1450:4013:c01::22a]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UGPRi-0002Ox-8H for pgsql-bugs@postgresql.org; Fri, 15 Mar 2013 07:52:59 +0000 Received: by mail-ea0-f170.google.com with SMTP id a15so1416027eae.29 for ; Fri, 15 Mar 2013 00:52:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=CW6Seri7KVHrCNnBJWCp+Hfad2nZ3PRGmu5SlavcDHY=; b=QSfzmM7cPEOoa8B1FUB02u001QK5w5RilRqeYIuTcXgpiPIkG15TQM5DASlNW/wbyA XHejF27nNLAmXSjz69a+y/QuSrrYtkt/91v6HsDDYDFx6mfx5m+NMc7JxPBp4p4rZO6/ 2w2PVxReoQ5Al0g1YoyCe5qzc8zGGz9P5TCsV4wfdiQmyeyfze9vnuosQBpWoS+6Mj9C TiwecIRzZ6QuBnills5NOlqQRNvI/2BNNDQ1vi7dXqzMTMxChqWjV9pygsS152ADQpOd ew7GEwxbewwN8bRNxSuodApu3AADKlyCFlvIAHx604DTQCELMIlYMAHgFACtIuq3HFgU CnGA== X-Received: by 10.14.210.8 with SMTP id t8mr15407372eeo.35.1363333976233; Fri, 15 Mar 2013 00:52:56 -0700 (PDT) Received: from [94.253.151.31] (cpezg-94-253-151-31-cbl.xnet.hr. [94.253.151.31]) by mx.google.com with ESMTPS id k7sm8258192een.8.2013.03.15.00.52.54 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Mar 2013 00:52:55 -0700 (PDT) Message-ID: <5142D354.2000206@ngs.hr> Date: Fri, 15 Mar 2013 08:52:52 +0100 From: Rikard Pavelic User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Tom Lane CC: pgsql-bugs@postgresql.org Subject: Re: BUG #7943: plpgsql parsing bug References: <20846.1363319341@sss.pgh.pa.us> In-Reply-To: <20846.1363319341@sss.pgh.pa.us> X-Enigmail-Version: 1.3.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkPe0yHvJ+4gJbBEPp7UDtMu/zvbMBwYxjIYcSpaFVAvw58M26WxDNXUWA6pxRMMtK8IVs8 X-Pg-Spam-Score: -1.9 (-) 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 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 15.3.2013. 4:49, Tom Lane wrote: > > [ shrug ... ] It's right: _t1 is not a scalar variable. (It has > the composite type s.) > > The reason this is problematic is that writing a composite variable as > the target of a FOR IN SELECT loop is defined as assigning all the > columns from the SELECT into fields of the composite variable. Which > is not what you wanted to have happen there, even if we were to extend > the definition to allow a mixture of scalar and composite variables in > the target list. > > I'd suggest declaring a record variable and using that as the target. > > regards, tom lane > I changed my approach, so I can live with current behavior, just wanted to report a bug. So you are saying that I should use single record for result instead of multiple variables. Ok, that works. Another thing that was strange is that when I changed declare _t1 s; to declare _t1 s[]; parsing passed, but of course it blew up at runtime. Anyway, thanx for the workaround. I'll see if it's faster comparing fields using record or as I do it currently. Regards, Rikard - -- Rikard Pavelic http://www.ngs.hr/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJRQtNTAAoJELBms/fUcNQT+s8IAIbnA1cShN7crCCphwgDZAXh dqHW9V6m1ALPBBIgfhbjH3gPkj/5K9CC+jAGP1zRbHGunrgVKByiIcT+AoAnmGfB 8A7Vw69Yo6kQfi4hYtsEfAhmkpzn4/ZyY+q8+HwNgnAQytxRLg5rtQ5mJLard14U rxyaZM2uFHGfAp//pkfzaL7pHGd1DC/MAFLnWftUUfraWXdvJmdjQSrunXDfvpYc rfDSTTlHptK3esrk7UQnd0W9/GvpXjQNvbvgVEJ3YI0K/sUNit8QbL3DXxxOn64g F+Pc8pIpFWC0RTC9u85VPmGLoA3MI5pkRMTEMxcIONscDbmZsxk13m0zDT3OdFs= =VWnW -----END PGP SIGNATURE----- -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs