Re: [HACKERS] Rules: first fix on monday

From: jwieck(at)debis(dot)com (Jan Wieck)
To: emkxp01(at)mtcc(dot)demon(dot)co(dot)uk
Cc: pgsql-hackers(at)postgreSQL(dot)org, jwieck(at)debis(dot)com
Subject: Re: [HACKERS] Rules: first fix on monday
Date: 1998-08-17 10:22:12
Message-ID: m0z8MQX-000EBPC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> Jan,
>
> Whilst you are working on the rules system it would be nice if
> you could look for an oportunity to store the plain text rule
> definition at creation time.
>
> If the definition were stored in a table column it would allow us
> to dump and restore databases in a more complete way.
>
> I looked at this some while ago myself but never got close to
> making it work.
>
> Keith.
>

Yes, that would really be nice and I had something the like
already in mind.

I'm not really sure if it's a good thing to save the rules
definition text instead of the parsetree. The advantages of
doing so would be that the rule could easily be dumped and
(more important) that the rules can have more complicated
actions (remember that the currently stored parsetrees can
quickly override the size limit of a text type).

Storing the definition text only would require to parse at
least the actions any time, a rule should be fired on a
query. Bad for performance - but must check if significant
bad.

At least I can't do this for 6.4 I think. But I'm willing to
take a look at it after.

On the other hand wouldn't it be too complicated to
reconstruct a command from the parsetree, that exactly
creates the rule. Reading a parsetree isn't fun, but after
all I did on the rewrite system I'm somewhat familiar with it
now (sometimes I see the cup in a targetlist, the coffee
machine in the rangetable and all the buttons in the
qualification when pulling a coffee out of it - think I
should I consult a psychist when the rule system is fixed
:-).

Jan

--

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1998-08-17 11:35:26 What does "cannot extend" mean?
Previous Message David Gould 1998-08-17 07:50:33 Re: [HACKERS] Re: Quick cut at an autoconf tutorial