pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bryn Llewellyn <bryn@yugabyte.com>
To: Christophe Pettus <xof@thebuild.com>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Re: « The PL/pgSQL interpreter parses the function's source text and produces an internal binary instruction tree... »
Date: Thu, 28 Jul 2022 18:49:32 -0700
Message-ID: <C4FB1CF4-AF47-4443-B7D2-94CB817D4666@yugabyte.com> (raw)
In-Reply-To: <14BAC5B9-225E-49A8-A225-60C2F179E334@thebuild.com>
References: <DD03DCB0-1946-4CEB-8D72-D94EE7A85A7A@yugabyte.com>
	<14BAC5B9-225E-49A8-A225-60C2F179E334@thebuild.com>

> xof@thebuild.com wrote:
> 
>> bryn@yugabyte.com wrote:
>> 
>> Is this expected?
> 
> Yes.  This isn't a bug… Database objects (such as tables and columns) are left as identifiers until they are executed, because that is the point at which a plan for those statements is created.  The other components of PL/pgSQL are translated to internal form (and thus checked for existence) at compile time.

My example was carefully contrived to test what you said—which is what I had earlier understood. My deliberate typo thus:

>> change "v_message" in "z := v_message;  return next;" to "q_message"

(surely) has nothing to do with possible database objects. The context is a straight PL/pgSQL assignment statement (with no scalar subquery in sight).

It's this that surprises me. And it's this, and only this, that I'm asking about: might _just_ this be a fixable bug?=

view thread (8+ messages)  latest in thread

Message-ID: <C4FB1CF4-AF47-4443-B7D2-94CB817D4666@yugabyte.com>
Permalink:  ../C4FB1CF4-AF47-4443-B7D2-94CB817D4666@yugabyte.com/
Also on:    postgresql.org/message-id/C4FB1CF4-AF47-4443-B7D2-94CB817D4666@yugabyte.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: bryn@yugabyte.com, xof@thebuild.com
  Subject: Re: « The PL/pgSQL interpreter parses the function's source text and produces an internal binary instruction tree... »
  In-Reply-To: <C4FB1CF4-AF47-4443-B7D2-94CB817D4666@yugabyte.com>
  References: <DD03DCB0-1946-4CEB-8D72-D94EE7A85A7A@yugabyte.com> <14BAC5B9-225E-49A8-A225-60C2F179E334@thebuild.com> <C4FB1CF4-AF47-4443-B7D2-94CB817D4666@yugabyte.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox