Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > Re: Changing a ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 3088 of 3255
Post > Topic >>

Re: Changing a trigger function

by tgl@[EMAIL PROTECTED] (Tom Lane) Apr 24, 2008 at 11:39 AM

"A. Kretschmer" <andreas.kretschmer@[EMAIL PROTECTED]
> writes:
> am  Thu, dem 24.04.2008, um 11:08:12 +0200 mailte Didier Gasser-Morlay
folgendes:
>> What would happen if someone sends an update firing that trigger
>> whilst I am in the middle of updating it  via a create or update ? Do
>> I need to wait for this evening or can I safely runs the update of the
>> function ?

> All works within a TRANSACTION. If you change the function while the old
> version are running for an other transaction, the other transaction has
> the old version until the end.

Actually I believe that stuff works on SnapshotNow, meaning that the new
definition will be absorbed at the next call of the function after you
commit the CREATE OR REPLACE FUNCTION command.  Existing active calls
will continue to use the old function definition till they finish.

For plpgsql functions, there were some bugs in this in 8.1.0-8.1.6
and 8.2.0-8.2.1, so there's some risk of a problem if you're running one
of those versions.

			regards, tom lane

-- 
Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
 




 4 Posts in Topic:
Changing a trigger function
didiergm@[EMAIL PROTECTED  2008-04-24 11:08:12 
Re: Changing a trigger function
andreas.kretschmer@[EMAIL  2008-04-24 11:22:44 
Re: Changing a trigger function
tgl@[EMAIL PROTECTED] (T  2008-04-24 11:39:40 
Re: Changing a trigger function
terry@[EMAIL PROTECTED]   2008-04-24 05:23:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 14:33:03 CDT 2008.