Re: INSERT ON DUPLICATE KEY UPDATE

From: Richard Huxton <dev(at)archonet(dot)com>
To: Eduardo Pérez Ureta <eperez(at)it(dot)uc3m(dot)es>
Cc: Duane Lee - EGOVX <DLee(at)mail(dot)maricopa(dot)gov>, pgsql-general(at)postgresql(dot)org
Subject: Re: INSERT ON DUPLICATE KEY UPDATE
Date: 2004-06-18 18:02:18
Message-ID: 40D32E2A.2020201@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Eduardo Pérez Ureta wrote:
> On 2004-06-18 17:19:40 UTC, Duane Lee - EGOVX wrote:
>
>>I would suspect you would need to write a trigger to do this.
>
>
> It seems the mysql way of doing this is easier and safer.

And non-standard AFAIK.

> Why is that not implemented in postgresql?
> Is it better done with a trigger or with any other way?

Out of curiosity, why don't you know whether you're inserting or
updating? It always worries me when I don't know what my application is
doing.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Fitzpatrick 2004-06-18 18:17:25 Re: Trigger to update records out of memory
Previous Message Eduardo Pérez Ureta 2004-06-18 17:39:27 Re: INSERT ON DUPLICATE KEY UPDATE