Chris Angelico wrote: On Wed, Feb 15, 2012 at 5:26 PM, Bartosz Dmytrak<bdmytrak@eranet.pl> wrote: 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; I wonder why, in that example, you would not try the INSERT first, and if that fails, then do the update? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general
On Wed, Feb 15, 2012 at 5:26 PM, Bartosz Dmytrak<bdmytrak@eranet.pl> wrote: 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;
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;
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных