Re: Question on Insert / Update

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: Question on Insert / Update
Дата
Msg-id 20051109152051.GS30305@webserv.wug-glas.de
обсуждение исходный текст
Ответ на Question on Insert / Update  (Alex <alex@meerkatsoft.com>)
Ответы Re: Question on Insert / Update  (Csaba Nagy <nagy@ecircle-ag.com>)
Список pgsql-general
am  10.11.2005, um  1:45:46 +1100 mailte Alex folgendes:
> Hi,
> have just a general question...
>
> I have a table of 10M records, unique key on 5 fields.
> I need to update/insert 200k records in one go.
>
> I could do a select to check for existence and then either insert or
> update.
> Or simply insert, check on the error code an update if required.

Take a look at
http://developer.postgresql.org/docs/postgres/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING



HTH, Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47212,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===

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

Предыдущее
От: Csaba Nagy
Дата:
Сообщение: Re: Question on Insert / Update
Следующее
От: Tom Lane
Дата:
Сообщение: Re: insert on duplicate update?