From: Álvaro Herrera <alvherre@alvh.no-ip.org>
To: Rajni Bobal <rajnibobal@gmail.com>
Cc: Greg Sabino Mullane <htamfids@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18774: Not the required output of the query used in the function(delete_from_table1) in postgresql9.4
Date: Mon, 3 Feb 2025 12:10:51 +0100
Message-ID: <202502031110.zwixdecgonww@alvherre.pgsql> (raw)
In-Reply-To: <CA+UiKXbXO6SXirvbUBHVP59a1VrwoZXfr7a9C54yu_3kDz7cnQ@mail.gmail.com>
On 2025-Feb-03, Rajni Bobal wrote:
> Please clarify the use of %I will not be substituted by the string literal
> 'colname' rather its value will be substituted dynamically.
Yes, it is expanded dynamically to the _value_ of the variable
colname, not to the literal 'colname'. If you wanted to expand a
string literal there, you would use something like
SELECT format('some text .. %I ... more', 'colname');
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: alvherre@alvh.no-ip.org, rajnibobal@gmail.com, htamfids@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18774: Not the required output of the query used in the function(delete_from_table1) in postgresql9.4
In-Reply-To: <202502031110.zwixdecgonww@alvherre.pgsql>
* 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