Some track the attempts, though; using the equivalent to a column named Attempts. But I am not sure how useful that is in practice tbh:INSERT INTO records (PriKey, Foo, Bar) VALUES (1, 'Hello', World') ON DUPLICATE KEY UPDATE Foo=Foo;
> Since I can choose the DB, what is your opinion on MySQL vs. Postgres?INSERT INTO records (PriKey, Foo, Bar) VALUES (1, 'Hello', World') ON DUPLICATE KEY UPDATE Attempts=Attempts+1;
It really depends; frankly I don't do anything these days that even requires a DB server so usually I go with DBD::SQLite. That has it's own things to deal with (forks, etc) but it makes my life a lot easier not to have to maintain DB servers and all that stuff. YMMV based on the application though.
Most relevant from the YMMV link,
SQLite does not compete with client/server databases. SQLite competes with fopen().
In reply to Re: [OT] SQL "on duplicate key" custom action
by perlfan
in thread [OT] SQL "on duplicate key" custom action
by haukex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |