<div>‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br></div><div> On Monday, May 20, 2019 12:37 AM, John Fawcett via dovecot <dovecot@dovecot.org> wrote:<br></div><div> <br></div><blockquote class="protonmail_quote" type="cite"><div class="moz-cite-prefix">So looking into this with a postgresql databse to work with: the
above query does not work. You have to specify either the column
name or the constraint name that you expect to be violated in
order for the update to take place.<br></div><p>With a map like this one you're using<br></p><pre><code>map {
pattern = shared/last-login/$user/$domain
table = last_login
value_field = last_login
value_type = uint
fields {
username = $user
domain = $domain
}
}</code><br></pre><p>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). <br></p></blockquote><div>So as you mention the new query you adapted which includes the primary key works, I tested it manually against PostgreSQL 10.5.<br></div><blockquote class="protonmail_quote" type="cite"><p>The attached fix should work in that case, although I feel it's
not general enough.<br></p></blockquote><div>Unfortunately my compiling skills are quite poor and I did not manage to patch and recompile Dovecot on OpenBSD.<br></div><div><br></div><div>Do you think your patch will make it into the Dovecot code?<br></div><div><br></div>