Re: Insert Or update - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Insert Or update
Date
Msg-id 20040423174115.GB7767@wolff.to
Whole thread Raw
In response to Re: Insert Or update  (Igor Shevchenko <igor@carcass.ath.cx>)
Responses Re: Insert Or update
List pgsql-general
On Fri, Apr 23, 2004 at 20:17:10 +0300,
  Igor Shevchenko <igor@carcass.ath.cx> wrote:
>
> This workaround is ok but it requires additional programming instead of a
> simple single query. Absence of this sort of thing moves some of naturally
> database-side logic off to the application, and this sounds quite mysql-ish
> to me =\
> This feature was asked for for too many times, maybe it's time to implement it
> in some form ?

I suspect most of the people doing this have something wrong with their
design in the first place.

> For example, like this: INSERT OR UPDATE into TABLE [(list of attributes)]
> values (list of values)

There is a command defined to do this in the latest SQL standard. There was
some discussion about this very recently on one of the lists. You might want
to look at it to see what the standard syntax is going to be. There were
also some comments on the semantics of the command.

pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: Re: Insert Or update
Next
From: Igor Shevchenko
Date:
Subject: Re: Insert Or update