Re: INSERT before UPDATE?
От | A. Kretschmer |
---|---|
Тема | Re: INSERT before UPDATE? |
Дата | |
Msg-id | 20070816123715.GA19295@a-kretschmer.de обсуждение исходный текст |
Ответ на | INSERT before UPDATE? (Jiří Němec <konference@menea.cz>) |
Список | pgsql-general |
am Thu, dem 16.08.2007, um 14:11:07 +0200 mailte Ji??í N??mec folgendes: > > see > > http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE > > Yes I see, but I'll try to describe it in more detail: > > I could write plpgsql trigger function which will UPDATE a record (or > INSERT new record) when the record is not found. But as far as I know > a trigger is not executed when a updated record is not found, so this > solution doesn't work for me. I don't want to change my application - > I would like to set this behaviour directly in PostgreSQL database so > I couldn't use a method from your example (...which requires that all > SQL UPDATE statements need to be modified). Maybe you can achieve this with a RULE. I'm not sure, but i would try ist. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
В списке pgsql-general по дате отправления: