Re: Insert works but fails for merge - Mailing list pgsql-general

From David G. Johnston
Subject Re: Insert works but fails for merge
Date
Msg-id CAKFQuwZBRWuVE5mz4ZTZ3Y2t=RMkSdxG7-UXV7aHLwFuM2-KOA@mail.gmail.com
Whole thread Raw
In response to Re: Insert works but fails for merge  (yudhi s <learnerdatabase99@gmail.com>)
List pgsql-general
On Saturday, August 10, 2024, yudhi s <learnerdatabase99@gmail.com> wrote:

In our case , we were using this merge query in application code(in Java) as a framework to dynamically take these values as bind values and do the merge of input data/message. 

I’d do most anything before resorting to dynamic SQL.  Usually one can simply write:  values ($1::timestamptz) without resorting to a catalog lookup.

Or maybe write a function to do the merge.  Or maybe insert to a temporary table then merge that.

David J.

pgsql-general by date:

Previous
From: sud
Date:
Subject: Re: Column type modification in big tables
Next
From: Adrian Klaver
Date:
Subject: Re: Insert works but fails for merge