Skip site navigation (1) Skip section navigation (2)

Re: Transactions and "create or replace function"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Transactions and "create or replace function"
Date: 2005-04-23 23:41:21
Message-ID: 23883.1114299681@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> writes:
> I would have expected that since the CREATE OR REPLACE was
> in a separate connection, and hense a separate transaction,
> that all the results of the select() will have been processed
> by the same function.

System catalog accesses are generally done with SnapshotNow semantics
--- in particular, lookups for function definitions will be done that
way.  Although the PL languages all cache function definitions, they go
out of their way to verify that the cache is still up-to-date each time
it is used.  I don't recall the exact example that made us conclude we
had to act that way, but it's unlikely to be changed.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-04-23 23:45:22
Subject: Re: BUG #1620: triggers breaks with alter table (at least with plpythonu)
Previous:From: Tom LaneDate: 2005-04-23 23:04:51
Subject: Re: BUG #1618: EXTRACTing EPOCH from TIME WITH TIME ZONE is broken

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group