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

Re: [BUGS] ERROR: deferredTriggerGetPreviousEvent: event for tuple(0,9) not found

From: Kristis Makris <kristis(dot)makris(at)datasoft(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org, pgsql-odbc(at)postgresql(dot)org
Subject: Re: [BUGS] ERROR: deferredTriggerGetPreviousEvent: event for tuple(0,9) not found
Date: 2001-07-11 17:51:46
Message-ID: 200107111751.f6BHpla87783@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-odbcpgsql-sql
> So that raises this from an unimplemented feature to a real bug, or at
> least higher priority in my eyes.  You can't do a CREATE/ALTER USER
> followed by an UPDATE on pg_shadow in a single transaction:

I'm glad I could be of some help.

I don't know if the following means anything to you (or the pgsql-odbc
folks), but in the past (I don't recall if that was postgres 7.0.3,
7.1.1 or 7.1.2) I used to get the following error message while issuing
a "BEGIN, ALTER USER ..., COMMIT" block, coming in through an ODBC
connection using VC++ 6 with the 7.01.00.05 driver:

ERROR:  ALTER USER: may not be called in a transaction block

Doing a BEGIN, ALTER USER.., COMMIT (not through ODBC, through the psql
client) now on 7.1.2 *seems* to work fine though. Should I take it that
ALTER USER may indeed be used in a transaction block? I don't know if
this was actually fixed or bugfixes to this might have something to do
with the system trigger on pg_shadow, but I just thought I'll mention it
in case it rings any more bells. I'm sure you know best.
 
> The workaround I'd recommend to you for now is to use ALTER USER, not
> UPDATE, to perform the second step in your function.

So, how would I go about using the ALTER USER statement to clear out the
valuntil value from the pg_shadow table? If I want to set an expiration
date for the user, I can use a statement such as:

ALTER USER test VALID UNTIL '2001-07-11 10:23:23-07'

but if I want to clear the valuntil completely, how should I issue the
ALTER USER statement? I have tried (with no success) the following so
far:

ALTER USER test VALID UNTIL NULL;
ALTER USER test VALID UNTIL 'NULL';
ALTER USER test VALID UNTIL '';


Me failing to use the "ALTER USER" command successfully caused be to use
the "UPDATE pg_shadow" instead.

Thanks,
-Kristis


In response to

pgsql-odbc by date

Next:From: Tom LaneDate: 2001-07-11 17:56:58
Subject: Re: ERROR: deferredTriggerGetPreviousEvent: event for tuple (0,9) not found
Previous:From: Tom LaneDate: 2001-07-11 16:40:27
Subject: Re: ERROR: deferredTriggerGetPreviousEvent: event for tuple (0,9) not found

pgsql-bugs by date

Next:From: Peter EisentrautDate: 2001-07-11 17:53:39
Subject: Re: order by and union
Previous:From: Bruce MomjianDate: 2001-07-11 17:30:51
Subject: Re: ecpg: INITALLY DEFERRED translated into intially deferrable

pgsql-sql by date

Next:From: Tom LaneDate: 2001-07-11 17:56:58
Subject: Re: ERROR: deferredTriggerGetPreviousEvent: event for tuple (0,9) not found
Previous:From: Alex PilosovDate: 2001-07-11 17:51:20
Subject: RE: can we write to a flat file from Postgresql procedure

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