Re: Changes in Trigger Firing

Поиск
Список
Период
Сортировка
От Sameer Kumar
Тема Re: Changes in Trigger Firing
Дата
Msg-id CADp-Sm4TfjZhJx=uqk451zgYQAZTsmEQaggZsBvHkkvtLsQ6ww@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Changes in Trigger Firing  (Sameer Kumar <sameer.kumar@ashnik.com>)
Ответы Re: Changes in Trigger Firing
Список pgsql-hackers
<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#339999">I have been
finallyable to get the right set of files. I going with below approach:</div><div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;color:#339999"><br/></div><div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;color:#339999"><br/></div><div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;color:#339999">1)Add a new column in pg_trigger called
tgiscascaded</div><divclass="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#339999"><br
/></div><divclass="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#339999">2) Change pg_trigger.h
forthis</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#339999"><br /></div><div
class="gmail_default"style="font-family:arial,helvetica,sans-serif;color:#339999">3) Made changes in trigger.c to
insertthis values</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#339999"><br
/></div><divclass="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#339999">4) Corresponding changes
madein </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#339999">                 -
reltrigger.h</div><divclass="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#339999">             
  - parsenode.h</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#339999"><br
/></div><divclass="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#339999">5) Changed gram.y to
understanda new key word in CREATE TRIGGER statement "CASCADED". </div><div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;color:#339999">               - The new option will be optional and will
applyonly to non-constraint triggers</div><div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;color:#339999">                - If the option is specified trigger will
CASCADEto child tables</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#339999"><br
/></div><divclass="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#339999"> 6) I just complied the
sourcecode (modified with above changes) and it </div><div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;color:#339999">               - Added a new column in
pg_trigger</div><divclass="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#339999">               
-The new column is able to derive its value from CREATE TRIGGER statement based on whether CASDADED was specified or
not<br/></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#339999">                -
Thevalue is True if the option was specified</div><div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;color:#339999">                - The value is false if the option was not
specified</div><divclass="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#339999"><br /></div><div
class="gmail_default"style="font-family:arial,helvetica,sans-serif;color:#339999"><br /></div><div
class="gmail_default"style="font-family:arial,helvetica,sans-serif;color:#339999">7) Now I will work on trigger firing
mechanismwith below approach</div><div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;color:#339999">               - Before firing triggers, check if it's an
inheritedtable</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#339999">           
  - First get CASCADED triggers for parents and fire them</div><div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;color:#339999">              - Proceed as usual</div><div
class="gmail_default"style="font-family:arial,helvetica,sans-serif;color:#339999"><br /></div><div
class="gmail_default"style="font-family:arial,helvetica,sans-serif;color:#339999"><br /></div><div
class="gmail_default"style="font-family:arial,helvetica,sans-serif;color:#339999">Any suggestion on improving the
approachor comments on need for this feature are welcome.</div><div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;color:#339999"><br/></div><div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;color:#339999"><br/></div><div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;color:#339999">Regards<br />Sameer</div></div> 

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: shared memory message queues
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: pgsql: Fix a couple of bugs in MultiXactId freezing