Re: BUG #1248: pg_dump produces grants with concatonated elements - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1248: pg_dump produces grants with concatonated elements
Date
Msg-id 24528.1094681936@sss.pgh.pa.us
Whole thread Raw
In response to BUG #1248: pg_dump produces grants with concatonated elements  ("PostgreSQL Bugs List" <pgsql-bugs@postgresql.org>)
List pgsql-bugs
"PostgreSQL Bugs List" <pgsql-bugs@postgresql.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

pgsql-bugs by date:

Previous
From: Devrim GUNDUZ
Date:
Subject: Re: BUG #1247: pltcl.so does not exist in postgresql-pl RPM
Next
From: Kjetil Torgrim Homme
Date:
Subject: Re: PosgreSQL is crashing with a signal 11 - Bug?