473,503 Members | 9,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

what is the keyWord DELETING

gauravgmbhr
107 New Member
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
3 1983
michaelb
534 Recognized Expert Contributor
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
masdi2t
37 New Member
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
107 New Member
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

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

Similar topics

5
2722
by: flupke | last post by:
Hi, i'm having trouble with deleting elements from a list in a for loop ============== test program ============== el = print "**** Start ****" print "List = %s " % el index = 0 for line...
6
2551
by: Alfonso Morra | last post by:
I have written the following code, to test the concept of storing objects in a vector. I encounter two run time errors: 1). myClass gets destructed when pushed onto the vector 2). Prog throws a...
51
4451
by: jacob navia | last post by:
I would like to add at the beginning of the C tutorial I am writing a short blurb about what "types" are. I came up with the following text. Please can you comment? Did I miss something? Is...
18
3095
by: vermarajeev | last post by:
Hello everybody, This is my second query in this post. Firstly thankx to Banfa, for helping me solve my first query. Here is the code which I have written. #include<iostream>...
6
4002
by: JonathanOrlev | last post by:
Hello everyone, I have a newbe question: In Access (2003) VBA, what is the difference between a Module and a Class Module in the VBA development environment? If I remember correctly, new...
5
2344
by: Sam.Gundry | last post by:
Hi, I wish to share an object through a bunch of functions without declaring it globally. I have achieved this through the following function: VideoReceiver* getReceiver() { static...
1
2621
by: Brian Simmons | last post by:
Hi All, I know that if you modify the web.config file or any file in the App_Code subfolder, that ASP.net 2.0 will "restart" the application (i.e. clear out any sessions, etc...). Are there...
167
8152
by: darren | last post by:
Hi I have to write a multi-threaded program. I decided to take an OO approach to it. I had the idea to wrap up all of the thread functions in a mix-in class called Threadable. Then when an...
23
4798
by: raashid bhatt | last post by:
what is restrict keyword used for? eg int *restrict p;
0
7067
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
4992
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.