Re: BUG #18774: Not the required output of the query used in the function(delete_from_table1) in postgresql9.4 - Mailing list pgsql-bugs

From Rajni Bobal
Subject Re: BUG #18774: Not the required output of the query used in the function(delete_from_table1) in postgresql9.4
Date
Msg-id CA+UiKXbazbto=0b8bT--j7WWJm2vrQk+F0_7+XBx0Zxc0P=zJg@mail.gmail.com
Whole thread Raw
In response to Re: BUG #18774: Not the required output of the query used in the function(delete_from_table1) in postgresql9.4  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
Hello Sir,

Colname is variable here, it value should be replaced in param string ($1). 

Thanks and regards. 

On Thu, 23 Jan 2025 at 7:54 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Thursday, January 23, 2025, Rajni Bobal <rajnibobal@gmail.com> wrote:
Hello SIr,
Please clarify about why $1 is not been replaced by 'colname' in delete_from_table2 function.

It has been replace with the string literal value ‘colname’, not a column reference identifier “colname”.  You cannot use positional parameters to supply identifiers.  Structure must be known at parse time.

David J.

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #18774: Not the required output of the query used in the function(delete_from_table1) in postgresql9.4
Next
From: Greg Sabino Mullane
Date:
Subject: Re: BUG #18774: Not the required output of the query used in the function(delete_from_table1) in postgresql9.4