Re: INSERT before UPDATE?

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: INSERT before UPDATE?
Дата
Msg-id 20070816091629.GA13550@a-kretschmer.de
обсуждение исходный текст
Ответ на INSERT before UPDATE?  (Jiří Němec <konference@menea.cz>)
Список pgsql-general
am  Thu, dem 16.08.2007, um 10:30:01 +0200 mailte Ji?í N?mec folgendes:
> Hello,
>
> I would like to ask you for an advice.
>
> There are two tables in my PostgreSQL database - main table with datas and
> second with translations for all languages of these records.
>
> When I try to UPDATE a record in the language table and this record
> doesn't exists there I need to INSERT into the language table (from
> default language version) and execute UPDATE statement again.
>
> Could you tell me if is this possible and if so - how to do it?

Okay, i try to ask our doc-bot on IRC:

11:15 < akretschmer> ??upsert
11:15 < rtfm_please> For information about upsert
11:15 < rtfm_please> see
http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE

Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

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

Предыдущее
От: Jiří Němec
Дата:
Сообщение: INSERT before UPDATE?
Следующее
От: "Sergey Moroz"
Дата:
Сообщение: array for cstring type