Re: [HACKERS] Delaying insertion of default values

From: wieck(at)debis(dot)com (Jan Wieck)
To: vadim(at)krs(dot)ru (Vadim Mikheev)
Cc: jwieck(at)debis(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Delaying insertion of default values
Date: 1999-07-08 12:39:41
Message-ID: m112DSn-0003ktC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Vadim wrote:

> Jan Wieck wrote:
> >
> > What's WAL?
>
> Write Ahead Log. We could backward scan WAL to get tid of
> changed primary/unique/foreign table rows and check constraints.
> More of that, we could write to WAL RI infos only for rows with
> updated _keys_ to avoid check for cases when there was no key
> update.

Sounds reasonable.

>
> As far as I understand what is statement level trigger (SLT),
> one is able to use NEW/OLD in queries of SLT just like as
> NEW/OLD are used in rules. I would say that SLT-s are
> rules powered by PL, and nothing more. You would just rewrite
> each query of SLT with NEW/OLD in normal fashion. Using power
> of PL _ANY_ constraints (not just simple RI ones) could be
> implemented.

Ah - in contrast to what I thought SLT's would be. I thought
an SLT would only be called once per statement, not once per
tuple (... FOR EACH STATEMENT EXECUTE PROCEDURE ...).

In my understanding an SLT couldn't have worked for something
like

UPDATE t1 SET b = t2.b WHERE t1.a = t2.a;

Isn't this all still an AFTER trigger on ROW level that could
be executed deferred?

I like the aproach to give constraints the power of PL.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck(at)debis(dot)com (Jan Wieck) #

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-07-08 13:56:38 Re: [HACKERS] acl problem in NetBSD/m68k
Previous Message Leon 1999-07-08 12:19:33 Re: [HACKERS] Fwd: Joins and links