Re: ecpg - GRANT bug - Mailing list pgsql-bugs

From Tom Lane
Subject Re: ecpg - GRANT bug
Date
Msg-id 27250.1002907129@sss.pgh.pa.us
Whole thread Raw
In response to ecpg - GRANT bug  (Lee Kindness <lkindness@csl.co.uk>)
Responses Re: ecpg - GRANT bug  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-bugs
Lee Kindness <lkindness@csl.co.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

pgsql-bugs by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #493: corrupt pg_language_oid_index, (how to fix?)
Next
From: Bruce Momjian
Date:
Subject: Re: probably a bug of data-type serial