473,750 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

view triggers/procedures

Hi,

I have a table where in lot of triggers were included in that as shown
below. How to view/access triggers and procedures from postgresql.

I am using postgresql 7.4.1 on solaris.

regds
-raju
Process=# \d reviews
Table "public.reviews "
Column | Type |
Modifiers
------------------+-----------------------+---------------------------------
--------------------------
review_id | integer | not null default
nextval('"revie ws_review_id_se q"'::text)
project | character varying(32) | not null
phase | character varying(32) | not null default
'Unknown'::char acter varying
artifact_type | character varying(32) | not null
description | text |
author | character varying(32) |
moderator | character varying(32) |
meeting_end_dat e | date |
meeting_date | date |
formal | boolean | default true
status | character varying(16) |
disposition | character varying(16) | default 'To be
decided'::chara cter varying
comments | text |
num_attendees | smallint |
review_size | smallint |
kickoff_time | smallint |
meeting_time | smallint |
review_name | character varying(64) |
rework_effort | integer | default 0
Indexes:
"reviews_pk ey" primary key, btree (review_id)
Triggers:
"RI_ConstraintT rigger_414655" AFTER DELETE ON reviews FROM documents NOT
DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE
"RI_FKey_noacti on_del"('<unnam ed>', 'documents', 'reviews', 'UNSPECIFIED',
'review_id', 'review_id')
"RI_ConstraintT rigger_414656" AFTER UPDATE ON reviews FROM documents NOT
DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE
"RI_FKey_noacti on_upd"('<unnam ed>', 'documents', 'reviews', 'UNSPECIFIED',
'review_id', 'review_id')
"RI_ConstraintT rigger_414658" AFTER DELETE ON reviews FROM inspectors
NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE
"RI_FKey_noacti on_del"('<unnam ed>', 'inspectors', 'reviews', 'UNSPECIFIED',
'review_id', 'review_id')
"RI_ConstraintT rigger_414659" AFTER UPDATE ON reviews FROM inspectors
NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE
"RI_FKey_noacti on_upd"('<unnam ed>', 'inspectors', 'reviews', 'UNSPECIFIED',
'review_id', 'review_id')
"RI_ConstraintT rigger_414661" AFTER DELETE ON reviews FROM defects NOT
DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE
"RI_FKey_noacti on_del"('<unnam ed>', 'defects', 'reviews', 'UNSPECIFIED',
'review_id', 'review_id')
"RI_ConstraintT rigger_414662" AFTER UPDATE ON reviews FROM defects NOT
DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE
"RI_FKey_noacti on_upd"('<unnam ed>', 'defects', 'reviews', 'UNSPECIFIED',
'review_id', 'review_id')

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #1
1 2434

Raju,

these triggers are the PG implementation of foreign key constraints
checking.
They are written in C, so if you're curios how they work you will have
to check the postgres sources ;-)

HTH,
Csaba.
On Mon, 2004-08-23 at 12:06, SVGK, Raju (Raju) wrote:
Hi,

I have a table where in lot of triggers were included in that as shown
below. How to view/access triggers and procedures from postgresql.

I am using postgresql 7.4.1 on solaris.

regds
-raju
Process=# \d reviews
Table "public.reviews "
Column | Type |
Modifiers
------------------+-----------------------+---------------------------------
--------------------------
review_id | integer | not null default
nextval('"revie ws_review_id_se q"'::text)
project | character varying(32) | not null
phase | character varying(32) | not null default
'Unknown'::char acter varying
artifact_type | character varying(32) | not null
description | text |
author | character varying(32) |
moderator | character varying(32) |
meeting_end_dat e | date |
meeting_date | date |
formal | boolean | default true
status | character varying(16) |
disposition | character varying(16) | default 'To be
decided'::chara cter varying
comments | text |
num_attendees | smallint |
review_size | smallint |
kickoff_time | smallint |
meeting_time | smallint |
review_name | character varying(64) |
rework_effort | integer | default 0
Indexes:
"reviews_pk ey" primary key, btree (review_id)
Triggers:
"RI_ConstraintT rigger_414655" AFTER DELETE ON reviews FROM documents NOT
DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE
"RI_FKey_noacti on_del"('<unnam ed>', 'documents', 'reviews', 'UNSPECIFIED',
'review_id', 'review_id')
"RI_ConstraintT rigger_414656" AFTER UPDATE ON reviews FROM documents NOT
DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE
"RI_FKey_noacti on_upd"('<unnam ed>', 'documents', 'reviews', 'UNSPECIFIED',
'review_id', 'review_id')
"RI_ConstraintT rigger_414658" AFTER DELETE ON reviews FROM inspectors
NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE
"RI_FKey_noacti on_del"('<unnam ed>', 'inspectors', 'reviews', 'UNSPECIFIED',
'review_id', 'review_id')
"RI_ConstraintT rigger_414659" AFTER UPDATE ON reviews FROM inspectors
NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE
"RI_FKey_noacti on_upd"('<unnam ed>', 'inspectors', 'reviews', 'UNSPECIFIED',
'review_id', 'review_id')
"RI_ConstraintT rigger_414661" AFTER DELETE ON reviews FROM defects NOT
DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE
"RI_FKey_noacti on_del"('<unnam ed>', 'defects', 'reviews', 'UNSPECIFIED',
'review_id', 'review_id')
"RI_ConstraintT rigger_414662" AFTER UPDATE ON reviews FROM defects NOT
DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE
"RI_FKey_noacti on_upd"('<unnam ed>', 'defects', 'reviews', 'UNSPECIFIED',
'review_id', 'review_id')

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
2208
by: serge | last post by:
How can i delete all user stored procedures and all table triggers very fast in a single database? Thank you
1
4465
by: Fran?ois Bourdages | last post by:
Hi is there a way to know if object (view, function, etc) are invalid ? let say a have a table t1 (field col1, col2) and a view v1 (field t1.col1, t1.col2) if I drop t1.col2, the view v1 is not working anymore. I want to know that information. In Oracle (8.1.7), i can query the all_objects, user_object table, where status = 'INVALID'. So i can recompile invalid objects (or
4
2716
by: stacdab | last post by:
We have a partitioned view with 4 underlying tables. The view and each of the underlying tables are in seperate databases on the same server. Inserts and deletes on the view work fine. We then add insert and delete triggers to each of the underlying tables. The triggers modify a different set of tables in the same database as the view (different than the underlying table). The problem is those triggers aren't fired when inserting or...
5
4283
by: marcsirois | last post by:
I am maintaining an application where most of the business rules are in Triggers, Stored Procedures and User Defined Functions. When a bug arises, it can get very tedious to debug. Today for example, I wanted to modify a function that was being called by a trigger. The problem is that I don't want to change the function, for fear that it is being called by one of the other SP's or triggers in the database (there are hundreds of them) ...
1
1042
by: Miaaa Mukherjee | last post by:
Hello, I want to know something about the stored procedures and triggers which are used. I want to know that the procedures n triggers r created in SQL Server 2005 or Visual Studio.Net 2005 ???? Though it may be silly question for all the experts so pls answer me. Can anyone suggest me any online book guide which shows the information abt this...
2
1400
by: sonia.sardana | last post by:
Hey can anyone tell me whether Triggers and Stored Procedures are same? Triggers are stored procedures that get executed automatically when an Insert,Update,or Delete operation takes place. Stored Procedures.------???? If i m right,Stored procedures are similar to Functions in C??
4
5746
by: --CELKO-- | last post by:
I need to convert a bunch of DB2 triggers to Oracle. Is there any kind of tools for this?
1
4335
by: anuragshrivastava64 | last post by:
I am new to SQL Server. I have got a project where lot of stored procedures ,UDF's and triggers are used. The problem is I am finding all the functions and procedures but not been able to find any of the TRIGGERS. Can anyone plz tell me where can I find the triggers. I used the query (Select * from Sysobjects) and it shows 52 triggers
2
2246
by: ajaysbedi | last post by:
Hi, I have 2 triggers on a table, both triggers are updating the another table create trigger DB.TRG1 AFTER INSERT ON Table1REFERENCING NEW AS NEW FOR EACH ROW MODE DB2SQL WHEN ( NEW.DEPT <> OLD.DEPT)CALL COBOL_SP1 (NEW.DEPT,NEW.DEPT_NO) CREATE TRIGGER DB.TG2 AFTER INSERT ON Table1REFERENCING NEW AS NEW FOR EACH ROW MODE DB2SQL WHEN ( NEW.DEPT =222 and OLD.DEPT = 111) CALL COBOL_SP2 (NEW.DEPT,NEW.DEPT_NO); Basically i need to merge...
0
9397
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9257
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8264
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6810
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6081
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4716
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4893
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3327
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.