Unix Technical Forum

triggers

This is a discussion on triggers within the pgsql Admins forums, part of the PostgreSQL category; --> hi I have a query regarding triggers. On INSERT, UPDATE, DELETE I want to fire a trigger to relect ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 06:14 AM
Kailash Vyas
 
Posts: n/a
Default triggers

hi

I have a query regarding triggers.
On INSERT, UPDATE, DELETE I want to fire a trigger to relect it to another
database on postgres sever.
how can I do this operation.

Thanks in advance,
Kailash Vyas

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 06:14 AM
Guido Barosio
 
Posts: n/a
Default Re: triggers

http://www.google.co.uk/search?hl=en...ql+%2B+8&meta=
which actually will guide you to:
http://www.postgresql.org/docs/curre...tetrigger.html
..that actually is the pgsql man.
rtfm
Best wishes,
Guido

On 9/8/05, Kailash Vyas <kailash.vyas@gmail.com> wrote:
>
> hi
>
> I have a query regarding triggers.
> On INSERT, UPDATE, DELETE I want to fire a trigger to relect it to another
> database on postgres sever.
> how can I do this operation.
>
> Thanks in advance,
> Kailash Vyas
>
>



--
"Adopting the position that you are smarter than an automatic
optimization algorithm is generally a good way to achieve less
performance, not more" - Tom Lane.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 06:14 AM
Stephan Szabo
 
Posts: n/a
Default Re: triggers

On Thu, 8 Sep 2005, Kailash Vyas wrote:

> hi
>
> I have a query regarding triggers.
> On INSERT, UPDATE, DELETE I want to fire a trigger to relect it to another
> database on postgres sever.
> how can I do this operation.


This is tricky, because you probably want to have the same transactional
occurances as well (ie, rollbacks not leaving the rolledback data on the
other database). You might be best off looking at some of the replication
systems for PostgreSQL to see what they do (or perhaps just using one).


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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 06:14 AM
Chris Browne
 
Posts: n/a
Default Re: triggers

kailash.vyas@gmail.com (Kailash Vyas) writes:
> hi
> I have a query regarding triggers.
> On INSERT, UPDATE, DELETE I want to fire a trigger to relect it to another database on postgres sever.
> how can I do this operation.
> Thanks in advance,
> Kailash Vyas


If you wish the trigger to result in some action taking place on
another database, then there are two major methodologies available:

1. The trigger could RAISE an event.

A LISTENing daemon would see that event, and do something in the
other database.

2. The trigger could write data into a replicated table.

The replication system (possibly Slony-I?) would then copy
the replicable data to the other database.

--
"cbbrowne","@","cbbrowne.com"
http://cbbrowne.com/info/slony.html
Rules of the Evil Overlord #52. "I will hire a team of board-certified
architects and surveyors to examine my castle and inform me of any
secret passages and abandoned tunnels that I might not know about."
<http://www.eviloverlord.com/>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:50 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com