https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8098

--- Comment #5 from [email protected] ---
(In reply to martin from comment #4)
> (In reply to Sidney Markowitz from comment #1)
> > It looks like the correct fix is to make it totscore =
> > $self->{tablename}.totscore  + ?
> > 
> > I have attached a patch for perusal by people who know SQL better than I do
> > and who have access to postgres for testing.
> 
> if I read the manual correctly, in PostgreSQL at least, you can use the
> special EXCLUDED prefix to refer to the row that could not be modified due
> to the conflict.
> That would make the query:
> 
> totscore = EXCLUDED.totscore + ?
> 
> There are a number of examples of this in the documentation:
> https://www.postgresql.org/docs/15/sql-insert.html
> 
> I think this might be better than concatenating / pasting the table name as
> a prefix into the SQL query?

Note: As per 
https://www.sqlite.org/lang_UPSERT.html

SQLITE also supports / uses the special EXCLUDED prefix.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to