On Fri, Oct 13, 2017 at 9:39 AM, Susan Hurst
<susan(dot)hurst(at)brookhurstdata(dot)com> wrote:
> Does postgres have a MERGE statement ala Oracle?
No.
> I have found examples online for INSERT...ON CONFLICT DO NOTHING, but all of
> those examples use VALUES statements, which is not the scenario that I have.
You can use SELECT instead of VALUES with ON CONFLICT DO NOTHING/ON
CONFLICT DO UPDATE. They don't impose any restriction on the INSERT
statement at all, unlike MERGE, which is fussy about the use of
subqueries.
--
Peter Geoghegan