Dict issue with PostgreSQL for last_login plugin (duplicate key)

Aki Tuomi aki.tuomi at open-xchange.com
Wed May 29 09:01:57 EEST 2019


On 28.5.2019 22.34, mabi via dovecot wrote:
> ‐‐‐‐‐‐‐ 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...

We'll take this under consideration, but no promises.

Aki

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20190529/c749fedf/attachment.html>


More information about the dovecot mailing list