Re: The efficient method to create trigger

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: Jignesh Shah <jignesh(dot)shah1980(at)gmail(dot)com>
Cc: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: The efficient method to create trigger
Date: 2009-08-19 11:11:05
Message-ID: 264855a00908190411t3fb3beb1hab3f4fbc261b1164@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Wed, Aug 19, 2009 at 1:42 AM, Jignesh Shah <jignesh(dot)shah1980(at)gmail(dot)com>wrote:

> Thanks but I already read about everything about PostgrSQL and don't want
> to read LogTable. Could any one please give me or point me some of Perl or C
> trigger examples that uses spi_prepare.
>
> Thanks a lot,
> Jignesh
>
> On Tue, Aug 18, 2009 at 4:09 PM, A. Kretschmer <
> andreas(dot)kretschmer(at)schollglas(dot)com> wrote:
>
>> In response to Jignesh Shah :
>> > Hi,
>> >
>> > I am new to PostgreSQL. I learnt most of things from postgresql.orgsite. I
>> > want to write a trigger for on my table tech_projects such that whenever
>> > INSERT, UPDATE or DELETE happen on this table, the trigger should get
>> called
>> > and the updated/deleted row must be added to tech_projects_backup table.
>> > Moreover, if there are more than one row updated then I don't want to
>> reiterate
>> > the client-server communication for each row but instead it should
>> process all
>> > rows at once.
>>
>
Triggers operate on the server only. There is no client-server
communication for executing a trigger at the row level or at the statement
level.

Sean

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Pol (Admin) 2009-08-19 11:25:53 text records and cross referencing
Previous Message Fred Janon 2009-08-19 11:02:52 Need advice on table structure for DATE & OVERLAPS