Re: BUG #1248: pg_dump produces grants with concatonated elements

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Timothy LoGrasso" <timlograsso(at)yahoo(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1248: pg_dump produces grants with concatonated elements
Date: 2004-09-08 22:18:56
Message-ID: 24528.1094681936@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> writes:
> pg_dump produces the following grants:
> GRANT INSERTSELECTUPDATE ON TABLE camp_score TO mn;

Doesn't happen for anybody else...

> Obviously there are no commas or spaces seperating the different privs. I'm
> actually running the following version: PostgreSQL 7.3.6 on
> i386-pc-solaris2.8, compiled by cc -fast -xarch=386 -Xa

I'm wondering about a buggy compiler. The code involved is much too
simple to be broken: it's repeated calls to this:

static void
AddAcl(char *aclbuf, const char *keyword)
{
if (*aclbuf)
strcat(aclbuf, ",");
strcat(aclbuf, keyword);
}

If *aclbuf contains zero on entry, then why isn't the strcat overwriting
instead of appending? Looks like a compiler bug to me. What is "-fast"
and does the problem go away if you don't use it?

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Kjetil Torgrim Homme 2004-09-08 22:30:16 Re: PosgreSQL is crashing with a signal 11 - Bug?
Previous Message Gaetano Mendola 2004-09-08 22:12:15 8.0 incompatibility