search for: stmt_r

Displaying 5 results from an estimated 5 matches for "stmt_r".

Did you mean: stmt_1
2019 May 19
3
Dict issue with PostgreSQL for last_login plugin (duplicate key)
On 19/05/2019 20:31, mabi via dovecot wrote: > > ??????? Original Message ??????? > On Sunday, May 19, 2019 7:36 PM, John Fawcett via dovecot > <dovecot at dovecot.org> wrote: >> >> Attached is a tentative patch. I've verified no regression for mysql. >> There should be no regression for sqlite as the code path is identical. >> >> Are you able to
2019 May 19
0
Dict issue with PostgreSQL for last_login plugin (duplicate key)
...end_c(prefix, ')'); - if (!dict->has_on_duplicate_key) { + if (dict->has_on_duplicate_key ) { + str_append(prefix, " ON DUPLICATE KEY UPDATE "); + } else if(dict->has_on_conflict_do_update) { + str_append(prefix, " ON CONFLICT DO UPDATE SET "); + } else { *stmt_r = sql_dict_transaction_stmt_init(ctx, str_c(prefix), &params); return 0; } - str_append(prefix, " ON DUPLICATE KEY UPDATE "); for (i = 0; i < field_count; i++) { const char *first_value_field = t_strcut(fields[i].map->value_field, ',');
2019 May 19
2
Dict issue with PostgreSQL for last_login plugin (duplicate key)
On 19/05/2019 16:25, John Fawcett via dovecot wrote: > INSERT INTO last_logins (last_login,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')
2019 May 19
2
Dict issue with PostgreSQL for last_login plugin (duplicate key)
...->has_on_duplicate_key) { + if (dict->has_on_duplicate_key ) { + str_append(prefix, " ON DUPLICATE KEY UPDATE "); + } else if(dict->has_on_conflict_do_update) { + str_printfa(prefix, " ON CONFLICT (%s) DO UPDATE SET ",fields[0].map->username_field); + } else { *stmt_r = sql_dict_transaction_stmt_init(ctx, str_c(prefix), &params); return 0; } - str_append(prefix, " ON DUPLICATE KEY UPDATE "); for (i = 0; i < field_count; i++) { const char *first_value_field = t_strcut(fields[i].map->value_field, ',');
2019 May 19
4
Dict issue with PostgreSQL for last_login plugin (duplicate key)
..._on_duplicate_key) { + if (dict->has_on_duplicate_key ) { + str_append(prefix, " ON DUPLICATE KEY UPDATE "); + } else if(dict->has_on_conflict_do_update) { + str_printfa(prefix, " ON CONFLICT ON CONSTRAINT %s_pkey DO UPDATE SET ",fields[0].map->table); + } else { *stmt_r = sql_dict_transaction_stmt_init(ctx, str_c(prefix), &params); return 0; } - str_append(prefix, " ON DUPLICATE KEY UPDATE "); for (i = 0; i < field_count; i++) { const char *first_value_field = t_strcut(fields[i].map->value_field, ',');