Re: insert trigger

From: <mallah(at)trade-india(dot)com>
To: <RBENITEZ(at)houston(dot)rr(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: insert trigger
Date: 2002-11-07 16:08:45
Message-ID: 1101.203.145.130.142.1036685325.squirrel@mail.trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


Yes Roberto ,
Trigger are very relaible and are fired in intutive manner.

(trigger is fired for every insert )

read documentation of create trigger

regds
mallah.

regds
mallah.

> I have the following situation:
>
> when a new record is inserted in to a psql table, i want to be able to update certain
> fields. the way i'm doing it right now..to find the last record inserted...is by sorting
> the primary key (serial) in descending order and taking the first item in the list...the one
> at the top should be the one i just entered...and of course, i then procede to update the
> fieldsd i need to update..
> So, basically would like to know if this will always work. will the one at the top (the one w/
> the highest primary key [serial type]) always be the one i just entered. AND does psql ALWAYS
> execute the trigger(s) after EVERY single record that is inerted. what would happen if [ n ]
> different users try to insert records simultaniously? will psql insert one-execute the trigger,
> insert the next-execute the trigger..and so on? or will it insert ALL [n] records AND THEN
> execute the trigger?
>
> i would appreciate any advice--if this would work, or if there is a better way.
>
> thanks
> rbenitez22(at)yahoo(dot)com

-----------------------------------------
Get your free web based email at trade-india.com.
"India's Leading B2B eMarketplace.!"
http://www.trade-india.com/

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Gareth Kirwan 2002-11-07 16:27:27 Re: how could I get the source table name and field name from a view field
Previous Message Marc Mitchell 2002-11-07 16:06:58 Re: insert trigger