Dict issue with PostgreSQL for last_login plugin (duplicate key)

mabi mabi at protonmail.ch
Tue May 28 22:34:05 EEST 2019


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, May 20, 2019 12:37 AM, John Fawcett via dovecot <dovecot at dovecot.org> wrote:

> there's no field name that is obviously the primary key. I've reworked the patch to use the postgres default primary key constraint name (tablename_pkey).
>
> The attached fix should work in that case, although I feel it's not general enough.

I saw there has been quite some discussion how to make things more generic and better for database queries in general in Dovecot around my issue but I would still be very thankful if your original patch could be submitted to Dovecot for review and approval. Your patch solves an immediate problem which is of adding UPSERT functionality to PostgreSQL Dict queries.

MySQL Dict queries has its "INSERT ... ON DUPLICATE KEY UPDATE" implemented in Dovecot so I think it's more than fair that for now that PostgreSQL support in Dict also gets its equivalent "INSERT ... ON CONFLICT UPDATE" implemented.

This is just my opinion as a long-time "user" of Dovecot, I am no dev...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20190528/ca7aabc5/attachment.html>


More information about the dovecot mailing list