By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,377 Members | 3,038 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,377 IT Pros & Developers. It's quick & easy.

what is the keyWord DELETING

gauravgmbhr
100+
P: 107
hi friends
I have been doing testing on an existing project
The tables in postgresQl Db has some trigger function using keyword 'DELETING'

Expand|Select|Wrap|Line Numbers
  1. IF DELETING THEN
  2.           SOME SELECT STATEMENT
  3. END IF;
  4.  
  5.  
can anyone please help me what is this keyword deleting
it is creating errors on insert (coz the trigger is on insert)

Is it really a keyword or its a mistake by the programmer who coded this
Plz help me
Mar 27 '07 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 534
You did not post the entire code, but this statement alone does not look valid.

You can review Postgres docs for more information:
Triggers
Create Trigger
Trigger Procedures
Mar 27 '07 #2

P: 37
hi friends
I have been doing testing on an existing project
The tables in postgresQl Db has some trigger function using keyword 'DELETING'

Expand|Select|Wrap|Line Numbers
  1. IF DELETING THEN
  2.           SOME SELECT STATEMENT
  3. END IF;
  4.  
  5.  
can anyone please help me what is this keyword deleting
it is creating errors on insert (coz the trigger is on insert)

Is it really a keyword or its a mistake by the programmer who coded this
Plz help me
try this

IF (TG_OP = 'INSERT') THEN
SOME SELECT STATEMENT
ELSEIF (TG_OP = 'UPDATE') THEN
SOME SELECT STATEMENT
ELSEIF (TG_OP = 'DELETE') THEN
SOME SELECT STATEMENT
END IF;
Apr 13 '07 #3

gauravgmbhr
100+
P: 107
try this

IF (TG_OP = 'INSERT') THEN
SOME SELECT STATEMENT
ELSEIF (TG_OP = 'UPDATE') THEN
SOME SELECT STATEMENT
ELSEIF (TG_OP = 'DELETE') THEN
SOME SELECT STATEMENT
END IF;

WELL THANX for your valuable help
I worked it out
Apr 16 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.