Re: Easy form of "insert if it isn't already there"?

Поиск
Список
Период
Сортировка
От Chris Angelico
Тема Re: Easy form of "insert if it isn't already there"?
Дата
Msg-id CAPTjJmp5uNxwgOPKwOfZ+JXngAUypeQe+Vbuvsb0DuxxVxng_w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Easy form of "insert if it isn't already there"?  (Bartosz Dmytrak <bdmytrak@eranet.pl>)
Ответы Re: Easy form of "insert if it isn't already there"?
Re: Easy form of "insert if it isn't already there"?
Список pgsql-general
On Wed, Feb 15, 2012 at 5:26 PM, Bartosz Dmytrak <bdmytrak@eranet.pl> wrote:
> Hi,
> similar topic is in NOVICE mailing
> list: http://archives.postgresql.org/pgsql-novice/2012-02/msg00034.php
>
> e.g. You can use BEGIN... EXCEPTION.... END, good example of
> such approach is
> there: http://www.postgresql.org/docs/9.1/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE;

Ah, thanks for that!

Currently the query is a single PHP pg_query_params() call, and it's
inside a larger transaction. By the look of it, this requires writing
a function to do the job, rather than embedding the logic straight
into the query - is this correct?

ChrisA

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

Предыдущее
От: Bartosz Dmytrak
Дата:
Сообщение: Re: Easy form of "insert if it isn't already there"?
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: High checkpoint_segments