Search Postgresql Archives

Re: INSERT before UPDATE?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux