| От | Thomas Kellerer |
|---|---|
| Тема | Re: Implementing replace function |
| Дата | |
| Msg-id | iajf5l$bpp$1@dough.gmane.org обсуждение исходный текст |
| Ответ на | Implementing replace function (Alexander Farber <alexander.farber@gmail.com>) |
| Ответы |
Re: Implementing replace function
Re: Implementing replace function |
| Список | pgsql-general |
Alexander Farber wrote on 31.10.2010 09:22: > Hello Postgres users, > > to mimic the MySQL-REPLACE statement I need > to try to UPDATE a record and if that fails - INSERT it. > There is actually an example of this in the PG manual ;) http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE Here is another solution based on triggers: http://database-programmer.blogspot.com/2009/06/approaches-to-upsert.html Regards Thomas
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера