Re: Repetition of warning message while REVOKE

Stephen Frost <sfrost@snowman.net>

From: Stephen Frost <sfrost@snowman.net>
To: "Joshua D. Drake" <jd@commandprompt.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Piyush Newe <piyush.newe@enterprisedb.com>, pgsql-hackers@postgresql.org
Date: 2010-03-05T03:41:30Z
Lists: pgsql-hackers

Attachments

All,

* Joshua D. Drake (jd@commandprompt.com) wrote:
> On Thu, 2010-03-04 at 11:23 -0500, Tom Lane wrote:
> > I'm not sure offhand about a reasonable way to rearrange the code to
> > avoid duplicate messages.
> 
> Perhaps just add what can't be revoked? meaning:
> WARNING:  no privileges could be revoked for "tbl" for column "foo"
> Then they aren't actually duplicate.

Yeah, they really aren't, after all.  I don't know how we could
rearrange the code to prevent it- we're checking and trying to change
privileges on each of the columns in the table, after all.

Attached is a patch to add column name to the error message when it's a
column-level failure.  I'm not really thrilled with it, due to the
expansion of code and addition of a bunch of conditionals, but at least
this isn't a terribly complicated function..

In the process of trying to build/run regression tests, but having
some build issues w/ HEAD (probably my fault).

	Thanks,

		Stephen