insert trigger

Поиск
Список
Период
Сортировка
От Roberto Benitez
Тема insert trigger
Дата
Msg-id 000801c28478$2c97e810$6401a8c0@SUZIE
обсуждение исходный текст
Ответы Re: insert trigger  (<mallah@trade-india.com>)
Re: insert trigger  (Bruno Wolff III <bruno@wolff.to>)
Re: insert trigger  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-admin
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
 
 
 
 
 

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Eric Comeau"
Дата:
Сообщение: Re: HA for high insert volume
Следующее
От: "Adam Erickson"
Дата:
Сообщение: Postgres over stand-alone disk array?