From: | Hannu Krosing <hannu(at)tm(dot)ee> |
---|---|
To: | Alex Pilosov <alex(at)pilosoft(dot)com> |
Cc: | mlw <markw(at)mohawksoft(dot)com>, Jan Wieck <JanWieck(at)yahoo(dot)com>, Dale Johnson <djohnson(at)mi(dot)ab(dot)ca>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Re: REPLACE INTO table a la mySQL |
Date: | 2001-06-12 18:34:29 |
Message-ID: | 3B2660B5.1E4FEAF7@tm.ee |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alex Pilosov wrote:
>
> On Mon, 11 Jun 2001, mlw wrote:
>
> > > Adding another trigger event type will break every existing
> > > DB schema that relies on custom triggers to ensure logical
> > > data integrity. Thus it is unacceptable as solution to
> > > support a non-standard feature - period.
> > >
> > > The question "does this row exist" can only be answered by
> > > looking at the primary key. Now BEFORE triggers are allowed
> > > to alter the key attributes, so the final primary key isn't
> > > known before they are executed.
> > >
> > > Thus the DELETE then INSERT semantic might be the only way.
> > > Pretty havy restriction, making the entire REPLACE INTO
> > > somewhat useless IMHO.
> >
> > The only issue I have with your conclusion about DB schema is that
> > REPLACE is not part of standard SQL, so we do not need be too
> > concerned. Just give them a REPLACE trigger and be done with it. If
> > that isn't good enough, in the FAQ, say that the standard way is
> > insert or update.
> I am not sure I like this: it is possible that someone's security is based
> on triggers, and adding replace as a trigger will let them get around
> it...
BTW, does current LOAD INTO trigger INSERT triggers ?
>Possibly this could be controlled by serverwide option
> 'enable_replace_into' or something like that for people with such setup..?
>
> -alex
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-06-12 18:44:08 | Re: Patch to include PAM support... |
Previous Message | Bruce Momjian | 2001-06-12 18:31:58 | Re: Patch to include PAM support... |