Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YGlIj-0004Rb-A5 for pgsql-bugs@arkaria.postgresql.org; Thu, 29 Jan 2015 09:22:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YGlIh-0002RE-ES for pgsql-bugs@arkaria.postgresql.org; Thu, 29 Jan 2015 09:22:11 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YGlIf-0002R5-CX for pgsql-bugs@postgresql.org; Thu, 29 Jan 2015 09:22:09 +0000 Received: from mail-lb0-f179.google.com ([209.85.217.179]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YGlIb-0007WV-26 for pgsql-bugs@postgresql.org; Thu, 29 Jan 2015 09:22:07 +0000 Received: by mail-lb0-f179.google.com with SMTP id 10so25860859lbg.10 for ; Thu, 29 Jan 2015 01:22:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=CPG2/cyqC7xD9G3VrWHEHA04jWoov3/L0zXKQTsUnW8=; b=ZIhjfPPPFFrmEQ1bC5S45xPJ8hRcTyGAc7s/2sd73hYlyPBmL+XsCxeMxAU7sJYeuz jXgsEtPemqWCWdflMnlxTK4rSQE3913ZJzOIXlkjlWJgKbjLWiw1lFj/17KbBE2DX77U yWlD/9WyYKx90Y4KaxsUiS6i4leAKJ0gr41DDtTzIbh0TFXdkMHphalVrJgHS1er17yq BC+k2JyrbRz+m+33RMpQfRFxVWGSBnbUOxG1vF1QfUj20SvqVvcX/P8AQ6Q/2MNIyvHj 5yaLaB+pKA1mkh5LZ0cwfYgCUaIqaASYt22a2PXZRIrRUx/mv76vPndnnXtaQuCwSyat tgYQ== X-Gm-Message-State: ALoCoQkFCnLzok+cbvz7KkPDl9byyBry22O1wjv6vuuAOxJuiesn4yRfgR4fBaQQVSJRpc94WO+O X-Received: by 10.112.181.165 with SMTP id dx5mr12810482lbc.89.1422523322663; Thu, 29 Jan 2015 01:22:02 -0800 (PST) Received: from [172.20.10.2] (c-5eeaaa2b-74736162.cust.telenor.se. [94.234.170.43]) by mx.google.com with ESMTPSA id aq4sm1978043lbc.46.2015.01.29.01.22.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jan 2015 01:22:02 -0800 (PST) Message-ID: <54C9FBB8.4070502@joh.to> Date: Thu, 29 Jan 2015 10:22:00 +0100 From: Marko Tiikkaja User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: patrick@vanlaake.net, pgsql-bugs@postgresql.org Subject: Re: BUG #12690: EXECUTE statement fails with dynamic column name on record variable References: <20150128101839.2585.73885@wrigleys.postgresql.org> In-Reply-To: <20150128101839.2585.73885@wrigleys.postgresql.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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 On 2015-01-28 11:18, patrick@vanlaake.net wrote: > EXECUTE 'SELECT th.' || quote_ident(period) INTO times; > > In this specific context the parser seems to not support or disallow the use > of a record variable. Is this a bug ? No. It has nothing to do with the type of the variable; PL/PgSQL variables are not visible to the query being EXECUTEd at all. See http://www.postgresql.org/docs/9.4/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN, specifically the part: "No substitution of PL/pgSQL variables is done on the computed command string. Any required variable values must be inserted in the command string as it is constructed; or you can use parameters as described below." .m -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs