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

Re: [HACKERS] Duplicate object names in GRANT

From: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Duplicate object names in GRANT
Date: 2005-07-28 06:00:24
Message-ID: Pine.LNX.4.58.0507281558130.1799@linuxworld.com.au (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On Wed, 27 Jul 2005, Tom Lane wrote:

> Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> writes:
> > I ran across this yesterday on HEAD:
>
> > template1=# grant select on foo, foo to swm;
> > ERROR:  tuple already updated by self
>
> Seems to fail similarly in every version back to 7.2; probably further,
> but that's all I have running at the moment.
>
> > We could do away with the error by producing a unique list of object names
> > -- but that would impose an extra cost on the common case.
>
> CommandCounterIncrement in the GRANT loop would be easier, likely.
> I'm having a hard time getting excited about it though...

Yeah, its not that exciting but that error message would throw your
average user.

I've attached a patch which calls CommandCounterIncrement() in each of the
grant loops.

Thanks,

Gavin

Attachment: grant.patch
Description: text/plain (1.4 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2005-07-28 06:21:13
Subject: Re: VACUUM DATABASE
Previous:From: Neil ConwayDate: 2005-07-28 05:12:49
Subject: Re: Some new list.c primitives

pgsql-patches by date

Next:From: Tom LaneDate: 2005-07-28 06:34:59
Subject: Re: PLPGSQL OID Bug
Previous:From: Neil ConwayDate: 2005-07-28 05:51:45
Subject: Re: PLPGSQL OID Bug

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