Re: INSERT Trigger to check for existing records

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: INSERT Trigger to check for existing records
Дата
Msg-id CAHOFxGo9etLxf=ZmgNKfsZ1jnNo8OWcvx24520oQpqHo86BMYw@mail.gmail.com
обсуждение исходный текст
Ответ на RE: INSERT Trigger to check for existing records  (<hagen@datasundae.com>)
Ответы Re: INSERT Trigger to check for existing records  (Hagen Finley <hagen@datasundae.com>)
Список pgsql-general
If you can modify your insert statement, and live with an extra column in the data, no trigger is needed as best I can figure.

Create a unique index over the existing columns, add a "created_on" field and call insert on conflict (unique index) do nothing.

This should give the behavior you want.

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

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