search for: onconflict

Displaying 2 results from an estimated 2 matches for "onconflict".

Did you mean: noconflict
2019 May 19
4
Dict issue with PostgreSQL for last_login plugin (duplicate key)
??????? Original Message ??????? On Sunday, May 19, 2019 2:58 PM, John Fawcett via dovecot <dovecot at dovecot.org> wrote: > I guess it is not supported for PostgreSQL or Sqlite, since they don't > have "ON DUPLICATE KEY UPDATE" statement which is what is being used in > MySQL. That's it, PostgreSQL does not have "ON DUPLICATE KEY" but instead uses
2019 May 19
2
Dict issue with PostgreSQL for last_login plugin (duplicate key)
...in,username,domain) VALUES (1558273000,'user at domain.tld','domain.tld') I don't have PostgresSql, would you be able to verify if this syntax would work: INSERT INTO last_logins (last_login,username,domain) VALUES (1558273000,'user at domain.tld','domain.tld') ONCONFLICT(username) UPDATE SET last_login=1558273000,domain='user at domain.tld' It's important to check that this updates only the single row for that user and it puts the right data in that row. If it doesn't work can you give the correct syntax? John -------------- next part ----------...