Re: Re: REPLACE INTO table a la mySQL

From: "Dale Johnson" <djohnson(at)mi(dot)ab(dot)ca>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: REPLACE INTO table a la mySQL
Date: 2001-06-08 09:19:49
Message-ID: VM0U6.73518$%i7.55451364@news1.rdc1.sfba.home.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


"Jan Wieck" <JanWieck(at)Yahoo(dot)com> wrote in message
news:200106061506(dot)f56F6dV01843(at)jupiter(dot)us(dot)greatbridge(dot)com(dot)(dot)(dot)
> mlw wrote:
> > [...]
> > REPLACE into table set xx=yy, ww = zz where ID = fubar;
> >
> > A MUCH better solution!
>
> Please solve the trigger problem at least theoretical before
> claiming that mySQL is that MUCH better. And please don't
> solve it by ripping out trigger support :-)
>
for INSERT OR REPLACE into table ...
if the record was not there, fire the insert trigger
else
delete the row (fire delete trigger)
insert the new row (fire the insert trigger)
fi

semantically no other way, I think

Dale.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message D'Arcy J.M. Cain 2001-06-08 13:07:05 ERROR: Memory exhausted in AllocSetAlloc(909324558)
Previous Message Roberto Fichera 2001-06-08 08:44:48 Re: Re: Acucobol interface