Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit394925b

Browse files
committed
> 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.)My patch doesn't loose the option, it's never been passed on anyway: opt_with_grant: WITH GRANT OPTION { mmerror(ET_ERROR, "WITH GRANT OPTION is not supported. Only relation owners can set privileges"); } | /*EMPTY*/ ;The existing code in ecpg/preproc/preproc.y to handle the WITH optionsimply throws an error and aborts the processing... The patch belowprevents the segfault and also passes on the WITH option to thebackend, probably a better fix.Lee Kindness
1 parentb261cb9 commit394925b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

‎src/interfaces/ecpg/preproc/preproc.y

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,7 @@ comment_text: StringConst{ $$ = $1; }
16931693

16941694
GrantStmt:GRANTprivilegesONopt_tablerelation_name_listTOgrantee_listopt_with_grant
16951695
{
1696-
$$ = cat_str(7, make_str("grant"),$2, make_str("on"),$4,$5, make_str("to"),$7);
1696+
$$ = cat_str(8, make_str("grant"),$2, make_str("on"),$4,$5, make_str("to"),$7,$8);
16971697
}
16981698
;
16991699

@@ -1769,11 +1769,8 @@ grantee_list: grantee { $$ = $1; }
17691769
|grantee_list','grantee {$$ = cat_str(3,$1, make_str(","),$3); }
17701770
;
17711771

1772-
opt_with_grant:WITHGRANTOPTION
1773-
{
1774-
mmerror(ET_ERROR,"WITH GRANT OPTION is not supported. Only relation owners can set privileges");
1775-
}
1776-
|/*EMPTY*/
1772+
opt_with_grant:WITHGRANTOPTION {$$ = make_str("with grant option"); }
1773+
|/*EMPTY*/ {$$ = EMPTY; }
17771774
;
17781775

17791776

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp