From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: INSERT before UPDATE? |
Date: | 2007-08-16 09:16:29 |
Message-ID: | 20070816091629.GA13550@a-kretschmer.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Sergey Moroz | 2007-08-16 09:22:31 | array for cstring type |
Previous Message | Peter Eisentraut | 2007-08-16 09:03:39 | Re: UTF-8 encoding problem |