optional_all.patch
text/x-patch
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: context
| File | + | − |
|---|---|---|
| src/backend/parser/gram.y | 30 | 0 |
*** a/src/backend/parser/gram.y
--- b/src/backend/parser/gram.y
***************
*** 4658,4663 **** privilege_target:
--- 4658,4671 ----
n->objs = $2;
$$ = n;
}
+ | TABLES IN_P SCHEMA name_list
+ {
+ PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget));
+ n->targtype = ACL_TARGET_ALL_IN_SCHEMA;
+ n->objtype = ACL_OBJECT_RELATION;
+ n->objs = $4;
+ $$ = n;
+ }
| ALL TABLES IN_P SCHEMA name_list
{
PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget));
***************
*** 4666,4671 **** privilege_target:
--- 4674,4687 ----
n->objs = $5;
$$ = n;
}
+ | SEQUENCES IN_P SCHEMA name_list
+ {
+ PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget));
+ n->targtype = ACL_TARGET_ALL_IN_SCHEMA;
+ n->objtype = ACL_OBJECT_SEQUENCE;
+ n->objs = $4;
+ $$ = n;
+ }
| ALL SEQUENCES IN_P SCHEMA name_list
{
PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget));
***************
*** 4674,4679 **** privilege_target:
--- 4690,4703 ----
n->objs = $5;
$$ = n;
}
+ | FUNCTIONS IN_P SCHEMA name_list
+ {
+ PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget));
+ n->targtype = ACL_TARGET_ALL_IN_SCHEMA;
+ n->objtype = ACL_OBJECT_FUNCTION;
+ n->objs = $4;
+ $$ = n;
+ }
| ALL FUNCTIONS IN_P SCHEMA name_list
{
PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget));
***************
*** 4869,4877 **** DefACLAction:
;
defacl_privilege_target:
! TABLES { $$ = ACL_OBJECT_RELATION; }
! | FUNCTIONS { $$ = ACL_OBJECT_FUNCTION; }
! | SEQUENCES { $$ = ACL_OBJECT_SEQUENCE; }
;
--- 4893,4904 ----
;
defacl_privilege_target:
! ALL TABLES { $$ = ACL_OBJECT_RELATION; }
! | TABLES { $$ = ACL_OBJECT_RELATION; }
! | ALL FUNCTIONS { $$ = ACL_OBJECT_FUNCTION; }
! | FUNCTIONS { $$ = ACL_OBJECT_FUNCTION; }
! | ALL SEQUENCES { $$ = ACL_OBJECT_SEQUENCE; }
! | SEQUENCES { $$ = ACL_OBJECT_SEQUENCE; }
;