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

Commita49ceda

Browse files
committed
Update dummy CREATE ASSERTION grammar
While we are probably still far away from fully implementingassertions, all patch proposals appear to take issue with the existingdummy grammar CREATE/DROP ASSERTION productions, so update those alittle bit. Rename the rule, use any_name instead of name, and removesome unused code. Also remove the production for DROP ASSERTION,since that would most likely be handled via the generic DROP support.extracted from a patch by Joe Wildish
1 parenta3d2844 commita49ceda

File tree

1 file changed

+7
-32
lines changed

1 file changed

+7
-32
lines changed

‎src/backend/parser/gram.y

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,11 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
259259
CreateOpFamilyStmtAlterOpFamilyStmtCreatePLangStmt
260260
CreateSchemaStmtCreateSeqStmtCreateStmtCreateStatsStmtCreateTableSpaceStmt
261261
CreateFdwStmtCreateForeignServerStmtCreateForeignTableStmt
262-
CreateAssertStmtCreateTransformStmtCreateTrigStmtCreateEventTrigStmt
262+
CreateAssertionStmtCreateTransformStmtCreateTrigStmtCreateEventTrigStmt
263263
CreateUserStmtCreateUserMappingStmtCreateRoleStmtCreatePolicyStmt
264264
CreatedbStmtDeclareCursorStmtDefineStmtDeleteStmtDiscardStmtDoStmt
265265
DropOpClassStmtDropOpFamilyStmtDropPLangStmtDropStmt
266-
DropAssertStmtDropCastStmtDropRoleStmt
266+
DropCastStmtDropRoleStmt
267267
DropdbStmtDropTableSpaceStmt
268268
DropTransformStmt
269269
DropUserMappingStmtExplainStmtFetchStmt
@@ -860,7 +860,7 @@ stmt :
860860
|CopyStmt
861861
|CreateAmStmt
862862
|CreateAsStmt
863-
|CreateAssertStmt
863+
|CreateAssertionStmt
864864
|CreateCastStmt
865865
|CreateConversionStmt
866866
|CreateDomainStmt
@@ -896,7 +896,6 @@ stmt :
896896
|DeleteStmt
897897
|DiscardStmt
898898
|DoStmt
899-
|DropAssertStmt
900899
|DropCastStmt
901900
|DropOpClassStmt
902901
|DropOpFamilyStmt
@@ -5639,43 +5638,19 @@ enable_trigger:
56395638

56405639
/*****************************************************************************
56415640
*
5642-
*QUERIES :
5641+
*QUERY :
56435642
*CREATE ASSERTION ...
5644-
*DROP ASSERTION ...
56455643
*
56465644
*****************************************************************************/
56475645

5648-
CreateAssertStmt:
5649-
CREATEASSERTIONnameCHECK'('a_expr')'
5650-
ConstraintAttributeSpec
5646+
CreateAssertionStmt:
5647+
CREATEASSERTIONany_nameCHECK'('a_expr')'ConstraintAttributeSpec
56515648
{
5652-
CreateTrigStmt *n = makeNode(CreateTrigStmt);
5653-
n->trigname =$3;
5654-
n->args = list_make1($6);
5655-
n->isconstraint =true;
5656-
processCASbits($8, @8,"ASSERTION",
5657-
&n->deferrable, &n->initdeferred,NULL,
5658-
NULL, yyscanner);
5659-
56605649
ereport(ERROR,
56615650
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
56625651
errmsg("CREATE ASSERTION is not yet implemented")));
56635652

5664-
$$ = (Node *)n;
5665-
}
5666-
;
5667-
5668-
DropAssertStmt:
5669-
DROPASSERTIONnameopt_drop_behavior
5670-
{
5671-
DropStmt *n = makeNode(DropStmt);
5672-
n->objects = NIL;
5673-
n->behavior =$4;
5674-
n->removeType = OBJECT_TRIGGER;/* XXX*/
5675-
ereport(ERROR,
5676-
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
5677-
errmsg("DROP ASSERTION is not yet implemented")));
5678-
$$ = (Node *) n;
5653+
$$ =NULL;
56795654
}
56805655
;
56815656

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp