reset password
Author Message
ptran6
Posts: 25
Posted 17:29 Oct 25, 2010 |

Hi Dr. Sun,

1. In your example, db_class_size is an after-trigger, and the db_class_size() function tests "if l_class_size > 30". Is this equivalent to creating a before-trigger and testing "if l_class_size = 30"?

2. The special variables "new" and "old" can only be used with an after-trigger, not a before-trigger, correct?

3. Is the entire midterm going to open-internet as well? (i.e. can we access the PostgreSQL documentation during the midterm)?

Thank you.

- Peter Tran

cysun
Posts: 2935
Posted 18:19 Oct 25, 2010 |

1. Yes.

2. No. OLD and NEW can be used in row trigger (both before and after).

3. Yes.