Re: INSERT Trigger to check for existing records

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: INSERT Trigger to check for existing records
Дата
Msg-id CAKFQuwZK_igf_c2CuEUWC-VAYxHeR1+PAfTtATzTJZX5836wFA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: INSERT Trigger to check for existing records  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы RE: INSERT Trigger to check for existing records  (<hagen@datasundae.com>)
Список pgsql-general
On Saturday, November 21, 2020, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Saturday, November 21, 2020, Hagen Finley <hagen@datasundae.com> wrote:

David,

That's an interesting idea. I WOULD like  to retain the OLD records that are the same and only INSERT new or changed records. Is there a way to compare the old and the new records without a trigger?


A where clause?


Did you get the part in the plan where there are two tables, existing and new? You write queries that join the two tables together and use the where clause in those queries to limit records.

David J.
 

В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: INSERT Trigger to check for existing records
Следующее
От:
Дата:
Сообщение: RE: INSERT Trigger to check for existing records