Re: [HACKERS] Rules: first fix on monday

Поиск
Список
Период
Сортировка
От jwieck@debis.com (Jan Wieck)
Тема Re: [HACKERS] Rules: first fix on monday
Дата
Msg-id m0z8MQX-000EBPC@orion.SAPserv.Hamburg.dsh.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Rules: first fix on monday  (Keith Parks <emkxp01@mtcc.demon.co.uk>)
Ответы Re: [HACKERS] dumping rules
Список 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@debis.com (Jan Wieck) #

В списке pgsql-hackers по дате отправления:

Предыдущее
От: dg@informix.com (David Gould)
Дата:
Сообщение: Re: [HACKERS] Re: Quick cut at an autoconf tutorial
Следующее
От: The Hermit Hacker
Дата:
Сообщение: What does "cannot extend" mean?