Re: BUG #17445: "ON CONFLICT" has different behaviors when its param is passed with prepared stmt or hard coded

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: yaser(dot)amiri95(at)gmail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17445: "ON CONFLICT" has different behaviors when its param is passed with prepared stmt or hard coded
Date: 2022-03-21 23:03:15
Message-ID: 2409082.1647903795@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Peter Geoghegan <pg(at)bowt(dot)ie> writes:
> That being said, I *don't* think that it makes sense to support
> paramaters in conflict_target's WHERE clause -- that should be static,
> not dynamic. ISTM that it would be somewhat useful to have that case
> throw an error, in an immediate and obvious way, with an accompanying
> HINT.

Hm. I don't have an opinion on whether this'd be a useful case to
support, but I agree that actually doing so is not terribly feasible.
Perhaps a specific error message would be worth the trouble.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Geoghegan 2022-03-21 23:14:21 Re: BUG #17445: "ON CONFLICT" has different behaviors when its param is passed with prepared stmt or hard coded
Previous Message Peter Geoghegan 2022-03-21 22:53:12 Re: BUG #17445: "ON CONFLICT" has different behaviors when its param is passed with prepared stmt or hard coded