Re: [GENERAL] upsert: is there a shortcut?

2017-07-28 Thread Peter Geoghegan
Daniele Varrazzo wrote: Is there a way to avoid replicating the list of fields and use instead something like (new.*) = (excluded.*) as one could do in a trigger? (that would also imply an (id = excluded.id but it seems harmless). This is certainly something that I've seen requests for before.

[GENERAL] upsert: is there a shortcut?

2017-07-27 Thread Daniele Varrazzo
Hello, it seems not, but I feel like asking. Is there a way to express a statement like "if you have a conflict on insert replace all the values in the conflicting record" without specifying all the fields explicitly? I.e. in a replication system (where occasional accidents mean replication may r