Re: ecpg - GRANT bug

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>, pgsql-bugs(at)postgresql(dot)org, maves(at)csl(dot)co(dot)uk, Michael Meskes <meskes(at)postgresql(dot)org>
Subject: Re: ecpg - GRANT bug
Date: 2001-10-29 17:44:09
Message-ID: 200110291744.f9THi9r25011@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers


I saw that change from 8 to 7. I think in the ecpg code that the first
parameter to cat_str is the number of arguments _after_ the first
parameter.

preproc.c:{ yyval.str = cat_str(3, yyvsp[-2].str, make_str(","), yyvsp[0].str);

so I think the change from 8 -> 7 is correct.

---------------------------------------------------------------------------

> Lee Kindness <lkindness(at)csl(dot)co(dot)uk> writes:
> > ***************
> > *** 1693,1699 ****
>
> > GrantStmt: GRANT privileges ON opt_table relation_name_list TO grantee_list opt_with_grant
> > {
> > ! $$ = cat_str(8, make_str("grant"), $2, make_str("on"), $4, $5, make_str("to"), $7);
> > }
> > ;
>
> > --- 1693,1699 ----
>
> > GrantStmt: GRANT privileges ON opt_table relation_name_list TO grantee_list opt_with_grant
> > {
> > ! $$ = cat_str(7, make_str("grant"), $2, make_str("on"), $4, $5, make_str("to"), $7);
> > }
> > ;
>
>
> Uh, isn't the correct fix
>
> ! $$ = cat_str(8, make_str("grant"), $2, make_str("on"), $4, $5, make_str("to"), $7, $8);
>
> ISTM your patch loses the opt_with_grant clause. (Of course the backend
> doesn't currently accept that clause anyway, but that's no reason for
> ecpg to drop it.)
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephan Szabo 2001-10-29 17:53:57 Re: reference to inherited column in parent
Previous Message pgsql-bugs 2001-10-29 10:29:06 Bug #500: Cannot create View and Problems With the UNION clause

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-10-29 17:59:48 Re: Old backend/frontend protocol versions
Previous Message Ross J. Reedstrom 2001-10-29 17:31:54 Re: Serious performance problem