Re: [SQL] Trigger function to know which fields are being updated

2004-05-11 Thread Bernard Cheung
ADDRESS = '123 Drive' WHERE COMPANY_ID = 1; I want the trigger to ensure that the user must provide value for NAME when updating this record. From: Jeff Eckermann <[EMAIL PROTECTED]> To: Bernard Cheung <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Subject: Re: [SQL] Trigger function t

[SQL] Trigger function to know which fields are being updated

2004-05-10 Thread Bernard Cheung
without updating NAME. I tried the following code block and it doesn't work: IF TG_OP = ''UPDATE'' THEN IF NEW.NAME IS NULL THEN RAISE NOTICE ''Field NAME must be provided!''; END IF; END IF; Are there any functions like the O