Re: Insert Or update

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Igor Shevchenko <igor(at)carcass(dot)ath(dot)cx>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Insert Or update
Date: 2004-04-23 17:41:15
Message-ID: 20040423174115.GB7767@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Apr 23, 2004 at 20:17:10 +0300,
Igor Shevchenko <igor(at)carcass(dot)ath(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igor Shevchenko 2004-04-23 18:01:00 Re: Insert Or update
Previous Message Greg Stark 2004-04-23 17:31:20 Re: Insert Or update