From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | yudhi s <learnerdatabase99(at)gmail(dot)com> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Insert works but fails for merge |
Date: | 2024-08-10 13:49:30 |
Message-ID: | CAKFQuwZBRWuVE5mz4ZTZ3Y2t=RMkSdxG7-UXV7aHLwFuM2-KOA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Saturday, August 10, 2024, yudhi s <learnerdatabase99(at)gmail(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2024-08-10 14:52:31 | Re: Insert works but fails for merge |
Previous Message | sud | 2024-08-10 12:17:18 | Re: Column type modification in big tables |