In a BEFORE UPDATE trigger I need to know whether the row was previously
modified by this transaction. Is it safe to use xmin and txid_current()
for this purpose (xmin is 32-bit txid type but txid_current() returns
64-bit bigint).
CREATE FUNCTION test_trigger()
RETURNS TRIGGER AS $$
BEGIN
On Thu, Dec 6, 2012 at 3:58 AM, Vlad Arkhipov arhi...@dc.baikal.ru wrote:
In a BEFORE UPDATE trigger I need to know whether the row was previously
modified by this transaction. Is it safe to use xmin and txid_current() for
this purpose (xmin is 32-bit txid type but txid_current() returns 64-bit
Vlad Arkhipov arhi...@dc.baikal.ru writes:
In a BEFORE UPDATE trigger I need to know whether the row was previously
modified by this transaction. Is it safe to use xmin and txid_current()
for this purpose (xmin is 32-bit txid type but txid_current() returns
64-bit bigint).
IF OLD.xmin
Tom Lane wrote:
Vlad Arkhipov arhi...@dc.baikal.ru writes:
In a BEFORE UPDATE trigger I need to know whether the row was previously
modified by this transaction. Is it safe to use xmin and txid_current()
for this purpose (xmin is 32-bit txid type but txid_current() returns
64-bit
Alvaro Herrera alvhe...@2ndquadrant.com writes:
I think we should be setting the initial epoch to something other than
zero. That way, some quick testing would have revealed this problem
immediately.
Yeah, having initdb start the epoch at 1 doesn't seem unreasonable.
Andres Freund and...@2ndquadrant.com writes:
On 2012-12-06 15:08:51 -0300, Alvaro Herrera wrote:
Vlad Arkhipov arhi...@dc.baikal.ru writes:
In a BEFORE UPDATE trigger I need to know whether the row was previously
modified by this transaction. Is it safe to use xmin and txid_current()
for this
On 12/07/2012 02:53 AM, Tom Lane wrote:
Vlad Arkhipov arhi...@dc.baikal.ru writes:
In a BEFORE UPDATE trigger I need to know whether the row was previously
modified by this transaction. Is it safe to use xmin and txid_current()
for this purpose (xmin is 32-bit txid type but txid_current()