diff options
| author | Andrey Neporada <[email protected]> | 2024-07-05 16:55:28 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-07-05 16:55:28 +0300 |
| commit | bbe1921d60a346b9e81b8692a70f8390d692bdde (patch) | |
| tree | 2aff04209a8197f7bdac48efdb198ac82f7e9ee6 | |
| parent | 3c3738a7df1bdc0476f17ea066a12a45257cb523 (diff) | |
Upgrade pg_wrapper to PostgreSQL 14.3 (#6334)
78 files changed, 13854 insertions, 12901 deletions
diff --git a/ydb/library/yql/parser/pg_wrapper/copy_src.sh b/ydb/library/yql/parser/pg_wrapper/copy_src.sh index 8d233abffb3..59142add685 100755 --- a/ydb/library/yql/parser/pg_wrapper/copy_src.sh +++ b/ydb/library/yql/parser/pg_wrapper/copy_src.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -eu -VERSION="14.2" +VERSION="14.3" errexit() { echo $1 diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/brin/brin.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/brin/brin.c index ccc9fa0959a..685899fc24c 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/brin/brin.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/brin/brin.c @@ -1007,6 +1007,9 @@ brin_summarize_range(PG_FUNCTION_ARGS) Oid heapoid; Relation indexRel; Relation heapRel; + Oid save_userid; + int save_sec_context; + int save_nestlevel; double numSummarized = 0; if (RecoveryInProgress()) @@ -1033,7 +1036,22 @@ brin_summarize_range(PG_FUNCTION_ARGS) */ heapoid = IndexGetRelation(indexoid, true); if (OidIsValid(heapoid)) + { heapRel = table_open(heapoid, ShareUpdateExclusiveLock); + + /* + * Autovacuum calls us. For its benefit, switch to the table owner's + * userid, so that any index functions are run as that user. Also + * lock down security-restricted operations and arrange to make GUC + * variable changes local to this command. This is harmless, albeit + * unnecessary, when called from SQL, because we fail shortly if the + * user does not own the index. + */ + GetUserIdAndSecContext(&save_userid, &save_sec_context); + SetUserIdAndSecContext(heapRel->rd_rel->relowner, + save_sec_context | SECURITY_RESTRICTED_OPERATION); + save_nestlevel = NewGUCNestLevel(); + } else heapRel = NULL; @@ -1048,7 +1066,7 @@ brin_summarize_range(PG_FUNCTION_ARGS) RelationGetRelationName(indexRel)))); /* User must own the index (comparable to privileges needed for VACUUM) */ - if (!pg_class_ownercheck(indexoid, GetUserId())) + if (heapRel != NULL && !pg_class_ownercheck(indexoid, save_userid)) aclcheck_error(ACLCHECK_NOT_OWNER, OBJECT_INDEX, RelationGetRelationName(indexRel)); @@ -1066,6 +1084,12 @@ brin_summarize_range(PG_FUNCTION_ARGS) /* OK, do it */ brinsummarize(indexRel, heapRel, heapBlk, true, &numSummarized, NULL); + /* Roll back any GUC changes executed by index functions */ + AtEOXact_GUC(false, save_nestlevel); + + /* Restore userid and security context */ + SetUserIdAndSecContext(save_userid, save_sec_context); + relation_close(indexRel, ShareUpdateExclusiveLock); relation_close(heapRel, ShareUpdateExclusiveLock); @@ -1107,6 +1131,9 @@ brin_desummarize_range(PG_FUNCTION_ARGS) * passed indexoid isn't an index then IndexGetRelation() will fail. * Rather than emitting a not-very-helpful error message, postpone * complaining, expecting that the is-it-an-index test below will fail. + * + * Unlike brin_summarize_range(), autovacuum never calls this. Hence, we + * don't switch userid. */ heapoid = IndexGetRelation(indexoid, true); if (OidIsValid(heapoid)) diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/gist/gistbuild.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/gist/gistbuild.c index f46a42197c9..ec28bfe89f0 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/gist/gistbuild.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/gist/gistbuild.c @@ -461,6 +461,21 @@ gist_indexsortbuild(GISTBuildState *state) pfree(pagestate->page); pfree(pagestate); + + /* + * When we WAL-logged index pages, we must nonetheless fsync index files. + * Since we're building outside shared buffers, a CHECKPOINT occurring + * during the build has no way to flush the previously written data to + * disk (indeed it won't know the index even exists). A crash later on + * would replay WAL from the checkpoint, therefore it wouldn't replay our + * earlier WAL entries. If we do not fsync those pages here, they might + * still not be on disk when the crash occurs. + */ + if (RelationNeedsWAL(state->indexrel)) + { + RelationOpenSmgr(state->indexrel); + smgrimmedsync(state->indexrel->rd_smgr, MAIN_FORKNUM); + } } /* diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/heap/heapam.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/heap/heapam.c index 114a96954a6..64b9ec0376a 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/heap/heapam.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/heap/heapam.c @@ -78,9 +78,11 @@ static XLogRecPtr log_heap_update(Relation reln, Buffer oldbuf, Buffer newbuf, HeapTuple oldtup, HeapTuple newtup, HeapTuple old_key_tuple, bool all_visible_cleared, bool new_all_visible_cleared); -static Bitmapset *HeapDetermineModifiedColumns(Relation relation, - Bitmapset *interesting_cols, - HeapTuple oldtup, HeapTuple newtup); +static Bitmapset *HeapDetermineColumnsInfo(Relation relation, + Bitmapset *interesting_cols, + Bitmapset *external_cols, + HeapTuple oldtup, HeapTuple newtup, + bool *has_external); static bool heap_acquire_tuplock(Relation relation, ItemPointer tid, LockTupleMode mode, LockWaitPolicy wait_policy, bool *have_tuple_lock); @@ -106,7 +108,7 @@ static bool ConditionalMultiXactIdWait(MultiXactId multi, MultiXactStatus status static void index_delete_sort(TM_IndexDeleteOp *delstate); static int bottomup_sort_and_shrink(TM_IndexDeleteOp *delstate); static XLogRecPtr log_heap_new_cid(Relation relation, HeapTuple tup); -static HeapTuple ExtractReplicaIdentity(Relation rel, HeapTuple tup, bool key_changed, +static HeapTuple ExtractReplicaIdentity(Relation rel, HeapTuple tup, bool key_required, bool *copy); @@ -326,7 +328,7 @@ initscan(HeapScanDesc scan, ScanKey key, bool keep_startblock) /* * copy the scan key, if appropriate */ - if (key != NULL) + if (key != NULL && scan->rs_base.rs_nkeys > 0) memcpy(scan->rs_base.rs_key, key, scan->rs_base.rs_nkeys * sizeof(ScanKeyData)); /* @@ -1574,10 +1576,13 @@ heap_getnextslot_tidrange(TableScanDesc sscan, ScanDirection direction, * must unpin the buffer when done with the tuple. * * If the tuple is not found (ie, item number references a deleted slot), - * then tuple->t_data is set to NULL and false is returned. + * then tuple->t_data is set to NULL, *userbuf is set to InvalidBuffer, + * and false is returned. * * If the tuple is found but fails the time qual check, then false is returned - * but tuple->t_data is left pointing to the tuple. + * and *userbuf is set to InvalidBuffer, but tuple->t_data is left pointing + * to the tuple. (Note that it is unsafe to dereference tuple->t_data in + * this case, but callers might choose to test it for NULL-ness.) * * heap_fetch does not follow HOT chains: only the exact TID requested will * be fetched. @@ -1597,6 +1602,25 @@ heap_fetch(Relation relation, HeapTuple tuple, Buffer *userbuf) { + return heap_fetch_extended(relation, snapshot, tuple, userbuf, false); +} + +/* + * heap_fetch_extended - fetch tuple even if it fails snapshot test + * + * If keep_buf is true, then upon finding a tuple that is valid but fails + * the snapshot check, we return the tuple pointer in tuple->t_data and the + * buffer ID in *userbuf, keeping the buffer pin, just as if it had passed + * the snapshot. (The function result is still "false" though.) + * If keep_buf is false then this behaves identically to heap_fetch(). + */ +bool +heap_fetch_extended(Relation relation, + Snapshot snapshot, + HeapTuple tuple, + Buffer *userbuf, + bool keep_buf) +{ ItemPointer tid = &(tuple->t_self); ItemId lp; Buffer buffer; @@ -1678,9 +1702,14 @@ heap_fetch(Relation relation, return true; } - /* Tuple failed time qual */ - ReleaseBuffer(buffer); - *userbuf = InvalidBuffer; + /* Tuple failed time qual, but maybe caller wants to see it anyway. */ + if (keep_buf) + *userbuf = buffer; + else + { + ReleaseBuffer(buffer); + *userbuf = InvalidBuffer; + } return false; } @@ -1703,8 +1732,7 @@ heap_fetch(Relation relation, * are vacuumable, false if not. * * Unlike heap_fetch, the caller must already have pin and (at least) share - * lock on the buffer; it is still pinned/locked at exit. Also unlike - * heap_fetch, we do not report any pgstats count; caller may do so if wanted. + * lock on the buffer; it is still pinned/locked at exit. */ bool heap_hot_search_buffer(ItemPointer tid, Relation relation, Buffer buffer, @@ -3185,6 +3213,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup, bool all_visible_cleared_new = false; bool checked_lockers; bool locker_remains; + bool id_has_external = false; TransactionId xmax_new_tuple, xmax_old_tuple; uint16 infomask_old_tuple, @@ -3269,7 +3298,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup, Assert(ItemIdIsNormal(lp)); /* - * Fill in enough data in oldtup for HeapDetermineModifiedColumns to work + * Fill in enough data in oldtup for HeapDetermineColumnsInfo to work * properly. */ oldtup.t_tableOid = RelationGetRelid(relation); @@ -3280,9 +3309,17 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup, /* the new tuple is ready, except for this: */ newtup->t_tableOid = RelationGetRelid(relation); - /* Determine columns modified by the update. */ - modified_attrs = HeapDetermineModifiedColumns(relation, interesting_attrs, - &oldtup, newtup); + /* + * Determine columns modified by the update. Additionally, identify + * whether any of the unmodified replica identity key attributes in the + * old tuple is externally stored or not. This is required because for + * such attributes the flattened value won't be WAL logged as part of the + * new tuple so we must include it as part of the old_key_tuple. See + * ExtractReplicaIdentity. + */ + modified_attrs = HeapDetermineColumnsInfo(relation, interesting_attrs, + id_attrs, &oldtup, + newtup, &id_has_external); /* * If we're not updating any "key" column, we can grab a weaker lock type. @@ -3883,10 +3920,12 @@ l2: * Compute replica identity tuple before entering the critical section so * we don't PANIC upon a memory allocation failure. * ExtractReplicaIdentity() will return NULL if nothing needs to be - * logged. + * logged. Pass old key required as true only if the replica identity key + * columns are modified or it has external data. */ old_key_tuple = ExtractReplicaIdentity(relation, &oldtup, - bms_overlap(modified_attrs, id_attrs), + bms_overlap(modified_attrs, id_attrs) || + id_has_external, &old_key_copied); /* NO EREPORT(ERROR) from here till changes are logged */ @@ -4042,48 +4081,16 @@ l2: } /* - * Check if the specified attribute's value is same in both given tuples. - * Subroutine for HeapDetermineModifiedColumns. + * Check if the specified attribute's values are the same. Subroutine for + * HeapDetermineColumnsInfo. */ static bool -heap_tuple_attr_equals(TupleDesc tupdesc, int attrnum, - HeapTuple tup1, HeapTuple tup2) +heap_attr_equals(TupleDesc tupdesc, int attrnum, Datum value1, Datum value2, + bool isnull1, bool isnull2) { - Datum value1, - value2; - bool isnull1, - isnull2; Form_pg_attribute att; /* - * If it's a whole-tuple reference, say "not equal". It's not really - * worth supporting this case, since it could only succeed after a no-op - * update, which is hardly a case worth optimizing for. - */ - if (attrnum == 0) - return false; - - /* - * Likewise, automatically say "not equal" for any system attribute other - * than tableOID; we cannot expect these to be consistent in a HOT chain, - * or even to be set correctly yet in the new tuple. - */ - if (attrnum < 0) - { - if (attrnum != TableOidAttributeNumber) - return false; - } - - /* - * Extract the corresponding values. XXX this is pretty inefficient if - * there are many indexed columns. Should HeapDetermineModifiedColumns do - * a single heap_deform_tuple call on each tuple, instead? But that - * doesn't work for system columns ... - */ - value1 = heap_getattr(tup1, attrnum, tupdesc, &isnull1); - value2 = heap_getattr(tup2, attrnum, tupdesc, &isnull2); - - /* * If one value is NULL and other is not, then they are certainly not * equal */ @@ -4124,24 +4131,96 @@ heap_tuple_attr_equals(TupleDesc tupdesc, int attrnum, * Given an updated tuple, determine (and return into the output bitmapset), * from those listed as interesting, the set of columns that changed. * - * The input bitmapset is destructively modified; that is OK since this is - * invoked at most once in heap_update. + * has_external indicates if any of the unmodified attributes (from those + * listed as interesting) of the old tuple is a member of external_cols and is + * stored externally. + * + * The input interesting_cols bitmapset is destructively modified; that is OK + * since this is invoked at most once in heap_update. */ static Bitmapset * -HeapDetermineModifiedColumns(Relation relation, Bitmapset *interesting_cols, - HeapTuple oldtup, HeapTuple newtup) +HeapDetermineColumnsInfo(Relation relation, + Bitmapset *interesting_cols, + Bitmapset *external_cols, + HeapTuple oldtup, HeapTuple newtup, + bool *has_external) { - int attnum; + int attrnum; Bitmapset *modified = NULL; + TupleDesc tupdesc = RelationGetDescr(relation); - while ((attnum = bms_first_member(interesting_cols)) >= 0) + while ((attrnum = bms_first_member(interesting_cols)) >= 0) { - attnum += FirstLowInvalidHeapAttributeNumber; + Datum value1, + value2; + bool isnull1, + isnull2; - if (!heap_tuple_attr_equals(RelationGetDescr(relation), - attnum, oldtup, newtup)) + attrnum += FirstLowInvalidHeapAttributeNumber; + + /* + * If it's a whole-tuple reference, say "not equal". It's not really + * worth supporting this case, since it could only succeed after a + * no-op update, which is hardly a case worth optimizing for. + */ + if (attrnum == 0) + { modified = bms_add_member(modified, - attnum - FirstLowInvalidHeapAttributeNumber); + attrnum - + FirstLowInvalidHeapAttributeNumber); + continue; + } + + /* + * Likewise, automatically say "not equal" for any system attribute + * other than tableOID; we cannot expect these to be consistent in a + * HOT chain, or even to be set correctly yet in the new tuple. + */ + if (attrnum < 0) + { + if (attrnum != TableOidAttributeNumber) + { + modified = bms_add_member(modified, + attrnum - + FirstLowInvalidHeapAttributeNumber); + continue; + } + } + + /* + * Extract the corresponding values. XXX this is pretty inefficient + * if there are many indexed columns. Should we do a single + * heap_deform_tuple call on each tuple, instead? But that doesn't + * work for system columns ... + */ + value1 = heap_getattr(oldtup, attrnum, tupdesc, &isnull1); + value2 = heap_getattr(newtup, attrnum, tupdesc, &isnull2); + + if (!heap_attr_equals(tupdesc, attrnum, value1, + value2, isnull1, isnull2)) + { + modified = bms_add_member(modified, + attrnum - + FirstLowInvalidHeapAttributeNumber); + continue; + } + + /* + * No need to check attributes that can't be stored externally. Note + * that system attributes can't be stored externally. + */ + if (attrnum < 0 || isnull1 || + TupleDescAttr(tupdesc, attrnum - 1)->attlen != -1) + continue; + + /* + * Check if the old tuple's attribute is stored externally and is a + * member of external_cols. + */ + if (VARATT_IS_EXTERNAL((struct varlena *) DatumGetPointer(value1)) && + bms_is_member(attrnum - FirstLowInvalidHeapAttributeNumber, + external_cols)) + *has_external = true; } return modified; @@ -8306,14 +8385,14 @@ log_heap_new_cid(Relation relation, HeapTuple tup) * Returns NULL if there's no need to log an identity or if there's no suitable * key defined. * - * key_changed should be false if caller knows that no replica identity - * columns changed value. It's always true in the DELETE case. + * Pass key_required true if any replica identity columns changed value, or if + * any of them have any external data. Delete must always pass true. * * *copy is set to true if the returned tuple is a modified copy rather than * the same tuple that was passed in. */ static HeapTuple -ExtractReplicaIdentity(Relation relation, HeapTuple tp, bool key_changed, +ExtractReplicaIdentity(Relation relation, HeapTuple tp, bool key_required, bool *copy) { TupleDesc desc = RelationGetDescr(relation); @@ -8345,8 +8424,8 @@ ExtractReplicaIdentity(Relation relation, HeapTuple tp, bool key_changed, return tp; } - /* if the key hasn't changed and we're only logging the key, we're done */ - if (!key_changed) + /* if the key isn't required and we're only logging the key, we're done */ + if (!key_required) return NULL; /* find out the replica identity columns */ @@ -8354,10 +8433,10 @@ ExtractReplicaIdentity(Relation relation, HeapTuple tp, bool key_changed, INDEX_ATTR_BITMAP_IDENTITY_KEY); /* - * If there's no defined replica identity columns, treat as !key_changed. + * If there's no defined replica identity columns, treat as !key_required. * (This case should not be reachable from heap_update, since that should - * calculate key_changed accurately. But heap_delete just passes constant - * true for key_changed, so we can hit this case in deletes.) + * calculate key_required accurately. But heap_delete just passes + * constant true for key_required, so we can hit this case in deletes.) */ if (bms_is_empty(idattrs)) return NULL; diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/heap/heapam_handler.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/heap/heapam_handler.c index d1192e6a0c5..66339392d75 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/heap/heapam_handler.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/heap/heapam_handler.c @@ -401,7 +401,8 @@ tuple_lock_retry: errmsg("tuple to be locked was already moved to another partition due to concurrent update"))); tuple->t_self = *tid; - if (heap_fetch(relation, &SnapshotDirty, tuple, &buffer)) + if (heap_fetch_extended(relation, &SnapshotDirty, tuple, + &buffer, true)) { /* * If xmin isn't what we're expecting, the slot must have @@ -500,6 +501,7 @@ tuple_lock_retry: */ if (tuple->t_data == NULL) { + Assert(!BufferIsValid(buffer)); return TM_Deleted; } @@ -509,8 +511,7 @@ tuple_lock_retry: if (!TransactionIdEquals(HeapTupleHeaderGetXmin(tuple->t_data), priorXmax)) { - if (BufferIsValid(buffer)) - ReleaseBuffer(buffer); + ReleaseBuffer(buffer); return TM_Deleted; } @@ -526,13 +527,12 @@ tuple_lock_retry: * * As above, it should be safe to examine xmax and t_ctid * without the buffer content lock, because they can't be - * changing. + * changing. We'd better hold a buffer pin though. */ if (ItemPointerEquals(&tuple->t_self, &tuple->t_data->t_ctid)) { /* deleted, so forget about it */ - if (BufferIsValid(buffer)) - ReleaseBuffer(buffer); + ReleaseBuffer(buffer); return TM_Deleted; } @@ -540,8 +540,7 @@ tuple_lock_retry: *tid = tuple->t_data->t_ctid; /* updated row should have xmin matching this xmax */ priorXmax = HeapTupleHeaderGetUpdateXid(tuple->t_data); - if (BufferIsValid(buffer)) - ReleaseBuffer(buffer); + ReleaseBuffer(buffer); /* loop back to fetch next in chain */ } } diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/heap/heapam_visibility.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/heap/heapam_visibility.c index d3c57cd16a8..20d82cad4b6 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/heap/heapam_visibility.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/heap/heapam_visibility.c @@ -1564,8 +1564,8 @@ HeapTupleHeaderIsOnlyLocked(HeapTupleHeader tuple) static bool TransactionIdInArray(TransactionId xid, TransactionId *xip, Size num) { - return bsearch(&xid, xip, num, - sizeof(TransactionId), xidComparator) != NULL; + return num > 0 && + bsearch(&xid, xip, num, sizeof(TransactionId), xidComparator) != NULL; } /* diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/nbtree/nbtdedup.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/nbtree/nbtdedup.c index 6401fce57b9..1cd1b59ec35 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/nbtree/nbtdedup.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/nbtree/nbtdedup.c @@ -64,7 +64,7 @@ _bt_dedup_pass(Relation rel, Buffer buf, Relation heapRel, IndexTuple newitem, BTPageOpaque opaque = (BTPageOpaque) PageGetSpecialPointer(page); Page newpage; BTDedupState state; - Size pagesaving = 0; + Size pagesaving PG_USED_FOR_ASSERTS_ONLY = 0; bool singlevalstrat = false; int nkeyatts = IndexRelationGetNumberOfKeyAttributes(rel); diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/transam/clog.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/transam/clog.c index 67451ac3fe7..6767363484d 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/transam/clog.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/transam/clog.c @@ -297,8 +297,9 @@ TransactionIdSetPageStatus(TransactionId xid, int nsubxids, if (all_xact_same_page && xid == MyProc->xid && nsubxids <= THRESHOLD_SUBTRANS_CLOG_OPT && nsubxids == MyProc->subxidStatus.count && - memcmp(subxids, MyProc->subxids.xids, - nsubxids * sizeof(TransactionId)) == 0) + (nsubxids == 0 || + memcmp(subxids, MyProc->subxids.xids, + nsubxids * sizeof(TransactionId)) == 0)) { /* * If we can immediately acquire XactSLRULock, we update the status of diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/transam/twophase.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/transam/twophase.c index 553334807db..fbda7b73192 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/transam/twophase.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/transam/twophase.c @@ -476,6 +476,7 @@ MarkAsPreparingGuts(GlobalTransaction gxact, TransactionId xid, const char *gid, Assert(proc->xmin == InvalidTransactionId); proc->delayChkpt = false; proc->statusFlags = 0; + proc->delayChkptEnd = false; proc->pid = 0; proc->databaseId = databaseid; proc->roleId = owner; @@ -1167,6 +1168,7 @@ EndPrepare(GlobalTransaction gxact) START_CRIT_SECTION(); + Assert(!MyProc->delayChkpt); MyProc->delayChkpt = true; XLogBeginInsert(); @@ -2277,6 +2279,7 @@ RecordTransactionCommitPrepared(TransactionId xid, START_CRIT_SECTION(); /* See notes in RecordTransactionCommit */ + Assert(!MyProc->delayChkpt); MyProc->delayChkpt = true; /* diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/transam/xact.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/transam/xact.c index 11b8969f5de..1f118657cd3 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/transam/xact.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/transam/xact.c @@ -1336,6 +1336,7 @@ RecordTransactionCommit(void) * This makes checkpoint's determination of which xacts are delayChkpt * a bit fuzzy, but it doesn't matter. */ + Assert(!MyProc->delayChkpt); START_CRIT_SECTION(); MyProc->delayChkpt = true; @@ -5306,8 +5307,9 @@ SerializeTransactionState(Size maxsize, char *start_address) { if (FullTransactionIdIsValid(s->fullTransactionId)) workspace[i++] = XidFromFullTransactionId(s->fullTransactionId); - memcpy(&workspace[i], s->childXids, - s->nChildXids * sizeof(TransactionId)); + if (s->nChildXids > 0) + memcpy(&workspace[i], s->childXids, + s->nChildXids * sizeof(TransactionId)); i += s->nChildXids; } Assert(i == nxids); diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/transam/xlog.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/transam/xlog.c index a9c96836ab1..8be61dc0dd2 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/transam/xlog.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/access/transam/xlog.c @@ -9021,6 +9021,14 @@ CreateCheckPoint(int flags) CheckpointStats.ckpt_start_t = GetCurrentTimestamp(); /* + * Let smgr prepare for checkpoint; this has to happen outside the + * critical section and before we determine the REDO pointer. Note that + * smgr must not do anything that'd have to be undone if we decide no + * checkpoint is needed. + */ + SyncPreCheckpoint(); + + /* * Use a critical section to force system panic if we have trouble. */ START_CRIT_SECTION(); @@ -9034,13 +9042,6 @@ CreateCheckPoint(int flags) LWLockRelease(ControlFileLock); } - /* - * Let smgr prepare for checkpoint; this has to happen before we determine - * the REDO pointer. Note that smgr must not do anything that'd have to - * be undone if we decide no checkpoint is needed. - */ - SyncPreCheckpoint(); - /* Begin filling in the checkpoint WAL record */ MemSet(&checkPoint, 0, sizeof(checkPoint)); checkPoint.time = (pg_time_t) time(NULL); @@ -9239,6 +9240,16 @@ CreateCheckPoint(int flags) CheckPointGuts(checkPoint.redo, flags); + vxids = GetVirtualXIDsDelayingChkptEnd(&nvxids); + if (nvxids > 0) + { + do + { + pg_usleep(10000L); /* wait for 10 msec */ + } while (HaveVirtualXIDsDelayingChkptEnd(vxids, nvxids)); + } + pfree(vxids); + /* * Take a snapshot of running transactions and write this to WAL. This * allows us to reconstruct the state of running transactions during @@ -10591,6 +10602,10 @@ VerifyOverwriteContrecord(xl_overwrite_contrecord *xlrec, XLogReaderState *state LSN_FORMAT_ARGS(xlrec->overwritten_lsn), LSN_FORMAT_ARGS(state->overwrittenRecPtr)); + /* We have safely skipped the aborted record */ + abortedRecPtr = InvalidXLogRecPtr; + missingContrecPtr = InvalidXLogRecPtr; + ereport(LOG, (errmsg("successfully skipped missing contrecord at %X/%X, overwritten at %s", LSN_FORMAT_ARGS(xlrec->overwritten_lsn), diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/bootstrap/bootparse.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/bootstrap/bootparse.c index dc52e6b4134..d11a09d9289 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/bootstrap/bootparse.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/bootstrap/bootparse.c @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.3.2. */ +/* A Bison parser, made by GNU Bison 3.7.5. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -34,6 +34,10 @@ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. @@ -41,14 +45,11 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Undocumented macros, especially those whose name start with YY_, - are private implementation details. Do not rely on them. */ - -/* Identify Bison output. */ -#define YYBISON 1 +/* Identify Bison output, and Bison version. */ +#define YYBISON 30705 -/* Bison version. */ -#define YYBISON_VERSION "3.3.2" +/* Bison version string. */ +#define YYBISON_VERSION "3.7.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -69,12 +70,11 @@ #define yyerror boot_yyerror #define yydebug boot_yydebug #define yynerrs boot_yynerrs - #define yylval boot_yylval #define yychar boot_yychar /* First part of user prologue. */ -#line 1 "bootparse.y" /* yacc.c:337 */ +#line 1 "bootparse.y" /*------------------------------------------------------------------------- * @@ -154,7 +154,17 @@ do_end(void) static __thread int num_columns_read = 0; -#line 158 "bootparse.c" /* yacc.c:337 */ +#line 158 "bootparse.c" + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast<Type> (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus @@ -167,14 +177,6 @@ static __thread int num_columns_read = 0; # endif # endif -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - /* Debug traces. */ #ifndef YYDEBUG @@ -184,45 +186,49 @@ static __thread int num_columns_read = 0; extern int boot_yydebug; #endif -/* Token type. */ +/* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { - ID = 258, - COMMA = 259, - EQUALS = 260, - LPAREN = 261, - RPAREN = 262, - NULLVAL = 263, - OPEN = 264, - XCLOSE = 265, - XCREATE = 266, - INSERT_TUPLE = 267, - XDECLARE = 268, - INDEX = 269, - ON = 270, - USING = 271, - XBUILD = 272, - INDICES = 273, - UNIQUE = 274, - XTOAST = 275, - OBJ_ID = 276, - XBOOTSTRAP = 277, - XSHARED_RELATION = 278, - XROWTYPE_OID = 279, - XFORCE = 280, - XNOT = 281, - XNULL = 282 + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + ID = 258, /* ID */ + COMMA = 259, /* COMMA */ + EQUALS = 260, /* EQUALS */ + LPAREN = 261, /* LPAREN */ + RPAREN = 262, /* RPAREN */ + NULLVAL = 263, /* NULLVAL */ + OPEN = 264, /* OPEN */ + XCLOSE = 265, /* XCLOSE */ + XCREATE = 266, /* XCREATE */ + INSERT_TUPLE = 267, /* INSERT_TUPLE */ + XDECLARE = 268, /* XDECLARE */ + INDEX = 269, /* INDEX */ + ON = 270, /* ON */ + USING = 271, /* USING */ + XBUILD = 272, /* XBUILD */ + INDICES = 273, /* INDICES */ + UNIQUE = 274, /* UNIQUE */ + XTOAST = 275, /* XTOAST */ + OBJ_ID = 276, /* OBJ_ID */ + XBOOTSTRAP = 277, /* XBOOTSTRAP */ + XSHARED_RELATION = 278, /* XSHARED_RELATION */ + XROWTYPE_OID = 279, /* XROWTYPE_OID */ + XFORCE = 280, /* XFORCE */ + XNOT = 281, /* XNOT */ + XNULL = 282 /* XNULL */ }; + typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - union YYSTYPE { -#line 85 "bootparse.y" /* yacc.c:352 */ +#line 85 "bootparse.y" List *list; IndexElem *ielem; @@ -231,9 +237,9 @@ union YYSTYPE int ival; Oid oidval; -#line 235 "bootparse.c" /* yacc.c:352 */ -}; +#line 241 "bootparse.c" +}; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 @@ -245,6 +251,68 @@ extern __thread YYSTYPE boot_yylval; int boot_yyparse (void); +/* Symbol kind. */ +enum yysymbol_kind_t +{ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_ID = 3, /* ID */ + YYSYMBOL_COMMA = 4, /* COMMA */ + YYSYMBOL_EQUALS = 5, /* EQUALS */ + YYSYMBOL_LPAREN = 6, /* LPAREN */ + YYSYMBOL_RPAREN = 7, /* RPAREN */ + YYSYMBOL_NULLVAL = 8, /* NULLVAL */ + YYSYMBOL_OPEN = 9, /* OPEN */ + YYSYMBOL_XCLOSE = 10, /* XCLOSE */ + YYSYMBOL_XCREATE = 11, /* XCREATE */ + YYSYMBOL_INSERT_TUPLE = 12, /* INSERT_TUPLE */ + YYSYMBOL_XDECLARE = 13, /* XDECLARE */ + YYSYMBOL_INDEX = 14, /* INDEX */ + YYSYMBOL_ON = 15, /* ON */ + YYSYMBOL_USING = 16, /* USING */ + YYSYMBOL_XBUILD = 17, /* XBUILD */ + YYSYMBOL_INDICES = 18, /* INDICES */ + YYSYMBOL_UNIQUE = 19, /* UNIQUE */ + YYSYMBOL_XTOAST = 20, /* XTOAST */ + YYSYMBOL_OBJ_ID = 21, /* OBJ_ID */ + YYSYMBOL_XBOOTSTRAP = 22, /* XBOOTSTRAP */ + YYSYMBOL_XSHARED_RELATION = 23, /* XSHARED_RELATION */ + YYSYMBOL_XROWTYPE_OID = 24, /* XROWTYPE_OID */ + YYSYMBOL_XFORCE = 25, /* XFORCE */ + YYSYMBOL_XNOT = 26, /* XNOT */ + YYSYMBOL_XNULL = 27, /* XNULL */ + YYSYMBOL_YYACCEPT = 28, /* $accept */ + YYSYMBOL_TopLevel = 29, /* TopLevel */ + YYSYMBOL_Boot_Queries = 30, /* Boot_Queries */ + YYSYMBOL_Boot_Query = 31, /* Boot_Query */ + YYSYMBOL_Boot_OpenStmt = 32, /* Boot_OpenStmt */ + YYSYMBOL_Boot_CloseStmt = 33, /* Boot_CloseStmt */ + YYSYMBOL_Boot_CreateStmt = 34, /* Boot_CreateStmt */ + YYSYMBOL_35_1 = 35, /* $@1 */ + YYSYMBOL_36_2 = 36, /* $@2 */ + YYSYMBOL_Boot_InsertStmt = 37, /* Boot_InsertStmt */ + YYSYMBOL_38_3 = 38, /* $@3 */ + YYSYMBOL_Boot_DeclareIndexStmt = 39, /* Boot_DeclareIndexStmt */ + YYSYMBOL_Boot_DeclareUniqueIndexStmt = 40, /* Boot_DeclareUniqueIndexStmt */ + YYSYMBOL_Boot_DeclareToastStmt = 41, /* Boot_DeclareToastStmt */ + YYSYMBOL_Boot_BuildIndsStmt = 42, /* Boot_BuildIndsStmt */ + YYSYMBOL_boot_index_params = 43, /* boot_index_params */ + YYSYMBOL_boot_index_param = 44, /* boot_index_param */ + YYSYMBOL_optbootstrap = 45, /* optbootstrap */ + YYSYMBOL_optsharedrelation = 46, /* optsharedrelation */ + YYSYMBOL_optrowtypeoid = 47, /* optrowtypeoid */ + YYSYMBOL_boot_column_list = 48, /* boot_column_list */ + YYSYMBOL_boot_column_def = 49, /* boot_column_def */ + YYSYMBOL_boot_column_nullness = 50, /* boot_column_nullness */ + YYSYMBOL_oidspec = 51, /* oidspec */ + YYSYMBOL_boot_column_val_list = 52, /* boot_column_val_list */ + YYSYMBOL_boot_column_val = 53, /* boot_column_val */ + YYSYMBOL_boot_ident = 54 /* boot_ident */ +}; +typedef enum yysymbol_kind_t yysymbol_kind_t; + @@ -252,28 +320,87 @@ int boot_yyparse (void); # undef short #endif -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; +/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure + <limits.h> and (if available) <stdint.h> are included + so that the code can choose integer types of a good width. */ + +#ifndef __PTRDIFF_MAX__ +# include <limits.h> /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include <stdint.h> /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif #endif -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; +/* Narrow types that promote to a signed type and that can represent a + signed or unsigned integer of at least N bits. In tables they can + save space and decrease cache pressure. Promoting to a signed type + helps avoid bugs in integer arithmetic. */ + +#ifdef __INT_LEAST8_MAX__ +typedef __INT_LEAST8_TYPE__ yytype_int8; +#elif defined YY_STDINT_H +typedef int_least8_t yytype_int8; #else typedef signed char yytype_int8; #endif -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; +#ifdef __INT_LEAST16_MAX__ +typedef __INT_LEAST16_TYPE__ yytype_int16; +#elif defined YY_STDINT_H +typedef int_least16_t yytype_int16; #else -typedef unsigned short yytype_uint16; +typedef short yytype_int16; +#endif + +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 #endif -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; +#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST8_TYPE__ yytype_uint8; +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) +typedef uint_least8_t yytype_uint8; +#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX +typedef unsigned char yytype_uint8; #else -typedef short yytype_int16; +typedef short yytype_uint8; +#endif + +#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST16_TYPE__ yytype_uint16; +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) +typedef uint_least16_t yytype_uint16; +#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX +typedef unsigned short yytype_uint16; +#else +typedef int yytype_uint16; +#endif + +#ifndef YYPTRDIFF_T +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif #endif #ifndef YYSIZE_T @@ -281,7 +408,7 @@ typedef short yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -289,7 +416,20 @@ typedef short yytype_int16; # endif #endif -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) + + +/* Stored state numbers (used for stacks). */ +typedef yytype_int8 yy_state_t; + +/* State numbers in computations. */ +typedef int yy_state_fast_t; #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS @@ -303,38 +443,37 @@ typedef short yytype_int16; # endif #endif -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif #ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif #endif #ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value @@ -347,8 +486,22 @@ typedef short yytype_int16; # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + -#if ! defined yyoverflow || YYERROR_VERBOSE +#define YY_ASSERT(E) ((void) (0 && (E))) + +#if !defined yyoverflow /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -413,8 +566,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - +#endif /* !defined yyoverflow */ #if (! defined yyoverflow \ && (! defined __cplusplus \ @@ -423,17 +575,17 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss_alloc; + yy_state_t yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 @@ -446,11 +598,11 @@ union yyalloc # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ - YYSIZE_T yynewbytes; \ + YYPTRDIFF_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ } \ while (0) @@ -462,12 +614,12 @@ union yyalloc # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ - YYSIZE_T yyi; \ + YYPTRDIFF_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ @@ -490,17 +642,20 @@ union yyalloc /* YYNSTATES -- Number of states. */ #define YYNSTATES 110 -#define YYUNDEFTOK 2 +/* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 282 + /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_uint8 yytranslate[] = +static const yytype_int8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -535,7 +690,7 @@ static const yytype_uint8 yytranslate[] = #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = +static const yytype_int16 yyrline[] = { 0, 115, 115, 116, 120, 121, 125, 126, 127, 128, 129, 130, 131, 132, 136, 145, 155, 165, 154, 251, @@ -547,45 +702,58 @@ static const yytype_uint16 yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 0 +/** Accessing symbol of state STATE. */ +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) + +#if YYDEBUG || 0 +/* The user-facing name of the symbol whose (internal) number is + YYSYMBOL. No bounds checking. */ +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; + /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "ID", "COMMA", "EQUALS", "LPAREN", - "RPAREN", "NULLVAL", "OPEN", "XCLOSE", "XCREATE", "INSERT_TUPLE", - "XDECLARE", "INDEX", "ON", "USING", "XBUILD", "INDICES", "UNIQUE", - "XTOAST", "OBJ_ID", "XBOOTSTRAP", "XSHARED_RELATION", "XROWTYPE_OID", - "XFORCE", "XNOT", "XNULL", "$accept", "TopLevel", "Boot_Queries", - "Boot_Query", "Boot_OpenStmt", "Boot_CloseStmt", "Boot_CreateStmt", - "$@1", "$@2", "Boot_InsertStmt", "$@3", "Boot_DeclareIndexStmt", - "Boot_DeclareUniqueIndexStmt", "Boot_DeclareToastStmt", - "Boot_BuildIndsStmt", "boot_index_params", "boot_index_param", - "optbootstrap", "optsharedrelation", "optrowtypeoid", "boot_column_list", - "boot_column_def", "boot_column_nullness", "oidspec", + "\"end of file\"", "error", "\"invalid token\"", "ID", "COMMA", + "EQUALS", "LPAREN", "RPAREN", "NULLVAL", "OPEN", "XCLOSE", "XCREATE", + "INSERT_TUPLE", "XDECLARE", "INDEX", "ON", "USING", "XBUILD", "INDICES", + "UNIQUE", "XTOAST", "OBJ_ID", "XBOOTSTRAP", "XSHARED_RELATION", + "XROWTYPE_OID", "XFORCE", "XNOT", "XNULL", "$accept", "TopLevel", + "Boot_Queries", "Boot_Query", "Boot_OpenStmt", "Boot_CloseStmt", + "Boot_CreateStmt", "$@1", "$@2", "Boot_InsertStmt", "$@3", + "Boot_DeclareIndexStmt", "Boot_DeclareUniqueIndexStmt", + "Boot_DeclareToastStmt", "Boot_BuildIndsStmt", "boot_index_params", + "boot_index_param", "optbootstrap", "optsharedrelation", "optrowtypeoid", + "boot_column_list", "boot_column_def", "boot_column_nullness", "oidspec", "boot_column_val_list", "boot_column_val", "boot_ident", YY_NULLPTR }; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif -# ifdef YYPRINT +#ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = +static const yytype_int16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282 }; -# endif +#endif -#define YYPACT_NINF -53 +#define YYPACT_NINF (-53) -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-53))) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF -1 +#define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yytable_value) \ +#define yytable_value_is_error(Yyn) \ 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing @@ -608,7 +776,7 @@ static const yytype_int16 yypact[] = /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = +static const yytype_int8 yydefact[] = { 3, 0, 0, 0, 19, 0, 0, 0, 2, 4, 6, 7, 8, 9, 10, 11, 12, 13, 46, 47, @@ -634,7 +802,7 @@ static const yytype_int8 yypgoto[] = /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { - -1, 7, 8, 9, 10, 11, 12, 81, 90, 13, + 0, 7, 8, 9, 10, 11, 12, 81, 90, 13, 41, 14, 15, 16, 17, 92, 93, 55, 64, 72, 84, 85, 104, 48, 57, 58, 49 }; @@ -642,7 +810,7 @@ static const yytype_int8 yydefgoto[] = /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = +static const yytype_int8 yytable[] = { 38, 39, 40, 53, 45, 1, 2, 3, 4, 5, 60, 67, 62, 6, 99, 99, 42, 100, 106, 73, @@ -686,7 +854,7 @@ static const yytype_int8 yycheck[] = /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = +static const yytype_int8 yystos[] = { 0, 9, 10, 11, 12, 13, 17, 29, 30, 31, 32, 33, 34, 37, 39, 40, 41, 42, 3, 9, @@ -702,7 +870,7 @@ static const yytype_uint8 yystos[] = }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = +static const yytype_int8 yyr1[] = { 0, 28, 29, 29, 30, 30, 31, 31, 31, 31, 31, 31, 31, 31, 32, 33, 35, 36, 34, 38, @@ -714,7 +882,7 @@ static const yytype_uint8 yyr1[] = }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +static const yytype_int8 yyr2[] = { 0, 2, 1, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 0, 0, 11, 0, @@ -726,10 +894,10 @@ static const yytype_uint8 yyr2[] = }; +enum { YYENOMEM = -2 }; + #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab @@ -755,10 +923,9 @@ static const yytype_uint8 yyr2[] = } \ while (0) -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - +/* Backward compatibility with an undocumented macro. + Use YYerror or YYUNDEF. */ +#define YYERRCODE YYUNDEF /* Enable debugging if requested. */ @@ -776,18 +943,18 @@ do { \ } while (0) /* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif +# ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ - Type, Value); \ + Kind, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) @@ -798,17 +965,20 @@ do { \ `-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { FILE *yyoutput = yyo; - YYUSE (yyoutput); + YY_USE (yyoutput); if (!yyvaluep) return; # ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyo, yytoknum[yytype], *yyvaluep); + if (yykind < YYNTOKENS) + YYPRINT (yyo, yytoknum[yykind], *yyvaluep); # endif - YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -817,12 +987,13 @@ yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) `---------------------------*/ static void -yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { YYFPRINTF (yyo, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - yy_symbol_value_print (yyo, yytype, yyvaluep); + yy_symbol_value_print (yyo, yykind, yyvaluep); YYFPRINTF (yyo, ")"); } @@ -832,7 +1003,7 @@ yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) `------------------------------------------------------------------*/ static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -855,21 +1026,21 @@ do { \ `------------------------------------------------*/ static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, + int yyrule) { - unsigned long yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &yyvsp[(yyi + 1) - (yynrhs)] - ); + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)]); YYFPRINTF (stderr, "\n"); } } @@ -884,8 +1055,8 @@ do { \ multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -908,254 +1079,30 @@ int yydebug; #endif -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return 2; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - default: /* Avoid compiler warnings. */ - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return 2; - } - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep) { - YYUSE (yyvaluep); + YY_USE (yyvaluep); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - - -/* The lookahead symbol. */ +/* Lookahead token kind. */ __thread int yychar; /* The semantic value of the lookahead symbol. */ @@ -1164,6 +1111,8 @@ __thread YYSTYPE boot_yylval; __thread int yynerrs; + + /*----------. | yyparse. | `----------*/ @@ -1171,43 +1120,36 @@ __thread int yynerrs; int yyparse (void) { - int yystate; + yy_state_fast_t yystate = 0; /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. + int yyerrstatus = 0; - Refer to the stacks through separate pointers, to allow yyoverflow + /* Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - YYSIZE_T yystacksize; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; int yyn; + /* The return value of yyparse. */ int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; + /* Lookahead symbol kind. */ + yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif + #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) @@ -1215,15 +1157,8 @@ yyparse (void) Keep to zero when no symbol should be popped. */ int yylen = 0; - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - YYDPRINTF ((stderr, "Starting parse\n")); - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; @@ -1238,10 +1173,15 @@ yynewstate: /*--------------------------------------------------------------------. -| yynewstate -- set current state (the top of the stack) to yystate. | +| yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - *yyssp = (yytype_int16) yystate; + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YY_IGNORE_USELESS_CAST_BEGIN + *yyssp = YY_CAST (yy_state_t, yystate); + YY_IGNORE_USELESS_CAST_END + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE @@ -1249,23 +1189,23 @@ yysetstate: #else { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); + YYPTRDIFF_T yysize = yyssp - yyss + 1; # if defined yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ + yy_state_t *yyss1 = yyss; YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; @@ -1279,14 +1219,15 @@ yysetstate: yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; + yy_state_t *yyss1 = yyss; union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE +# undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } @@ -1295,16 +1236,16 @@ yysetstate: yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long) yystacksize)); + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END if (yyss + yystacksize - 1 <= yyssp) YYABORT; } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - if (yystate == YYFINAL) YYACCEPT; @@ -1325,18 +1266,29 @@ yybackup: /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token: ")); + YYDPRINTF ((stderr, "Reading a token\n")); yychar = yylex (); } if (yychar <= YYEOF) { - yychar = yytoken = YYEOF; + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + goto yyerrlab1; + } else { yytoken = YYTRANSLATE (yychar); @@ -1364,15 +1316,13 @@ yybackup: /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END + /* Discard the shifted token. */ + yychar = YYEMPTY; goto yynewstate; @@ -1407,29 +1357,29 @@ yyreduce: YY_REDUCE_PRINT (yyn); switch (yyn) { - case 14: -#line 137 "bootparse.y" /* yacc.c:1652 */ - { + case 14: /* Boot_OpenStmt: OPEN boot_ident */ +#line 137 "bootparse.y" + { do_start(); boot_openrel((yyvsp[0].str)); do_end(); } -#line 1418 "bootparse.c" /* yacc.c:1652 */ +#line 1368 "bootparse.c" break; - case 15: -#line 146 "bootparse.y" /* yacc.c:1652 */ - { + case 15: /* Boot_CloseStmt: XCLOSE boot_ident */ +#line 146 "bootparse.y" + { do_start(); closerel((yyvsp[0].str)); do_end(); } -#line 1428 "bootparse.c" /* yacc.c:1652 */ +#line 1378 "bootparse.c" break; - case 16: -#line 155 "bootparse.y" /* yacc.c:1652 */ - { + case 16: /* $@1: %empty */ +#line 155 "bootparse.y" + { do_start(); numattr = 0; elog(DEBUG4, "creating%s%s relation %s %u", @@ -1438,20 +1388,20 @@ yyreduce: (yyvsp[-5].str), (yyvsp[-4].oidval)); } -#line 1442 "bootparse.c" /* yacc.c:1652 */ +#line 1392 "bootparse.c" break; - case 17: -#line 165 "bootparse.y" /* yacc.c:1652 */ - { + case 17: /* $@2: %empty */ +#line 165 "bootparse.y" + { do_end(); } -#line 1450 "bootparse.c" /* yacc.c:1652 */ +#line 1400 "bootparse.c" break; - case 18: -#line 169 "bootparse.y" /* yacc.c:1652 */ - { + case 18: /* Boot_CreateStmt: XCREATE boot_ident oidspec optbootstrap optsharedrelation optrowtypeoid LPAREN $@1 boot_column_list $@2 RPAREN */ +#line 169 "bootparse.y" + { TupleDesc tupdesc; bool shared_relation; bool mapped_relation; @@ -1529,22 +1479,22 @@ yyreduce: } do_end(); } -#line 1533 "bootparse.c" /* yacc.c:1652 */ +#line 1483 "bootparse.c" break; - case 19: -#line 251 "bootparse.y" /* yacc.c:1652 */ - { + case 19: /* $@3: %empty */ +#line 251 "bootparse.y" + { do_start(); elog(DEBUG4, "inserting row"); num_columns_read = 0; } -#line 1543 "bootparse.c" /* yacc.c:1652 */ +#line 1493 "bootparse.c" break; - case 20: -#line 257 "bootparse.y" /* yacc.c:1652 */ - { + case 20: /* Boot_InsertStmt: INSERT_TUPLE $@3 LPAREN boot_column_val_list RPAREN */ +#line 257 "bootparse.y" + { if (num_columns_read != numattr) elog(ERROR, "incorrect number of columns in row (expected %d, got %d)", numattr, num_columns_read); @@ -1553,12 +1503,12 @@ yyreduce: InsertOneTuple(); do_end(); } -#line 1557 "bootparse.c" /* yacc.c:1652 */ +#line 1507 "bootparse.c" break; - case 21: -#line 270 "bootparse.y" /* yacc.c:1652 */ - { + case 21: /* Boot_DeclareIndexStmt: XDECLARE INDEX boot_ident oidspec ON boot_ident USING boot_ident LPAREN boot_index_params RPAREN */ +#line 270 "bootparse.y" + { IndexStmt *stmt = makeNode(IndexStmt); Oid relationId; @@ -1606,12 +1556,12 @@ yyreduce: false); do_end(); } -#line 1610 "bootparse.c" /* yacc.c:1652 */ +#line 1560 "bootparse.c" break; - case 22: -#line 322 "bootparse.y" /* yacc.c:1652 */ - { + case 22: /* Boot_DeclareUniqueIndexStmt: XDECLARE UNIQUE INDEX boot_ident oidspec ON boot_ident USING boot_ident LPAREN boot_index_params RPAREN */ +#line 322 "bootparse.y" + { IndexStmt *stmt = makeNode(IndexStmt); Oid relationId; @@ -1659,12 +1609,12 @@ yyreduce: false); do_end(); } -#line 1663 "bootparse.c" /* yacc.c:1652 */ +#line 1613 "bootparse.c" break; - case 23: -#line 374 "bootparse.y" /* yacc.c:1652 */ - { + case 23: /* Boot_DeclareToastStmt: XDECLARE XTOAST oidspec oidspec ON boot_ident */ +#line 374 "bootparse.y" + { elog(DEBUG4, "creating toast table for table \"%s\"", (yyvsp[0].str)); do_start(); @@ -1672,34 +1622,34 @@ yyreduce: BootstrapToastTable((yyvsp[0].str), (yyvsp[-3].oidval), (yyvsp[-2].oidval)); do_end(); } -#line 1676 "bootparse.c" /* yacc.c:1652 */ +#line 1626 "bootparse.c" break; - case 24: -#line 386 "bootparse.y" /* yacc.c:1652 */ - { + case 24: /* Boot_BuildIndsStmt: XBUILD INDICES */ +#line 386 "bootparse.y" + { do_start(); build_indices(); do_end(); } -#line 1686 "bootparse.c" /* yacc.c:1652 */ +#line 1636 "bootparse.c" break; - case 25: -#line 395 "bootparse.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].ielem)); } -#line 1692 "bootparse.c" /* yacc.c:1652 */ + case 25: /* boot_index_params: boot_index_params COMMA boot_index_param */ +#line 395 "bootparse.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].ielem)); } +#line 1642 "bootparse.c" break; - case 26: -#line 396 "bootparse.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].ielem)); } -#line 1698 "bootparse.c" /* yacc.c:1652 */ + case 26: /* boot_index_params: boot_index_param */ +#line 396 "bootparse.y" + { (yyval.list) = list_make1((yyvsp[0].ielem)); } +#line 1648 "bootparse.c" break; - case 27: -#line 401 "bootparse.y" /* yacc.c:1652 */ - { + case 27: /* boot_index_param: boot_ident boot_ident */ +#line 401 "bootparse.y" + { IndexElem *n = makeNode(IndexElem); n->name = (yyvsp[-1].str); n->expr = NULL; @@ -1710,213 +1660,214 @@ yyreduce: n->nulls_ordering = SORTBY_NULLS_DEFAULT; (yyval.ielem) = n; } -#line 1714 "bootparse.c" /* yacc.c:1652 */ +#line 1664 "bootparse.c" break; - case 28: -#line 415 "bootparse.y" /* yacc.c:1652 */ - { (yyval.ival) = 1; } -#line 1720 "bootparse.c" /* yacc.c:1652 */ + case 28: /* optbootstrap: XBOOTSTRAP */ +#line 415 "bootparse.y" + { (yyval.ival) = 1; } +#line 1670 "bootparse.c" break; - case 29: -#line 416 "bootparse.y" /* yacc.c:1652 */ - { (yyval.ival) = 0; } -#line 1726 "bootparse.c" /* yacc.c:1652 */ + case 29: /* optbootstrap: %empty */ +#line 416 "bootparse.y" + { (yyval.ival) = 0; } +#line 1676 "bootparse.c" break; - case 30: -#line 420 "bootparse.y" /* yacc.c:1652 */ - { (yyval.ival) = 1; } -#line 1732 "bootparse.c" /* yacc.c:1652 */ + case 30: /* optsharedrelation: XSHARED_RELATION */ +#line 420 "bootparse.y" + { (yyval.ival) = 1; } +#line 1682 "bootparse.c" break; - case 31: -#line 421 "bootparse.y" /* yacc.c:1652 */ - { (yyval.ival) = 0; } -#line 1738 "bootparse.c" /* yacc.c:1652 */ + case 31: /* optsharedrelation: %empty */ +#line 421 "bootparse.y" + { (yyval.ival) = 0; } +#line 1688 "bootparse.c" break; - case 32: -#line 425 "bootparse.y" /* yacc.c:1652 */ - { (yyval.oidval) = (yyvsp[0].oidval); } -#line 1744 "bootparse.c" /* yacc.c:1652 */ + case 32: /* optrowtypeoid: XROWTYPE_OID oidspec */ +#line 425 "bootparse.y" + { (yyval.oidval) = (yyvsp[0].oidval); } +#line 1694 "bootparse.c" break; - case 33: -#line 426 "bootparse.y" /* yacc.c:1652 */ - { (yyval.oidval) = InvalidOid; } -#line 1750 "bootparse.c" /* yacc.c:1652 */ + case 33: /* optrowtypeoid: %empty */ +#line 426 "bootparse.y" + { (yyval.oidval) = InvalidOid; } +#line 1700 "bootparse.c" break; - case 36: -#line 436 "bootparse.y" /* yacc.c:1652 */ - { + case 36: /* boot_column_def: boot_ident EQUALS boot_ident boot_column_nullness */ +#line 436 "bootparse.y" + { if (++numattr > MAXATTR) elog(FATAL, "too many columns"); DefineAttr((yyvsp[-3].str), (yyvsp[-1].str), numattr-1, (yyvsp[0].ival)); } -#line 1760 "bootparse.c" /* yacc.c:1652 */ +#line 1710 "bootparse.c" break; - case 37: -#line 444 "bootparse.y" /* yacc.c:1652 */ - { (yyval.ival) = BOOTCOL_NULL_FORCE_NOT_NULL; } -#line 1766 "bootparse.c" /* yacc.c:1652 */ + case 37: /* boot_column_nullness: XFORCE XNOT XNULL */ +#line 444 "bootparse.y" + { (yyval.ival) = BOOTCOL_NULL_FORCE_NOT_NULL; } +#line 1716 "bootparse.c" break; - case 38: -#line 445 "bootparse.y" /* yacc.c:1652 */ - { (yyval.ival) = BOOTCOL_NULL_FORCE_NULL; } -#line 1772 "bootparse.c" /* yacc.c:1652 */ + case 38: /* boot_column_nullness: XFORCE XNULL */ +#line 445 "bootparse.y" + { (yyval.ival) = BOOTCOL_NULL_FORCE_NULL; } +#line 1722 "bootparse.c" break; - case 39: -#line 446 "bootparse.y" /* yacc.c:1652 */ - { (yyval.ival) = BOOTCOL_NULL_AUTO; } -#line 1778 "bootparse.c" /* yacc.c:1652 */ + case 39: /* boot_column_nullness: %empty */ +#line 446 "bootparse.y" + { (yyval.ival) = BOOTCOL_NULL_AUTO; } +#line 1728 "bootparse.c" break; - case 40: -#line 450 "bootparse.y" /* yacc.c:1652 */ - { (yyval.oidval) = atooid((yyvsp[0].str)); } -#line 1784 "bootparse.c" /* yacc.c:1652 */ + case 40: /* oidspec: boot_ident */ +#line 450 "bootparse.y" + { (yyval.oidval) = atooid((yyvsp[0].str)); } +#line 1734 "bootparse.c" break; - case 44: -#line 461 "bootparse.y" /* yacc.c:1652 */ - { InsertOneValue((yyvsp[0].str), num_columns_read++); } -#line 1790 "bootparse.c" /* yacc.c:1652 */ + case 44: /* boot_column_val: boot_ident */ +#line 461 "bootparse.y" + { InsertOneValue((yyvsp[0].str), num_columns_read++); } +#line 1740 "bootparse.c" break; - case 45: -#line 463 "bootparse.y" /* yacc.c:1652 */ - { InsertOneNull(num_columns_read++); } -#line 1796 "bootparse.c" /* yacc.c:1652 */ + case 45: /* boot_column_val: NULLVAL */ +#line 463 "bootparse.y" + { InsertOneNull(num_columns_read++); } +#line 1746 "bootparse.c" break; - case 46: -#line 467 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 1802 "bootparse.c" /* yacc.c:1652 */ + case 46: /* boot_ident: ID */ +#line 467 "bootparse.y" + { (yyval.str) = (yyvsp[0].str); } +#line 1752 "bootparse.c" break; - case 47: -#line 468 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1808 "bootparse.c" /* yacc.c:1652 */ + case 47: /* boot_ident: OPEN */ +#line 468 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1758 "bootparse.c" break; - case 48: -#line 469 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1814 "bootparse.c" /* yacc.c:1652 */ + case 48: /* boot_ident: XCLOSE */ +#line 469 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1764 "bootparse.c" break; - case 49: -#line 470 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1820 "bootparse.c" /* yacc.c:1652 */ + case 49: /* boot_ident: XCREATE */ +#line 470 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1770 "bootparse.c" break; - case 50: -#line 471 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1826 "bootparse.c" /* yacc.c:1652 */ + case 50: /* boot_ident: INSERT_TUPLE */ +#line 471 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1776 "bootparse.c" break; - case 51: -#line 472 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1832 "bootparse.c" /* yacc.c:1652 */ + case 51: /* boot_ident: XDECLARE */ +#line 472 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1782 "bootparse.c" break; - case 52: -#line 473 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1838 "bootparse.c" /* yacc.c:1652 */ + case 52: /* boot_ident: INDEX */ +#line 473 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1788 "bootparse.c" break; - case 53: -#line 474 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1844 "bootparse.c" /* yacc.c:1652 */ + case 53: /* boot_ident: ON */ +#line 474 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1794 "bootparse.c" break; - case 54: -#line 475 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1850 "bootparse.c" /* yacc.c:1652 */ + case 54: /* boot_ident: USING */ +#line 475 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1800 "bootparse.c" break; - case 55: -#line 476 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1856 "bootparse.c" /* yacc.c:1652 */ + case 55: /* boot_ident: XBUILD */ +#line 476 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1806 "bootparse.c" break; - case 56: -#line 477 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1862 "bootparse.c" /* yacc.c:1652 */ + case 56: /* boot_ident: INDICES */ +#line 477 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1812 "bootparse.c" break; - case 57: -#line 478 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1868 "bootparse.c" /* yacc.c:1652 */ + case 57: /* boot_ident: UNIQUE */ +#line 478 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1818 "bootparse.c" break; - case 58: -#line 479 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1874 "bootparse.c" /* yacc.c:1652 */ + case 58: /* boot_ident: XTOAST */ +#line 479 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1824 "bootparse.c" break; - case 59: -#line 480 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1880 "bootparse.c" /* yacc.c:1652 */ + case 59: /* boot_ident: OBJ_ID */ +#line 480 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1830 "bootparse.c" break; - case 60: -#line 481 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1886 "bootparse.c" /* yacc.c:1652 */ + case 60: /* boot_ident: XBOOTSTRAP */ +#line 481 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1836 "bootparse.c" break; - case 61: -#line 482 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1892 "bootparse.c" /* yacc.c:1652 */ + case 61: /* boot_ident: XSHARED_RELATION */ +#line 482 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1842 "bootparse.c" break; - case 62: -#line 483 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1898 "bootparse.c" /* yacc.c:1652 */ + case 62: /* boot_ident: XROWTYPE_OID */ +#line 483 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1848 "bootparse.c" break; - case 63: -#line 484 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1904 "bootparse.c" /* yacc.c:1652 */ + case 63: /* boot_ident: XFORCE */ +#line 484 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1854 "bootparse.c" break; - case 64: -#line 485 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1910 "bootparse.c" /* yacc.c:1652 */ + case 64: /* boot_ident: XNOT */ +#line 485 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1860 "bootparse.c" break; - case 65: -#line 486 "bootparse.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].kw)); } -#line 1916 "bootparse.c" /* yacc.c:1652 */ + case 65: /* boot_ident: XNULL */ +#line 486 "bootparse.y" + { (yyval.str) = pstrdup((yyvsp[0].kw)); } +#line 1866 "bootparse.c" break; -#line 1920 "bootparse.c" /* yacc.c:1652 */ +#line 1870 "bootparse.c" + default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -1930,11 +1881,10 @@ yyreduce: case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -1958,50 +1908,14 @@ yyreduce: yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; -#if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif } - - if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an @@ -2050,13 +1964,14 @@ yyerrorlab: yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ + /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { yyn = yytable[yyn]; if (0 < yyn) @@ -2070,7 +1985,7 @@ yyerrlab1: yydestruct ("Error: popping", - yystos[yystate], yyvsp); + YY_ACCESSING_SYMBOL (yystate), yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -2082,7 +1997,7 @@ yyerrlab1: /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -2104,20 +2019,20 @@ yyabortlab: goto yyreturn; -#if !defined yyoverflow || YYERROR_VERBOSE +#if !defined yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - /* Fall through. */ + goto yyreturn; #endif -/*-----------------------------------------------------. -| yyreturn -- parsing is finished, return the result. | -`-----------------------------------------------------*/ +/*-------------------------------------------------------. +| yyreturn -- parsing is finished, clean up and return. | +`-------------------------------------------------------*/ yyreturn: if (yychar != YYEMPTY) { @@ -2134,20 +2049,18 @@ yyreturn: while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif + return yyresult; } -#line 488 "bootparse.y" /* yacc.c:1918 */ + +#line 488 "bootparse.y" #include "bootscanner.c" diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/catalog/index.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/catalog/index.c index 2cb06326412..7ef9f45d75d 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/catalog/index.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/catalog/index.c @@ -1424,6 +1424,9 @@ index_concurrently_build(Oid heapRelationId, Oid indexRelationId) { Relation heapRel; + Oid save_userid; + int save_sec_context; + int save_nestlevel; Relation indexRelation; IndexInfo *indexInfo; @@ -1433,7 +1436,16 @@ index_concurrently_build(Oid heapRelationId, /* Open and lock the parent heap relation */ heapRel = table_open(heapRelationId, ShareUpdateExclusiveLock); - /* And the target index relation */ + /* + * Switch to the table owner's userid, so that any index functions are run + * as that user. Also lock down security-restricted operations and + * arrange to make GUC variable changes local to this command. + */ + GetUserIdAndSecContext(&save_userid, &save_sec_context); + SetUserIdAndSecContext(heapRel->rd_rel->relowner, + save_sec_context | SECURITY_RESTRICTED_OPERATION); + save_nestlevel = NewGUCNestLevel(); + indexRelation = index_open(indexRelationId, RowExclusiveLock); /* @@ -1449,6 +1461,12 @@ index_concurrently_build(Oid heapRelationId, /* Now build the index */ index_build(heapRel, indexRelation, indexInfo, false, true); + /* Roll back any GUC changes executed by index functions */ + AtEOXact_GUC(false, save_nestlevel); + + /* Restore userid and security context */ + SetUserIdAndSecContext(save_userid, save_sec_context); + /* Close both the relations, but keep the locks */ table_close(heapRel, NoLock); index_close(indexRelation, NoLock); @@ -3294,7 +3312,17 @@ validate_index(Oid heapId, Oid indexId, Snapshot snapshot) /* Open and lock the parent heap relation */ heapRelation = table_open(heapId, ShareUpdateExclusiveLock); - /* And the target index relation */ + + /* + * Switch to the table owner's userid, so that any index functions are run + * as that user. Also lock down security-restricted operations and + * arrange to make GUC variable changes local to this command. + */ + GetUserIdAndSecContext(&save_userid, &save_sec_context); + SetUserIdAndSecContext(heapRelation->rd_rel->relowner, + save_sec_context | SECURITY_RESTRICTED_OPERATION); + save_nestlevel = NewGUCNestLevel(); + indexRelation = index_open(indexId, RowExclusiveLock); /* @@ -3308,16 +3336,6 @@ validate_index(Oid heapId, Oid indexId, Snapshot snapshot) indexInfo->ii_Concurrent = true; /* - * Switch to the table owner's userid, so that any index functions are run - * as that user. Also lock down security-restricted operations and - * arrange to make GUC variable changes local to this command. - */ - GetUserIdAndSecContext(&save_userid, &save_sec_context); - SetUserIdAndSecContext(heapRelation->rd_rel->relowner, - save_sec_context | SECURITY_RESTRICTED_OPERATION); - save_nestlevel = NewGUCNestLevel(); - - /* * Scan the index and gather up all the TIDs into a tuplesort object. */ ivinfo.index = indexRelation; @@ -3525,6 +3543,9 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence, Relation iRel, heapRelation; Oid heapId; + Oid save_userid; + int save_sec_context; + int save_nestlevel; IndexInfo *indexInfo; volatile bool skipped_constraint = false; PGRUsage ru0; @@ -3552,6 +3573,16 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence, if (!heapRelation) return; + /* + * Switch to the table owner's userid, so that any index functions are run + * as that user. Also lock down security-restricted operations and + * arrange to make GUC variable changes local to this command. + */ + GetUserIdAndSecContext(&save_userid, &save_sec_context); + SetUserIdAndSecContext(heapRelation->rd_rel->relowner, + save_sec_context | SECURITY_RESTRICTED_OPERATION); + save_nestlevel = NewGUCNestLevel(); + if (progress) { const int progress_cols[] = { @@ -3770,12 +3801,18 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence, errdetail_internal("%s", pg_rusage_show(&ru0)))); - if (progress) - pgstat_progress_end_command(); + /* Roll back any GUC changes executed by index functions */ + AtEOXact_GUC(false, save_nestlevel); + + /* Restore userid and security context */ + SetUserIdAndSecContext(save_userid, save_sec_context); /* Close rels, but keep locks */ index_close(iRel, NoLock); table_close(heapRelation, NoLock); + + if (progress) + pgstat_progress_end_command(); } /* diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/catalog/namespace.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/catalog/namespace.c index 1088fc19df1..147629a4bd8 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/catalog/namespace.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/catalog/namespace.c @@ -55,6 +55,7 @@ #include "utils/inval.h" #include "utils/lsyscache.h" #include "utils/memutils.h" +#include "utils/snapmgr.h" #include "utils/syscache.h" #include "utils/varlena.h" @@ -4292,9 +4293,11 @@ RemoveTempRelationsCallback(int code, Datum arg) /* Need to ensure we have a usable transaction. */ AbortOutOfAnyTransaction(); StartTransactionCommand(); + PushActiveSnapshot(GetTransactionSnapshot()); RemoveTempRelations(myTempNamespace); + PopActiveSnapshot(); CommitTransactionCommand(); } } diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/catalog/storage.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/catalog/storage.c index 8fc4ad05f3c..ece5c1b146a 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/catalog/storage.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/catalog/storage.c @@ -326,6 +326,22 @@ RelationTruncate(Relation rel, BlockNumber nblocks) RelationPreTruncate(rel); /* + * Make sure that a concurrent checkpoint can't complete while truncation + * is in progress. + * + * The truncation operation might drop buffers that the checkpoint + * otherwise would have flushed. If it does, then it's essential that + * the files actually get truncated on disk before the checkpoint record + * is written. Otherwise, if reply begins from that checkpoint, the + * to-be-truncated blocks might still exist on disk but have older + * contents than expected, which can cause replay to fail. It's OK for + * the blocks to not exist on disk at all, but not for them to have the + * wrong contents. + */ + Assert(!MyProc->delayChkptEnd); + MyProc->delayChkptEnd = true; + + /* * We WAL-log the truncation before actually truncating, which means * trouble if the truncation fails. If we then crash, the WAL replay * likely isn't going to succeed in the truncation either, and cause a @@ -363,13 +379,24 @@ RelationTruncate(Relation rel, BlockNumber nblocks) XLogFlush(lsn); } - /* Do the real work to truncate relation forks */ + /* + * This will first remove any buffers from the buffer pool that should no + * longer exist after truncation is complete, and then truncate the + * corresponding files on disk. + */ smgrtruncate(rel->rd_smgr, forks, nforks, blocks); + /* We've done all the critical work, so checkpoints are OK now. */ + MyProc->delayChkptEnd = false; + /* * Update upper-level FSM pages to account for the truncation. This is * important because the just-truncated pages were likely marked as * all-free, and would be preferentially selected. + * + * NB: There's no point in delaying checkpoints until this is done. + * Because the FSM is not WAL-logged, we have to be prepared for the + * possibility of corruption after a crash anyway. */ if (need_fsm_vacuum) FreeSpaceMapVacuumRange(rel, nblocks, InvalidBlockNumber); diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/cluster.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/cluster.c index 7cc08f18cf3..33718aad436 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/cluster.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/cluster.c @@ -277,6 +277,9 @@ void cluster_rel(Oid tableOid, Oid indexOid, ClusterParams *params) { Relation OldHeap; + Oid save_userid; + int save_sec_context; + int save_nestlevel; bool verbose = ((params->options & CLUOPT_VERBOSE) != 0); bool recheck = ((params->options & CLUOPT_RECHECK) != 0); @@ -307,6 +310,16 @@ cluster_rel(Oid tableOid, Oid indexOid, ClusterParams *params) } /* + * Switch to the table owner's userid, so that any index functions are run + * as that user. Also lock down security-restricted operations and + * arrange to make GUC variable changes local to this command. + */ + GetUserIdAndSecContext(&save_userid, &save_sec_context); + SetUserIdAndSecContext(OldHeap->rd_rel->relowner, + save_sec_context | SECURITY_RESTRICTED_OPERATION); + save_nestlevel = NewGUCNestLevel(); + + /* * Since we may open a new transaction for each relation, we have to check * that the relation still is what we think it is. * @@ -317,11 +330,10 @@ cluster_rel(Oid tableOid, Oid indexOid, ClusterParams *params) if (recheck) { /* Check that the user still owns the relation */ - if (!pg_class_ownercheck(tableOid, GetUserId())) + if (!pg_class_ownercheck(tableOid, save_userid)) { relation_close(OldHeap, AccessExclusiveLock); - pgstat_progress_end_command(); - return; + goto out; } /* @@ -335,8 +347,7 @@ cluster_rel(Oid tableOid, Oid indexOid, ClusterParams *params) if (RELATION_IS_OTHER_TEMP(OldHeap)) { relation_close(OldHeap, AccessExclusiveLock); - pgstat_progress_end_command(); - return; + goto out; } if (OidIsValid(indexOid)) @@ -347,8 +358,7 @@ cluster_rel(Oid tableOid, Oid indexOid, ClusterParams *params) if (!SearchSysCacheExists1(RELOID, ObjectIdGetDatum(indexOid))) { relation_close(OldHeap, AccessExclusiveLock); - pgstat_progress_end_command(); - return; + goto out; } /* @@ -357,8 +367,7 @@ cluster_rel(Oid tableOid, Oid indexOid, ClusterParams *params) if (!get_index_isclustered(indexOid)) { relation_close(OldHeap, AccessExclusiveLock); - pgstat_progress_end_command(); - return; + goto out; } } } @@ -411,8 +420,7 @@ cluster_rel(Oid tableOid, Oid indexOid, ClusterParams *params) !RelationIsPopulated(OldHeap)) { relation_close(OldHeap, AccessExclusiveLock); - pgstat_progress_end_command(); - return; + goto out; } /* @@ -428,6 +436,13 @@ cluster_rel(Oid tableOid, Oid indexOid, ClusterParams *params) /* NB: rebuild_relation does table_close() on OldHeap */ +out: + /* Roll back any GUC changes executed by index functions */ + AtEOXact_GUC(false, save_nestlevel); + + /* Restore userid and security context */ + SetUserIdAndSecContext(save_userid, save_sec_context); + pgstat_progress_end_command(); } diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/copyfrom.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/copyfrom.c index 40a54ad0bd7..177d731d125 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/copyfrom.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/copyfrom.c @@ -312,7 +312,7 @@ CopyMultiInsertBufferFlush(CopyMultiInsertInfo *miinfo, /* * Print error context information correctly, if one of the operations - * below fail. + * below fails. */ cstate->line_buf_valid = false; save_cur_lineno = cstate->cur_lineno; diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/explain.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/explain.c index 1ec87986761..c152b1a5d42 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/explain.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/explain.c @@ -604,7 +604,13 @@ ExplainOnePlan(PlannedStmt *plannedstmt, IntoClause *into, ExplainState *es, /* Create textual dump of plan tree */ ExplainPrintPlan(es, queryDesc); - if (es->verbose && plannedstmt->queryId != UINT64CONST(0)) + /* + * COMPUTE_QUERY_ID_REGRESS means COMPUTE_QUERY_ID_AUTO, but we don't show + * the queryid in any of the EXPLAIN plans to keep stable the results + * generated by regression test suites. + */ + if (es->verbose && plannedstmt->queryId != UINT64CONST(0) && + compute_query_id != COMPUTE_QUERY_ID_REGRESS) { /* * Output the queryid as an int64 rather than a uint64 so we match diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/functioncmds.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/functioncmds.c index a997cb62642..016cdf20fb2 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/functioncmds.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/functioncmds.c @@ -1489,6 +1489,8 @@ AlterFunction(ParseState *pstate, AlterFunctionStmt *stmt) procForm->prosupport = newsupport; } + if (parallel_item) + procForm->proparallel = interpret_func_parallel(parallel_item); if (set_items) { Datum datum; @@ -1523,8 +1525,7 @@ AlterFunction(ParseState *pstate, AlterFunctionStmt *stmt) tup = heap_modify_tuple(tup, RelationGetDescr(rel), repl_val, repl_null, repl_repl); } - if (parallel_item) - procForm->proparallel = interpret_func_parallel(parallel_item); + /* DO NOT put more touches of procForm below here; it's now dangling. */ /* Do the update */ CatalogTupleUpdate(rel, &tup->t_self, tup); diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/indexcmds.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/indexcmds.c index 76774dce064..ca150452c1c 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/indexcmds.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/indexcmds.c @@ -547,21 +547,22 @@ DefineIndex(Oid relationId, LOCKTAG heaplocktag; LOCKMODE lockmode; Snapshot snapshot; - int save_nestlevel = -1; + Oid root_save_userid; + int root_save_sec_context; + int root_save_nestlevel; int i; + root_save_nestlevel = NewGUCNestLevel(); + /* * Some callers need us to run with an empty default_tablespace; this is a * necessary hack to be able to reproduce catalog state accurately when * recreating indexes after table-rewriting ALTER TABLE. */ if (stmt->reset_default_tblspc) - { - save_nestlevel = NewGUCNestLevel(); (void) set_config_option("default_tablespace", "", PGC_USERSET, PGC_S_SESSION, GUC_ACTION_SAVE, true, 0, false); - } /* * Force non-concurrent build on temporary relations, even if CONCURRENTLY @@ -640,6 +641,15 @@ DefineIndex(Oid relationId, lockmode = concurrent ? ShareUpdateExclusiveLock : ShareLock; rel = table_open(relationId, lockmode); + /* + * Switch to the table owner's userid, so that any index functions are run + * as that user. Also lock down security-restricted operations. We + * already arranged to make GUC variable changes local to this command. + */ + GetUserIdAndSecContext(&root_save_userid, &root_save_sec_context); + SetUserIdAndSecContext(rel->rd_rel->relowner, + root_save_sec_context | SECURITY_RESTRICTED_OPERATION); + namespaceId = RelationGetNamespace(rel); /* Ensure that it makes sense to index this kind of relation */ @@ -725,7 +735,7 @@ DefineIndex(Oid relationId, { AclResult aclresult; - aclresult = pg_namespace_aclcheck(namespaceId, GetUserId(), + aclresult = pg_namespace_aclcheck(namespaceId, root_save_userid, ACL_CREATE); if (aclresult != ACLCHECK_OK) aclcheck_error(aclresult, OBJECT_SCHEMA, @@ -757,7 +767,7 @@ DefineIndex(Oid relationId, { AclResult aclresult; - aclresult = pg_tablespace_aclcheck(tablespaceId, GetUserId(), + aclresult = pg_tablespace_aclcheck(tablespaceId, root_save_userid, ACL_CREATE); if (aclresult != ACLCHECK_OK) aclcheck_error(aclresult, OBJECT_TABLESPACE, @@ -1147,15 +1157,17 @@ DefineIndex(Oid relationId, ObjectAddressSet(address, RelationRelationId, indexRelationId); - /* - * Revert to original default_tablespace. Must do this before any return - * from this function, but after index_create, so this is a good time. - */ - if (save_nestlevel >= 0) - AtEOXact_GUC(true, save_nestlevel); - if (!OidIsValid(indexRelationId)) { + /* + * Roll back any GUC changes executed by index functions. Also revert + * to original default_tablespace if we changed it above. + */ + AtEOXact_GUC(false, root_save_nestlevel); + + /* Restore userid and security context */ + SetUserIdAndSecContext(root_save_userid, root_save_sec_context); + table_close(rel, NoLock); /* If this is the top-level index, we're done */ @@ -1165,6 +1177,17 @@ DefineIndex(Oid relationId, return address; } + /* + * Roll back any GUC changes executed by index functions, and keep + * subsequent changes local to this command. It's barely possible that + * some index function changed a behavior-affecting GUC, e.g. xmloption, + * that affects subsequent steps. This improves bug-compatibility with + * older PostgreSQL versions. They did the AtEOXact_GUC() here for the + * purpose of clearing the above default_tablespace change. + */ + AtEOXact_GUC(false, root_save_nestlevel); + root_save_nestlevel = NewGUCNestLevel(); + /* Add any requested comment */ if (stmt->idxcomment != NULL) CreateComments(indexRelationId, RelationRelationId, 0, @@ -1211,6 +1234,9 @@ DefineIndex(Oid relationId, { Oid childRelid = part_oids[i]; Relation childrel; + Oid child_save_userid; + int child_save_sec_context; + int child_save_nestlevel; List *childidxs; ListCell *cell; AttrMap *attmap; @@ -1218,6 +1244,12 @@ DefineIndex(Oid relationId, childrel = table_open(childRelid, lockmode); + GetUserIdAndSecContext(&child_save_userid, + &child_save_sec_context); + SetUserIdAndSecContext(childrel->rd_rel->relowner, + child_save_sec_context | SECURITY_RESTRICTED_OPERATION); + child_save_nestlevel = NewGUCNestLevel(); + /* * Don't try to create indexes on foreign tables, though. Skip * those if a regular index, or fail if trying to create a @@ -1233,6 +1265,9 @@ DefineIndex(Oid relationId, errdetail("Table \"%s\" contains partitions that are foreign tables.", RelationGetRelationName(rel)))); + AtEOXact_GUC(false, child_save_nestlevel); + SetUserIdAndSecContext(child_save_userid, + child_save_sec_context); table_close(childrel, lockmode); continue; } @@ -1304,6 +1339,9 @@ DefineIndex(Oid relationId, } list_free(childidxs); + AtEOXact_GUC(false, child_save_nestlevel); + SetUserIdAndSecContext(child_save_userid, + child_save_sec_context); table_close(childrel, NoLock); /* @@ -1360,12 +1398,21 @@ DefineIndex(Oid relationId, if (found_whole_row) elog(ERROR, "cannot convert whole-row table reference"); + /* + * Recurse as the starting user ID. Callee will use that + * for permission checks, then switch again. + */ + Assert(GetUserId() == child_save_userid); + SetUserIdAndSecContext(root_save_userid, + root_save_sec_context); DefineIndex(childRelid, childStmt, InvalidOid, /* no predefined OID */ indexRelationId, /* this is our child */ createdConstraintId, is_alter_table, check_rights, check_not_in_use, skip_build, quiet); + SetUserIdAndSecContext(child_save_userid, + child_save_sec_context); } pgstat_progress_update_param(PROGRESS_CREATEIDX_PARTITIONS_DONE, @@ -1402,12 +1449,17 @@ DefineIndex(Oid relationId, * Indexes on partitioned tables are not themselves built, so we're * done here. */ + AtEOXact_GUC(false, root_save_nestlevel); + SetUserIdAndSecContext(root_save_userid, root_save_sec_context); table_close(rel, NoLock); if (!OidIsValid(parentIndexId)) pgstat_progress_end_command(); return address; } + AtEOXact_GUC(false, root_save_nestlevel); + SetUserIdAndSecContext(root_save_userid, root_save_sec_context); + if (!concurrent) { /* Close the heap and we're done, in the non-concurrent case */ @@ -3536,6 +3588,9 @@ ReindexRelationConcurrently(Oid relationOid, ReindexParams *params) Oid newIndexId; Relation indexRel; Relation heapRel; + Oid save_userid; + int save_sec_context; + int save_nestlevel; Relation newIndexRel; LockRelId *lockrelid; Oid tablespaceid; @@ -3544,6 +3599,16 @@ ReindexRelationConcurrently(Oid relationOid, ReindexParams *params) heapRel = table_open(indexRel->rd_index->indrelid, ShareUpdateExclusiveLock); + /* + * Switch to the table owner's userid, so that any index functions are + * run as that user. Also lock down security-restricted operations + * and arrange to make GUC variable changes local to this command. + */ + GetUserIdAndSecContext(&save_userid, &save_sec_context); + SetUserIdAndSecContext(heapRel->rd_rel->relowner, + save_sec_context | SECURITY_RESTRICTED_OPERATION); + save_nestlevel = NewGUCNestLevel(); + /* determine safety of this index for set_indexsafe_procflags */ idx->safe = (indexRel->rd_indexprs == NIL && indexRel->rd_indpred == NIL); @@ -3619,6 +3684,13 @@ ReindexRelationConcurrently(Oid relationOid, ReindexParams *params) index_close(indexRel, NoLock); index_close(newIndexRel, NoLock); + + /* Roll back any GUC changes executed by index functions */ + AtEOXact_GUC(false, save_nestlevel); + + /* Restore userid and security context */ + SetUserIdAndSecContext(save_userid, save_sec_context); + table_close(heapRel, NoLock); } diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/matview.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/matview.c index 2c2d4a12bba..afc067e1c09 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/matview.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/matview.c @@ -167,6 +167,17 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString, lockmode, 0, RangeVarCallbackOwnsTable, NULL); matviewRel = table_open(matviewOid, NoLock); + relowner = matviewRel->rd_rel->relowner; + + /* + * Switch to the owner's userid, so that any functions are run as that + * user. Also lock down security-restricted operations and arrange to + * make GUC variable changes local to this command. + */ + GetUserIdAndSecContext(&save_userid, &save_sec_context); + SetUserIdAndSecContext(relowner, + save_sec_context | SECURITY_RESTRICTED_OPERATION); + save_nestlevel = NewGUCNestLevel(); /* Make sure it is a materialized view. */ if (matviewRel->rd_rel->relkind != RELKIND_MATVIEW) @@ -269,19 +280,6 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString, */ SetMatViewPopulatedState(matviewRel, !stmt->skipData); - relowner = matviewRel->rd_rel->relowner; - - /* - * Switch to the owner's userid, so that any functions are run as that - * user. Also arrange to make GUC variable changes local to this command. - * Don't lock it down too tight to create a temporary table just yet. We - * will switch modes when we are about to execute user code. - */ - GetUserIdAndSecContext(&save_userid, &save_sec_context); - SetUserIdAndSecContext(relowner, - save_sec_context | SECURITY_LOCAL_USERID_CHANGE); - save_nestlevel = NewGUCNestLevel(); - /* Concurrent refresh builds new data in temp tablespace, and does diff. */ if (concurrent) { @@ -304,12 +302,6 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString, LockRelationOid(OIDNewHeap, AccessExclusiveLock); dest = CreateTransientRelDestReceiver(OIDNewHeap); - /* - * Now lock down security-restricted operations. - */ - SetUserIdAndSecContext(relowner, - save_sec_context | SECURITY_RESTRICTED_OPERATION); - /* Generate the data, if wanted. */ if (!stmt->skipData) processed = refresh_matview_datafill(dest, dataQuery, queryString); diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/tablecmds.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/tablecmds.c index 49f3ccdbec7..b1495a956e6 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/tablecmds.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/commands/tablecmds.c @@ -293,12 +293,18 @@ static const struct dropmsgstrings dropmsgstringarray[] = { {'\0', 0, NULL, NULL, NULL, NULL} }; +/* communication between RemoveRelations and RangeVarCallbackForDropRelation */ struct DropRelationCallbackState { - char relkind; + /* These fields are set by RemoveRelations: */ + char expected_relkind; + LOCKMODE heap_lockmode; + /* These fields are state to track which subsidiary locks are held: */ Oid heapOid; Oid partParentOid; - bool concurrent; + /* These fields are passed back by RangeVarCallbackForDropRelation: */ + char actual_relkind; + char actual_relpersistence; }; /* Alter table target-type flags for ATSimplePermissions */ @@ -1394,10 +1400,13 @@ RemoveRelations(DropStmt *drop) AcceptInvalidationMessages(); /* Look up the appropriate relation using namespace search. */ - state.relkind = relkind; + state.expected_relkind = relkind; + state.heap_lockmode = drop->concurrent ? + ShareUpdateExclusiveLock : AccessExclusiveLock; + /* We must initialize these fields to show that no locks are held: */ state.heapOid = InvalidOid; state.partParentOid = InvalidOid; - state.concurrent = drop->concurrent; + relOid = RangeVarGetRelidExtended(rel, lockmode, RVR_MISSING_OK, RangeVarCallbackForDropRelation, (void *) &state); @@ -1411,10 +1420,10 @@ RemoveRelations(DropStmt *drop) /* * Decide if concurrent mode needs to be used here or not. The - * relation persistence cannot be known without its OID. + * callback retrieved the rel's persistence for us. */ if (drop->concurrent && - get_rel_persistence(relOid) != RELPERSISTENCE_TEMP) + state.actual_relpersistence != RELPERSISTENCE_TEMP) { Assert(list_length(drop->objects) == 1 && drop->removeType == OBJECT_INDEX); @@ -1426,12 +1435,24 @@ RemoveRelations(DropStmt *drop) * either. */ if ((flags & PERFORM_DELETION_CONCURRENTLY) != 0 && - get_rel_relkind(relOid) == RELKIND_PARTITIONED_INDEX) + state.actual_relkind == RELKIND_PARTITIONED_INDEX) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("cannot drop partitioned index \"%s\" concurrently", rel->relname))); + /* + * If we're told to drop a partitioned index, we must acquire lock on + * all the children of its parent partitioned table before proceeding. + * Otherwise we'd try to lock the child index partitions before their + * tables, leading to potential deadlock against other sessions that + * will lock those objects in the other order. + */ + if (state.actual_relkind == RELKIND_PARTITIONED_INDEX) + (void) find_all_inheritors(state.heapOid, + state.heap_lockmode, + NULL); + /* OK, we're ready to delete this one */ obj.classId = RelationRelationId; obj.objectId = relOid; @@ -1457,7 +1478,6 @@ RangeVarCallbackForDropRelation(const RangeVar *rel, Oid relOid, Oid oldRelOid, { HeapTuple tuple; struct DropRelationCallbackState *state; - char relkind; char expected_relkind; bool is_partition; Form_pg_class classform; @@ -1465,9 +1485,7 @@ RangeVarCallbackForDropRelation(const RangeVar *rel, Oid relOid, Oid oldRelOid, bool invalid_system_index = false; state = (struct DropRelationCallbackState *) arg; - relkind = state->relkind; - heap_lockmode = state->concurrent ? - ShareUpdateExclusiveLock : AccessExclusiveLock; + heap_lockmode = state->heap_lockmode; /* * If we previously locked some other index's heap, and the name we're @@ -1501,6 +1519,10 @@ RangeVarCallbackForDropRelation(const RangeVar *rel, Oid relOid, Oid oldRelOid, classform = (Form_pg_class) GETSTRUCT(tuple); is_partition = classform->relispartition; + /* Pass back some data to save lookups in RemoveRelations */ + state->actual_relkind = classform->relkind; + state->actual_relpersistence = classform->relpersistence; + /* * Both RELKIND_RELATION and RELKIND_PARTITIONED_TABLE are OBJECT_TABLE, * but RemoveRelations() can only pass one relkind for a given relation. @@ -1516,13 +1538,15 @@ RangeVarCallbackForDropRelation(const RangeVar *rel, Oid relOid, Oid oldRelOid, else expected_relkind = classform->relkind; - if (relkind != expected_relkind) - DropErrorMsgWrongType(rel->relname, classform->relkind, relkind); + if (state->expected_relkind != expected_relkind) + DropErrorMsgWrongType(rel->relname, classform->relkind, + state->expected_relkind); /* Allow DROP to either table owner or schema owner */ if (!pg_class_ownercheck(relOid, GetUserId()) && !pg_namespace_ownercheck(classform->relnamespace, GetUserId())) - aclcheck_error(ACLCHECK_NOT_OWNER, get_relkind_objtype(get_rel_relkind(relOid)), + aclcheck_error(ACLCHECK_NOT_OWNER, + get_relkind_objtype(classform->relkind), rel->relname); /* @@ -1531,7 +1555,7 @@ RangeVarCallbackForDropRelation(const RangeVar *rel, Oid relOid, Oid oldRelOid, * only concerns indexes of toast relations that became invalid during a * REINDEX CONCURRENTLY process. */ - if (IsSystemClass(relOid, classform) && relkind == RELKIND_INDEX) + if (IsSystemClass(relOid, classform) && classform->relkind == RELKIND_INDEX) { HeapTuple locTuple; Form_pg_index indexform; @@ -1567,9 +1591,10 @@ RangeVarCallbackForDropRelation(const RangeVar *rel, Oid relOid, Oid oldRelOid, * locking the index. index_drop() will need this anyway, and since * regular queries lock tables before their indexes, we risk deadlock if * we do it the other way around. No error if we don't find a pg_index - * entry, though --- the relation may have been dropped. + * entry, though --- the relation may have been dropped. Note that this + * code will execute for either plain or partitioned indexes. */ - if ((relkind == RELKIND_INDEX || relkind == RELKIND_PARTITIONED_INDEX) && + if (expected_relkind == RELKIND_INDEX && relOid != oldRelOid) { state->heapOid = IndexGetRelation(relOid, true); @@ -1580,7 +1605,7 @@ RangeVarCallbackForDropRelation(const RangeVar *rel, Oid relOid, Oid oldRelOid, /* * Similarly, if the relation is a partition, we must acquire lock on its * parent before locking the partition. That's because queries lock the - * parent before its partitions, so we risk deadlock it we do it the other + * parent before its partitions, so we risk deadlock if we do it the other * way around. */ if (is_partition && relOid != oldRelOid) diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/executor/execExpr.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/executor/execExpr.c index 954a6b9438d..bec249f8998 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/executor/execExpr.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/executor/execExpr.c @@ -1897,16 +1897,16 @@ ExecInitExprRec(Expr *node, ExprState *state, { /* generic record, use types of given expressions */ tupdesc = ExecTypeFromExprList(rowexpr->args); + /* ... but adopt RowExpr's column aliases */ + ExecTypeSetColNames(tupdesc, rowexpr->colnames); + /* Bless the tupdesc so it can be looked up later */ + BlessTupleDesc(tupdesc); } else { /* it's been cast to a named type, use that */ tupdesc = lookup_rowtype_tupdesc_copy(rowexpr->row_typeid, -1); } - /* In either case, adopt RowExpr's column aliases */ - ExecTypeSetColNames(tupdesc, rowexpr->colnames); - /* Bless the tupdesc in case it's now of type RECORD */ - BlessTupleDesc(tupdesc); /* * In the named-type case, the tupdesc could have more columns diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/executor/execExprInterp.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/executor/execExprInterp.c index df1013a2146..d6bb97bf7d2 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/executor/execExprInterp.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/executor/execExprInterp.c @@ -4008,12 +4008,8 @@ ExecEvalWholeRowVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext) * generates an INT4 NULL regardless of the dropped column type). * If we find a dropped column and cannot verify that case (1) * holds, we have to use the slow path to check (2) for each row. - * - * If vartype is a domain over composite, just look through that - * to the base composite type. */ - var_tupdesc = lookup_rowtype_tupdesc_domain(variable->vartype, - -1, false); + var_tupdesc = lookup_rowtype_tupdesc(variable->vartype, -1); slot_tupdesc = slot->tts_tupleDescriptor; @@ -4050,9 +4046,8 @@ ExecEvalWholeRowVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext) /* * Use the variable's declared rowtype as the descriptor for the - * output values, modulo possibly assigning new column names - * below. In particular, we *must* absorb any attisdropped - * markings. + * output values. In particular, we *must* absorb any + * attisdropped markings. */ oldcontext = MemoryContextSwitchTo(econtext->ecxt_per_query_memory); output_tupdesc = CreateTupleDescCopy(var_tupdesc); @@ -4070,39 +4065,38 @@ ExecEvalWholeRowVar(ExprState *state, ExprEvalStep *op, ExprContext *econtext) oldcontext = MemoryContextSwitchTo(econtext->ecxt_per_query_memory); output_tupdesc = CreateTupleDescCopy(slot->tts_tupleDescriptor); MemoryContextSwitchTo(oldcontext); - } - /* - * Construct a tuple descriptor for the composite values we'll - * produce, and make sure its record type is "blessed". The main - * reason to do this is to be sure that operations such as - * row_to_json() will see the desired column names when they look up - * the descriptor from the type information embedded in the composite - * values. - * - * We already got the correct physical datatype info above, but now we - * should try to find the source RTE and adopt its column aliases, in - * case they are different from the original rowtype's names. For - * example, in "SELECT foo(t) FROM tab t(x,y)", the first two columns - * in the composite output should be named "x" and "y" regardless of - * tab's column names. - * - * If we can't locate the RTE, assume the column names we've got are - * OK. (As of this writing, the only cases where we can't locate the - * RTE are in execution of trigger WHEN clauses, and then the Var will - * have the trigger's relation's rowtype, so its names are fine.) - * Also, if the creator of the RTE didn't bother to fill in an eref - * field, assume our column names are OK. (This happens in COPY, and - * perhaps other places.) - */ - if (econtext->ecxt_estate && - variable->varno <= econtext->ecxt_estate->es_range_table_size) - { - RangeTblEntry *rte = exec_rt_fetch(variable->varno, - econtext->ecxt_estate); + /* + * It's possible that the input slot is a relation scan slot and + * so is marked with that relation's rowtype. But we're supposed + * to be returning RECORD, so reset to that. + */ + output_tupdesc->tdtypeid = RECORDOID; + output_tupdesc->tdtypmod = -1; - if (rte->eref) - ExecTypeSetColNames(output_tupdesc, rte->eref->colnames); + /* + * We already got the correct physical datatype info above, but + * now we should try to find the source RTE and adopt its column + * aliases, since it's unlikely that the input slot has the + * desired names. + * + * If we can't locate the RTE, assume the column names we've got + * are OK. (As of this writing, the only cases where we can't + * locate the RTE are in execution of trigger WHEN clauses, and + * then the Var will have the trigger's relation's rowtype, so its + * names are fine.) Also, if the creator of the RTE didn't bother + * to fill in an eref field, assume our column names are OK. (This + * happens in COPY, and perhaps other places.) + */ + if (econtext->ecxt_estate && + variable->varno <= econtext->ecxt_estate->es_range_table_size) + { + RangeTblEntry *rte = exec_rt_fetch(variable->varno, + econtext->ecxt_estate); + + if (rte->eref) + ExecTypeSetColNames(output_tupdesc, rte->eref->colnames); + } } /* Bless the tupdesc if needed, and save it in the execution state */ diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/executor/execTuples.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/executor/execTuples.c index f4478028431..5004b3b1656 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/executor/execTuples.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/executor/execTuples.c @@ -2022,51 +2022,40 @@ ExecTypeFromExprList(List *exprList) } /* - * ExecTypeSetColNames - set column names in a TupleDesc + * ExecTypeSetColNames - set column names in a RECORD TupleDesc * * Column names must be provided as an alias list (list of String nodes). - * - * For some callers, the supplied tupdesc has a named rowtype (not RECORD) - * and it is moderately likely that the alias list matches the column names - * already present in the tupdesc. If we do change any column names then - * we must reset the tupdesc's type to anonymous RECORD; but we avoid doing - * so if no names change. */ void ExecTypeSetColNames(TupleDesc typeInfo, List *namesList) { - bool modified = false; int colno = 0; ListCell *lc; + /* It's only OK to change col names in a not-yet-blessed RECORD type */ + Assert(typeInfo->tdtypeid == RECORDOID); + Assert(typeInfo->tdtypmod < 0); + foreach(lc, namesList) { char *cname = strVal(lfirst(lc)); Form_pg_attribute attr; - /* Guard against too-long names list */ + /* Guard against too-long names list (probably can't happen) */ if (colno >= typeInfo->natts) break; attr = TupleDescAttr(typeInfo, colno); colno++; - /* Ignore empty aliases (these must be for dropped columns) */ - if (cname[0] == '\0') + /* + * Do nothing for empty aliases or dropped columns (these cases + * probably can't arise in RECORD types, either) + */ + if (cname[0] == '\0' || attr->attisdropped) continue; - /* Change tupdesc only if alias is actually different */ - if (strcmp(cname, NameStr(attr->attname)) != 0) - { - namestrcpy(&(attr->attname), cname); - modified = true; - } - } - - /* If we modified the tupdesc, it's now a new record type */ - if (modified) - { - typeInfo->tdtypeid = RECORDOID; - typeInfo->tdtypmod = -1; + /* OK, assign the column name */ + namestrcpy(&(attr->attname), cname); } } diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/executor/nodeIndexscan.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/executor/nodeIndexscan.c index 2fffb1b4371..add29b3733b 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/executor/nodeIndexscan.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/executor/nodeIndexscan.c @@ -574,8 +574,12 @@ ExecReScanIndexScan(IndexScanState *node) /* flush the reorder queue */ if (node->iss_ReorderQueue) { + HeapTuple tuple; while (!pairingheap_is_empty(node->iss_ReorderQueue)) - reorderqueue_pop(node); + { + tuple = reorderqueue_pop(node); + heap_freetuple(tuple); + } } /* reset index scan */ diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/libpq/be-secure-common.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/libpq/be-secure-common.c index a212308666a..612f6f3777e 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/libpq/be-secure-common.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/libpq/be-secure-common.c @@ -143,6 +143,7 @@ check_ssl_key_file_permissions(const char *ssl_key_file, bool isServerStart) return false; } + /* Key file must be a regular file */ if (!S_ISREG(buf.st_mode)) { ereport(loglevel, @@ -153,9 +154,19 @@ check_ssl_key_file_permissions(const char *ssl_key_file, bool isServerStart) } /* - * Refuse to load key files owned by users other than us or root. + * Refuse to load key files owned by users other than us or root, and + * require no public access to the key file. If the file is owned by us, + * require mode 0600 or less. If owned by root, require 0640 or less to + * allow read access through either our gid or a supplementary gid that + * allows us to read system-wide certificates. * - * XXX surely we can check this on Windows somehow, too. + * Note that similar checks are performed in + * src/interfaces/libpq/fe-secure-openssl.c so any changes here may need + * to be made there as well. + * + * Ideally we would do similar permissions checks on Windows, but it is + * not clear how that would work since Unix-style permissions may not be + * available. */ #if !defined(WIN32) && !defined(__CYGWIN__) if (buf.st_uid != geteuid() && buf.st_uid != 0) @@ -166,20 +177,7 @@ check_ssl_key_file_permissions(const char *ssl_key_file, bool isServerStart) ssl_key_file))); return false; } -#endif - /* - * Require no public access to key file. If the file is owned by us, - * require mode 0600 or less. If owned by root, require 0640 or less to - * allow read access through our gid, or a supplementary gid that allows - * to read system-wide certificates. - * - * XXX temporarily suppress check when on Windows, because there may not - * be proper support for Unix-y file permissions. Need to think of a - * reasonable check to apply on Windows. (See also the data directory - * permission check in postmaster.c) - */ -#if !defined(WIN32) && !defined(__CYGWIN__) if ((buf.st_uid == geteuid() && buf.st_mode & (S_IRWXG | S_IRWXO)) || (buf.st_uid == 0 && buf.st_mode & (S_IWGRP | S_IXGRP | S_IRWXO))) { diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/nodes/copyfuncs.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/nodes/copyfuncs.c index f0fa2e23375..a106a2cdf18 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/nodes/copyfuncs.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/nodes/copyfuncs.c @@ -57,8 +57,11 @@ #define COPY_POINTER_FIELD(fldname, sz) \ do { \ Size _size = (sz); \ - newnode->fldname = palloc(_size); \ - memcpy(newnode->fldname, from->fldname, _size); \ + if (_size > 0) \ + { \ + newnode->fldname = palloc(_size); \ + memcpy(newnode->fldname, from->fldname, _size); \ + } \ } while (0) /* Copy a parse location field (for Copy, this is same as scalar case) */ @@ -296,12 +299,9 @@ _copyRecursiveUnion(const RecursiveUnion *from) */ COPY_SCALAR_FIELD(wtParam); COPY_SCALAR_FIELD(numCols); - if (from->numCols > 0) - { - COPY_POINTER_FIELD(dupColIdx, from->numCols * sizeof(AttrNumber)); - COPY_POINTER_FIELD(dupOperators, from->numCols * sizeof(Oid)); - COPY_POINTER_FIELD(dupCollations, from->numCols * sizeof(Oid)); - } + COPY_POINTER_FIELD(dupColIdx, from->numCols * sizeof(AttrNumber)); + COPY_POINTER_FIELD(dupOperators, from->numCols * sizeof(Oid)); + COPY_POINTER_FIELD(dupCollations, from->numCols * sizeof(Oid)); COPY_SCALAR_FIELD(numGroups); return newnode; @@ -897,13 +897,10 @@ _copyMergeJoin(const MergeJoin *from) COPY_SCALAR_FIELD(skip_mark_restore); COPY_NODE_FIELD(mergeclauses); numCols = list_length(from->mergeclauses); - if (numCols > 0) - { - COPY_POINTER_FIELD(mergeFamilies, numCols * sizeof(Oid)); - COPY_POINTER_FIELD(mergeCollations, numCols * sizeof(Oid)); - COPY_POINTER_FIELD(mergeStrategies, numCols * sizeof(int)); - COPY_POINTER_FIELD(mergeNullsFirst, numCols * sizeof(bool)); - } + COPY_POINTER_FIELD(mergeFamilies, numCols * sizeof(Oid)); + COPY_POINTER_FIELD(mergeCollations, numCols * sizeof(Oid)); + COPY_POINTER_FIELD(mergeStrategies, numCols * sizeof(int)); + COPY_POINTER_FIELD(mergeNullsFirst, numCols * sizeof(bool)); return newnode; } @@ -1067,12 +1064,9 @@ _copyAgg(const Agg *from) COPY_SCALAR_FIELD(aggstrategy); COPY_SCALAR_FIELD(aggsplit); COPY_SCALAR_FIELD(numCols); - if (from->numCols > 0) - { - COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber)); - COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid)); - COPY_POINTER_FIELD(grpCollations, from->numCols * sizeof(Oid)); - } + COPY_POINTER_FIELD(grpColIdx, from->numCols * sizeof(AttrNumber)); + COPY_POINTER_FIELD(grpOperators, from->numCols * sizeof(Oid)); + COPY_POINTER_FIELD(grpCollations, from->numCols * sizeof(Oid)); COPY_SCALAR_FIELD(numGroups); COPY_SCALAR_FIELD(transitionSpace); COPY_BITMAPSET_FIELD(aggParams); @@ -1094,19 +1088,13 @@ _copyWindowAgg(const WindowAgg *from) COPY_SCALAR_FIELD(winref); COPY_SCALAR_FIELD(partNumCols); - if (from->partNumCols > 0) - { - COPY_POINTER_FIELD(partColIdx, from->partNumCols * sizeof(AttrNumber)); - COPY_POINTER_FIELD(partOperators, from->partNumCols * sizeof(Oid)); - COPY_POINTER_FIELD(partCollations, from->partNumCols * sizeof(Oid)); - } + COPY_POINTER_FIELD(partColIdx, from->partNumCols * sizeof(AttrNumber)); + COPY_POINTER_FIELD(partOperators, from->partNumCols * sizeof(Oid)); + COPY_POINTER_FIELD(partCollations, from->partNumCols * sizeof(Oid)); COPY_SCALAR_FIELD(ordNumCols); - if (from->ordNumCols > 0) - { - COPY_POINTER_FIELD(ordColIdx, from->ordNumCols * sizeof(AttrNumber)); - COPY_POINTER_FIELD(ordOperators, from->ordNumCols * sizeof(Oid)); - COPY_POINTER_FIELD(ordCollations, from->ordNumCols * sizeof(Oid)); - } + COPY_POINTER_FIELD(ordColIdx, from->ordNumCols * sizeof(AttrNumber)); + COPY_POINTER_FIELD(ordOperators, from->ordNumCols * sizeof(Oid)); + COPY_POINTER_FIELD(ordCollations, from->ordNumCols * sizeof(Oid)); COPY_SCALAR_FIELD(frameOptions); COPY_NODE_FIELD(startOffset); COPY_NODE_FIELD(endOffset); diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/nodes/nodeFuncs.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/nodes/nodeFuncs.c index 0ec7b9680e5..50c3f83e1e9 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/nodes/nodeFuncs.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/nodes/nodeFuncs.c @@ -736,6 +736,8 @@ expression_returns_set_walker(Node *node, void *context) /* Avoid recursion for some cases that parser checks not to return a set */ if (IsA(node, Aggref)) return false; + if (IsA(node, GroupingFunc)) + return false; if (IsA(node, WindowFunc)) return false; diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/optimizer/path/allpaths.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/optimizer/path/allpaths.c index 3f4e5081db9..2dbe4babf73 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/optimizer/path/allpaths.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/optimizer/path/allpaths.c @@ -2461,7 +2461,8 @@ set_cte_pathlist(PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte) if (ndx >= list_length(cteroot->cte_plan_ids)) elog(ERROR, "could not find plan for CTE \"%s\"", rte->ctename); plan_id = list_nth_int(cteroot->cte_plan_ids, ndx); - Assert(plan_id > 0); + if (plan_id <= 0) + elog(ERROR, "no plan was made for CTE \"%s\"", rte->ctename); cteplan = (Plan *) list_nth(root->glob->subplans, plan_id - 1); /* Mark rel with estimated output rows, width, etc */ diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/optimizer/path/costsize.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/optimizer/path/costsize.c index 43d9d88e96d..16fd51aa450 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/optimizer/path/costsize.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/optimizer/path/costsize.c @@ -4492,6 +4492,12 @@ cost_qual_eval_walker(Node *node, cost_qual_eval_context *context) */ return false; /* don't recurse into children */ } + else if (IsA(node, GroupingFunc)) + { + /* Treat this as having cost 1 */ + context->total.per_tuple += cpu_operator_cost; + return false; /* don't recurse into children */ + } else if (IsA(node, CoerceViaIO)) { CoerceViaIO *iocoerce = (CoerceViaIO *) node; diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/optimizer/plan/createplan.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/optimizer/plan/createplan.c index 81e47937c68..0ed858f305a 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/optimizer/plan/createplan.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/optimizer/plan/createplan.c @@ -82,7 +82,7 @@ static List *get_gating_quals(PlannerInfo *root, List *quals); static Plan *create_gating_plan(PlannerInfo *root, Path *path, Plan *plan, List *gating_quals); static Plan *create_join_plan(PlannerInfo *root, JoinPath *best_path); -static bool is_async_capable_path(Path *path); +static bool is_async_capable_plan(Plan *plan, Path *path); static Plan *create_append_plan(PlannerInfo *root, AppendPath *best_path, int flags); static Plan *create_merge_append_plan(PlannerInfo *root, MergeAppendPath *best_path, @@ -915,6 +915,22 @@ use_physical_tlist(PlannerInfo *root, Path *path, int flags) } /* + * For an index-only scan, the "physical tlist" is the index's indextlist. + * We can only return that without a projection if all the index's columns + * are returnable. + */ + if (path->pathtype == T_IndexOnlyScan) + { + IndexOptInfo *indexinfo = ((IndexPath *) path)->indexinfo; + + for (i = 0; i < indexinfo->ncolumns; i++) + { + if (!indexinfo->canreturn[i]) + return false; + } + } + + /* * Also, can't do it if CP_LABEL_TLIST is specified and path is requested * to emit any sort/group columns that are not simple Vars. (If they are * simple Vars, they should appear in the physical tlist, and @@ -1093,11 +1109,11 @@ create_join_plan(PlannerInfo *root, JoinPath *best_path) } /* - * is_async_capable_path - * Check whether a given Path node is async-capable. + * is_async_capable_plan + * Check whether the Plan node created from a Path node is async-capable. */ static bool -is_async_capable_path(Path *path) +is_async_capable_plan(Plan *plan, Path *path) { switch (nodeTag(path)) { @@ -1105,6 +1121,13 @@ is_async_capable_path(Path *path) { FdwRoutine *fdwroutine = path->parent->fdwroutine; + /* + * If the generated plan node includes a gating Result node, + * we can't execute it asynchronously. + */ + if (IsA(plan, Result)) + return false; + Assert(fdwroutine != NULL); if (fdwroutine->IsForeignPathAsyncCapable != NULL && fdwroutine->IsForeignPathAsyncCapable((ForeignPath *) path)) @@ -1279,8 +1302,8 @@ create_append_plan(PlannerInfo *root, AppendPath *best_path, int flags) subplans = lappend(subplans, subplan); - /* Check to see if subplan can be executed asynchronously */ - if (consider_async && is_async_capable_path(subpath)) + /* If needed, check to see if subplan can be executed asynchronously */ + if (consider_async && is_async_capable_plan(subplan, subpath)) { subplan->async_capable = true; ++nasyncplans; @@ -3846,7 +3869,8 @@ create_ctescan_plan(PlannerInfo *root, Path *best_path, if (ndx >= list_length(cteroot->cte_plan_ids)) elog(ERROR, "could not find plan for CTE \"%s\"", rte->ctename); plan_id = list_nth_int(cteroot->cte_plan_ids, ndx); - Assert(plan_id > 0); + if (plan_id <= 0) + elog(ERROR, "no plan was made for CTE \"%s\"", rte->ctename); foreach(lc, cteroot->init_plans) { ctesplan = (SubPlan *) lfirst(lc); diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/optimizer/plan/subselect.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/optimizer/plan/subselect.c index 5d0680821b5..0ee36b95004 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/optimizer/plan/subselect.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/optimizer/plan/subselect.c @@ -61,7 +61,6 @@ typedef struct inline_cte_walker_context { const char *ctename; /* name and relative level of target CTE */ int levelsup; - int refcount; /* number of remaining references */ Query *ctequery; /* query to substitute */ } inline_cte_walker_context; @@ -356,15 +355,17 @@ build_subplan(PlannerInfo *root, Plan *plan, PlannerInfo *subroot, Node *arg = pitem->item; /* - * The Var, PlaceHolderVar, or Aggref has already been adjusted to - * have the correct varlevelsup, phlevelsup, or agglevelsup. + * The Var, PlaceHolderVar, Aggref or GroupingFunc has already been + * adjusted to have the correct varlevelsup, phlevelsup, or + * agglevelsup. * - * If it's a PlaceHolderVar or Aggref, its arguments might contain - * SubLinks, which have not yet been processed (see the comments for - * SS_replace_correlation_vars). Do that now. + * If it's a PlaceHolderVar, Aggref or GroupingFunc, its arguments + * might contain SubLinks, which have not yet been processed (see the + * comments for SS_replace_correlation_vars). Do that now. */ if (IsA(arg, PlaceHolderVar) || - IsA(arg, Aggref)) + IsA(arg, Aggref) || + IsA(arg, GroupingFunc)) arg = SS_process_sublinks(root, arg, false); splan->parParam = lappend_int(splan->parParam, pitem->paramId); @@ -1155,13 +1156,9 @@ inline_cte(PlannerInfo *root, CommonTableExpr *cte) context.ctename = cte->ctename; /* Start at levelsup = -1 because we'll immediately increment it */ context.levelsup = -1; - context.refcount = cte->cterefcount; context.ctequery = castNode(Query, cte->ctequery); (void) inline_cte_walker((Node *) root->parse, &context); - - /* Assert we replaced all references */ - Assert(context.refcount == 0); } static bool @@ -1224,9 +1221,6 @@ inline_cte_walker(Node *node, inline_cte_walker_context *context) rte->coltypes = NIL; rte->coltypmods = NIL; rte->colcollations = NIL; - - /* Count the number of replacements we've done */ - context->refcount--; } return false; @@ -1957,10 +1951,11 @@ process_sublinks_mutator(Node *node, process_sublinks_context *context) } /* - * Don't recurse into the arguments of an outer PHV or aggregate here. Any - * SubLinks in the arguments have to be dealt with at the outer query - * level; they'll be handled when build_subplan collects the PHV or Aggref - * into the arguments to be passed down to the current subplan. + * Don't recurse into the arguments of an outer PHV, Aggref or + * GroupingFunc here. Any SubLinks in the arguments have to be dealt with + * at the outer query level; they'll be handled when build_subplan + * collects the PHV, Aggref or GroupingFunc into the arguments to be + * passed down to the current subplan. */ if (IsA(node, PlaceHolderVar)) { @@ -1972,6 +1967,11 @@ process_sublinks_mutator(Node *node, process_sublinks_context *context) if (((Aggref *) node)->agglevelsup > 0) return node; } + else if (IsA(node, GroupingFunc)) + { + if (((GroupingFunc *) node)->agglevelsup > 0) + return node; + } /* * We should never see a SubPlan expression in the input (since this is @@ -2084,7 +2084,7 @@ SS_identify_outer_params(PlannerInfo *root) outer_params = NULL; for (proot = root->parent_root; proot != NULL; proot = proot->parent_root) { - /* Include ordinary Var/PHV/Aggref params */ + /* Include ordinary Var/PHV/Aggref/GroupingFunc params */ foreach(l, proot->plan_params) { PlannerParamItem *pitem = (PlannerParamItem *) lfirst(l); diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/parser/analyze.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/parser/analyze.c index 86f6ca06235..0bd7f4fff43 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/parser/analyze.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/parser/analyze.c @@ -1381,7 +1381,7 @@ static Query * transformValuesClause(ParseState *pstate, SelectStmt *stmt) { Query *qry = makeNode(Query); - List *exprsLists; + List *exprsLists = NIL; List *coltypes = NIL; List *coltypmods = NIL; List *colcollations = NIL; @@ -1465,6 +1465,9 @@ transformValuesClause(ParseState *pstate, SelectStmt *stmt) /* Release sub-list's cells to save memory */ list_free(sublist); + + /* Prepare an exprsLists element for this row */ + exprsLists = lappend(exprsLists, NIL); } /* @@ -1508,17 +1511,7 @@ transformValuesClause(ParseState *pstate, SelectStmt *stmt) /* * Finally, rearrange the coerced expressions into row-organized lists. */ - exprsLists = NIL; - foreach(lc, colexprs[0]) - { - Node *col = (Node *) lfirst(lc); - List *sublist; - - sublist = list_make1(col); - exprsLists = lappend(exprsLists, sublist); - } - list_free(colexprs[0]); - for (i = 1; i < sublist_length; i++) + for (i = 0; i < sublist_length; i++) { forboth(lc, colexprs[i], lc2, exprsLists) { @@ -1526,6 +1519,7 @@ transformValuesClause(ParseState *pstate, SelectStmt *stmt) List *sublist = lfirst(lc2); sublist = lappend(sublist, col); + lfirst(lc2) = sublist; } list_free(colexprs[i]); } diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/parser/gram.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/parser/gram.c index 257cfd0a6a4..76befd6680e 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/parser/gram.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/parser/gram.c @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.3.2. */ +/* A Bison parser, made by GNU Bison 3.7.5. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -34,6 +34,10 @@ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. @@ -41,14 +45,11 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Undocumented macros, especially those whose name start with YY_, - are private implementation details. Do not rely on them. */ - -/* Identify Bison output. */ -#define YYBISON 1 +/* Identify Bison output, and Bison version. */ +#define YYBISON 30705 -/* Bison version. */ -#define YYBISON_VERSION "3.3.2" +/* Bison version string. */ +#define YYBISON_VERSION "3.7.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -70,9 +71,8 @@ #define yydebug base_yydebug #define yynerrs base_yynerrs - /* First part of user prologue. */ -#line 1 "gram.y" /* yacc.c:337 */ +#line 1 "gram.y" /*#define YYDEBUG 1*/ @@ -279,7 +279,17 @@ static void processCASbits(int cas_bits, int location, const char *constrType, static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query); -#line 283 "gram.c" /* yacc.c:337 */ +#line 283 "gram.c" + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast<Type> (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus @@ -292,626 +302,1281 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query); # endif # endif -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "gram.h". */ -#ifndef YY_BASE_YY_GRAM_H_INCLUDED -# define YY_BASE_YY_GRAM_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int base_yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - IDENT = 258, - UIDENT = 259, - FCONST = 260, - SCONST = 261, - USCONST = 262, - BCONST = 263, - XCONST = 264, - Op = 265, - ICONST = 266, - PARAM = 267, - TYPECAST = 268, - DOT_DOT = 269, - COLON_EQUALS = 270, - EQUALS_GREATER = 271, - LESS_EQUALS = 272, - GREATER_EQUALS = 273, - NOT_EQUALS = 274, - ABORT_P = 275, - ABSOLUTE_P = 276, - ACCESS = 277, - ACTION = 278, - ADD_P = 279, - ADMIN = 280, - AFTER = 281, - AGGREGATE = 282, - ALL = 283, - ALSO = 284, - ALTER = 285, - ALWAYS = 286, - ANALYSE = 287, - ANALYZE = 288, - AND = 289, - ANY = 290, - ARRAY = 291, - AS = 292, - ASC = 293, - ASENSITIVE = 294, - ASSERTION = 295, - ASSIGNMENT = 296, - ASYMMETRIC = 297, - ATOMIC = 298, - AT = 299, - ATTACH = 300, - ATTRIBUTE = 301, - AUTHORIZATION = 302, - BACKWARD = 303, - BEFORE = 304, - BEGIN_P = 305, - BETWEEN = 306, - BIGINT = 307, - BINARY = 308, - BIT = 309, - BOOLEAN_P = 310, - BOTH = 311, - BREADTH = 312, - BY = 313, - CACHE = 314, - CALL = 315, - CALLED = 316, - CASCADE = 317, - CASCADED = 318, - CASE = 319, - CAST = 320, - CATALOG_P = 321, - CHAIN = 322, - CHAR_P = 323, - CHARACTER = 324, - CHARACTERISTICS = 325, - CHECK = 326, - CHECKPOINT = 327, - CLASS = 328, - CLOSE = 329, - CLUSTER = 330, - COALESCE = 331, - COLLATE = 332, - COLLATION = 333, - COLUMN = 334, - COLUMNS = 335, - COMMENT = 336, - COMMENTS = 337, - COMMIT = 338, - COMMITTED = 339, - COMPRESSION = 340, - CONCURRENTLY = 341, - CONFIGURATION = 342, - CONFLICT = 343, - CONNECTION = 344, - CONSTRAINT = 345, - CONSTRAINTS = 346, - CONTENT_P = 347, - CONTINUE_P = 348, - CONVERSION_P = 349, - COPY = 350, - COST = 351, - CREATE = 352, - CROSS = 353, - CSV = 354, - CUBE = 355, - CURRENT_P = 356, - CURRENT_CATALOG = 357, - CURRENT_DATE = 358, - CURRENT_ROLE = 359, - CURRENT_SCHEMA = 360, - CURRENT_TIME = 361, - CURRENT_TIMESTAMP = 362, - CURRENT_USER = 363, - CURSOR = 364, - CYCLE = 365, - DATA_P = 366, - DATABASE = 367, - DAY_P = 368, - DEALLOCATE = 369, - DEC = 370, - DECIMAL_P = 371, - DECLARE = 372, - DEFAULT = 373, - DEFAULTS = 374, - DEFERRABLE = 375, - DEFERRED = 376, - DEFINER = 377, - DELETE_P = 378, - DELIMITER = 379, - DELIMITERS = 380, - DEPENDS = 381, - DEPTH = 382, - DESC = 383, - DETACH = 384, - DICTIONARY = 385, - DISABLE_P = 386, - DISCARD = 387, - DISTINCT = 388, - DO = 389, - DOCUMENT_P = 390, - DOMAIN_P = 391, - DOUBLE_P = 392, - DROP = 393, - EACH = 394, - ELSE = 395, - ENABLE_P = 396, - ENCODING = 397, - ENCRYPTED = 398, - END_P = 399, - ENUM_P = 400, - ESCAPE = 401, - EVENT = 402, - EXCEPT = 403, - EXCLUDE = 404, - EXCLUDING = 405, - EXCLUSIVE = 406, - EXECUTE = 407, - EXISTS = 408, - EXPLAIN = 409, - EXPRESSION = 410, - EXTENSION = 411, - EXTERNAL = 412, - EXTRACT = 413, - FALSE_P = 414, - FAMILY = 415, - FETCH = 416, - FILTER = 417, - FINALIZE = 418, - FIRST_P = 419, - FLOAT_P = 420, - FOLLOWING = 421, - FOR = 422, - FORCE = 423, - FOREIGN = 424, - FORWARD = 425, - FREEZE = 426, - FROM = 427, - FULL = 428, - FUNCTION = 429, - FUNCTIONS = 430, - GENERATED = 431, - GLOBAL = 432, - GRANT = 433, - GRANTED = 434, - GREATEST = 435, - GROUP_P = 436, - GROUPING = 437, - GROUPS = 438, - HANDLER = 439, - HAVING = 440, - HEADER_P = 441, - HOLD = 442, - HOUR_P = 443, - IDENTITY_P = 444, - IF_P = 445, - ILIKE = 446, - IMMEDIATE = 447, - IMMUTABLE = 448, - IMPLICIT_P = 449, - IMPORT_P = 450, - IN_P = 451, - INCLUDE = 452, - INCLUDING = 453, - INCREMENT = 454, - INDEX = 455, - INDEXES = 456, - INHERIT = 457, - INHERITS = 458, - INITIALLY = 459, - INLINE_P = 460, - INNER_P = 461, - INOUT = 462, - INPUT_P = 463, - INSENSITIVE = 464, - INSERT = 465, - INSTEAD = 466, - INT_P = 467, - INTEGER = 468, - INTERSECT = 469, - INTERVAL = 470, - INTO = 471, - INVOKER = 472, - IS = 473, - ISNULL = 474, - ISOLATION = 475, - JOIN = 476, - KEY = 477, - LABEL = 478, - LANGUAGE = 479, - LARGE_P = 480, - LAST_P = 481, - LATERAL_P = 482, - LEADING = 483, - LEAKPROOF = 484, - LEAST = 485, - LEFT = 486, - LEVEL = 487, - LIKE = 488, - LIMIT = 489, - LISTEN = 490, - LOAD = 491, - LOCAL = 492, - LOCALTIME = 493, - LOCALTIMESTAMP = 494, - LOCATION = 495, - LOCK_P = 496, - LOCKED = 497, - LOGGED = 498, - MAPPING = 499, - MATCH = 500, - MATERIALIZED = 501, - MAXVALUE = 502, - METHOD = 503, - MINUTE_P = 504, - MINVALUE = 505, - MODE = 506, - MONTH_P = 507, - MOVE = 508, - NAME_P = 509, - NAMES = 510, - NATIONAL = 511, - NATURAL = 512, - NCHAR = 513, - NEW = 514, - NEXT = 515, - NFC = 516, - NFD = 517, - NFKC = 518, - NFKD = 519, - NO = 520, - NONE = 521, - NORMALIZE = 522, - NORMALIZED = 523, - NOT = 524, - NOTHING = 525, - NOTIFY = 526, - NOTNULL = 527, - NOWAIT = 528, - NULL_P = 529, - NULLIF = 530, - NULLS_P = 531, - NUMERIC = 532, - OBJECT_P = 533, - OF = 534, - OFF = 535, - OFFSET = 536, - OIDS = 537, - OLD = 538, - ON = 539, - ONLY = 540, - OPERATOR = 541, - OPTION = 542, - OPTIONS = 543, - OR = 544, - ORDER = 545, - ORDINALITY = 546, - OTHERS = 547, - OUT_P = 548, - OUTER_P = 549, - OVER = 550, - OVERLAPS = 551, - OVERLAY = 552, - OVERRIDING = 553, - OWNED = 554, - OWNER = 555, - PARALLEL = 556, - PARSER = 557, - PARTIAL = 558, - PARTITION = 559, - PASSING = 560, - PASSWORD = 561, - PLACING = 562, - PLANS = 563, - POLICY = 564, - POSITION = 565, - PRECEDING = 566, - PRECISION = 567, - PRESERVE = 568, - PREPARE = 569, - PREPARED = 570, - PRIMARY = 571, - PRIOR = 572, - PRIVILEGES = 573, - PROCEDURAL = 574, - PROCEDURE = 575, - PROCEDURES = 576, - PROGRAM = 577, - PUBLICATION = 578, - QUOTE = 579, - RANGE = 580, - READ = 581, - REAL = 582, - REASSIGN = 583, - RECHECK = 584, - RECURSIVE = 585, - REF = 586, - REFERENCES = 587, - REFERENCING = 588, - REFRESH = 589, - REINDEX = 590, - RELATIVE_P = 591, - RELEASE = 592, - RENAME = 593, - REPEATABLE = 594, - REPLACE = 595, - REPLICA = 596, - RESET = 597, - RESTART = 598, - RESTRICT = 599, - RETURN = 600, - RETURNING = 601, - RETURNS = 602, - REVOKE = 603, - RIGHT = 604, - ROLE = 605, - ROLLBACK = 606, - ROLLUP = 607, - ROUTINE = 608, - ROUTINES = 609, - ROW = 610, - ROWS = 611, - RULE = 612, - SAVEPOINT = 613, - SCHEMA = 614, - SCHEMAS = 615, - SCROLL = 616, - SEARCH = 617, - SECOND_P = 618, - SECURITY = 619, - SELECT = 620, - SEQUENCE = 621, - SEQUENCES = 622, - SERIALIZABLE = 623, - SERVER = 624, - SESSION = 625, - SESSION_USER = 626, - SET = 627, - SETS = 628, - SETOF = 629, - SHARE = 630, - SHOW = 631, - SIMILAR = 632, - SIMPLE = 633, - SKIP = 634, - SMALLINT = 635, - SNAPSHOT = 636, - SOME = 637, - SQL_P = 638, - STABLE = 639, - STANDALONE_P = 640, - START = 641, - STATEMENT = 642, - STATISTICS = 643, - STDIN = 644, - STDOUT = 645, - STORAGE = 646, - STORED = 647, - STRICT_P = 648, - STRIP_P = 649, - SUBSCRIPTION = 650, - SUBSTRING = 651, - SUPPORT = 652, - SYMMETRIC = 653, - SYSID = 654, - SYSTEM_P = 655, - TABLE = 656, - TABLES = 657, - TABLESAMPLE = 658, - TABLESPACE = 659, - TEMP = 660, - TEMPLATE = 661, - TEMPORARY = 662, - TEXT_P = 663, - THEN = 664, - TIES = 665, - TIME = 666, - TIMESTAMP = 667, - TO = 668, - TRAILING = 669, - TRANSACTION = 670, - TRANSFORM = 671, - TREAT = 672, - TRIGGER = 673, - TRIM = 674, - TRUE_P = 675, - TRUNCATE = 676, - TRUSTED = 677, - TYPE_P = 678, - TYPES_P = 679, - UESCAPE = 680, - UNBOUNDED = 681, - UNCOMMITTED = 682, - UNENCRYPTED = 683, - UNION = 684, - UNIQUE = 685, - UNKNOWN = 686, - UNLISTEN = 687, - UNLOGGED = 688, - UNTIL = 689, - UPDATE = 690, - USER = 691, - USING = 692, - VACUUM = 693, - VALID = 694, - VALIDATE = 695, - VALIDATOR = 696, - VALUE_P = 697, - VALUES = 698, - VARCHAR = 699, - VARIADIC = 700, - VARYING = 701, - VERBOSE = 702, - VERSION_P = 703, - VIEW = 704, - VIEWS = 705, - VOLATILE = 706, - WHEN = 707, - WHERE = 708, - WHITESPACE_P = 709, - WINDOW = 710, - WITH = 711, - WITHIN = 712, - WITHOUT = 713, - WORK = 714, - WRAPPER = 715, - WRITE = 716, - XML_P = 717, - XMLATTRIBUTES = 718, - XMLCONCAT = 719, - XMLELEMENT = 720, - XMLEXISTS = 721, - XMLFOREST = 722, - XMLNAMESPACES = 723, - XMLPARSE = 724, - XMLPI = 725, - XMLROOT = 726, - XMLSERIALIZE = 727, - XMLTABLE = 728, - YEAR_P = 729, - YES_P = 730, - ZONE = 731, - NOT_LA = 732, - NULLS_LA = 733, - WITH_LA = 734, - MODE_TYPE_NAME = 735, - MODE_PLPGSQL_EXPR = 736, - MODE_PLPGSQL_ASSIGN1 = 737, - MODE_PLPGSQL_ASSIGN2 = 738, - MODE_PLPGSQL_ASSIGN3 = 739, - UMINUS = 740 - }; -#endif - -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - -union YYSTYPE +#include "gram.h" +/* Symbol kind. */ +enum yysymbol_kind_t { -#line 217 "gram.y" /* yacc.c:352 */ - - core_YYSTYPE core_yystype; - /* these fields must match core_YYSTYPE: */ - int ival; - char *str; - const char *keyword; - - char chr; - bool boolean; - JoinType jtype; - DropBehavior dbehavior; - OnCommitAction oncommit; - List *list; - Node *node; - Value *value; - ObjectType objtype; - TypeName *typnam; - FunctionParameter *fun_param; - FunctionParameterMode fun_param_mode; - ObjectWithArgs *objwithargs; - DefElem *defelt; - SortBy *sortby; - WindowDef *windef; - JoinExpr *jexpr; - IndexElem *ielem; - StatsElem *selem; - Alias *alias; - RangeVar *range; - IntoClause *into; - WithClause *with; - InferClause *infer; - OnConflictClause *onconflict; - A_Indices *aind; - ResTarget *target; - struct PrivTarget *privtarget; - AccessPriv *accesspriv; - struct ImportQual *importqual; - InsertStmt *istmt; - VariableSetStmt *vsetstmt; - PartitionElem *partelem; - PartitionSpec *partspec; - PartitionBoundSpec *partboundspec; - RoleSpec *rolespec; - struct SelectLimit *selectlimit; - SetQuantifier setquantifier; - struct GroupClause *groupclause; - -#line 860 "gram.c" /* yacc.c:352 */ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_IDENT = 3, /* IDENT */ + YYSYMBOL_UIDENT = 4, /* UIDENT */ + YYSYMBOL_FCONST = 5, /* FCONST */ + YYSYMBOL_SCONST = 6, /* SCONST */ + YYSYMBOL_USCONST = 7, /* USCONST */ + YYSYMBOL_BCONST = 8, /* BCONST */ + YYSYMBOL_XCONST = 9, /* XCONST */ + YYSYMBOL_Op = 10, /* Op */ + YYSYMBOL_ICONST = 11, /* ICONST */ + YYSYMBOL_PARAM = 12, /* PARAM */ + YYSYMBOL_TYPECAST = 13, /* TYPECAST */ + YYSYMBOL_DOT_DOT = 14, /* DOT_DOT */ + YYSYMBOL_COLON_EQUALS = 15, /* COLON_EQUALS */ + YYSYMBOL_EQUALS_GREATER = 16, /* EQUALS_GREATER */ + YYSYMBOL_LESS_EQUALS = 17, /* LESS_EQUALS */ + YYSYMBOL_GREATER_EQUALS = 18, /* GREATER_EQUALS */ + YYSYMBOL_NOT_EQUALS = 19, /* NOT_EQUALS */ + YYSYMBOL_ABORT_P = 20, /* ABORT_P */ + YYSYMBOL_ABSOLUTE_P = 21, /* ABSOLUTE_P */ + YYSYMBOL_ACCESS = 22, /* ACCESS */ + YYSYMBOL_ACTION = 23, /* ACTION */ + YYSYMBOL_ADD_P = 24, /* ADD_P */ + YYSYMBOL_ADMIN = 25, /* ADMIN */ + YYSYMBOL_AFTER = 26, /* AFTER */ + YYSYMBOL_AGGREGATE = 27, /* AGGREGATE */ + YYSYMBOL_ALL = 28, /* ALL */ + YYSYMBOL_ALSO = 29, /* ALSO */ + YYSYMBOL_ALTER = 30, /* ALTER */ + YYSYMBOL_ALWAYS = 31, /* ALWAYS */ + YYSYMBOL_ANALYSE = 32, /* ANALYSE */ + YYSYMBOL_ANALYZE = 33, /* ANALYZE */ + YYSYMBOL_AND = 34, /* AND */ + YYSYMBOL_ANY = 35, /* ANY */ + YYSYMBOL_ARRAY = 36, /* ARRAY */ + YYSYMBOL_AS = 37, /* AS */ + YYSYMBOL_ASC = 38, /* ASC */ + YYSYMBOL_ASENSITIVE = 39, /* ASENSITIVE */ + YYSYMBOL_ASSERTION = 40, /* ASSERTION */ + YYSYMBOL_ASSIGNMENT = 41, /* ASSIGNMENT */ + YYSYMBOL_ASYMMETRIC = 42, /* ASYMMETRIC */ + YYSYMBOL_ATOMIC = 43, /* ATOMIC */ + YYSYMBOL_AT = 44, /* AT */ + YYSYMBOL_ATTACH = 45, /* ATTACH */ + YYSYMBOL_ATTRIBUTE = 46, /* ATTRIBUTE */ + YYSYMBOL_AUTHORIZATION = 47, /* AUTHORIZATION */ + YYSYMBOL_BACKWARD = 48, /* BACKWARD */ + YYSYMBOL_BEFORE = 49, /* BEFORE */ + YYSYMBOL_BEGIN_P = 50, /* BEGIN_P */ + YYSYMBOL_BETWEEN = 51, /* BETWEEN */ + YYSYMBOL_BIGINT = 52, /* BIGINT */ + YYSYMBOL_BINARY = 53, /* BINARY */ + YYSYMBOL_BIT = 54, /* BIT */ + YYSYMBOL_BOOLEAN_P = 55, /* BOOLEAN_P */ + YYSYMBOL_BOTH = 56, /* BOTH */ + YYSYMBOL_BREADTH = 57, /* BREADTH */ + YYSYMBOL_BY = 58, /* BY */ + YYSYMBOL_CACHE = 59, /* CACHE */ + YYSYMBOL_CALL = 60, /* CALL */ + YYSYMBOL_CALLED = 61, /* CALLED */ + YYSYMBOL_CASCADE = 62, /* CASCADE */ + YYSYMBOL_CASCADED = 63, /* CASCADED */ + YYSYMBOL_CASE = 64, /* CASE */ + YYSYMBOL_CAST = 65, /* CAST */ + YYSYMBOL_CATALOG_P = 66, /* CATALOG_P */ + YYSYMBOL_CHAIN = 67, /* CHAIN */ + YYSYMBOL_CHAR_P = 68, /* CHAR_P */ + YYSYMBOL_CHARACTER = 69, /* CHARACTER */ + YYSYMBOL_CHARACTERISTICS = 70, /* CHARACTERISTICS */ + YYSYMBOL_CHECK = 71, /* CHECK */ + YYSYMBOL_CHECKPOINT = 72, /* CHECKPOINT */ + YYSYMBOL_CLASS = 73, /* CLASS */ + YYSYMBOL_CLOSE = 74, /* CLOSE */ + YYSYMBOL_CLUSTER = 75, /* CLUSTER */ + YYSYMBOL_COALESCE = 76, /* COALESCE */ + YYSYMBOL_COLLATE = 77, /* COLLATE */ + YYSYMBOL_COLLATION = 78, /* COLLATION */ + YYSYMBOL_COLUMN = 79, /* COLUMN */ + YYSYMBOL_COLUMNS = 80, /* COLUMNS */ + YYSYMBOL_COMMENT = 81, /* COMMENT */ + YYSYMBOL_COMMENTS = 82, /* COMMENTS */ + YYSYMBOL_COMMIT = 83, /* COMMIT */ + YYSYMBOL_COMMITTED = 84, /* COMMITTED */ + YYSYMBOL_COMPRESSION = 85, /* COMPRESSION */ + YYSYMBOL_CONCURRENTLY = 86, /* CONCURRENTLY */ + YYSYMBOL_CONFIGURATION = 87, /* CONFIGURATION */ + YYSYMBOL_CONFLICT = 88, /* CONFLICT */ + YYSYMBOL_CONNECTION = 89, /* CONNECTION */ + YYSYMBOL_CONSTRAINT = 90, /* CONSTRAINT */ + YYSYMBOL_CONSTRAINTS = 91, /* CONSTRAINTS */ + YYSYMBOL_CONTENT_P = 92, /* CONTENT_P */ + YYSYMBOL_CONTINUE_P = 93, /* CONTINUE_P */ + YYSYMBOL_CONVERSION_P = 94, /* CONVERSION_P */ + YYSYMBOL_COPY = 95, /* COPY */ + YYSYMBOL_COST = 96, /* COST */ + YYSYMBOL_CREATE = 97, /* CREATE */ + YYSYMBOL_CROSS = 98, /* CROSS */ + YYSYMBOL_CSV = 99, /* CSV */ + YYSYMBOL_CUBE = 100, /* CUBE */ + YYSYMBOL_CURRENT_P = 101, /* CURRENT_P */ + YYSYMBOL_CURRENT_CATALOG = 102, /* CURRENT_CATALOG */ + YYSYMBOL_CURRENT_DATE = 103, /* CURRENT_DATE */ + YYSYMBOL_CURRENT_ROLE = 104, /* CURRENT_ROLE */ + YYSYMBOL_CURRENT_SCHEMA = 105, /* CURRENT_SCHEMA */ + YYSYMBOL_CURRENT_TIME = 106, /* CURRENT_TIME */ + YYSYMBOL_CURRENT_TIMESTAMP = 107, /* CURRENT_TIMESTAMP */ + YYSYMBOL_CURRENT_USER = 108, /* CURRENT_USER */ + YYSYMBOL_CURSOR = 109, /* CURSOR */ + YYSYMBOL_CYCLE = 110, /* CYCLE */ + YYSYMBOL_DATA_P = 111, /* DATA_P */ + YYSYMBOL_DATABASE = 112, /* DATABASE */ + YYSYMBOL_DAY_P = 113, /* DAY_P */ + YYSYMBOL_DEALLOCATE = 114, /* DEALLOCATE */ + YYSYMBOL_DEC = 115, /* DEC */ + YYSYMBOL_DECIMAL_P = 116, /* DECIMAL_P */ + YYSYMBOL_DECLARE = 117, /* DECLARE */ + YYSYMBOL_DEFAULT = 118, /* DEFAULT */ + YYSYMBOL_DEFAULTS = 119, /* DEFAULTS */ + YYSYMBOL_DEFERRABLE = 120, /* DEFERRABLE */ + YYSYMBOL_DEFERRED = 121, /* DEFERRED */ + YYSYMBOL_DEFINER = 122, /* DEFINER */ + YYSYMBOL_DELETE_P = 123, /* DELETE_P */ + YYSYMBOL_DELIMITER = 124, /* DELIMITER */ + YYSYMBOL_DELIMITERS = 125, /* DELIMITERS */ + YYSYMBOL_DEPENDS = 126, /* DEPENDS */ + YYSYMBOL_DEPTH = 127, /* DEPTH */ + YYSYMBOL_DESC = 128, /* DESC */ + YYSYMBOL_DETACH = 129, /* DETACH */ + YYSYMBOL_DICTIONARY = 130, /* DICTIONARY */ + YYSYMBOL_DISABLE_P = 131, /* DISABLE_P */ + YYSYMBOL_DISCARD = 132, /* DISCARD */ + YYSYMBOL_DISTINCT = 133, /* DISTINCT */ + YYSYMBOL_DO = 134, /* DO */ + YYSYMBOL_DOCUMENT_P = 135, /* DOCUMENT_P */ + YYSYMBOL_DOMAIN_P = 136, /* DOMAIN_P */ + YYSYMBOL_DOUBLE_P = 137, /* DOUBLE_P */ + YYSYMBOL_DROP = 138, /* DROP */ + YYSYMBOL_EACH = 139, /* EACH */ + YYSYMBOL_ELSE = 140, /* ELSE */ + YYSYMBOL_ENABLE_P = 141, /* ENABLE_P */ + YYSYMBOL_ENCODING = 142, /* ENCODING */ + YYSYMBOL_ENCRYPTED = 143, /* ENCRYPTED */ + YYSYMBOL_END_P = 144, /* END_P */ + YYSYMBOL_ENUM_P = 145, /* ENUM_P */ + YYSYMBOL_ESCAPE = 146, /* ESCAPE */ + YYSYMBOL_EVENT = 147, /* EVENT */ + YYSYMBOL_EXCEPT = 148, /* EXCEPT */ + YYSYMBOL_EXCLUDE = 149, /* EXCLUDE */ + YYSYMBOL_EXCLUDING = 150, /* EXCLUDING */ + YYSYMBOL_EXCLUSIVE = 151, /* EXCLUSIVE */ + YYSYMBOL_EXECUTE = 152, /* EXECUTE */ + YYSYMBOL_EXISTS = 153, /* EXISTS */ + YYSYMBOL_EXPLAIN = 154, /* EXPLAIN */ + YYSYMBOL_EXPRESSION = 155, /* EXPRESSION */ + YYSYMBOL_EXTENSION = 156, /* EXTENSION */ + YYSYMBOL_EXTERNAL = 157, /* EXTERNAL */ + YYSYMBOL_EXTRACT = 158, /* EXTRACT */ + YYSYMBOL_FALSE_P = 159, /* FALSE_P */ + YYSYMBOL_FAMILY = 160, /* FAMILY */ + YYSYMBOL_FETCH = 161, /* FETCH */ + YYSYMBOL_FILTER = 162, /* FILTER */ + YYSYMBOL_FINALIZE = 163, /* FINALIZE */ + YYSYMBOL_FIRST_P = 164, /* FIRST_P */ + YYSYMBOL_FLOAT_P = 165, /* FLOAT_P */ + YYSYMBOL_FOLLOWING = 166, /* FOLLOWING */ + YYSYMBOL_FOR = 167, /* FOR */ + YYSYMBOL_FORCE = 168, /* FORCE */ + YYSYMBOL_FOREIGN = 169, /* FOREIGN */ + YYSYMBOL_FORWARD = 170, /* FORWARD */ + YYSYMBOL_FREEZE = 171, /* FREEZE */ + YYSYMBOL_FROM = 172, /* FROM */ + YYSYMBOL_FULL = 173, /* FULL */ + YYSYMBOL_FUNCTION = 174, /* FUNCTION */ + YYSYMBOL_FUNCTIONS = 175, /* FUNCTIONS */ + YYSYMBOL_GENERATED = 176, /* GENERATED */ + YYSYMBOL_GLOBAL = 177, /* GLOBAL */ + YYSYMBOL_GRANT = 178, /* GRANT */ + YYSYMBOL_GRANTED = 179, /* GRANTED */ + YYSYMBOL_GREATEST = 180, /* GREATEST */ + YYSYMBOL_GROUP_P = 181, /* GROUP_P */ + YYSYMBOL_GROUPING = 182, /* GROUPING */ + YYSYMBOL_GROUPS = 183, /* GROUPS */ + YYSYMBOL_HANDLER = 184, /* HANDLER */ + YYSYMBOL_HAVING = 185, /* HAVING */ + YYSYMBOL_HEADER_P = 186, /* HEADER_P */ + YYSYMBOL_HOLD = 187, /* HOLD */ + YYSYMBOL_HOUR_P = 188, /* HOUR_P */ + YYSYMBOL_IDENTITY_P = 189, /* IDENTITY_P */ + YYSYMBOL_IF_P = 190, /* IF_P */ + YYSYMBOL_ILIKE = 191, /* ILIKE */ + YYSYMBOL_IMMEDIATE = 192, /* IMMEDIATE */ + YYSYMBOL_IMMUTABLE = 193, /* IMMUTABLE */ + YYSYMBOL_IMPLICIT_P = 194, /* IMPLICIT_P */ + YYSYMBOL_IMPORT_P = 195, /* IMPORT_P */ + YYSYMBOL_IN_P = 196, /* IN_P */ + YYSYMBOL_INCLUDE = 197, /* INCLUDE */ + YYSYMBOL_INCLUDING = 198, /* INCLUDING */ + YYSYMBOL_INCREMENT = 199, /* INCREMENT */ + YYSYMBOL_INDEX = 200, /* INDEX */ + YYSYMBOL_INDEXES = 201, /* INDEXES */ + YYSYMBOL_INHERIT = 202, /* INHERIT */ + YYSYMBOL_INHERITS = 203, /* INHERITS */ + YYSYMBOL_INITIALLY = 204, /* INITIALLY */ + YYSYMBOL_INLINE_P = 205, /* INLINE_P */ + YYSYMBOL_INNER_P = 206, /* INNER_P */ + YYSYMBOL_INOUT = 207, /* INOUT */ + YYSYMBOL_INPUT_P = 208, /* INPUT_P */ + YYSYMBOL_INSENSITIVE = 209, /* INSENSITIVE */ + YYSYMBOL_INSERT = 210, /* INSERT */ + YYSYMBOL_INSTEAD = 211, /* INSTEAD */ + YYSYMBOL_INT_P = 212, /* INT_P */ + YYSYMBOL_INTEGER = 213, /* INTEGER */ + YYSYMBOL_INTERSECT = 214, /* INTERSECT */ + YYSYMBOL_INTERVAL = 215, /* INTERVAL */ + YYSYMBOL_INTO = 216, /* INTO */ + YYSYMBOL_INVOKER = 217, /* INVOKER */ + YYSYMBOL_IS = 218, /* IS */ + YYSYMBOL_ISNULL = 219, /* ISNULL */ + YYSYMBOL_ISOLATION = 220, /* ISOLATION */ + YYSYMBOL_JOIN = 221, /* JOIN */ + YYSYMBOL_KEY = 222, /* KEY */ + YYSYMBOL_LABEL = 223, /* LABEL */ + YYSYMBOL_LANGUAGE = 224, /* LANGUAGE */ + YYSYMBOL_LARGE_P = 225, /* LARGE_P */ + YYSYMBOL_LAST_P = 226, /* LAST_P */ + YYSYMBOL_LATERAL_P = 227, /* LATERAL_P */ + YYSYMBOL_LEADING = 228, /* LEADING */ + YYSYMBOL_LEAKPROOF = 229, /* LEAKPROOF */ + YYSYMBOL_LEAST = 230, /* LEAST */ + YYSYMBOL_LEFT = 231, /* LEFT */ + YYSYMBOL_LEVEL = 232, /* LEVEL */ + YYSYMBOL_LIKE = 233, /* LIKE */ + YYSYMBOL_LIMIT = 234, /* LIMIT */ + YYSYMBOL_LISTEN = 235, /* LISTEN */ + YYSYMBOL_LOAD = 236, /* LOAD */ + YYSYMBOL_LOCAL = 237, /* LOCAL */ + YYSYMBOL_LOCALTIME = 238, /* LOCALTIME */ + YYSYMBOL_LOCALTIMESTAMP = 239, /* LOCALTIMESTAMP */ + YYSYMBOL_LOCATION = 240, /* LOCATION */ + YYSYMBOL_LOCK_P = 241, /* LOCK_P */ + YYSYMBOL_LOCKED = 242, /* LOCKED */ + YYSYMBOL_LOGGED = 243, /* LOGGED */ + YYSYMBOL_MAPPING = 244, /* MAPPING */ + YYSYMBOL_MATCH = 245, /* MATCH */ + YYSYMBOL_MATERIALIZED = 246, /* MATERIALIZED */ + YYSYMBOL_MAXVALUE = 247, /* MAXVALUE */ + YYSYMBOL_METHOD = 248, /* METHOD */ + YYSYMBOL_MINUTE_P = 249, /* MINUTE_P */ + YYSYMBOL_MINVALUE = 250, /* MINVALUE */ + YYSYMBOL_MODE = 251, /* MODE */ + YYSYMBOL_MONTH_P = 252, /* MONTH_P */ + YYSYMBOL_MOVE = 253, /* MOVE */ + YYSYMBOL_NAME_P = 254, /* NAME_P */ + YYSYMBOL_NAMES = 255, /* NAMES */ + YYSYMBOL_NATIONAL = 256, /* NATIONAL */ + YYSYMBOL_NATURAL = 257, /* NATURAL */ + YYSYMBOL_NCHAR = 258, /* NCHAR */ + YYSYMBOL_NEW = 259, /* NEW */ + YYSYMBOL_NEXT = 260, /* NEXT */ + YYSYMBOL_NFC = 261, /* NFC */ + YYSYMBOL_NFD = 262, /* NFD */ + YYSYMBOL_NFKC = 263, /* NFKC */ + YYSYMBOL_NFKD = 264, /* NFKD */ + YYSYMBOL_NO = 265, /* NO */ + YYSYMBOL_NONE = 266, /* NONE */ + YYSYMBOL_NORMALIZE = 267, /* NORMALIZE */ + YYSYMBOL_NORMALIZED = 268, /* NORMALIZED */ + YYSYMBOL_NOT = 269, /* NOT */ + YYSYMBOL_NOTHING = 270, /* NOTHING */ + YYSYMBOL_NOTIFY = 271, /* NOTIFY */ + YYSYMBOL_NOTNULL = 272, /* NOTNULL */ + YYSYMBOL_NOWAIT = 273, /* NOWAIT */ + YYSYMBOL_NULL_P = 274, /* NULL_P */ + YYSYMBOL_NULLIF = 275, /* NULLIF */ + YYSYMBOL_NULLS_P = 276, /* NULLS_P */ + YYSYMBOL_NUMERIC = 277, /* NUMERIC */ + YYSYMBOL_OBJECT_P = 278, /* OBJECT_P */ + YYSYMBOL_OF = 279, /* OF */ + YYSYMBOL_OFF = 280, /* OFF */ + YYSYMBOL_OFFSET = 281, /* OFFSET */ + YYSYMBOL_OIDS = 282, /* OIDS */ + YYSYMBOL_OLD = 283, /* OLD */ + YYSYMBOL_ON = 284, /* ON */ + YYSYMBOL_ONLY = 285, /* ONLY */ + YYSYMBOL_OPERATOR = 286, /* OPERATOR */ + YYSYMBOL_OPTION = 287, /* OPTION */ + YYSYMBOL_OPTIONS = 288, /* OPTIONS */ + YYSYMBOL_OR = 289, /* OR */ + YYSYMBOL_ORDER = 290, /* ORDER */ + YYSYMBOL_ORDINALITY = 291, /* ORDINALITY */ + YYSYMBOL_OTHERS = 292, /* OTHERS */ + YYSYMBOL_OUT_P = 293, /* OUT_P */ + YYSYMBOL_OUTER_P = 294, /* OUTER_P */ + YYSYMBOL_OVER = 295, /* OVER */ + YYSYMBOL_OVERLAPS = 296, /* OVERLAPS */ + YYSYMBOL_OVERLAY = 297, /* OVERLAY */ + YYSYMBOL_OVERRIDING = 298, /* OVERRIDING */ + YYSYMBOL_OWNED = 299, /* OWNED */ + YYSYMBOL_OWNER = 300, /* OWNER */ + YYSYMBOL_PARALLEL = 301, /* PARALLEL */ + YYSYMBOL_PARSER = 302, /* PARSER */ + YYSYMBOL_PARTIAL = 303, /* PARTIAL */ + YYSYMBOL_PARTITION = 304, /* PARTITION */ + YYSYMBOL_PASSING = 305, /* PASSING */ + YYSYMBOL_PASSWORD = 306, /* PASSWORD */ + YYSYMBOL_PLACING = 307, /* PLACING */ + YYSYMBOL_PLANS = 308, /* PLANS */ + YYSYMBOL_POLICY = 309, /* POLICY */ + YYSYMBOL_POSITION = 310, /* POSITION */ + YYSYMBOL_PRECEDING = 311, /* PRECEDING */ + YYSYMBOL_PRECISION = 312, /* PRECISION */ + YYSYMBOL_PRESERVE = 313, /* PRESERVE */ + YYSYMBOL_PREPARE = 314, /* PREPARE */ + YYSYMBOL_PREPARED = 315, /* PREPARED */ + YYSYMBOL_PRIMARY = 316, /* PRIMARY */ + YYSYMBOL_PRIOR = 317, /* PRIOR */ + YYSYMBOL_PRIVILEGES = 318, /* PRIVILEGES */ + YYSYMBOL_PROCEDURAL = 319, /* PROCEDURAL */ + YYSYMBOL_PROCEDURE = 320, /* PROCEDURE */ + YYSYMBOL_PROCEDURES = 321, /* PROCEDURES */ + YYSYMBOL_PROGRAM = 322, /* PROGRAM */ + YYSYMBOL_PUBLICATION = 323, /* PUBLICATION */ + YYSYMBOL_QUOTE = 324, /* QUOTE */ + YYSYMBOL_RANGE = 325, /* RANGE */ + YYSYMBOL_READ = 326, /* READ */ + YYSYMBOL_REAL = 327, /* REAL */ + YYSYMBOL_REASSIGN = 328, /* REASSIGN */ + YYSYMBOL_RECHECK = 329, /* RECHECK */ + YYSYMBOL_RECURSIVE = 330, /* RECURSIVE */ + YYSYMBOL_REF = 331, /* REF */ + YYSYMBOL_REFERENCES = 332, /* REFERENCES */ + YYSYMBOL_REFERENCING = 333, /* REFERENCING */ + YYSYMBOL_REFRESH = 334, /* REFRESH */ + YYSYMBOL_REINDEX = 335, /* REINDEX */ + YYSYMBOL_RELATIVE_P = 336, /* RELATIVE_P */ + YYSYMBOL_RELEASE = 337, /* RELEASE */ + YYSYMBOL_RENAME = 338, /* RENAME */ + YYSYMBOL_REPEATABLE = 339, /* REPEATABLE */ + YYSYMBOL_REPLACE = 340, /* REPLACE */ + YYSYMBOL_REPLICA = 341, /* REPLICA */ + YYSYMBOL_RESET = 342, /* RESET */ + YYSYMBOL_RESTART = 343, /* RESTART */ + YYSYMBOL_RESTRICT = 344, /* RESTRICT */ + YYSYMBOL_RETURN = 345, /* RETURN */ + YYSYMBOL_RETURNING = 346, /* RETURNING */ + YYSYMBOL_RETURNS = 347, /* RETURNS */ + YYSYMBOL_REVOKE = 348, /* REVOKE */ + YYSYMBOL_RIGHT = 349, /* RIGHT */ + YYSYMBOL_ROLE = 350, /* ROLE */ + YYSYMBOL_ROLLBACK = 351, /* ROLLBACK */ + YYSYMBOL_ROLLUP = 352, /* ROLLUP */ + YYSYMBOL_ROUTINE = 353, /* ROUTINE */ + YYSYMBOL_ROUTINES = 354, /* ROUTINES */ + YYSYMBOL_ROW = 355, /* ROW */ + YYSYMBOL_ROWS = 356, /* ROWS */ + YYSYMBOL_RULE = 357, /* RULE */ + YYSYMBOL_SAVEPOINT = 358, /* SAVEPOINT */ + YYSYMBOL_SCHEMA = 359, /* SCHEMA */ + YYSYMBOL_SCHEMAS = 360, /* SCHEMAS */ + YYSYMBOL_SCROLL = 361, /* SCROLL */ + YYSYMBOL_SEARCH = 362, /* SEARCH */ + YYSYMBOL_SECOND_P = 363, /* SECOND_P */ + YYSYMBOL_SECURITY = 364, /* SECURITY */ + YYSYMBOL_SELECT = 365, /* SELECT */ + YYSYMBOL_SEQUENCE = 366, /* SEQUENCE */ + YYSYMBOL_SEQUENCES = 367, /* SEQUENCES */ + YYSYMBOL_SERIALIZABLE = 368, /* SERIALIZABLE */ + YYSYMBOL_SERVER = 369, /* SERVER */ + YYSYMBOL_SESSION = 370, /* SESSION */ + YYSYMBOL_SESSION_USER = 371, /* SESSION_USER */ + YYSYMBOL_SET = 372, /* SET */ + YYSYMBOL_SETS = 373, /* SETS */ + YYSYMBOL_SETOF = 374, /* SETOF */ + YYSYMBOL_SHARE = 375, /* SHARE */ + YYSYMBOL_SHOW = 376, /* SHOW */ + YYSYMBOL_SIMILAR = 377, /* SIMILAR */ + YYSYMBOL_SIMPLE = 378, /* SIMPLE */ + YYSYMBOL_SKIP = 379, /* SKIP */ + YYSYMBOL_SMALLINT = 380, /* SMALLINT */ + YYSYMBOL_SNAPSHOT = 381, /* SNAPSHOT */ + YYSYMBOL_SOME = 382, /* SOME */ + YYSYMBOL_SQL_P = 383, /* SQL_P */ + YYSYMBOL_STABLE = 384, /* STABLE */ + YYSYMBOL_STANDALONE_P = 385, /* STANDALONE_P */ + YYSYMBOL_START = 386, /* START */ + YYSYMBOL_STATEMENT = 387, /* STATEMENT */ + YYSYMBOL_STATISTICS = 388, /* STATISTICS */ + YYSYMBOL_STDIN = 389, /* STDIN */ + YYSYMBOL_STDOUT = 390, /* STDOUT */ + YYSYMBOL_STORAGE = 391, /* STORAGE */ + YYSYMBOL_STORED = 392, /* STORED */ + YYSYMBOL_STRICT_P = 393, /* STRICT_P */ + YYSYMBOL_STRIP_P = 394, /* STRIP_P */ + YYSYMBOL_SUBSCRIPTION = 395, /* SUBSCRIPTION */ + YYSYMBOL_SUBSTRING = 396, /* SUBSTRING */ + YYSYMBOL_SUPPORT = 397, /* SUPPORT */ + YYSYMBOL_SYMMETRIC = 398, /* SYMMETRIC */ + YYSYMBOL_SYSID = 399, /* SYSID */ + YYSYMBOL_SYSTEM_P = 400, /* SYSTEM_P */ + YYSYMBOL_TABLE = 401, /* TABLE */ + YYSYMBOL_TABLES = 402, /* TABLES */ + YYSYMBOL_TABLESAMPLE = 403, /* TABLESAMPLE */ + YYSYMBOL_TABLESPACE = 404, /* TABLESPACE */ + YYSYMBOL_TEMP = 405, /* TEMP */ + YYSYMBOL_TEMPLATE = 406, /* TEMPLATE */ + YYSYMBOL_TEMPORARY = 407, /* TEMPORARY */ + YYSYMBOL_TEXT_P = 408, /* TEXT_P */ + YYSYMBOL_THEN = 409, /* THEN */ + YYSYMBOL_TIES = 410, /* TIES */ + YYSYMBOL_TIME = 411, /* TIME */ + YYSYMBOL_TIMESTAMP = 412, /* TIMESTAMP */ + YYSYMBOL_TO = 413, /* TO */ + YYSYMBOL_TRAILING = 414, /* TRAILING */ + YYSYMBOL_TRANSACTION = 415, /* TRANSACTION */ + YYSYMBOL_TRANSFORM = 416, /* TRANSFORM */ + YYSYMBOL_TREAT = 417, /* TREAT */ + YYSYMBOL_TRIGGER = 418, /* TRIGGER */ + YYSYMBOL_TRIM = 419, /* TRIM */ + YYSYMBOL_TRUE_P = 420, /* TRUE_P */ + YYSYMBOL_TRUNCATE = 421, /* TRUNCATE */ + YYSYMBOL_TRUSTED = 422, /* TRUSTED */ + YYSYMBOL_TYPE_P = 423, /* TYPE_P */ + YYSYMBOL_TYPES_P = 424, /* TYPES_P */ + YYSYMBOL_UESCAPE = 425, /* UESCAPE */ + YYSYMBOL_UNBOUNDED = 426, /* UNBOUNDED */ + YYSYMBOL_UNCOMMITTED = 427, /* UNCOMMITTED */ + YYSYMBOL_UNENCRYPTED = 428, /* UNENCRYPTED */ + YYSYMBOL_UNION = 429, /* UNION */ + YYSYMBOL_UNIQUE = 430, /* UNIQUE */ + YYSYMBOL_UNKNOWN = 431, /* UNKNOWN */ + YYSYMBOL_UNLISTEN = 432, /* UNLISTEN */ + YYSYMBOL_UNLOGGED = 433, /* UNLOGGED */ + YYSYMBOL_UNTIL = 434, /* UNTIL */ + YYSYMBOL_UPDATE = 435, /* UPDATE */ + YYSYMBOL_USER = 436, /* USER */ + YYSYMBOL_USING = 437, /* USING */ + YYSYMBOL_VACUUM = 438, /* VACUUM */ + YYSYMBOL_VALID = 439, /* VALID */ + YYSYMBOL_VALIDATE = 440, /* VALIDATE */ + YYSYMBOL_VALIDATOR = 441, /* VALIDATOR */ + YYSYMBOL_VALUE_P = 442, /* VALUE_P */ + YYSYMBOL_VALUES = 443, /* VALUES */ + YYSYMBOL_VARCHAR = 444, /* VARCHAR */ + YYSYMBOL_VARIADIC = 445, /* VARIADIC */ + YYSYMBOL_VARYING = 446, /* VARYING */ + YYSYMBOL_VERBOSE = 447, /* VERBOSE */ + YYSYMBOL_VERSION_P = 448, /* VERSION_P */ + YYSYMBOL_VIEW = 449, /* VIEW */ + YYSYMBOL_VIEWS = 450, /* VIEWS */ + YYSYMBOL_VOLATILE = 451, /* VOLATILE */ + YYSYMBOL_WHEN = 452, /* WHEN */ + YYSYMBOL_WHERE = 453, /* WHERE */ + YYSYMBOL_WHITESPACE_P = 454, /* WHITESPACE_P */ + YYSYMBOL_WINDOW = 455, /* WINDOW */ + YYSYMBOL_WITH = 456, /* WITH */ + YYSYMBOL_WITHIN = 457, /* WITHIN */ + YYSYMBOL_WITHOUT = 458, /* WITHOUT */ + YYSYMBOL_WORK = 459, /* WORK */ + YYSYMBOL_WRAPPER = 460, /* WRAPPER */ + YYSYMBOL_WRITE = 461, /* WRITE */ + YYSYMBOL_XML_P = 462, /* XML_P */ + YYSYMBOL_XMLATTRIBUTES = 463, /* XMLATTRIBUTES */ + YYSYMBOL_XMLCONCAT = 464, /* XMLCONCAT */ + YYSYMBOL_XMLELEMENT = 465, /* XMLELEMENT */ + YYSYMBOL_XMLEXISTS = 466, /* XMLEXISTS */ + YYSYMBOL_XMLFOREST = 467, /* XMLFOREST */ + YYSYMBOL_XMLNAMESPACES = 468, /* XMLNAMESPACES */ + YYSYMBOL_XMLPARSE = 469, /* XMLPARSE */ + YYSYMBOL_XMLPI = 470, /* XMLPI */ + YYSYMBOL_XMLROOT = 471, /* XMLROOT */ + YYSYMBOL_XMLSERIALIZE = 472, /* XMLSERIALIZE */ + YYSYMBOL_XMLTABLE = 473, /* XMLTABLE */ + YYSYMBOL_YEAR_P = 474, /* YEAR_P */ + YYSYMBOL_YES_P = 475, /* YES_P */ + YYSYMBOL_ZONE = 476, /* ZONE */ + YYSYMBOL_NOT_LA = 477, /* NOT_LA */ + YYSYMBOL_NULLS_LA = 478, /* NULLS_LA */ + YYSYMBOL_WITH_LA = 479, /* WITH_LA */ + YYSYMBOL_MODE_TYPE_NAME = 480, /* MODE_TYPE_NAME */ + YYSYMBOL_MODE_PLPGSQL_EXPR = 481, /* MODE_PLPGSQL_EXPR */ + YYSYMBOL_MODE_PLPGSQL_ASSIGN1 = 482, /* MODE_PLPGSQL_ASSIGN1 */ + YYSYMBOL_MODE_PLPGSQL_ASSIGN2 = 483, /* MODE_PLPGSQL_ASSIGN2 */ + YYSYMBOL_MODE_PLPGSQL_ASSIGN3 = 484, /* MODE_PLPGSQL_ASSIGN3 */ + YYSYMBOL_485_ = 485, /* '<' */ + YYSYMBOL_486_ = 486, /* '>' */ + YYSYMBOL_487_ = 487, /* '=' */ + YYSYMBOL_488_ = 488, /* '+' */ + YYSYMBOL_489_ = 489, /* '-' */ + YYSYMBOL_490_ = 490, /* '*' */ + YYSYMBOL_491_ = 491, /* '/' */ + YYSYMBOL_492_ = 492, /* '%' */ + YYSYMBOL_493_ = 493, /* '^' */ + YYSYMBOL_UMINUS = 494, /* UMINUS */ + YYSYMBOL_495_ = 495, /* '[' */ + YYSYMBOL_496_ = 496, /* ']' */ + YYSYMBOL_497_ = 497, /* '(' */ + YYSYMBOL_498_ = 498, /* ')' */ + YYSYMBOL_499_ = 499, /* '.' */ + YYSYMBOL_500_ = 500, /* ';' */ + YYSYMBOL_501_ = 501, /* ',' */ + YYSYMBOL_502_ = 502, /* ':' */ + YYSYMBOL_YYACCEPT = 503, /* $accept */ + YYSYMBOL_parse_toplevel = 504, /* parse_toplevel */ + YYSYMBOL_stmtmulti = 505, /* stmtmulti */ + YYSYMBOL_toplevel_stmt = 506, /* toplevel_stmt */ + YYSYMBOL_stmt = 507, /* stmt */ + YYSYMBOL_CallStmt = 508, /* CallStmt */ + YYSYMBOL_CreateRoleStmt = 509, /* CreateRoleStmt */ + YYSYMBOL_opt_with = 510, /* opt_with */ + YYSYMBOL_OptRoleList = 511, /* OptRoleList */ + YYSYMBOL_AlterOptRoleList = 512, /* AlterOptRoleList */ + YYSYMBOL_AlterOptRoleElem = 513, /* AlterOptRoleElem */ + YYSYMBOL_CreateOptRoleElem = 514, /* CreateOptRoleElem */ + YYSYMBOL_CreateUserStmt = 515, /* CreateUserStmt */ + YYSYMBOL_AlterRoleStmt = 516, /* AlterRoleStmt */ + YYSYMBOL_opt_in_database = 517, /* opt_in_database */ + YYSYMBOL_AlterRoleSetStmt = 518, /* AlterRoleSetStmt */ + YYSYMBOL_DropRoleStmt = 519, /* DropRoleStmt */ + YYSYMBOL_CreateGroupStmt = 520, /* CreateGroupStmt */ + YYSYMBOL_AlterGroupStmt = 521, /* AlterGroupStmt */ + YYSYMBOL_add_drop = 522, /* add_drop */ + YYSYMBOL_CreateSchemaStmt = 523, /* CreateSchemaStmt */ + YYSYMBOL_OptSchemaName = 524, /* OptSchemaName */ + YYSYMBOL_OptSchemaEltList = 525, /* OptSchemaEltList */ + YYSYMBOL_schema_stmt = 526, /* schema_stmt */ + YYSYMBOL_VariableSetStmt = 527, /* VariableSetStmt */ + YYSYMBOL_set_rest = 528, /* set_rest */ + YYSYMBOL_generic_set = 529, /* generic_set */ + YYSYMBOL_set_rest_more = 530, /* set_rest_more */ + YYSYMBOL_var_name = 531, /* var_name */ + YYSYMBOL_var_list = 532, /* var_list */ + YYSYMBOL_var_value = 533, /* var_value */ + YYSYMBOL_iso_level = 534, /* iso_level */ + YYSYMBOL_opt_boolean_or_string = 535, /* opt_boolean_or_string */ + YYSYMBOL_zone_value = 536, /* zone_value */ + YYSYMBOL_opt_encoding = 537, /* opt_encoding */ + YYSYMBOL_NonReservedWord_or_Sconst = 538, /* NonReservedWord_or_Sconst */ + YYSYMBOL_VariableResetStmt = 539, /* VariableResetStmt */ + YYSYMBOL_reset_rest = 540, /* reset_rest */ + YYSYMBOL_generic_reset = 541, /* generic_reset */ + YYSYMBOL_SetResetClause = 542, /* SetResetClause */ + YYSYMBOL_FunctionSetResetClause = 543, /* FunctionSetResetClause */ + YYSYMBOL_VariableShowStmt = 544, /* VariableShowStmt */ + YYSYMBOL_ConstraintsSetStmt = 545, /* ConstraintsSetStmt */ + YYSYMBOL_constraints_set_list = 546, /* constraints_set_list */ + YYSYMBOL_constraints_set_mode = 547, /* constraints_set_mode */ + YYSYMBOL_CheckPointStmt = 548, /* CheckPointStmt */ + YYSYMBOL_DiscardStmt = 549, /* DiscardStmt */ + YYSYMBOL_AlterTableStmt = 550, /* AlterTableStmt */ + YYSYMBOL_alter_table_cmds = 551, /* alter_table_cmds */ + YYSYMBOL_partition_cmd = 552, /* partition_cmd */ + YYSYMBOL_index_partition_cmd = 553, /* index_partition_cmd */ + YYSYMBOL_alter_table_cmd = 554, /* alter_table_cmd */ + YYSYMBOL_alter_column_default = 555, /* alter_column_default */ + YYSYMBOL_opt_drop_behavior = 556, /* opt_drop_behavior */ + YYSYMBOL_opt_collate_clause = 557, /* opt_collate_clause */ + YYSYMBOL_alter_using = 558, /* alter_using */ + YYSYMBOL_replica_identity = 559, /* replica_identity */ + YYSYMBOL_reloptions = 560, /* reloptions */ + YYSYMBOL_opt_reloptions = 561, /* opt_reloptions */ + YYSYMBOL_reloption_list = 562, /* reloption_list */ + YYSYMBOL_reloption_elem = 563, /* reloption_elem */ + YYSYMBOL_alter_identity_column_option_list = 564, /* alter_identity_column_option_list */ + YYSYMBOL_alter_identity_column_option = 565, /* alter_identity_column_option */ + YYSYMBOL_PartitionBoundSpec = 566, /* PartitionBoundSpec */ + YYSYMBOL_hash_partbound_elem = 567, /* hash_partbound_elem */ + YYSYMBOL_hash_partbound = 568, /* hash_partbound */ + YYSYMBOL_AlterCompositeTypeStmt = 569, /* AlterCompositeTypeStmt */ + YYSYMBOL_alter_type_cmds = 570, /* alter_type_cmds */ + YYSYMBOL_alter_type_cmd = 571, /* alter_type_cmd */ + YYSYMBOL_ClosePortalStmt = 572, /* ClosePortalStmt */ + YYSYMBOL_CopyStmt = 573, /* CopyStmt */ + YYSYMBOL_copy_from = 574, /* copy_from */ + YYSYMBOL_opt_program = 575, /* opt_program */ + YYSYMBOL_copy_file_name = 576, /* copy_file_name */ + YYSYMBOL_copy_options = 577, /* copy_options */ + YYSYMBOL_copy_opt_list = 578, /* copy_opt_list */ + YYSYMBOL_copy_opt_item = 579, /* copy_opt_item */ + YYSYMBOL_opt_binary = 580, /* opt_binary */ + YYSYMBOL_copy_delimiter = 581, /* copy_delimiter */ + YYSYMBOL_opt_using = 582, /* opt_using */ + YYSYMBOL_copy_generic_opt_list = 583, /* copy_generic_opt_list */ + YYSYMBOL_copy_generic_opt_elem = 584, /* copy_generic_opt_elem */ + YYSYMBOL_copy_generic_opt_arg = 585, /* copy_generic_opt_arg */ + YYSYMBOL_copy_generic_opt_arg_list = 586, /* copy_generic_opt_arg_list */ + YYSYMBOL_copy_generic_opt_arg_list_item = 587, /* copy_generic_opt_arg_list_item */ + YYSYMBOL_CreateStmt = 588, /* CreateStmt */ + YYSYMBOL_OptTemp = 589, /* OptTemp */ + YYSYMBOL_OptTableElementList = 590, /* OptTableElementList */ + YYSYMBOL_OptTypedTableElementList = 591, /* OptTypedTableElementList */ + YYSYMBOL_TableElementList = 592, /* TableElementList */ + YYSYMBOL_TypedTableElementList = 593, /* TypedTableElementList */ + YYSYMBOL_TableElement = 594, /* TableElement */ + YYSYMBOL_TypedTableElement = 595, /* TypedTableElement */ + YYSYMBOL_columnDef = 596, /* columnDef */ + YYSYMBOL_columnOptions = 597, /* columnOptions */ + YYSYMBOL_column_compression = 598, /* column_compression */ + YYSYMBOL_opt_column_compression = 599, /* opt_column_compression */ + YYSYMBOL_ColQualList = 600, /* ColQualList */ + YYSYMBOL_ColConstraint = 601, /* ColConstraint */ + YYSYMBOL_ColConstraintElem = 602, /* ColConstraintElem */ + YYSYMBOL_generated_when = 603, /* generated_when */ + YYSYMBOL_ConstraintAttr = 604, /* ConstraintAttr */ + YYSYMBOL_TableLikeClause = 605, /* TableLikeClause */ + YYSYMBOL_TableLikeOptionList = 606, /* TableLikeOptionList */ + YYSYMBOL_TableLikeOption = 607, /* TableLikeOption */ + YYSYMBOL_TableConstraint = 608, /* TableConstraint */ + YYSYMBOL_ConstraintElem = 609, /* ConstraintElem */ + YYSYMBOL_opt_no_inherit = 610, /* opt_no_inherit */ + YYSYMBOL_opt_column_list = 611, /* opt_column_list */ + YYSYMBOL_columnList = 612, /* columnList */ + YYSYMBOL_columnElem = 613, /* columnElem */ + YYSYMBOL_opt_c_include = 614, /* opt_c_include */ + YYSYMBOL_key_match = 615, /* key_match */ + YYSYMBOL_ExclusionConstraintList = 616, /* ExclusionConstraintList */ + YYSYMBOL_ExclusionConstraintElem = 617, /* ExclusionConstraintElem */ + YYSYMBOL_OptWhereClause = 618, /* OptWhereClause */ + YYSYMBOL_key_actions = 619, /* key_actions */ + YYSYMBOL_key_update = 620, /* key_update */ + YYSYMBOL_key_delete = 621, /* key_delete */ + YYSYMBOL_key_action = 622, /* key_action */ + YYSYMBOL_OptInherit = 623, /* OptInherit */ + YYSYMBOL_OptPartitionSpec = 624, /* OptPartitionSpec */ + YYSYMBOL_PartitionSpec = 625, /* PartitionSpec */ + YYSYMBOL_part_params = 626, /* part_params */ + YYSYMBOL_part_elem = 627, /* part_elem */ + YYSYMBOL_table_access_method_clause = 628, /* table_access_method_clause */ + YYSYMBOL_OptWith = 629, /* OptWith */ + YYSYMBOL_OnCommitOption = 630, /* OnCommitOption */ + YYSYMBOL_OptTableSpace = 631, /* OptTableSpace */ + YYSYMBOL_OptConsTableSpace = 632, /* OptConsTableSpace */ + YYSYMBOL_ExistingIndex = 633, /* ExistingIndex */ + YYSYMBOL_CreateStatsStmt = 634, /* CreateStatsStmt */ + YYSYMBOL_stats_params = 635, /* stats_params */ + YYSYMBOL_stats_param = 636, /* stats_param */ + YYSYMBOL_AlterStatsStmt = 637, /* AlterStatsStmt */ + YYSYMBOL_CreateAsStmt = 638, /* CreateAsStmt */ + YYSYMBOL_create_as_target = 639, /* create_as_target */ + YYSYMBOL_opt_with_data = 640, /* opt_with_data */ + YYSYMBOL_CreateMatViewStmt = 641, /* CreateMatViewStmt */ + YYSYMBOL_create_mv_target = 642, /* create_mv_target */ + YYSYMBOL_OptNoLog = 643, /* OptNoLog */ + YYSYMBOL_RefreshMatViewStmt = 644, /* RefreshMatViewStmt */ + YYSYMBOL_CreateSeqStmt = 645, /* CreateSeqStmt */ + YYSYMBOL_AlterSeqStmt = 646, /* AlterSeqStmt */ + YYSYMBOL_OptSeqOptList = 647, /* OptSeqOptList */ + YYSYMBOL_OptParenthesizedSeqOptList = 648, /* OptParenthesizedSeqOptList */ + YYSYMBOL_SeqOptList = 649, /* SeqOptList */ + YYSYMBOL_SeqOptElem = 650, /* SeqOptElem */ + YYSYMBOL_opt_by = 651, /* opt_by */ + YYSYMBOL_NumericOnly = 652, /* NumericOnly */ + YYSYMBOL_NumericOnly_list = 653, /* NumericOnly_list */ + YYSYMBOL_CreatePLangStmt = 654, /* CreatePLangStmt */ + YYSYMBOL_opt_trusted = 655, /* opt_trusted */ + YYSYMBOL_handler_name = 656, /* handler_name */ + YYSYMBOL_opt_inline_handler = 657, /* opt_inline_handler */ + YYSYMBOL_validator_clause = 658, /* validator_clause */ + YYSYMBOL_opt_validator = 659, /* opt_validator */ + YYSYMBOL_opt_procedural = 660, /* opt_procedural */ + YYSYMBOL_CreateTableSpaceStmt = 661, /* CreateTableSpaceStmt */ + YYSYMBOL_OptTableSpaceOwner = 662, /* OptTableSpaceOwner */ + YYSYMBOL_DropTableSpaceStmt = 663, /* DropTableSpaceStmt */ + YYSYMBOL_CreateExtensionStmt = 664, /* CreateExtensionStmt */ + YYSYMBOL_create_extension_opt_list = 665, /* create_extension_opt_list */ + YYSYMBOL_create_extension_opt_item = 666, /* create_extension_opt_item */ + YYSYMBOL_AlterExtensionStmt = 667, /* AlterExtensionStmt */ + YYSYMBOL_alter_extension_opt_list = 668, /* alter_extension_opt_list */ + YYSYMBOL_alter_extension_opt_item = 669, /* alter_extension_opt_item */ + YYSYMBOL_AlterExtensionContentsStmt = 670, /* AlterExtensionContentsStmt */ + YYSYMBOL_CreateFdwStmt = 671, /* CreateFdwStmt */ + YYSYMBOL_fdw_option = 672, /* fdw_option */ + YYSYMBOL_fdw_options = 673, /* fdw_options */ + YYSYMBOL_opt_fdw_options = 674, /* opt_fdw_options */ + YYSYMBOL_AlterFdwStmt = 675, /* AlterFdwStmt */ + YYSYMBOL_create_generic_options = 676, /* create_generic_options */ + YYSYMBOL_generic_option_list = 677, /* generic_option_list */ + YYSYMBOL_alter_generic_options = 678, /* alter_generic_options */ + YYSYMBOL_alter_generic_option_list = 679, /* alter_generic_option_list */ + YYSYMBOL_alter_generic_option_elem = 680, /* alter_generic_option_elem */ + YYSYMBOL_generic_option_elem = 681, /* generic_option_elem */ + YYSYMBOL_generic_option_name = 682, /* generic_option_name */ + YYSYMBOL_generic_option_arg = 683, /* generic_option_arg */ + YYSYMBOL_CreateForeignServerStmt = 684, /* CreateForeignServerStmt */ + YYSYMBOL_opt_type = 685, /* opt_type */ + YYSYMBOL_foreign_server_version = 686, /* foreign_server_version */ + YYSYMBOL_opt_foreign_server_version = 687, /* opt_foreign_server_version */ + YYSYMBOL_AlterForeignServerStmt = 688, /* AlterForeignServerStmt */ + YYSYMBOL_CreateForeignTableStmt = 689, /* CreateForeignTableStmt */ + YYSYMBOL_ImportForeignSchemaStmt = 690, /* ImportForeignSchemaStmt */ + YYSYMBOL_import_qualification_type = 691, /* import_qualification_type */ + YYSYMBOL_import_qualification = 692, /* import_qualification */ + YYSYMBOL_CreateUserMappingStmt = 693, /* CreateUserMappingStmt */ + YYSYMBOL_auth_ident = 694, /* auth_ident */ + YYSYMBOL_DropUserMappingStmt = 695, /* DropUserMappingStmt */ + YYSYMBOL_AlterUserMappingStmt = 696, /* AlterUserMappingStmt */ + YYSYMBOL_CreatePolicyStmt = 697, /* CreatePolicyStmt */ + YYSYMBOL_AlterPolicyStmt = 698, /* AlterPolicyStmt */ + YYSYMBOL_RowSecurityOptionalExpr = 699, /* RowSecurityOptionalExpr */ + YYSYMBOL_RowSecurityOptionalWithCheck = 700, /* RowSecurityOptionalWithCheck */ + YYSYMBOL_RowSecurityDefaultToRole = 701, /* RowSecurityDefaultToRole */ + YYSYMBOL_RowSecurityOptionalToRole = 702, /* RowSecurityOptionalToRole */ + YYSYMBOL_RowSecurityDefaultPermissive = 703, /* RowSecurityDefaultPermissive */ + YYSYMBOL_RowSecurityDefaultForCmd = 704, /* RowSecurityDefaultForCmd */ + YYSYMBOL_row_security_cmd = 705, /* row_security_cmd */ + YYSYMBOL_CreateAmStmt = 706, /* CreateAmStmt */ + YYSYMBOL_am_type = 707, /* am_type */ + YYSYMBOL_CreateTrigStmt = 708, /* CreateTrigStmt */ + YYSYMBOL_TriggerActionTime = 709, /* TriggerActionTime */ + YYSYMBOL_TriggerEvents = 710, /* TriggerEvents */ + YYSYMBOL_TriggerOneEvent = 711, /* TriggerOneEvent */ + YYSYMBOL_TriggerReferencing = 712, /* TriggerReferencing */ + YYSYMBOL_TriggerTransitions = 713, /* TriggerTransitions */ + YYSYMBOL_TriggerTransition = 714, /* TriggerTransition */ + YYSYMBOL_TransitionOldOrNew = 715, /* TransitionOldOrNew */ + YYSYMBOL_TransitionRowOrTable = 716, /* TransitionRowOrTable */ + YYSYMBOL_TransitionRelName = 717, /* TransitionRelName */ + YYSYMBOL_TriggerForSpec = 718, /* TriggerForSpec */ + YYSYMBOL_TriggerForOptEach = 719, /* TriggerForOptEach */ + YYSYMBOL_TriggerForType = 720, /* TriggerForType */ + YYSYMBOL_TriggerWhen = 721, /* TriggerWhen */ + YYSYMBOL_FUNCTION_or_PROCEDURE = 722, /* FUNCTION_or_PROCEDURE */ + YYSYMBOL_TriggerFuncArgs = 723, /* TriggerFuncArgs */ + YYSYMBOL_TriggerFuncArg = 724, /* TriggerFuncArg */ + YYSYMBOL_OptConstrFromTable = 725, /* OptConstrFromTable */ + YYSYMBOL_ConstraintAttributeSpec = 726, /* ConstraintAttributeSpec */ + YYSYMBOL_ConstraintAttributeElem = 727, /* ConstraintAttributeElem */ + YYSYMBOL_CreateEventTrigStmt = 728, /* CreateEventTrigStmt */ + YYSYMBOL_event_trigger_when_list = 729, /* event_trigger_when_list */ + YYSYMBOL_event_trigger_when_item = 730, /* event_trigger_when_item */ + YYSYMBOL_event_trigger_value_list = 731, /* event_trigger_value_list */ + YYSYMBOL_AlterEventTrigStmt = 732, /* AlterEventTrigStmt */ + YYSYMBOL_enable_trigger = 733, /* enable_trigger */ + YYSYMBOL_CreateAssertionStmt = 734, /* CreateAssertionStmt */ + YYSYMBOL_DefineStmt = 735, /* DefineStmt */ + YYSYMBOL_definition = 736, /* definition */ + YYSYMBOL_def_list = 737, /* def_list */ + YYSYMBOL_def_elem = 738, /* def_elem */ + YYSYMBOL_def_arg = 739, /* def_arg */ + YYSYMBOL_old_aggr_definition = 740, /* old_aggr_definition */ + YYSYMBOL_old_aggr_list = 741, /* old_aggr_list */ + YYSYMBOL_old_aggr_elem = 742, /* old_aggr_elem */ + YYSYMBOL_opt_enum_val_list = 743, /* opt_enum_val_list */ + YYSYMBOL_enum_val_list = 744, /* enum_val_list */ + YYSYMBOL_AlterEnumStmt = 745, /* AlterEnumStmt */ + YYSYMBOL_opt_if_not_exists = 746, /* opt_if_not_exists */ + YYSYMBOL_CreateOpClassStmt = 747, /* CreateOpClassStmt */ + YYSYMBOL_opclass_item_list = 748, /* opclass_item_list */ + YYSYMBOL_opclass_item = 749, /* opclass_item */ + YYSYMBOL_opt_default = 750, /* opt_default */ + YYSYMBOL_opt_opfamily = 751, /* opt_opfamily */ + YYSYMBOL_opclass_purpose = 752, /* opclass_purpose */ + YYSYMBOL_opt_recheck = 753, /* opt_recheck */ + YYSYMBOL_CreateOpFamilyStmt = 754, /* CreateOpFamilyStmt */ + YYSYMBOL_AlterOpFamilyStmt = 755, /* AlterOpFamilyStmt */ + YYSYMBOL_opclass_drop_list = 756, /* opclass_drop_list */ + YYSYMBOL_opclass_drop = 757, /* opclass_drop */ + YYSYMBOL_DropOpClassStmt = 758, /* DropOpClassStmt */ + YYSYMBOL_DropOpFamilyStmt = 759, /* DropOpFamilyStmt */ + YYSYMBOL_DropOwnedStmt = 760, /* DropOwnedStmt */ + YYSYMBOL_ReassignOwnedStmt = 761, /* ReassignOwnedStmt */ + YYSYMBOL_DropStmt = 762, /* DropStmt */ + YYSYMBOL_object_type_any_name = 763, /* object_type_any_name */ + YYSYMBOL_object_type_name = 764, /* object_type_name */ + YYSYMBOL_drop_type_name = 765, /* drop_type_name */ + YYSYMBOL_object_type_name_on_any_name = 766, /* object_type_name_on_any_name */ + YYSYMBOL_any_name_list = 767, /* any_name_list */ + YYSYMBOL_any_name = 768, /* any_name */ + YYSYMBOL_attrs = 769, /* attrs */ + YYSYMBOL_type_name_list = 770, /* type_name_list */ + YYSYMBOL_TruncateStmt = 771, /* TruncateStmt */ + YYSYMBOL_opt_restart_seqs = 772, /* opt_restart_seqs */ + YYSYMBOL_CommentStmt = 773, /* CommentStmt */ + YYSYMBOL_comment_text = 774, /* comment_text */ + YYSYMBOL_SecLabelStmt = 775, /* SecLabelStmt */ + YYSYMBOL_opt_provider = 776, /* opt_provider */ + YYSYMBOL_security_label = 777, /* security_label */ + YYSYMBOL_FetchStmt = 778, /* FetchStmt */ + YYSYMBOL_fetch_args = 779, /* fetch_args */ + YYSYMBOL_from_in = 780, /* from_in */ + YYSYMBOL_opt_from_in = 781, /* opt_from_in */ + YYSYMBOL_GrantStmt = 782, /* GrantStmt */ + YYSYMBOL_RevokeStmt = 783, /* RevokeStmt */ + YYSYMBOL_privileges = 784, /* privileges */ + YYSYMBOL_privilege_list = 785, /* privilege_list */ + YYSYMBOL_privilege = 786, /* privilege */ + YYSYMBOL_privilege_target = 787, /* privilege_target */ + YYSYMBOL_grantee_list = 788, /* grantee_list */ + YYSYMBOL_grantee = 789, /* grantee */ + YYSYMBOL_opt_grant_grant_option = 790, /* opt_grant_grant_option */ + YYSYMBOL_GrantRoleStmt = 791, /* GrantRoleStmt */ + YYSYMBOL_RevokeRoleStmt = 792, /* RevokeRoleStmt */ + YYSYMBOL_opt_grant_admin_option = 793, /* opt_grant_admin_option */ + YYSYMBOL_opt_granted_by = 794, /* opt_granted_by */ + YYSYMBOL_AlterDefaultPrivilegesStmt = 795, /* AlterDefaultPrivilegesStmt */ + YYSYMBOL_DefACLOptionList = 796, /* DefACLOptionList */ + YYSYMBOL_DefACLOption = 797, /* DefACLOption */ + YYSYMBOL_DefACLAction = 798, /* DefACLAction */ + YYSYMBOL_defacl_privilege_target = 799, /* defacl_privilege_target */ + YYSYMBOL_IndexStmt = 800, /* IndexStmt */ + YYSYMBOL_opt_unique = 801, /* opt_unique */ + YYSYMBOL_opt_concurrently = 802, /* opt_concurrently */ + YYSYMBOL_opt_index_name = 803, /* opt_index_name */ + YYSYMBOL_access_method_clause = 804, /* access_method_clause */ + YYSYMBOL_index_params = 805, /* index_params */ + YYSYMBOL_index_elem_options = 806, /* index_elem_options */ + YYSYMBOL_index_elem = 807, /* index_elem */ + YYSYMBOL_opt_include = 808, /* opt_include */ + YYSYMBOL_index_including_params = 809, /* index_including_params */ + YYSYMBOL_opt_collate = 810, /* opt_collate */ + YYSYMBOL_opt_class = 811, /* opt_class */ + YYSYMBOL_opt_asc_desc = 812, /* opt_asc_desc */ + YYSYMBOL_opt_nulls_order = 813, /* opt_nulls_order */ + YYSYMBOL_CreateFunctionStmt = 814, /* CreateFunctionStmt */ + YYSYMBOL_opt_or_replace = 815, /* opt_or_replace */ + YYSYMBOL_func_args = 816, /* func_args */ + YYSYMBOL_func_args_list = 817, /* func_args_list */ + YYSYMBOL_function_with_argtypes_list = 818, /* function_with_argtypes_list */ + YYSYMBOL_function_with_argtypes = 819, /* function_with_argtypes */ + YYSYMBOL_func_args_with_defaults = 820, /* func_args_with_defaults */ + YYSYMBOL_func_args_with_defaults_list = 821, /* func_args_with_defaults_list */ + YYSYMBOL_func_arg = 822, /* func_arg */ + YYSYMBOL_arg_class = 823, /* arg_class */ + YYSYMBOL_param_name = 824, /* param_name */ + YYSYMBOL_func_return = 825, /* func_return */ + YYSYMBOL_func_type = 826, /* func_type */ + YYSYMBOL_func_arg_with_default = 827, /* func_arg_with_default */ + YYSYMBOL_aggr_arg = 828, /* aggr_arg */ + YYSYMBOL_aggr_args = 829, /* aggr_args */ + YYSYMBOL_aggr_args_list = 830, /* aggr_args_list */ + YYSYMBOL_aggregate_with_argtypes = 831, /* aggregate_with_argtypes */ + YYSYMBOL_aggregate_with_argtypes_list = 832, /* aggregate_with_argtypes_list */ + YYSYMBOL_opt_createfunc_opt_list = 833, /* opt_createfunc_opt_list */ + YYSYMBOL_createfunc_opt_list = 834, /* createfunc_opt_list */ + YYSYMBOL_common_func_opt_item = 835, /* common_func_opt_item */ + YYSYMBOL_createfunc_opt_item = 836, /* createfunc_opt_item */ + YYSYMBOL_func_as = 837, /* func_as */ + YYSYMBOL_ReturnStmt = 838, /* ReturnStmt */ + YYSYMBOL_opt_routine_body = 839, /* opt_routine_body */ + YYSYMBOL_routine_body_stmt_list = 840, /* routine_body_stmt_list */ + YYSYMBOL_routine_body_stmt = 841, /* routine_body_stmt */ + YYSYMBOL_transform_type_list = 842, /* transform_type_list */ + YYSYMBOL_opt_definition = 843, /* opt_definition */ + YYSYMBOL_table_func_column = 844, /* table_func_column */ + YYSYMBOL_table_func_column_list = 845, /* table_func_column_list */ + YYSYMBOL_AlterFunctionStmt = 846, /* AlterFunctionStmt */ + YYSYMBOL_alterfunc_opt_list = 847, /* alterfunc_opt_list */ + YYSYMBOL_opt_restrict = 848, /* opt_restrict */ + YYSYMBOL_RemoveFuncStmt = 849, /* RemoveFuncStmt */ + YYSYMBOL_RemoveAggrStmt = 850, /* RemoveAggrStmt */ + YYSYMBOL_RemoveOperStmt = 851, /* RemoveOperStmt */ + YYSYMBOL_oper_argtypes = 852, /* oper_argtypes */ + YYSYMBOL_any_operator = 853, /* any_operator */ + YYSYMBOL_operator_with_argtypes_list = 854, /* operator_with_argtypes_list */ + YYSYMBOL_operator_with_argtypes = 855, /* operator_with_argtypes */ + YYSYMBOL_DoStmt = 856, /* DoStmt */ + YYSYMBOL_dostmt_opt_list = 857, /* dostmt_opt_list */ + YYSYMBOL_dostmt_opt_item = 858, /* dostmt_opt_item */ + YYSYMBOL_CreateCastStmt = 859, /* CreateCastStmt */ + YYSYMBOL_cast_context = 860, /* cast_context */ + YYSYMBOL_DropCastStmt = 861, /* DropCastStmt */ + YYSYMBOL_opt_if_exists = 862, /* opt_if_exists */ + YYSYMBOL_CreateTransformStmt = 863, /* CreateTransformStmt */ + YYSYMBOL_transform_element_list = 864, /* transform_element_list */ + YYSYMBOL_DropTransformStmt = 865, /* DropTransformStmt */ + YYSYMBOL_ReindexStmt = 866, /* ReindexStmt */ + YYSYMBOL_reindex_target_type = 867, /* reindex_target_type */ + YYSYMBOL_reindex_target_multitable = 868, /* reindex_target_multitable */ + YYSYMBOL_AlterTblSpcStmt = 869, /* AlterTblSpcStmt */ + YYSYMBOL_RenameStmt = 870, /* RenameStmt */ + YYSYMBOL_opt_column = 871, /* opt_column */ + YYSYMBOL_opt_set_data = 872, /* opt_set_data */ + YYSYMBOL_AlterObjectDependsStmt = 873, /* AlterObjectDependsStmt */ + YYSYMBOL_opt_no = 874, /* opt_no */ + YYSYMBOL_AlterObjectSchemaStmt = 875, /* AlterObjectSchemaStmt */ + YYSYMBOL_AlterOperatorStmt = 876, /* AlterOperatorStmt */ + YYSYMBOL_operator_def_list = 877, /* operator_def_list */ + YYSYMBOL_operator_def_elem = 878, /* operator_def_elem */ + YYSYMBOL_operator_def_arg = 879, /* operator_def_arg */ + YYSYMBOL_AlterTypeStmt = 880, /* AlterTypeStmt */ + YYSYMBOL_AlterOwnerStmt = 881, /* AlterOwnerStmt */ + YYSYMBOL_CreatePublicationStmt = 882, /* CreatePublicationStmt */ + YYSYMBOL_opt_publication_for_tables = 883, /* opt_publication_for_tables */ + YYSYMBOL_publication_for_tables = 884, /* publication_for_tables */ + YYSYMBOL_AlterPublicationStmt = 885, /* AlterPublicationStmt */ + YYSYMBOL_CreateSubscriptionStmt = 886, /* CreateSubscriptionStmt */ + YYSYMBOL_AlterSubscriptionStmt = 887, /* AlterSubscriptionStmt */ + YYSYMBOL_DropSubscriptionStmt = 888, /* DropSubscriptionStmt */ + YYSYMBOL_RuleStmt = 889, /* RuleStmt */ + YYSYMBOL_RuleActionList = 890, /* RuleActionList */ + YYSYMBOL_RuleActionMulti = 891, /* RuleActionMulti */ + YYSYMBOL_RuleActionStmt = 892, /* RuleActionStmt */ + YYSYMBOL_RuleActionStmtOrEmpty = 893, /* RuleActionStmtOrEmpty */ + YYSYMBOL_event = 894, /* event */ + YYSYMBOL_opt_instead = 895, /* opt_instead */ + YYSYMBOL_NotifyStmt = 896, /* NotifyStmt */ + YYSYMBOL_notify_payload = 897, /* notify_payload */ + YYSYMBOL_ListenStmt = 898, /* ListenStmt */ + YYSYMBOL_UnlistenStmt = 899, /* UnlistenStmt */ + YYSYMBOL_TransactionStmt = 900, /* TransactionStmt */ + YYSYMBOL_TransactionStmtLegacy = 901, /* TransactionStmtLegacy */ + YYSYMBOL_opt_transaction = 902, /* opt_transaction */ + YYSYMBOL_transaction_mode_item = 903, /* transaction_mode_item */ + YYSYMBOL_transaction_mode_list = 904, /* transaction_mode_list */ + YYSYMBOL_transaction_mode_list_or_empty = 905, /* transaction_mode_list_or_empty */ + YYSYMBOL_opt_transaction_chain = 906, /* opt_transaction_chain */ + YYSYMBOL_ViewStmt = 907, /* ViewStmt */ + YYSYMBOL_opt_check_option = 908, /* opt_check_option */ + YYSYMBOL_LoadStmt = 909, /* LoadStmt */ + YYSYMBOL_CreatedbStmt = 910, /* CreatedbStmt */ + YYSYMBOL_createdb_opt_list = 911, /* createdb_opt_list */ + YYSYMBOL_createdb_opt_items = 912, /* createdb_opt_items */ + YYSYMBOL_createdb_opt_item = 913, /* createdb_opt_item */ + YYSYMBOL_createdb_opt_name = 914, /* createdb_opt_name */ + YYSYMBOL_opt_equal = 915, /* opt_equal */ + YYSYMBOL_AlterDatabaseStmt = 916, /* AlterDatabaseStmt */ + YYSYMBOL_AlterDatabaseSetStmt = 917, /* AlterDatabaseSetStmt */ + YYSYMBOL_DropdbStmt = 918, /* DropdbStmt */ + YYSYMBOL_drop_option_list = 919, /* drop_option_list */ + YYSYMBOL_drop_option = 920, /* drop_option */ + YYSYMBOL_AlterCollationStmt = 921, /* AlterCollationStmt */ + YYSYMBOL_AlterSystemStmt = 922, /* AlterSystemStmt */ + YYSYMBOL_CreateDomainStmt = 923, /* CreateDomainStmt */ + YYSYMBOL_AlterDomainStmt = 924, /* AlterDomainStmt */ + YYSYMBOL_opt_as = 925, /* opt_as */ + YYSYMBOL_AlterTSDictionaryStmt = 926, /* AlterTSDictionaryStmt */ + YYSYMBOL_AlterTSConfigurationStmt = 927, /* AlterTSConfigurationStmt */ + YYSYMBOL_any_with = 928, /* any_with */ + YYSYMBOL_CreateConversionStmt = 929, /* CreateConversionStmt */ + YYSYMBOL_ClusterStmt = 930, /* ClusterStmt */ + YYSYMBOL_cluster_index_specification = 931, /* cluster_index_specification */ + YYSYMBOL_VacuumStmt = 932, /* VacuumStmt */ + YYSYMBOL_AnalyzeStmt = 933, /* AnalyzeStmt */ + YYSYMBOL_utility_option_list = 934, /* utility_option_list */ + YYSYMBOL_analyze_keyword = 935, /* analyze_keyword */ + YYSYMBOL_utility_option_elem = 936, /* utility_option_elem */ + YYSYMBOL_utility_option_name = 937, /* utility_option_name */ + YYSYMBOL_utility_option_arg = 938, /* utility_option_arg */ + YYSYMBOL_opt_analyze = 939, /* opt_analyze */ + YYSYMBOL_opt_verbose = 940, /* opt_verbose */ + YYSYMBOL_opt_full = 941, /* opt_full */ + YYSYMBOL_opt_freeze = 942, /* opt_freeze */ + YYSYMBOL_opt_name_list = 943, /* opt_name_list */ + YYSYMBOL_vacuum_relation = 944, /* vacuum_relation */ + YYSYMBOL_vacuum_relation_list = 945, /* vacuum_relation_list */ + YYSYMBOL_opt_vacuum_relation_list = 946, /* opt_vacuum_relation_list */ + YYSYMBOL_ExplainStmt = 947, /* ExplainStmt */ + YYSYMBOL_ExplainableStmt = 948, /* ExplainableStmt */ + YYSYMBOL_PrepareStmt = 949, /* PrepareStmt */ + YYSYMBOL_prep_type_clause = 950, /* prep_type_clause */ + YYSYMBOL_PreparableStmt = 951, /* PreparableStmt */ + YYSYMBOL_ExecuteStmt = 952, /* ExecuteStmt */ + YYSYMBOL_execute_param_clause = 953, /* execute_param_clause */ + YYSYMBOL_DeallocateStmt = 954, /* DeallocateStmt */ + YYSYMBOL_InsertStmt = 955, /* InsertStmt */ + YYSYMBOL_insert_target = 956, /* insert_target */ + YYSYMBOL_insert_rest = 957, /* insert_rest */ + YYSYMBOL_override_kind = 958, /* override_kind */ + YYSYMBOL_insert_column_list = 959, /* insert_column_list */ + YYSYMBOL_insert_column_item = 960, /* insert_column_item */ + YYSYMBOL_opt_on_conflict = 961, /* opt_on_conflict */ + YYSYMBOL_opt_conf_expr = 962, /* opt_conf_expr */ + YYSYMBOL_returning_clause = 963, /* returning_clause */ + YYSYMBOL_DeleteStmt = 964, /* DeleteStmt */ + YYSYMBOL_using_clause = 965, /* using_clause */ + YYSYMBOL_LockStmt = 966, /* LockStmt */ + YYSYMBOL_opt_lock = 967, /* opt_lock */ + YYSYMBOL_lock_type = 968, /* lock_type */ + YYSYMBOL_opt_nowait = 969, /* opt_nowait */ + YYSYMBOL_opt_nowait_or_skip = 970, /* opt_nowait_or_skip */ + YYSYMBOL_UpdateStmt = 971, /* UpdateStmt */ + YYSYMBOL_set_clause_list = 972, /* set_clause_list */ + YYSYMBOL_set_clause = 973, /* set_clause */ + YYSYMBOL_set_target = 974, /* set_target */ + YYSYMBOL_set_target_list = 975, /* set_target_list */ + YYSYMBOL_DeclareCursorStmt = 976, /* DeclareCursorStmt */ + YYSYMBOL_cursor_name = 977, /* cursor_name */ + YYSYMBOL_cursor_options = 978, /* cursor_options */ + YYSYMBOL_opt_hold = 979, /* opt_hold */ + YYSYMBOL_SelectStmt = 980, /* SelectStmt */ + YYSYMBOL_select_with_parens = 981, /* select_with_parens */ + YYSYMBOL_select_no_parens = 982, /* select_no_parens */ + YYSYMBOL_select_clause = 983, /* select_clause */ + YYSYMBOL_simple_select = 984, /* simple_select */ + YYSYMBOL_with_clause = 985, /* with_clause */ + YYSYMBOL_cte_list = 986, /* cte_list */ + YYSYMBOL_common_table_expr = 987, /* common_table_expr */ + YYSYMBOL_opt_materialized = 988, /* opt_materialized */ + YYSYMBOL_opt_search_clause = 989, /* opt_search_clause */ + YYSYMBOL_opt_cycle_clause = 990, /* opt_cycle_clause */ + YYSYMBOL_opt_with_clause = 991, /* opt_with_clause */ + YYSYMBOL_into_clause = 992, /* into_clause */ + YYSYMBOL_OptTempTableName = 993, /* OptTempTableName */ + YYSYMBOL_opt_table = 994, /* opt_table */ + YYSYMBOL_set_quantifier = 995, /* set_quantifier */ + YYSYMBOL_distinct_clause = 996, /* distinct_clause */ + YYSYMBOL_opt_all_clause = 997, /* opt_all_clause */ + YYSYMBOL_opt_distinct_clause = 998, /* opt_distinct_clause */ + YYSYMBOL_opt_sort_clause = 999, /* opt_sort_clause */ + YYSYMBOL_sort_clause = 1000, /* sort_clause */ + YYSYMBOL_sortby_list = 1001, /* sortby_list */ + YYSYMBOL_sortby = 1002, /* sortby */ + YYSYMBOL_select_limit = 1003, /* select_limit */ + YYSYMBOL_opt_select_limit = 1004, /* opt_select_limit */ + YYSYMBOL_limit_clause = 1005, /* limit_clause */ + YYSYMBOL_offset_clause = 1006, /* offset_clause */ + YYSYMBOL_select_limit_value = 1007, /* select_limit_value */ + YYSYMBOL_select_offset_value = 1008, /* select_offset_value */ + YYSYMBOL_select_fetch_first_value = 1009, /* select_fetch_first_value */ + YYSYMBOL_I_or_F_const = 1010, /* I_or_F_const */ + YYSYMBOL_row_or_rows = 1011, /* row_or_rows */ + YYSYMBOL_first_or_next = 1012, /* first_or_next */ + YYSYMBOL_group_clause = 1013, /* group_clause */ + YYSYMBOL_group_by_list = 1014, /* group_by_list */ + YYSYMBOL_group_by_item = 1015, /* group_by_item */ + YYSYMBOL_empty_grouping_set = 1016, /* empty_grouping_set */ + YYSYMBOL_rollup_clause = 1017, /* rollup_clause */ + YYSYMBOL_cube_clause = 1018, /* cube_clause */ + YYSYMBOL_grouping_sets_clause = 1019, /* grouping_sets_clause */ + YYSYMBOL_having_clause = 1020, /* having_clause */ + YYSYMBOL_for_locking_clause = 1021, /* for_locking_clause */ + YYSYMBOL_opt_for_locking_clause = 1022, /* opt_for_locking_clause */ + YYSYMBOL_for_locking_items = 1023, /* for_locking_items */ + YYSYMBOL_for_locking_item = 1024, /* for_locking_item */ + YYSYMBOL_for_locking_strength = 1025, /* for_locking_strength */ + YYSYMBOL_locked_rels_list = 1026, /* locked_rels_list */ + YYSYMBOL_values_clause = 1027, /* values_clause */ + YYSYMBOL_from_clause = 1028, /* from_clause */ + YYSYMBOL_from_list = 1029, /* from_list */ + YYSYMBOL_table_ref = 1030, /* table_ref */ + YYSYMBOL_joined_table = 1031, /* joined_table */ + YYSYMBOL_alias_clause = 1032, /* alias_clause */ + YYSYMBOL_opt_alias_clause = 1033, /* opt_alias_clause */ + YYSYMBOL_opt_alias_clause_for_join_using = 1034, /* opt_alias_clause_for_join_using */ + YYSYMBOL_func_alias_clause = 1035, /* func_alias_clause */ + YYSYMBOL_join_type = 1036, /* join_type */ + YYSYMBOL_opt_outer = 1037, /* opt_outer */ + YYSYMBOL_join_qual = 1038, /* join_qual */ + YYSYMBOL_relation_expr = 1039, /* relation_expr */ + YYSYMBOL_relation_expr_list = 1040, /* relation_expr_list */ + YYSYMBOL_relation_expr_opt_alias = 1041, /* relation_expr_opt_alias */ + YYSYMBOL_tablesample_clause = 1042, /* tablesample_clause */ + YYSYMBOL_opt_repeatable_clause = 1043, /* opt_repeatable_clause */ + YYSYMBOL_func_table = 1044, /* func_table */ + YYSYMBOL_rowsfrom_item = 1045, /* rowsfrom_item */ + YYSYMBOL_rowsfrom_list = 1046, /* rowsfrom_list */ + YYSYMBOL_opt_col_def_list = 1047, /* opt_col_def_list */ + YYSYMBOL_opt_ordinality = 1048, /* opt_ordinality */ + YYSYMBOL_where_clause = 1049, /* where_clause */ + YYSYMBOL_where_or_current_clause = 1050, /* where_or_current_clause */ + YYSYMBOL_OptTableFuncElementList = 1051, /* OptTableFuncElementList */ + YYSYMBOL_TableFuncElementList = 1052, /* TableFuncElementList */ + YYSYMBOL_TableFuncElement = 1053, /* TableFuncElement */ + YYSYMBOL_xmltable = 1054, /* xmltable */ + YYSYMBOL_xmltable_column_list = 1055, /* xmltable_column_list */ + YYSYMBOL_xmltable_column_el = 1056, /* xmltable_column_el */ + YYSYMBOL_xmltable_column_option_list = 1057, /* xmltable_column_option_list */ + YYSYMBOL_xmltable_column_option_el = 1058, /* xmltable_column_option_el */ + YYSYMBOL_xml_namespace_list = 1059, /* xml_namespace_list */ + YYSYMBOL_xml_namespace_el = 1060, /* xml_namespace_el */ + YYSYMBOL_Typename = 1061, /* Typename */ + YYSYMBOL_opt_array_bounds = 1062, /* opt_array_bounds */ + YYSYMBOL_SimpleTypename = 1063, /* SimpleTypename */ + YYSYMBOL_ConstTypename = 1064, /* ConstTypename */ + YYSYMBOL_GenericType = 1065, /* GenericType */ + YYSYMBOL_opt_type_modifiers = 1066, /* opt_type_modifiers */ + YYSYMBOL_Numeric = 1067, /* Numeric */ + YYSYMBOL_opt_float = 1068, /* opt_float */ + YYSYMBOL_Bit = 1069, /* Bit */ + YYSYMBOL_ConstBit = 1070, /* ConstBit */ + YYSYMBOL_BitWithLength = 1071, /* BitWithLength */ + YYSYMBOL_BitWithoutLength = 1072, /* BitWithoutLength */ + YYSYMBOL_Character = 1073, /* Character */ + YYSYMBOL_ConstCharacter = 1074, /* ConstCharacter */ + YYSYMBOL_CharacterWithLength = 1075, /* CharacterWithLength */ + YYSYMBOL_CharacterWithoutLength = 1076, /* CharacterWithoutLength */ + YYSYMBOL_character = 1077, /* character */ + YYSYMBOL_opt_varying = 1078, /* opt_varying */ + YYSYMBOL_ConstDatetime = 1079, /* ConstDatetime */ + YYSYMBOL_ConstInterval = 1080, /* ConstInterval */ + YYSYMBOL_opt_timezone = 1081, /* opt_timezone */ + YYSYMBOL_opt_interval = 1082, /* opt_interval */ + YYSYMBOL_interval_second = 1083, /* interval_second */ + YYSYMBOL_a_expr = 1084, /* a_expr */ + YYSYMBOL_b_expr = 1085, /* b_expr */ + YYSYMBOL_c_expr = 1086, /* c_expr */ + YYSYMBOL_func_application = 1087, /* func_application */ + YYSYMBOL_func_expr = 1088, /* func_expr */ + YYSYMBOL_func_expr_windowless = 1089, /* func_expr_windowless */ + YYSYMBOL_func_expr_common_subexpr = 1090, /* func_expr_common_subexpr */ + YYSYMBOL_xml_root_version = 1091, /* xml_root_version */ + YYSYMBOL_opt_xml_root_standalone = 1092, /* opt_xml_root_standalone */ + YYSYMBOL_xml_attributes = 1093, /* xml_attributes */ + YYSYMBOL_xml_attribute_list = 1094, /* xml_attribute_list */ + YYSYMBOL_xml_attribute_el = 1095, /* xml_attribute_el */ + YYSYMBOL_document_or_content = 1096, /* document_or_content */ + YYSYMBOL_xml_whitespace_option = 1097, /* xml_whitespace_option */ + YYSYMBOL_xmlexists_argument = 1098, /* xmlexists_argument */ + YYSYMBOL_xml_passing_mech = 1099, /* xml_passing_mech */ + YYSYMBOL_within_group_clause = 1100, /* within_group_clause */ + YYSYMBOL_filter_clause = 1101, /* filter_clause */ + YYSYMBOL_window_clause = 1102, /* window_clause */ + YYSYMBOL_window_definition_list = 1103, /* window_definition_list */ + YYSYMBOL_window_definition = 1104, /* window_definition */ + YYSYMBOL_over_clause = 1105, /* over_clause */ + YYSYMBOL_window_specification = 1106, /* window_specification */ + YYSYMBOL_opt_existing_window_name = 1107, /* opt_existing_window_name */ + YYSYMBOL_opt_partition_clause = 1108, /* opt_partition_clause */ + YYSYMBOL_opt_frame_clause = 1109, /* opt_frame_clause */ + YYSYMBOL_frame_extent = 1110, /* frame_extent */ + YYSYMBOL_frame_bound = 1111, /* frame_bound */ + YYSYMBOL_opt_window_exclusion_clause = 1112, /* opt_window_exclusion_clause */ + YYSYMBOL_row = 1113, /* row */ + YYSYMBOL_explicit_row = 1114, /* explicit_row */ + YYSYMBOL_implicit_row = 1115, /* implicit_row */ + YYSYMBOL_sub_type = 1116, /* sub_type */ + YYSYMBOL_all_Op = 1117, /* all_Op */ + YYSYMBOL_MathOp = 1118, /* MathOp */ + YYSYMBOL_qual_Op = 1119, /* qual_Op */ + YYSYMBOL_qual_all_Op = 1120, /* qual_all_Op */ + YYSYMBOL_subquery_Op = 1121, /* subquery_Op */ + YYSYMBOL_expr_list = 1122, /* expr_list */ + YYSYMBOL_func_arg_list = 1123, /* func_arg_list */ + YYSYMBOL_func_arg_expr = 1124, /* func_arg_expr */ + YYSYMBOL_func_arg_list_opt = 1125, /* func_arg_list_opt */ + YYSYMBOL_type_list = 1126, /* type_list */ + YYSYMBOL_array_expr = 1127, /* array_expr */ + YYSYMBOL_array_expr_list = 1128, /* array_expr_list */ + YYSYMBOL_extract_list = 1129, /* extract_list */ + YYSYMBOL_extract_arg = 1130, /* extract_arg */ + YYSYMBOL_unicode_normal_form = 1131, /* unicode_normal_form */ + YYSYMBOL_overlay_list = 1132, /* overlay_list */ + YYSYMBOL_position_list = 1133, /* position_list */ + YYSYMBOL_substr_list = 1134, /* substr_list */ + YYSYMBOL_trim_list = 1135, /* trim_list */ + YYSYMBOL_in_expr = 1136, /* in_expr */ + YYSYMBOL_case_expr = 1137, /* case_expr */ + YYSYMBOL_when_clause_list = 1138, /* when_clause_list */ + YYSYMBOL_when_clause = 1139, /* when_clause */ + YYSYMBOL_case_default = 1140, /* case_default */ + YYSYMBOL_case_arg = 1141, /* case_arg */ + YYSYMBOL_columnref = 1142, /* columnref */ + YYSYMBOL_indirection_el = 1143, /* indirection_el */ + YYSYMBOL_opt_slice_bound = 1144, /* opt_slice_bound */ + YYSYMBOL_indirection = 1145, /* indirection */ + YYSYMBOL_opt_indirection = 1146, /* opt_indirection */ + YYSYMBOL_opt_asymmetric = 1147, /* opt_asymmetric */ + YYSYMBOL_opt_target_list = 1148, /* opt_target_list */ + YYSYMBOL_target_list = 1149, /* target_list */ + YYSYMBOL_target_el = 1150, /* target_el */ + YYSYMBOL_qualified_name_list = 1151, /* qualified_name_list */ + YYSYMBOL_qualified_name = 1152, /* qualified_name */ + YYSYMBOL_name_list = 1153, /* name_list */ + YYSYMBOL_name = 1154, /* name */ + YYSYMBOL_attr_name = 1155, /* attr_name */ + YYSYMBOL_file_name = 1156, /* file_name */ + YYSYMBOL_func_name = 1157, /* func_name */ + YYSYMBOL_AexprConst = 1158, /* AexprConst */ + YYSYMBOL_Iconst = 1159, /* Iconst */ + YYSYMBOL_Sconst = 1160, /* Sconst */ + YYSYMBOL_SignedIconst = 1161, /* SignedIconst */ + YYSYMBOL_RoleId = 1162, /* RoleId */ + YYSYMBOL_RoleSpec = 1163, /* RoleSpec */ + YYSYMBOL_role_list = 1164, /* role_list */ + YYSYMBOL_PLpgSQL_Expr = 1165, /* PLpgSQL_Expr */ + YYSYMBOL_PLAssignStmt = 1166, /* PLAssignStmt */ + YYSYMBOL_plassign_target = 1167, /* plassign_target */ + YYSYMBOL_plassign_equals = 1168, /* plassign_equals */ + YYSYMBOL_ColId = 1169, /* ColId */ + YYSYMBOL_type_function_name = 1170, /* type_function_name */ + YYSYMBOL_NonReservedWord = 1171, /* NonReservedWord */ + YYSYMBOL_ColLabel = 1172, /* ColLabel */ + YYSYMBOL_BareColLabel = 1173, /* BareColLabel */ + YYSYMBOL_unreserved_keyword = 1174, /* unreserved_keyword */ + YYSYMBOL_col_name_keyword = 1175, /* col_name_keyword */ + YYSYMBOL_type_func_name_keyword = 1176, /* type_func_name_keyword */ + YYSYMBOL_reserved_keyword = 1177, /* reserved_keyword */ + YYSYMBOL_bare_label_keyword = 1178 /* bare_label_keyword */ }; +typedef enum yysymbol_kind_t yysymbol_kind_t; -typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 -#endif -/* Location type. */ -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE YYLTYPE; -struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -}; -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif +#ifdef short +# undef short +#endif -int base_yyparse (core_yyscan_t yyscanner); - -#endif /* !YY_BASE_YY_GRAM_H_INCLUDED */ +/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure + <limits.h> and (if available) <stdint.h> are included + so that the code can choose integer types of a good width. */ +#ifndef __PTRDIFF_MAX__ +# include <limits.h> /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include <stdint.h> /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif +#endif +/* Narrow types that promote to a signed type and that can represent a + signed or unsigned integer of at least N bits. In tables they can + save space and decrease cache pressure. Promoting to a signed type + helps avoid bugs in integer arithmetic. */ -#ifdef short -# undef short +#ifdef __INT_LEAST8_MAX__ +typedef __INT_LEAST8_TYPE__ yytype_int8; +#elif defined YY_STDINT_H +typedef int_least8_t yytype_int8; +#else +typedef signed char yytype_int8; #endif -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; +#ifdef __INT_LEAST16_MAX__ +typedef __INT_LEAST16_TYPE__ yytype_int16; +#elif defined YY_STDINT_H +typedef int_least16_t yytype_int16; #else -typedef unsigned char yytype_uint8; +typedef short yytype_int16; #endif -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#else -typedef signed char yytype_int8; +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 #endif -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; +#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST8_TYPE__ yytype_uint8; +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) +typedef uint_least8_t yytype_uint8; +#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX +typedef unsigned char yytype_uint8; #else -typedef unsigned short yytype_uint16; +typedef short yytype_uint8; #endif -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; +#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST16_TYPE__ yytype_uint16; +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) +typedef uint_least16_t yytype_uint16; +#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX +typedef unsigned short yytype_uint16; #else -typedef short yytype_int16; +typedef int yytype_uint16; +#endif + +#ifndef YYPTRDIFF_T +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif #endif #ifndef YYSIZE_T @@ -919,7 +1584,7 @@ typedef short yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -927,7 +1592,20 @@ typedef short yytype_int16; # endif #endif -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) + + +/* Stored state numbers (used for stacks). */ +typedef yytype_int16 yy_state_t; + +/* State numbers in computations. */ +typedef int yy_state_fast_t; #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS @@ -941,38 +1619,37 @@ typedef short yytype_int16; # endif #endif -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif #ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif #endif #ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value @@ -985,8 +1662,22 @@ typedef short yytype_int16; # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + + +#define YY_ASSERT(E) ((void) (0 && (E))) -#if ! defined yyoverflow || YYERROR_VERBOSE +#if !defined yyoverflow /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -1051,8 +1742,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - +#endif /* !defined yyoverflow */ #if (! defined yyoverflow \ && (! defined __cplusplus \ @@ -1062,18 +1752,19 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss_alloc; + yy_state_t yyss_alloc; YYSTYPE yyvs_alloc; YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \ + + YYSIZEOF (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 @@ -1086,11 +1777,11 @@ union yyalloc # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ - YYSIZE_T yynewbytes; \ + YYPTRDIFF_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ } \ while (0) @@ -1102,12 +1793,12 @@ union yyalloc # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ - YYSIZE_T yyi; \ + YYPTRDIFF_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ @@ -1130,17 +1821,20 @@ union yyalloc /* YYNSTATES -- Number of states. */ #define YYNSTATES 5980 -#define YYUNDEFTOK 2 +/* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 740 + /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_uint16 yytranslate[] = +static const yytype_int16 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1221,7 +1915,7 @@ static const yytype_uint16 yytranslate[] = #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = +static const yytype_int16 yyrline[] = { 0, 827, 827, 831, 835, 840, 847, 854, 873, 885, 899, 900, 904, 905, 906, 907, 908, 909, 910, 911, @@ -1542,104 +2236,111 @@ static const yytype_uint16 yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 0 +/** Accessing symbol of state STATE. */ +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) + +#if YYDEBUG || 0 +/* The user-facing name of the symbol whose (internal) number is + YYSYMBOL. No bounds checking. */ +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; + /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "IDENT", "UIDENT", "FCONST", "SCONST", - "USCONST", "BCONST", "XCONST", "Op", "ICONST", "PARAM", "TYPECAST", - "DOT_DOT", "COLON_EQUALS", "EQUALS_GREATER", "LESS_EQUALS", - "GREATER_EQUALS", "NOT_EQUALS", "ABORT_P", "ABSOLUTE_P", "ACCESS", - "ACTION", "ADD_P", "ADMIN", "AFTER", "AGGREGATE", "ALL", "ALSO", "ALTER", - "ALWAYS", "ANALYSE", "ANALYZE", "AND", "ANY", "ARRAY", "AS", "ASC", - "ASENSITIVE", "ASSERTION", "ASSIGNMENT", "ASYMMETRIC", "ATOMIC", "AT", - "ATTACH", "ATTRIBUTE", "AUTHORIZATION", "BACKWARD", "BEFORE", "BEGIN_P", - "BETWEEN", "BIGINT", "BINARY", "BIT", "BOOLEAN_P", "BOTH", "BREADTH", - "BY", "CACHE", "CALL", "CALLED", "CASCADE", "CASCADED", "CASE", "CAST", - "CATALOG_P", "CHAIN", "CHAR_P", "CHARACTER", "CHARACTERISTICS", "CHECK", - "CHECKPOINT", "CLASS", "CLOSE", "CLUSTER", "COALESCE", "COLLATE", - "COLLATION", "COLUMN", "COLUMNS", "COMMENT", "COMMENTS", "COMMIT", - "COMMITTED", "COMPRESSION", "CONCURRENTLY", "CONFIGURATION", "CONFLICT", - "CONNECTION", "CONSTRAINT", "CONSTRAINTS", "CONTENT_P", "CONTINUE_P", - "CONVERSION_P", "COPY", "COST", "CREATE", "CROSS", "CSV", "CUBE", - "CURRENT_P", "CURRENT_CATALOG", "CURRENT_DATE", "CURRENT_ROLE", - "CURRENT_SCHEMA", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", - "CURSOR", "CYCLE", "DATA_P", "DATABASE", "DAY_P", "DEALLOCATE", "DEC", - "DECIMAL_P", "DECLARE", "DEFAULT", "DEFAULTS", "DEFERRABLE", "DEFERRED", - "DEFINER", "DELETE_P", "DELIMITER", "DELIMITERS", "DEPENDS", "DEPTH", - "DESC", "DETACH", "DICTIONARY", "DISABLE_P", "DISCARD", "DISTINCT", "DO", - "DOCUMENT_P", "DOMAIN_P", "DOUBLE_P", "DROP", "EACH", "ELSE", "ENABLE_P", - "ENCODING", "ENCRYPTED", "END_P", "ENUM_P", "ESCAPE", "EVENT", "EXCEPT", - "EXCLUDE", "EXCLUDING", "EXCLUSIVE", "EXECUTE", "EXISTS", "EXPLAIN", - "EXPRESSION", "EXTENSION", "EXTERNAL", "EXTRACT", "FALSE_P", "FAMILY", - "FETCH", "FILTER", "FINALIZE", "FIRST_P", "FLOAT_P", "FOLLOWING", "FOR", - "FORCE", "FOREIGN", "FORWARD", "FREEZE", "FROM", "FULL", "FUNCTION", - "FUNCTIONS", "GENERATED", "GLOBAL", "GRANT", "GRANTED", "GREATEST", - "GROUP_P", "GROUPING", "GROUPS", "HANDLER", "HAVING", "HEADER_P", "HOLD", - "HOUR_P", "IDENTITY_P", "IF_P", "ILIKE", "IMMEDIATE", "IMMUTABLE", - "IMPLICIT_P", "IMPORT_P", "IN_P", "INCLUDE", "INCLUDING", "INCREMENT", - "INDEX", "INDEXES", "INHERIT", "INHERITS", "INITIALLY", "INLINE_P", - "INNER_P", "INOUT", "INPUT_P", "INSENSITIVE", "INSERT", "INSTEAD", - "INT_P", "INTEGER", "INTERSECT", "INTERVAL", "INTO", "INVOKER", "IS", - "ISNULL", "ISOLATION", "JOIN", "KEY", "LABEL", "LANGUAGE", "LARGE_P", - "LAST_P", "LATERAL_P", "LEADING", "LEAKPROOF", "LEAST", "LEFT", "LEVEL", - "LIKE", "LIMIT", "LISTEN", "LOAD", "LOCAL", "LOCALTIME", - "LOCALTIMESTAMP", "LOCATION", "LOCK_P", "LOCKED", "LOGGED", "MAPPING", - "MATCH", "MATERIALIZED", "MAXVALUE", "METHOD", "MINUTE_P", "MINVALUE", - "MODE", "MONTH_P", "MOVE", "NAME_P", "NAMES", "NATIONAL", "NATURAL", - "NCHAR", "NEW", "NEXT", "NFC", "NFD", "NFKC", "NFKD", "NO", "NONE", - "NORMALIZE", "NORMALIZED", "NOT", "NOTHING", "NOTIFY", "NOTNULL", - "NOWAIT", "NULL_P", "NULLIF", "NULLS_P", "NUMERIC", "OBJECT_P", "OF", - "OFF", "OFFSET", "OIDS", "OLD", "ON", "ONLY", "OPERATOR", "OPTION", - "OPTIONS", "OR", "ORDER", "ORDINALITY", "OTHERS", "OUT_P", "OUTER_P", - "OVER", "OVERLAPS", "OVERLAY", "OVERRIDING", "OWNED", "OWNER", - "PARALLEL", "PARSER", "PARTIAL", "PARTITION", "PASSING", "PASSWORD", - "PLACING", "PLANS", "POLICY", "POSITION", "PRECEDING", "PRECISION", - "PRESERVE", "PREPARE", "PREPARED", "PRIMARY", "PRIOR", "PRIVILEGES", - "PROCEDURAL", "PROCEDURE", "PROCEDURES", "PROGRAM", "PUBLICATION", - "QUOTE", "RANGE", "READ", "REAL", "REASSIGN", "RECHECK", "RECURSIVE", - "REF", "REFERENCES", "REFERENCING", "REFRESH", "REINDEX", "RELATIVE_P", - "RELEASE", "RENAME", "REPEATABLE", "REPLACE", "REPLICA", "RESET", - "RESTART", "RESTRICT", "RETURN", "RETURNING", "RETURNS", "REVOKE", - "RIGHT", "ROLE", "ROLLBACK", "ROLLUP", "ROUTINE", "ROUTINES", "ROW", - "ROWS", "RULE", "SAVEPOINT", "SCHEMA", "SCHEMAS", "SCROLL", "SEARCH", - "SECOND_P", "SECURITY", "SELECT", "SEQUENCE", "SEQUENCES", - "SERIALIZABLE", "SERVER", "SESSION", "SESSION_USER", "SET", "SETS", - "SETOF", "SHARE", "SHOW", "SIMILAR", "SIMPLE", "SKIP", "SMALLINT", - "SNAPSHOT", "SOME", "SQL_P", "STABLE", "STANDALONE_P", "START", - "STATEMENT", "STATISTICS", "STDIN", "STDOUT", "STORAGE", "STORED", - "STRICT_P", "STRIP_P", "SUBSCRIPTION", "SUBSTRING", "SUPPORT", - "SYMMETRIC", "SYSID", "SYSTEM_P", "TABLE", "TABLES", "TABLESAMPLE", - "TABLESPACE", "TEMP", "TEMPLATE", "TEMPORARY", "TEXT_P", "THEN", "TIES", - "TIME", "TIMESTAMP", "TO", "TRAILING", "TRANSACTION", "TRANSFORM", - "TREAT", "TRIGGER", "TRIM", "TRUE_P", "TRUNCATE", "TRUSTED", "TYPE_P", - "TYPES_P", "UESCAPE", "UNBOUNDED", "UNCOMMITTED", "UNENCRYPTED", "UNION", - "UNIQUE", "UNKNOWN", "UNLISTEN", "UNLOGGED", "UNTIL", "UPDATE", "USER", - "USING", "VACUUM", "VALID", "VALIDATE", "VALIDATOR", "VALUE_P", "VALUES", - "VARCHAR", "VARIADIC", "VARYING", "VERBOSE", "VERSION_P", "VIEW", - "VIEWS", "VOLATILE", "WHEN", "WHERE", "WHITESPACE_P", "WINDOW", "WITH", - "WITHIN", "WITHOUT", "WORK", "WRAPPER", "WRITE", "XML_P", - "XMLATTRIBUTES", "XMLCONCAT", "XMLELEMENT", "XMLEXISTS", "XMLFOREST", - "XMLNAMESPACES", "XMLPARSE", "XMLPI", "XMLROOT", "XMLSERIALIZE", - "XMLTABLE", "YEAR_P", "YES_P", "ZONE", "NOT_LA", "NULLS_LA", "WITH_LA", - "MODE_TYPE_NAME", "MODE_PLPGSQL_EXPR", "MODE_PLPGSQL_ASSIGN1", - "MODE_PLPGSQL_ASSIGN2", "MODE_PLPGSQL_ASSIGN3", "'<'", "'>'", "'='", - "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", "UMINUS", "'['", "']'", "'('", - "')'", "'.'", "';'", "','", "':'", "$accept", "parse_toplevel", - "stmtmulti", "toplevel_stmt", "stmt", "CallStmt", "CreateRoleStmt", - "opt_with", "OptRoleList", "AlterOptRoleList", "AlterOptRoleElem", - "CreateOptRoleElem", "CreateUserStmt", "AlterRoleStmt", - "opt_in_database", "AlterRoleSetStmt", "DropRoleStmt", "CreateGroupStmt", - "AlterGroupStmt", "add_drop", "CreateSchemaStmt", "OptSchemaName", - "OptSchemaEltList", "schema_stmt", "VariableSetStmt", "set_rest", - "generic_set", "set_rest_more", "var_name", "var_list", "var_value", - "iso_level", "opt_boolean_or_string", "zone_value", "opt_encoding", - "NonReservedWord_or_Sconst", "VariableResetStmt", "reset_rest", - "generic_reset", "SetResetClause", "FunctionSetResetClause", - "VariableShowStmt", "ConstraintsSetStmt", "constraints_set_list", - "constraints_set_mode", "CheckPointStmt", "DiscardStmt", - "AlterTableStmt", "alter_table_cmds", "partition_cmd", + "\"end of file\"", "error", "\"invalid token\"", "IDENT", "UIDENT", + "FCONST", "SCONST", "USCONST", "BCONST", "XCONST", "Op", "ICONST", + "PARAM", "TYPECAST", "DOT_DOT", "COLON_EQUALS", "EQUALS_GREATER", + "LESS_EQUALS", "GREATER_EQUALS", "NOT_EQUALS", "ABORT_P", "ABSOLUTE_P", + "ACCESS", "ACTION", "ADD_P", "ADMIN", "AFTER", "AGGREGATE", "ALL", + "ALSO", "ALTER", "ALWAYS", "ANALYSE", "ANALYZE", "AND", "ANY", "ARRAY", + "AS", "ASC", "ASENSITIVE", "ASSERTION", "ASSIGNMENT", "ASYMMETRIC", + "ATOMIC", "AT", "ATTACH", "ATTRIBUTE", "AUTHORIZATION", "BACKWARD", + "BEFORE", "BEGIN_P", "BETWEEN", "BIGINT", "BINARY", "BIT", "BOOLEAN_P", + "BOTH", "BREADTH", "BY", "CACHE", "CALL", "CALLED", "CASCADE", + "CASCADED", "CASE", "CAST", "CATALOG_P", "CHAIN", "CHAR_P", "CHARACTER", + "CHARACTERISTICS", "CHECK", "CHECKPOINT", "CLASS", "CLOSE", "CLUSTER", + "COALESCE", "COLLATE", "COLLATION", "COLUMN", "COLUMNS", "COMMENT", + "COMMENTS", "COMMIT", "COMMITTED", "COMPRESSION", "CONCURRENTLY", + "CONFIGURATION", "CONFLICT", "CONNECTION", "CONSTRAINT", "CONSTRAINTS", + "CONTENT_P", "CONTINUE_P", "CONVERSION_P", "COPY", "COST", "CREATE", + "CROSS", "CSV", "CUBE", "CURRENT_P", "CURRENT_CATALOG", "CURRENT_DATE", + "CURRENT_ROLE", "CURRENT_SCHEMA", "CURRENT_TIME", "CURRENT_TIMESTAMP", + "CURRENT_USER", "CURSOR", "CYCLE", "DATA_P", "DATABASE", "DAY_P", + "DEALLOCATE", "DEC", "DECIMAL_P", "DECLARE", "DEFAULT", "DEFAULTS", + "DEFERRABLE", "DEFERRED", "DEFINER", "DELETE_P", "DELIMITER", + "DELIMITERS", "DEPENDS", "DEPTH", "DESC", "DETACH", "DICTIONARY", + "DISABLE_P", "DISCARD", "DISTINCT", "DO", "DOCUMENT_P", "DOMAIN_P", + "DOUBLE_P", "DROP", "EACH", "ELSE", "ENABLE_P", "ENCODING", "ENCRYPTED", + "END_P", "ENUM_P", "ESCAPE", "EVENT", "EXCEPT", "EXCLUDE", "EXCLUDING", + "EXCLUSIVE", "EXECUTE", "EXISTS", "EXPLAIN", "EXPRESSION", "EXTENSION", + "EXTERNAL", "EXTRACT", "FALSE_P", "FAMILY", "FETCH", "FILTER", + "FINALIZE", "FIRST_P", "FLOAT_P", "FOLLOWING", "FOR", "FORCE", "FOREIGN", + "FORWARD", "FREEZE", "FROM", "FULL", "FUNCTION", "FUNCTIONS", + "GENERATED", "GLOBAL", "GRANT", "GRANTED", "GREATEST", "GROUP_P", + "GROUPING", "GROUPS", "HANDLER", "HAVING", "HEADER_P", "HOLD", "HOUR_P", + "IDENTITY_P", "IF_P", "ILIKE", "IMMEDIATE", "IMMUTABLE", "IMPLICIT_P", + "IMPORT_P", "IN_P", "INCLUDE", "INCLUDING", "INCREMENT", "INDEX", + "INDEXES", "INHERIT", "INHERITS", "INITIALLY", "INLINE_P", "INNER_P", + "INOUT", "INPUT_P", "INSENSITIVE", "INSERT", "INSTEAD", "INT_P", + "INTEGER", "INTERSECT", "INTERVAL", "INTO", "INVOKER", "IS", "ISNULL", + "ISOLATION", "JOIN", "KEY", "LABEL", "LANGUAGE", "LARGE_P", "LAST_P", + "LATERAL_P", "LEADING", "LEAKPROOF", "LEAST", "LEFT", "LEVEL", "LIKE", + "LIMIT", "LISTEN", "LOAD", "LOCAL", "LOCALTIME", "LOCALTIMESTAMP", + "LOCATION", "LOCK_P", "LOCKED", "LOGGED", "MAPPING", "MATCH", + "MATERIALIZED", "MAXVALUE", "METHOD", "MINUTE_P", "MINVALUE", "MODE", + "MONTH_P", "MOVE", "NAME_P", "NAMES", "NATIONAL", "NATURAL", "NCHAR", + "NEW", "NEXT", "NFC", "NFD", "NFKC", "NFKD", "NO", "NONE", "NORMALIZE", + "NORMALIZED", "NOT", "NOTHING", "NOTIFY", "NOTNULL", "NOWAIT", "NULL_P", + "NULLIF", "NULLS_P", "NUMERIC", "OBJECT_P", "OF", "OFF", "OFFSET", + "OIDS", "OLD", "ON", "ONLY", "OPERATOR", "OPTION", "OPTIONS", "OR", + "ORDER", "ORDINALITY", "OTHERS", "OUT_P", "OUTER_P", "OVER", "OVERLAPS", + "OVERLAY", "OVERRIDING", "OWNED", "OWNER", "PARALLEL", "PARSER", + "PARTIAL", "PARTITION", "PASSING", "PASSWORD", "PLACING", "PLANS", + "POLICY", "POSITION", "PRECEDING", "PRECISION", "PRESERVE", "PREPARE", + "PREPARED", "PRIMARY", "PRIOR", "PRIVILEGES", "PROCEDURAL", "PROCEDURE", + "PROCEDURES", "PROGRAM", "PUBLICATION", "QUOTE", "RANGE", "READ", "REAL", + "REASSIGN", "RECHECK", "RECURSIVE", "REF", "REFERENCES", "REFERENCING", + "REFRESH", "REINDEX", "RELATIVE_P", "RELEASE", "RENAME", "REPEATABLE", + "REPLACE", "REPLICA", "RESET", "RESTART", "RESTRICT", "RETURN", + "RETURNING", "RETURNS", "REVOKE", "RIGHT", "ROLE", "ROLLBACK", "ROLLUP", + "ROUTINE", "ROUTINES", "ROW", "ROWS", "RULE", "SAVEPOINT", "SCHEMA", + "SCHEMAS", "SCROLL", "SEARCH", "SECOND_P", "SECURITY", "SELECT", + "SEQUENCE", "SEQUENCES", "SERIALIZABLE", "SERVER", "SESSION", + "SESSION_USER", "SET", "SETS", "SETOF", "SHARE", "SHOW", "SIMILAR", + "SIMPLE", "SKIP", "SMALLINT", "SNAPSHOT", "SOME", "SQL_P", "STABLE", + "STANDALONE_P", "START", "STATEMENT", "STATISTICS", "STDIN", "STDOUT", + "STORAGE", "STORED", "STRICT_P", "STRIP_P", "SUBSCRIPTION", "SUBSTRING", + "SUPPORT", "SYMMETRIC", "SYSID", "SYSTEM_P", "TABLE", "TABLES", + "TABLESAMPLE", "TABLESPACE", "TEMP", "TEMPLATE", "TEMPORARY", "TEXT_P", + "THEN", "TIES", "TIME", "TIMESTAMP", "TO", "TRAILING", "TRANSACTION", + "TRANSFORM", "TREAT", "TRIGGER", "TRIM", "TRUE_P", "TRUNCATE", "TRUSTED", + "TYPE_P", "TYPES_P", "UESCAPE", "UNBOUNDED", "UNCOMMITTED", + "UNENCRYPTED", "UNION", "UNIQUE", "UNKNOWN", "UNLISTEN", "UNLOGGED", + "UNTIL", "UPDATE", "USER", "USING", "VACUUM", "VALID", "VALIDATE", + "VALIDATOR", "VALUE_P", "VALUES", "VARCHAR", "VARIADIC", "VARYING", + "VERBOSE", "VERSION_P", "VIEW", "VIEWS", "VOLATILE", "WHEN", "WHERE", + "WHITESPACE_P", "WINDOW", "WITH", "WITHIN", "WITHOUT", "WORK", "WRAPPER", + "WRITE", "XML_P", "XMLATTRIBUTES", "XMLCONCAT", "XMLELEMENT", + "XMLEXISTS", "XMLFOREST", "XMLNAMESPACES", "XMLPARSE", "XMLPI", + "XMLROOT", "XMLSERIALIZE", "XMLTABLE", "YEAR_P", "YES_P", "ZONE", + "NOT_LA", "NULLS_LA", "WITH_LA", "MODE_TYPE_NAME", "MODE_PLPGSQL_EXPR", + "MODE_PLPGSQL_ASSIGN1", "MODE_PLPGSQL_ASSIGN2", "MODE_PLPGSQL_ASSIGN3", + "'<'", "'>'", "'='", "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", "UMINUS", + "'['", "']'", "'('", "')'", "'.'", "';'", "','", "':'", "$accept", + "parse_toplevel", "stmtmulti", "toplevel_stmt", "stmt", "CallStmt", + "CreateRoleStmt", "opt_with", "OptRoleList", "AlterOptRoleList", + "AlterOptRoleElem", "CreateOptRoleElem", "CreateUserStmt", + "AlterRoleStmt", "opt_in_database", "AlterRoleSetStmt", "DropRoleStmt", + "CreateGroupStmt", "AlterGroupStmt", "add_drop", "CreateSchemaStmt", + "OptSchemaName", "OptSchemaEltList", "schema_stmt", "VariableSetStmt", + "set_rest", "generic_set", "set_rest_more", "var_name", "var_list", + "var_value", "iso_level", "opt_boolean_or_string", "zone_value", + "opt_encoding", "NonReservedWord_or_Sconst", "VariableResetStmt", + "reset_rest", "generic_reset", "SetResetClause", + "FunctionSetResetClause", "VariableShowStmt", "ConstraintsSetStmt", + "constraints_set_list", "constraints_set_mode", "CheckPointStmt", + "DiscardStmt", "AlterTableStmt", "alter_table_cmds", "partition_cmd", "index_partition_cmd", "alter_table_cmd", "alter_column_default", "opt_drop_behavior", "opt_collate_clause", "alter_using", "replica_identity", "reloptions", "opt_reloptions", "reloption_list", @@ -1826,12 +2527,18 @@ static const char *const yytname[] = "BareColLabel", "unreserved_keyword", "col_name_keyword", "type_func_name_keyword", "reserved_keyword", "bare_label_keyword", YY_NULLPTR }; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif -# ifdef YYPRINT +#ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = +static const yytype_int16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, @@ -1885,17 +2592,17 @@ static const yytype_uint16 yytoknum[] = 42, 47, 37, 94, 740, 91, 93, 40, 41, 46, 59, 44, 58 }; -# endif +#endif -#define YYPACT_NINF -5214 +#define YYPACT_NINF (-5214) -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-5214))) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF -2772 +#define YYTABLE_NINF (-2772) -#define yytable_value_is_error(Yytable_value) \ - (!!((Yytable_value) == (-2772))) +#define yytable_value_is_error(Yyn) \ + ((Yyn) == YYTABLE_NINF) /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ @@ -2504,7 +3211,7 @@ static const int yypact[] = /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint16 yydefact[] = +static const yytype_int16 yydefact[] = { 1652, 1418, 639, 1505, 1504, 1418, 0, 261, 0, 1515, 0, 1418, 424, 1084, 0, 0, 0, 0, 639, 1418, @@ -3182,7 +3889,7 @@ static const yytype_int16 yypgoto[] = /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 57, 58, 59, 60, 61, 62, 1574, 2938, 2793, + 0, 57, 58, 59, 60, 61, 62, 1574, 2938, 2793, 3715, 3716, 63, 64, 1570, 65, 66, 67, 68, 1484, 69, 1072, 1822, 2953, 70, 2637, 820, 821, 822, 2504, 2505, 2883, 2506, 2494, 1338, 1768, 1506, 794, 795, 1466, @@ -24889,7 +25596,7 @@ static const yytype_int16 yycheck[] = /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const yytype_uint16 yystos[] = +static const yytype_int16 yystos[] = { 0, 20, 30, 32, 33, 50, 60, 72, 74, 75, 81, 83, 95, 97, 114, 117, 132, 134, 138, 144, @@ -25492,7 +26199,7 @@ static const yytype_uint16 yystos[] = }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint16 yyr1[] = +static const yytype_int16 yyr1[] = { 0, 503, 504, 504, 504, 504, 504, 504, 505, 505, 506, 506, 507, 507, 507, 507, 507, 507, 507, 507, @@ -25813,7 +26520,7 @@ static const yytype_uint16 yyr1[] = }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +static const yytype_int8 yyr2[] = { 0, 2, 1, 2, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -26134,10 +26841,10 @@ static const yytype_uint8 yyr2[] = }; +enum { YYENOMEM = -2 }; + #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab @@ -26163,10 +26870,9 @@ static const yytype_uint8 yyr2[] = } \ while (0) -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - +/* Backward compatibility with an undocumented macro. + Use YYerror or YYUNDEF. */ +#define YYERRCODE YYUNDEF /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends @@ -26214,8 +26920,8 @@ do { \ This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ -#ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# ifndef YY_LOCATION_PRINT +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ @@ -26245,22 +26951,22 @@ yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) return res; } -# define YY_LOCATION_PRINT(File, Loc) \ +# define YY_LOCATION_PRINT(File, Loc) \ yy_location_print_ (File, &(Loc)) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +# endif /* !defined YY_LOCATION_PRINT */ -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ - Type, Value, Location, yyscanner); \ + Kind, Value, Location, yyscanner); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) @@ -26271,19 +26977,22 @@ do { \ `-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, core_yyscan_t yyscanner) +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, core_yyscan_t yyscanner) { FILE *yyoutput = yyo; - YYUSE (yyoutput); - YYUSE (yylocationp); - YYUSE (yyscanner); + YY_USE (yyoutput); + YY_USE (yylocationp); + YY_USE (yyscanner); if (!yyvaluep) return; # ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyo, yytoknum[yytype], *yyvaluep); + if (yykind < YYNTOKENS) + YYPRINT (yyo, yytoknum[yykind], *yyvaluep); # endif - YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -26292,14 +27001,15 @@ yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YY `---------------------------*/ static void -yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, core_yyscan_t yyscanner) +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, core_yyscan_t yyscanner) { YYFPRINTF (yyo, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); YY_LOCATION_PRINT (yyo, *yylocationp); YYFPRINTF (yyo, ": "); - yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, yyscanner); + yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, yyscanner); YYFPRINTF (yyo, ")"); } @@ -26309,7 +27019,7 @@ yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE `------------------------------------------------------------------*/ static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -26332,21 +27042,22 @@ do { \ `------------------------------------------------*/ static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, core_yyscan_t yyscanner) +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, + int yyrule, core_yyscan_t yyscanner) { - unsigned long yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &yyvsp[(yyi + 1) - (yynrhs)] - , &(yylsp[(yyi + 1) - (yynrhs)]) , yyscanner); + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], + &(yylsp[(yyi + 1) - (yynrhs)]), yyscanner); YYFPRINTF (stderr, "\n"); } } @@ -26361,8 +27072,8 @@ do { \ multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -26385,255 +27096,35 @@ int yydebug; #endif -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return 2; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - default: /* Avoid compiler warnings. */ - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return 2; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, core_yyscan_t yyscanner) +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, core_yyscan_t yyscanner) { - YYUSE (yyvaluep); - YYUSE (yylocationp); - YYUSE (yyscanner); + YY_USE (yyvaluep); + YY_USE (yylocationp); + YY_USE (yyscanner); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + + /*----------. | yyparse. | `----------*/ @@ -26641,7 +27132,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio int yyparse (core_yyscan_t yyscanner) { -/* The lookahead symbol. */ +/* Lookahead token kind. */ int yychar; @@ -26660,55 +27151,47 @@ static __thread YYLTYPE yyloc_default YYLTYPE yylloc = yyloc_default; /* Number of syntax errors so far. */ - int yynerrs; + int yynerrs = 0; - int yystate; + yy_state_fast_t yystate = 0; /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; + int yyerrstatus = 0; - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - 'yyls': related to locations. - - Refer to the stacks through separate pointers, to allow yyoverflow + /* Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; + + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - /* The semantic value stack. */ + /* The semantic value stack: array, bottom, top. */ YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; - /* The location stack. */ + /* The location stack: array, bottom, top. */ YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls; - YYLTYPE *yylsp; - - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[3]; - - YYSIZE_T yystacksize; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp = yyls; int yyn; + /* The return value of yyparse. */ int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; + /* Lookahead symbol kind. */ + yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; YYLTYPE yyloc; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif + /* The locations where the error started and ended. */ + YYLTYPE yyerror_range[3]; + + #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) @@ -26716,16 +27199,8 @@ YYLTYPE yylloc = yyloc_default; Keep to zero when no symbol should be popped. */ int yylen = 0; - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yylsp = yyls = yylsa; - yystacksize = YYINITDEPTH; - YYDPRINTF ((stderr, "Starting parse\n")); - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ yylsp[0] = yylloc; goto yysetstate; @@ -26741,10 +27216,15 @@ yynewstate: /*--------------------------------------------------------------------. -| yynewstate -- set current state (the top of the stack) to yystate. | +| yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - *yyssp = (yytype_int16) yystate; + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YY_IGNORE_USELESS_CAST_BEGIN + *yyssp = YY_CAST (yy_state_t, yystate); + YY_IGNORE_USELESS_CAST_END + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE @@ -26752,15 +27232,15 @@ yysetstate: #else { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); + YYPTRDIFF_T yysize = yyssp - yyss + 1; # if defined yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ + yy_state_t *yyss1 = yyss; YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; YYLTYPE *yyls1 = yyls; /* Each stack pointer address is followed by the size of the @@ -26768,9 +27248,9 @@ yysetstate: conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), + &yyls1, yysize * YYSIZEOF (*yylsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; @@ -26785,15 +27265,16 @@ yysetstate: yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; + yy_state_t *yyss1 = yyss; union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE +# undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } @@ -26803,16 +27284,16 @@ yysetstate: yyvsp = yyvs + yysize - 1; yylsp = yyls + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long) yystacksize)); + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END if (yyss + yystacksize - 1 <= yyssp) YYABORT; } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - if (yystate == YYFINAL) YYACCEPT; @@ -26833,18 +27314,30 @@ yybackup: /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token: ")); + YYDPRINTF ((stderr, "Reading a token\n")); yychar = yylex (&yylval, &yylloc, yyscanner); } if (yychar <= YYEOF) { - yychar = yytoken = YYEOF; + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + yyerror_range[1] = yylloc; + goto yyerrlab1; + } else { yytoken = YYTRANSLATE (yychar); @@ -26872,15 +27365,14 @@ yybackup: /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END *++yylsp = yylloc; + + /* Discard the shifted token. */ + yychar = YYEMPTY; goto yynewstate; @@ -26917,67 +27409,67 @@ yyreduce: YY_REDUCE_PRINT (yyn); switch (yyn) { - case 2: -#line 828 "gram.y" /* yacc.c:1652 */ - { + case 2: /* parse_toplevel: stmtmulti */ +#line 828 "gram.y" + { pg_yyget_extra(yyscanner)->parsetree = (yyvsp[0].list); } -#line 26926 "gram.c" /* yacc.c:1652 */ +#line 27418 "gram.c" break; - case 3: -#line 832 "gram.y" /* yacc.c:1652 */ - { + case 3: /* parse_toplevel: MODE_TYPE_NAME Typename */ +#line 832 "gram.y" + { pg_yyget_extra(yyscanner)->parsetree = list_make1((yyvsp[0].typnam)); } -#line 26934 "gram.c" /* yacc.c:1652 */ +#line 27426 "gram.c" break; - case 4: -#line 836 "gram.y" /* yacc.c:1652 */ - { + case 4: /* parse_toplevel: MODE_PLPGSQL_EXPR PLpgSQL_Expr */ +#line 836 "gram.y" + { pg_yyget_extra(yyscanner)->parsetree = list_make1(makeRawStmt((yyvsp[0].node), 0)); } -#line 26943 "gram.c" /* yacc.c:1652 */ +#line 27435 "gram.c" break; - case 5: -#line 841 "gram.y" /* yacc.c:1652 */ - { + case 5: /* parse_toplevel: MODE_PLPGSQL_ASSIGN1 PLAssignStmt */ +#line 841 "gram.y" + { PLAssignStmt *n = (PLAssignStmt *) (yyvsp[0].node); n->nnames = 1; pg_yyget_extra(yyscanner)->parsetree = list_make1(makeRawStmt((Node *) n, 0)); } -#line 26954 "gram.c" /* yacc.c:1652 */ +#line 27446 "gram.c" break; - case 6: -#line 848 "gram.y" /* yacc.c:1652 */ - { + case 6: /* parse_toplevel: MODE_PLPGSQL_ASSIGN2 PLAssignStmt */ +#line 848 "gram.y" + { PLAssignStmt *n = (PLAssignStmt *) (yyvsp[0].node); n->nnames = 2; pg_yyget_extra(yyscanner)->parsetree = list_make1(makeRawStmt((Node *) n, 0)); } -#line 26965 "gram.c" /* yacc.c:1652 */ +#line 27457 "gram.c" break; - case 7: -#line 855 "gram.y" /* yacc.c:1652 */ - { + case 7: /* parse_toplevel: MODE_PLPGSQL_ASSIGN3 PLAssignStmt */ +#line 855 "gram.y" + { PLAssignStmt *n = (PLAssignStmt *) (yyvsp[0].node); n->nnames = 3; pg_yyget_extra(yyscanner)->parsetree = list_make1(makeRawStmt((Node *) n, 0)); } -#line 26976 "gram.c" /* yacc.c:1652 */ +#line 27468 "gram.c" break; - case 8: -#line 874 "gram.y" /* yacc.c:1652 */ - { + case 8: /* stmtmulti: stmtmulti ';' toplevel_stmt */ +#line 874 "gram.y" + { if ((yyvsp[-2].list) != NIL) { /* update length of previous stmt */ @@ -26988,92 +27480,92 @@ yyreduce: else (yyval.list) = (yyvsp[-2].list); } -#line 26992 "gram.c" /* yacc.c:1652 */ +#line 27484 "gram.c" break; - case 9: -#line 886 "gram.y" /* yacc.c:1652 */ - { + case 9: /* stmtmulti: toplevel_stmt */ +#line 886 "gram.y" + { if ((yyvsp[0].node) != NULL) (yyval.list) = list_make1(makeRawStmt((yyvsp[0].node), 0)); else (yyval.list) = NIL; } -#line 27003 "gram.c" /* yacc.c:1652 */ +#line 27495 "gram.c" break; - case 135: -#line 1028 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 27009 "gram.c" /* yacc.c:1652 */ + case 135: /* stmt: %empty */ +#line 1028 "gram.y" + { (yyval.node) = NULL; } +#line 27501 "gram.c" break; - case 136: -#line 1038 "gram.y" /* yacc.c:1652 */ - { + case 136: /* CallStmt: CALL func_application */ +#line 1038 "gram.y" + { CallStmt *n = makeNode(CallStmt); n->funccall = castNode(FuncCall, (yyvsp[0].node)); (yyval.node) = (Node *)n; } -#line 27019 "gram.c" /* yacc.c:1652 */ +#line 27511 "gram.c" break; - case 137: -#line 1053 "gram.y" /* yacc.c:1652 */ - { + case 137: /* CreateRoleStmt: CREATE ROLE RoleId opt_with OptRoleList */ +#line 1053 "gram.y" + { CreateRoleStmt *n = makeNode(CreateRoleStmt); n->stmt_type = ROLESTMT_ROLE; n->role = (yyvsp[-2].str); n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 27031 "gram.c" /* yacc.c:1652 */ +#line 27523 "gram.c" break; - case 141: -#line 1074 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 27037 "gram.c" /* yacc.c:1652 */ + case 141: /* OptRoleList: OptRoleList CreateOptRoleElem */ +#line 1074 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 27529 "gram.c" break; - case 142: -#line 1075 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 27043 "gram.c" /* yacc.c:1652 */ + case 142: /* OptRoleList: %empty */ +#line 1075 "gram.y" + { (yyval.list) = NIL; } +#line 27535 "gram.c" break; - case 143: -#line 1079 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 27049 "gram.c" /* yacc.c:1652 */ + case 143: /* AlterOptRoleList: AlterOptRoleList AlterOptRoleElem */ +#line 1079 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 27541 "gram.c" break; - case 144: -#line 1080 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 27055 "gram.c" /* yacc.c:1652 */ + case 144: /* AlterOptRoleList: %empty */ +#line 1080 "gram.y" + { (yyval.list) = NIL; } +#line 27547 "gram.c" break; - case 145: -#line 1085 "gram.y" /* yacc.c:1652 */ - { + case 145: /* AlterOptRoleElem: PASSWORD Sconst */ +#line 1085 "gram.y" + { (yyval.defelt) = makeDefElem("password", (Node *)makeString((yyvsp[0].str)), (yylsp[-1])); } -#line 27064 "gram.c" /* yacc.c:1652 */ +#line 27556 "gram.c" break; - case 146: -#line 1090 "gram.y" /* yacc.c:1652 */ - { + case 146: /* AlterOptRoleElem: PASSWORD NULL_P */ +#line 1090 "gram.y" + { (yyval.defelt) = makeDefElem("password", NULL, (yylsp[-1])); } -#line 27072 "gram.c" /* yacc.c:1652 */ +#line 27564 "gram.c" break; - case 147: -#line 1094 "gram.y" /* yacc.c:1652 */ - { + case 147: /* AlterOptRoleElem: ENCRYPTED PASSWORD Sconst */ +#line 1094 "gram.y" + { /* * These days, passwords are always stored in encrypted * form, so there is no difference between PASSWORD and @@ -27082,56 +27574,56 @@ yyreduce: (yyval.defelt) = makeDefElem("password", (Node *)makeString((yyvsp[0].str)), (yylsp[-2])); } -#line 27086 "gram.c" /* yacc.c:1652 */ +#line 27578 "gram.c" break; - case 148: -#line 1104 "gram.y" /* yacc.c:1652 */ - { + case 148: /* AlterOptRoleElem: UNENCRYPTED PASSWORD Sconst */ +#line 1104 "gram.y" + { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("UNENCRYPTED PASSWORD is no longer supported"), errhint("Remove UNENCRYPTED to store the password in encrypted form instead."), parser_errposition((yylsp[-2])))); } -#line 27098 "gram.c" /* yacc.c:1652 */ +#line 27590 "gram.c" break; - case 149: -#line 1112 "gram.y" /* yacc.c:1652 */ - { + case 149: /* AlterOptRoleElem: INHERIT */ +#line 1112 "gram.y" + { (yyval.defelt) = makeDefElem("inherit", (Node *)makeInteger(true), (yylsp[0])); } -#line 27106 "gram.c" /* yacc.c:1652 */ +#line 27598 "gram.c" break; - case 150: -#line 1116 "gram.y" /* yacc.c:1652 */ - { + case 150: /* AlterOptRoleElem: CONNECTION LIMIT SignedIconst */ +#line 1116 "gram.y" + { (yyval.defelt) = makeDefElem("connectionlimit", (Node *)makeInteger((yyvsp[0].ival)), (yylsp[-2])); } -#line 27114 "gram.c" /* yacc.c:1652 */ +#line 27606 "gram.c" break; - case 151: -#line 1120 "gram.y" /* yacc.c:1652 */ - { + case 151: /* AlterOptRoleElem: VALID UNTIL Sconst */ +#line 1120 "gram.y" + { (yyval.defelt) = makeDefElem("validUntil", (Node *)makeString((yyvsp[0].str)), (yylsp[-2])); } -#line 27122 "gram.c" /* yacc.c:1652 */ +#line 27614 "gram.c" break; - case 152: -#line 1125 "gram.y" /* yacc.c:1652 */ - { + case 152: /* AlterOptRoleElem: USER role_list */ +#line 1125 "gram.y" + { (yyval.defelt) = makeDefElem("rolemembers", (Node *)(yyvsp[0].list), (yylsp[-1])); } -#line 27130 "gram.c" /* yacc.c:1652 */ +#line 27622 "gram.c" break; - case 153: -#line 1129 "gram.y" /* yacc.c:1652 */ - { + case 153: /* AlterOptRoleElem: IDENT */ +#line 1129 "gram.y" + { /* * We handle identifiers that aren't parser keywords with * the following special-case codes, to avoid bloating the @@ -27175,232 +27667,232 @@ yyreduce: errmsg("unrecognized role option \"%s\"", (yyvsp[0].str)), parser_errposition((yylsp[0])))); } -#line 27179 "gram.c" /* yacc.c:1652 */ +#line 27671 "gram.c" break; - case 154: -#line 1176 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = (yyvsp[0].defelt); } -#line 27185 "gram.c" /* yacc.c:1652 */ + case 154: /* CreateOptRoleElem: AlterOptRoleElem */ +#line 1176 "gram.y" + { (yyval.defelt) = (yyvsp[0].defelt); } +#line 27677 "gram.c" break; - case 155: -#line 1179 "gram.y" /* yacc.c:1652 */ - { + case 155: /* CreateOptRoleElem: SYSID Iconst */ +#line 1179 "gram.y" + { (yyval.defelt) = makeDefElem("sysid", (Node *)makeInteger((yyvsp[0].ival)), (yylsp[-1])); } -#line 27193 "gram.c" /* yacc.c:1652 */ +#line 27685 "gram.c" break; - case 156: -#line 1183 "gram.y" /* yacc.c:1652 */ - { + case 156: /* CreateOptRoleElem: ADMIN role_list */ +#line 1183 "gram.y" + { (yyval.defelt) = makeDefElem("adminmembers", (Node *)(yyvsp[0].list), (yylsp[-1])); } -#line 27201 "gram.c" /* yacc.c:1652 */ +#line 27693 "gram.c" break; - case 157: -#line 1187 "gram.y" /* yacc.c:1652 */ - { + case 157: /* CreateOptRoleElem: ROLE role_list */ +#line 1187 "gram.y" + { (yyval.defelt) = makeDefElem("rolemembers", (Node *)(yyvsp[0].list), (yylsp[-1])); } -#line 27209 "gram.c" /* yacc.c:1652 */ +#line 27701 "gram.c" break; - case 158: -#line 1191 "gram.y" /* yacc.c:1652 */ - { + case 158: /* CreateOptRoleElem: IN_P ROLE role_list */ +#line 1191 "gram.y" + { (yyval.defelt) = makeDefElem("addroleto", (Node *)(yyvsp[0].list), (yylsp[-2])); } -#line 27217 "gram.c" /* yacc.c:1652 */ +#line 27709 "gram.c" break; - case 159: -#line 1195 "gram.y" /* yacc.c:1652 */ - { + case 159: /* CreateOptRoleElem: IN_P GROUP_P role_list */ +#line 1195 "gram.y" + { (yyval.defelt) = makeDefElem("addroleto", (Node *)(yyvsp[0].list), (yylsp[-2])); } -#line 27225 "gram.c" /* yacc.c:1652 */ +#line 27717 "gram.c" break; - case 160: -#line 1209 "gram.y" /* yacc.c:1652 */ - { + case 160: /* CreateUserStmt: CREATE USER RoleId opt_with OptRoleList */ +#line 1209 "gram.y" + { CreateRoleStmt *n = makeNode(CreateRoleStmt); n->stmt_type = ROLESTMT_USER; n->role = (yyvsp[-2].str); n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 27237 "gram.c" /* yacc.c:1652 */ +#line 27729 "gram.c" break; - case 161: -#line 1227 "gram.y" /* yacc.c:1652 */ - { + case 161: /* AlterRoleStmt: ALTER ROLE RoleSpec opt_with AlterOptRoleList */ +#line 1227 "gram.y" + { AlterRoleStmt *n = makeNode(AlterRoleStmt); n->role = (yyvsp[-2].rolespec); n->action = +1; /* add, if there are members */ n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 27249 "gram.c" /* yacc.c:1652 */ +#line 27741 "gram.c" break; - case 162: -#line 1235 "gram.y" /* yacc.c:1652 */ - { + case 162: /* AlterRoleStmt: ALTER USER RoleSpec opt_with AlterOptRoleList */ +#line 1235 "gram.y" + { AlterRoleStmt *n = makeNode(AlterRoleStmt); n->role = (yyvsp[-2].rolespec); n->action = +1; /* add, if there are members */ n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 27261 "gram.c" /* yacc.c:1652 */ +#line 27753 "gram.c" break; - case 163: -#line 1245 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 27267 "gram.c" /* yacc.c:1652 */ + case 163: /* opt_in_database: %empty */ +#line 1245 "gram.y" + { (yyval.str) = NULL; } +#line 27759 "gram.c" break; - case 164: -#line 1246 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 27273 "gram.c" /* yacc.c:1652 */ + case 164: /* opt_in_database: IN_P DATABASE name */ +#line 1246 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 27765 "gram.c" break; - case 165: -#line 1251 "gram.y" /* yacc.c:1652 */ - { + case 165: /* AlterRoleSetStmt: ALTER ROLE RoleSpec opt_in_database SetResetClause */ +#line 1251 "gram.y" + { AlterRoleSetStmt *n = makeNode(AlterRoleSetStmt); n->role = (yyvsp[-2].rolespec); n->database = (yyvsp[-1].str); n->setstmt = (yyvsp[0].vsetstmt); (yyval.node) = (Node *)n; } -#line 27285 "gram.c" /* yacc.c:1652 */ +#line 27777 "gram.c" break; - case 166: -#line 1259 "gram.y" /* yacc.c:1652 */ - { + case 166: /* AlterRoleSetStmt: ALTER ROLE ALL opt_in_database SetResetClause */ +#line 1259 "gram.y" + { AlterRoleSetStmt *n = makeNode(AlterRoleSetStmt); n->role = NULL; n->database = (yyvsp[-1].str); n->setstmt = (yyvsp[0].vsetstmt); (yyval.node) = (Node *)n; } -#line 27297 "gram.c" /* yacc.c:1652 */ +#line 27789 "gram.c" break; - case 167: -#line 1267 "gram.y" /* yacc.c:1652 */ - { + case 167: /* AlterRoleSetStmt: ALTER USER RoleSpec opt_in_database SetResetClause */ +#line 1267 "gram.y" + { AlterRoleSetStmt *n = makeNode(AlterRoleSetStmt); n->role = (yyvsp[-2].rolespec); n->database = (yyvsp[-1].str); n->setstmt = (yyvsp[0].vsetstmt); (yyval.node) = (Node *)n; } -#line 27309 "gram.c" /* yacc.c:1652 */ +#line 27801 "gram.c" break; - case 168: -#line 1275 "gram.y" /* yacc.c:1652 */ - { + case 168: /* AlterRoleSetStmt: ALTER USER ALL opt_in_database SetResetClause */ +#line 1275 "gram.y" + { AlterRoleSetStmt *n = makeNode(AlterRoleSetStmt); n->role = NULL; n->database = (yyvsp[-1].str); n->setstmt = (yyvsp[0].vsetstmt); (yyval.node) = (Node *)n; } -#line 27321 "gram.c" /* yacc.c:1652 */ +#line 27813 "gram.c" break; - case 169: -#line 1296 "gram.y" /* yacc.c:1652 */ - { + case 169: /* DropRoleStmt: DROP ROLE role_list */ +#line 1296 "gram.y" + { DropRoleStmt *n = makeNode(DropRoleStmt); n->missing_ok = false; n->roles = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 27332 "gram.c" /* yacc.c:1652 */ +#line 27824 "gram.c" break; - case 170: -#line 1303 "gram.y" /* yacc.c:1652 */ - { + case 170: /* DropRoleStmt: DROP ROLE IF_P EXISTS role_list */ +#line 1303 "gram.y" + { DropRoleStmt *n = makeNode(DropRoleStmt); n->missing_ok = true; n->roles = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 27343 "gram.c" /* yacc.c:1652 */ +#line 27835 "gram.c" break; - case 171: -#line 1310 "gram.y" /* yacc.c:1652 */ - { + case 171: /* DropRoleStmt: DROP USER role_list */ +#line 1310 "gram.y" + { DropRoleStmt *n = makeNode(DropRoleStmt); n->missing_ok = false; n->roles = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 27354 "gram.c" /* yacc.c:1652 */ +#line 27846 "gram.c" break; - case 172: -#line 1317 "gram.y" /* yacc.c:1652 */ - { + case 172: /* DropRoleStmt: DROP USER IF_P EXISTS role_list */ +#line 1317 "gram.y" + { DropRoleStmt *n = makeNode(DropRoleStmt); n->roles = (yyvsp[0].list); n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 27365 "gram.c" /* yacc.c:1652 */ +#line 27857 "gram.c" break; - case 173: -#line 1324 "gram.y" /* yacc.c:1652 */ - { + case 173: /* DropRoleStmt: DROP GROUP_P role_list */ +#line 1324 "gram.y" + { DropRoleStmt *n = makeNode(DropRoleStmt); n->missing_ok = false; n->roles = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 27376 "gram.c" /* yacc.c:1652 */ +#line 27868 "gram.c" break; - case 174: -#line 1331 "gram.y" /* yacc.c:1652 */ - { + case 174: /* DropRoleStmt: DROP GROUP_P IF_P EXISTS role_list */ +#line 1331 "gram.y" + { DropRoleStmt *n = makeNode(DropRoleStmt); n->missing_ok = true; n->roles = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 27387 "gram.c" /* yacc.c:1652 */ +#line 27879 "gram.c" break; - case 175: -#line 1348 "gram.y" /* yacc.c:1652 */ - { + case 175: /* CreateGroupStmt: CREATE GROUP_P RoleId opt_with OptRoleList */ +#line 1348 "gram.y" + { CreateRoleStmt *n = makeNode(CreateRoleStmt); n->stmt_type = ROLESTMT_GROUP; n->role = (yyvsp[-2].str); n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 27399 "gram.c" /* yacc.c:1652 */ +#line 27891 "gram.c" break; - case 176: -#line 1366 "gram.y" /* yacc.c:1652 */ - { + case 176: /* AlterGroupStmt: ALTER GROUP_P RoleSpec add_drop USER role_list */ +#line 1366 "gram.y" + { AlterRoleStmt *n = makeNode(AlterRoleStmt); n->role = (yyvsp[-3].rolespec); n->action = (yyvsp[-2].ival); @@ -27408,24 +27900,24 @@ yyreduce: (Node *)(yyvsp[0].list), (yylsp[0]))); (yyval.node) = (Node *)n; } -#line 27412 "gram.c" /* yacc.c:1652 */ +#line 27904 "gram.c" break; - case 177: -#line 1376 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = +1; } -#line 27418 "gram.c" /* yacc.c:1652 */ + case 177: /* add_drop: ADD_P */ +#line 1376 "gram.y" + { (yyval.ival) = +1; } +#line 27910 "gram.c" break; - case 178: -#line 1377 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = -1; } -#line 27424 "gram.c" /* yacc.c:1652 */ + case 178: /* add_drop: DROP */ +#line 1377 "gram.y" + { (yyval.ival) = -1; } +#line 27916 "gram.c" break; - case 179: -#line 1389 "gram.y" /* yacc.c:1652 */ - { + case 179: /* CreateSchemaStmt: CREATE SCHEMA OptSchemaName AUTHORIZATION RoleSpec OptSchemaEltList */ +#line 1389 "gram.y" + { CreateSchemaStmt *n = makeNode(CreateSchemaStmt); /* One can omit the schema name or the authorization id. */ n->schemaname = (yyvsp[-3].str); @@ -27434,12 +27926,12 @@ yyreduce: n->if_not_exists = false; (yyval.node) = (Node *)n; } -#line 27438 "gram.c" /* yacc.c:1652 */ +#line 27930 "gram.c" break; - case 180: -#line 1399 "gram.y" /* yacc.c:1652 */ - { + case 180: /* CreateSchemaStmt: CREATE SCHEMA ColId OptSchemaEltList */ +#line 1399 "gram.y" + { CreateSchemaStmt *n = makeNode(CreateSchemaStmt); /* ...but not both */ n->schemaname = (yyvsp[-1].str); @@ -27448,12 +27940,12 @@ yyreduce: n->if_not_exists = false; (yyval.node) = (Node *)n; } -#line 27452 "gram.c" /* yacc.c:1652 */ +#line 27944 "gram.c" break; - case 181: -#line 1409 "gram.y" /* yacc.c:1652 */ - { + case 181: /* CreateSchemaStmt: CREATE SCHEMA IF_P NOT EXISTS OptSchemaName AUTHORIZATION RoleSpec OptSchemaEltList */ +#line 1409 "gram.y" + { CreateSchemaStmt *n = makeNode(CreateSchemaStmt); /* schema name can be omitted here, too */ n->schemaname = (yyvsp[-3].str); @@ -27467,12 +27959,12 @@ yyreduce: n->if_not_exists = true; (yyval.node) = (Node *)n; } -#line 27471 "gram.c" /* yacc.c:1652 */ +#line 27963 "gram.c" break; - case 182: -#line 1424 "gram.y" /* yacc.c:1652 */ - { + case 182: /* CreateSchemaStmt: CREATE SCHEMA IF_P NOT EXISTS ColId OptSchemaEltList */ +#line 1424 "gram.y" + { CreateSchemaStmt *n = makeNode(CreateSchemaStmt); /* ...but not here */ n->schemaname = (yyvsp[-1].str); @@ -27486,157 +27978,157 @@ yyreduce: n->if_not_exists = true; (yyval.node) = (Node *)n; } -#line 27490 "gram.c" /* yacc.c:1652 */ +#line 27982 "gram.c" break; - case 183: -#line 1441 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 27496 "gram.c" /* yacc.c:1652 */ + case 183: /* OptSchemaName: ColId */ +#line 1441 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 27988 "gram.c" break; - case 184: -#line 1442 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 27502 "gram.c" /* yacc.c:1652 */ + case 184: /* OptSchemaName: %empty */ +#line 1442 "gram.y" + { (yyval.str) = NULL; } +#line 27994 "gram.c" break; - case 185: -#line 1447 "gram.y" /* yacc.c:1652 */ - { + case 185: /* OptSchemaEltList: OptSchemaEltList schema_stmt */ +#line 1447 "gram.y" + { if ((yyloc) < 0) /* see comments for YYLLOC_DEFAULT */ (yyloc) = (yylsp[0]); (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } -#line 27512 "gram.c" /* yacc.c:1652 */ +#line 28004 "gram.c" break; - case 186: -#line 1453 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 27518 "gram.c" /* yacc.c:1652 */ + case 186: /* OptSchemaEltList: %empty */ +#line 1453 "gram.y" + { (yyval.list) = NIL; } +#line 28010 "gram.c" break; - case 193: -#line 1481 "gram.y" /* yacc.c:1652 */ - { + case 193: /* VariableSetStmt: SET set_rest */ +#line 1481 "gram.y" + { VariableSetStmt *n = (yyvsp[0].vsetstmt); n->is_local = false; (yyval.node) = (Node *) n; } -#line 27528 "gram.c" /* yacc.c:1652 */ +#line 28020 "gram.c" break; - case 194: -#line 1487 "gram.y" /* yacc.c:1652 */ - { + case 194: /* VariableSetStmt: SET LOCAL set_rest */ +#line 1487 "gram.y" + { VariableSetStmt *n = (yyvsp[0].vsetstmt); n->is_local = true; (yyval.node) = (Node *) n; } -#line 27538 "gram.c" /* yacc.c:1652 */ +#line 28030 "gram.c" break; - case 195: -#line 1493 "gram.y" /* yacc.c:1652 */ - { + case 195: /* VariableSetStmt: SET SESSION set_rest */ +#line 1493 "gram.y" + { VariableSetStmt *n = (yyvsp[0].vsetstmt); n->is_local = false; (yyval.node) = (Node *) n; } -#line 27548 "gram.c" /* yacc.c:1652 */ +#line 28040 "gram.c" break; - case 196: -#line 1502 "gram.y" /* yacc.c:1652 */ - { + case 196: /* set_rest: TRANSACTION transaction_mode_list */ +#line 1502 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_MULTI; n->name = "TRANSACTION"; n->args = (yyvsp[0].list); (yyval.vsetstmt) = n; } -#line 27560 "gram.c" /* yacc.c:1652 */ +#line 28052 "gram.c" break; - case 197: -#line 1510 "gram.y" /* yacc.c:1652 */ - { + case 197: /* set_rest: SESSION CHARACTERISTICS AS TRANSACTION transaction_mode_list */ +#line 1510 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_MULTI; n->name = "SESSION CHARACTERISTICS"; n->args = (yyvsp[0].list); (yyval.vsetstmt) = n; } -#line 27572 "gram.c" /* yacc.c:1652 */ +#line 28064 "gram.c" break; - case 199: -#line 1522 "gram.y" /* yacc.c:1652 */ - { + case 199: /* generic_set: var_name TO var_list */ +#line 1522 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_VALUE; n->name = (yyvsp[-2].str); n->args = (yyvsp[0].list); (yyval.vsetstmt) = n; } -#line 27584 "gram.c" /* yacc.c:1652 */ +#line 28076 "gram.c" break; - case 200: -#line 1530 "gram.y" /* yacc.c:1652 */ - { + case 200: /* generic_set: var_name '=' var_list */ +#line 1530 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_VALUE; n->name = (yyvsp[-2].str); n->args = (yyvsp[0].list); (yyval.vsetstmt) = n; } -#line 27596 "gram.c" /* yacc.c:1652 */ +#line 28088 "gram.c" break; - case 201: -#line 1538 "gram.y" /* yacc.c:1652 */ - { + case 201: /* generic_set: var_name TO DEFAULT */ +#line 1538 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_DEFAULT; n->name = (yyvsp[-2].str); (yyval.vsetstmt) = n; } -#line 27607 "gram.c" /* yacc.c:1652 */ +#line 28099 "gram.c" break; - case 202: -#line 1545 "gram.y" /* yacc.c:1652 */ - { + case 202: /* generic_set: var_name '=' DEFAULT */ +#line 1545 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_DEFAULT; n->name = (yyvsp[-2].str); (yyval.vsetstmt) = n; } -#line 27618 "gram.c" /* yacc.c:1652 */ +#line 28110 "gram.c" break; - case 203: -#line 1554 "gram.y" /* yacc.c:1652 */ - {(yyval.vsetstmt) = (yyvsp[0].vsetstmt);} -#line 27624 "gram.c" /* yacc.c:1652 */ + case 203: /* set_rest_more: generic_set */ +#line 1554 "gram.y" + {(yyval.vsetstmt) = (yyvsp[0].vsetstmt);} +#line 28116 "gram.c" break; - case 204: -#line 1556 "gram.y" /* yacc.c:1652 */ - { + case 204: /* set_rest_more: var_name FROM CURRENT_P */ +#line 1556 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_CURRENT; n->name = (yyvsp[-2].str); (yyval.vsetstmt) = n; } -#line 27635 "gram.c" /* yacc.c:1652 */ +#line 28127 "gram.c" break; - case 205: -#line 1564 "gram.y" /* yacc.c:1652 */ - { + case 205: /* set_rest_more: TIME ZONE zone_value */ +#line 1564 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_VALUE; n->name = "timezone"; @@ -27646,36 +28138,36 @@ yyreduce: n->kind = VAR_SET_DEFAULT; (yyval.vsetstmt) = n; } -#line 27650 "gram.c" /* yacc.c:1652 */ +#line 28142 "gram.c" break; - case 206: -#line 1575 "gram.y" /* yacc.c:1652 */ - { + case 206: /* set_rest_more: CATALOG_P Sconst */ +#line 1575 "gram.y" + { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("current database cannot be changed"), parser_errposition((yylsp[0])))); (yyval.vsetstmt) = NULL; /*not reached*/ } -#line 27662 "gram.c" /* yacc.c:1652 */ +#line 28154 "gram.c" break; - case 207: -#line 1583 "gram.y" /* yacc.c:1652 */ - { + case 207: /* set_rest_more: SCHEMA Sconst */ +#line 1583 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_VALUE; n->name = "search_path"; n->args = list_make1(makeStringConst((yyvsp[0].str), (yylsp[0]))); (yyval.vsetstmt) = n; } -#line 27674 "gram.c" /* yacc.c:1652 */ +#line 28166 "gram.c" break; - case 208: -#line 1591 "gram.y" /* yacc.c:1652 */ - { + case 208: /* set_rest_more: NAMES opt_encoding */ +#line 1591 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_VALUE; n->name = "client_encoding"; @@ -27685,171 +28177,171 @@ yyreduce: n->kind = VAR_SET_DEFAULT; (yyval.vsetstmt) = n; } -#line 27689 "gram.c" /* yacc.c:1652 */ +#line 28181 "gram.c" break; - case 209: -#line 1602 "gram.y" /* yacc.c:1652 */ - { + case 209: /* set_rest_more: ROLE NonReservedWord_or_Sconst */ +#line 1602 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_VALUE; n->name = "role"; n->args = list_make1(makeStringConst((yyvsp[0].str), (yylsp[0]))); (yyval.vsetstmt) = n; } -#line 27701 "gram.c" /* yacc.c:1652 */ +#line 28193 "gram.c" break; - case 210: -#line 1610 "gram.y" /* yacc.c:1652 */ - { + case 210: /* set_rest_more: SESSION AUTHORIZATION NonReservedWord_or_Sconst */ +#line 1610 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_VALUE; n->name = "session_authorization"; n->args = list_make1(makeStringConst((yyvsp[0].str), (yylsp[0]))); (yyval.vsetstmt) = n; } -#line 27713 "gram.c" /* yacc.c:1652 */ +#line 28205 "gram.c" break; - case 211: -#line 1618 "gram.y" /* yacc.c:1652 */ - { + case 211: /* set_rest_more: SESSION AUTHORIZATION DEFAULT */ +#line 1618 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_DEFAULT; n->name = "session_authorization"; (yyval.vsetstmt) = n; } -#line 27724 "gram.c" /* yacc.c:1652 */ +#line 28216 "gram.c" break; - case 212: -#line 1625 "gram.y" /* yacc.c:1652 */ - { + case 212: /* set_rest_more: XML_P OPTION document_or_content */ +#line 1625 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_VALUE; n->name = "xmloption"; n->args = list_make1(makeStringConst((yyvsp[0].ival) == XMLOPTION_DOCUMENT ? "DOCUMENT" : "CONTENT", (yylsp[0]))); (yyval.vsetstmt) = n; } -#line 27736 "gram.c" /* yacc.c:1652 */ +#line 28228 "gram.c" break; - case 213: -#line 1634 "gram.y" /* yacc.c:1652 */ - { + case 213: /* set_rest_more: TRANSACTION SNAPSHOT Sconst */ +#line 1634 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_SET_MULTI; n->name = "TRANSACTION SNAPSHOT"; n->args = list_make1(makeStringConst((yyvsp[0].str), (yylsp[0]))); (yyval.vsetstmt) = n; } -#line 27748 "gram.c" /* yacc.c:1652 */ +#line 28240 "gram.c" break; - case 214: -#line 1643 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 27754 "gram.c" /* yacc.c:1652 */ + case 214: /* var_name: ColId */ +#line 1643 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 28246 "gram.c" break; - case 215: -#line 1645 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = psprintf("%s.%s", (yyvsp[-2].str), (yyvsp[0].str)); } -#line 27760 "gram.c" /* yacc.c:1652 */ + case 215: /* var_name: var_name '.' ColId */ +#line 1645 "gram.y" + { (yyval.str) = psprintf("%s.%s", (yyvsp[-2].str), (yyvsp[0].str)); } +#line 28252 "gram.c" break; - case 216: -#line 1648 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 27766 "gram.c" /* yacc.c:1652 */ + case 216: /* var_list: var_value */ +#line 1648 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 28258 "gram.c" break; - case 217: -#line 1649 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 27772 "gram.c" /* yacc.c:1652 */ + case 217: /* var_list: var_list ',' var_value */ +#line 1649 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } +#line 28264 "gram.c" break; - case 218: -#line 1653 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeStringConst((yyvsp[0].str), (yylsp[0])); } -#line 27778 "gram.c" /* yacc.c:1652 */ + case 218: /* var_value: opt_boolean_or_string */ +#line 1653 "gram.y" + { (yyval.node) = makeStringConst((yyvsp[0].str), (yylsp[0])); } +#line 28270 "gram.c" break; - case 219: -#line 1655 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeAConst((yyvsp[0].value), (yylsp[0])); } -#line 27784 "gram.c" /* yacc.c:1652 */ + case 219: /* var_value: NumericOnly */ +#line 1655 "gram.y" + { (yyval.node) = makeAConst((yyvsp[0].value), (yylsp[0])); } +#line 28276 "gram.c" break; - case 220: -#line 1658 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "read uncommitted"; } -#line 27790 "gram.c" /* yacc.c:1652 */ + case 220: /* iso_level: READ UNCOMMITTED */ +#line 1658 "gram.y" + { (yyval.str) = "read uncommitted"; } +#line 28282 "gram.c" break; - case 221: -#line 1659 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "read committed"; } -#line 27796 "gram.c" /* yacc.c:1652 */ + case 221: /* iso_level: READ COMMITTED */ +#line 1659 "gram.y" + { (yyval.str) = "read committed"; } +#line 28288 "gram.c" break; - case 222: -#line 1660 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "repeatable read"; } -#line 27802 "gram.c" /* yacc.c:1652 */ + case 222: /* iso_level: REPEATABLE READ */ +#line 1660 "gram.y" + { (yyval.str) = "repeatable read"; } +#line 28294 "gram.c" break; - case 223: -#line 1661 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "serializable"; } -#line 27808 "gram.c" /* yacc.c:1652 */ + case 223: /* iso_level: SERIALIZABLE */ +#line 1661 "gram.y" + { (yyval.str) = "serializable"; } +#line 28300 "gram.c" break; - case 224: -#line 1665 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "true"; } -#line 27814 "gram.c" /* yacc.c:1652 */ + case 224: /* opt_boolean_or_string: TRUE_P */ +#line 1665 "gram.y" + { (yyval.str) = "true"; } +#line 28306 "gram.c" break; - case 225: -#line 1666 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "false"; } -#line 27820 "gram.c" /* yacc.c:1652 */ + case 225: /* opt_boolean_or_string: FALSE_P */ +#line 1666 "gram.y" + { (yyval.str) = "false"; } +#line 28312 "gram.c" break; - case 226: -#line 1667 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "on"; } -#line 27826 "gram.c" /* yacc.c:1652 */ + case 226: /* opt_boolean_or_string: ON */ +#line 1667 "gram.y" + { (yyval.str) = "on"; } +#line 28318 "gram.c" break; - case 227: -#line 1673 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 27832 "gram.c" /* yacc.c:1652 */ + case 227: /* opt_boolean_or_string: NonReservedWord_or_Sconst */ +#line 1673 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 28324 "gram.c" break; - case 228: -#line 1686 "gram.y" /* yacc.c:1652 */ - { + case 228: /* zone_value: Sconst */ +#line 1686 "gram.y" + { (yyval.node) = makeStringConst((yyvsp[0].str), (yylsp[0])); } -#line 27840 "gram.c" /* yacc.c:1652 */ +#line 28332 "gram.c" break; - case 229: -#line 1690 "gram.y" /* yacc.c:1652 */ - { + case 229: /* zone_value: IDENT */ +#line 1690 "gram.y" + { (yyval.node) = makeStringConst((yyvsp[0].str), (yylsp[0])); } -#line 27848 "gram.c" /* yacc.c:1652 */ +#line 28340 "gram.c" break; - case 230: -#line 1694 "gram.y" /* yacc.c:1652 */ - { + case 230: /* zone_value: ConstInterval Sconst opt_interval */ +#line 1694 "gram.y" + { TypeName *t = (yyvsp[-2].typnam); if ((yyvsp[0].list) != NIL) { @@ -27863,305 +28355,305 @@ yyreduce: t->typmods = (yyvsp[0].list); (yyval.node) = makeStringConstCast((yyvsp[-1].str), (yylsp[-1]), t); } -#line 27867 "gram.c" /* yacc.c:1652 */ +#line 28359 "gram.c" break; - case 231: -#line 1709 "gram.y" /* yacc.c:1652 */ - { + case 231: /* zone_value: ConstInterval '(' Iconst ')' Sconst */ +#line 1709 "gram.y" + { TypeName *t = (yyvsp[-4].typnam); t->typmods = list_make2(makeIntConst(INTERVAL_FULL_RANGE, -1), makeIntConst((yyvsp[-2].ival), (yylsp[-2]))); (yyval.node) = makeStringConstCast((yyvsp[0].str), (yylsp[0]), t); } -#line 27878 "gram.c" /* yacc.c:1652 */ +#line 28370 "gram.c" break; - case 232: -#line 1715 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeAConst((yyvsp[0].value), (yylsp[0])); } -#line 27884 "gram.c" /* yacc.c:1652 */ + case 232: /* zone_value: NumericOnly */ +#line 1715 "gram.y" + { (yyval.node) = makeAConst((yyvsp[0].value), (yylsp[0])); } +#line 28376 "gram.c" break; - case 233: -#line 1716 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 27890 "gram.c" /* yacc.c:1652 */ + case 233: /* zone_value: DEFAULT */ +#line 1716 "gram.y" + { (yyval.node) = NULL; } +#line 28382 "gram.c" break; - case 234: -#line 1717 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 27896 "gram.c" /* yacc.c:1652 */ + case 234: /* zone_value: LOCAL */ +#line 1717 "gram.y" + { (yyval.node) = NULL; } +#line 28388 "gram.c" break; - case 235: -#line 1721 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 27902 "gram.c" /* yacc.c:1652 */ + case 235: /* opt_encoding: Sconst */ +#line 1721 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 28394 "gram.c" break; - case 236: -#line 1722 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 27908 "gram.c" /* yacc.c:1652 */ + case 236: /* opt_encoding: DEFAULT */ +#line 1722 "gram.y" + { (yyval.str) = NULL; } +#line 28400 "gram.c" break; - case 237: -#line 1723 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 27914 "gram.c" /* yacc.c:1652 */ + case 237: /* opt_encoding: %empty */ +#line 1723 "gram.y" + { (yyval.str) = NULL; } +#line 28406 "gram.c" break; - case 238: -#line 1727 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 27920 "gram.c" /* yacc.c:1652 */ + case 238: /* NonReservedWord_or_Sconst: NonReservedWord */ +#line 1727 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 28412 "gram.c" break; - case 239: -#line 1728 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 27926 "gram.c" /* yacc.c:1652 */ + case 239: /* NonReservedWord_or_Sconst: Sconst */ +#line 1728 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 28418 "gram.c" break; - case 240: -#line 1732 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) (yyvsp[0].vsetstmt); } -#line 27932 "gram.c" /* yacc.c:1652 */ + case 240: /* VariableResetStmt: RESET reset_rest */ +#line 1732 "gram.y" + { (yyval.node) = (Node *) (yyvsp[0].vsetstmt); } +#line 28424 "gram.c" break; - case 241: -#line 1736 "gram.y" /* yacc.c:1652 */ - { (yyval.vsetstmt) = (yyvsp[0].vsetstmt); } -#line 27938 "gram.c" /* yacc.c:1652 */ + case 241: /* reset_rest: generic_reset */ +#line 1736 "gram.y" + { (yyval.vsetstmt) = (yyvsp[0].vsetstmt); } +#line 28430 "gram.c" break; - case 242: -#line 1738 "gram.y" /* yacc.c:1652 */ - { + case 242: /* reset_rest: TIME ZONE */ +#line 1738 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_RESET; n->name = "timezone"; (yyval.vsetstmt) = n; } -#line 27949 "gram.c" /* yacc.c:1652 */ +#line 28441 "gram.c" break; - case 243: -#line 1745 "gram.y" /* yacc.c:1652 */ - { + case 243: /* reset_rest: TRANSACTION ISOLATION LEVEL */ +#line 1745 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_RESET; n->name = "transaction_isolation"; (yyval.vsetstmt) = n; } -#line 27960 "gram.c" /* yacc.c:1652 */ +#line 28452 "gram.c" break; - case 244: -#line 1752 "gram.y" /* yacc.c:1652 */ - { + case 244: /* reset_rest: SESSION AUTHORIZATION */ +#line 1752 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_RESET; n->name = "session_authorization"; (yyval.vsetstmt) = n; } -#line 27971 "gram.c" /* yacc.c:1652 */ +#line 28463 "gram.c" break; - case 245: -#line 1762 "gram.y" /* yacc.c:1652 */ - { + case 245: /* generic_reset: var_name */ +#line 1762 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_RESET; n->name = (yyvsp[0].str); (yyval.vsetstmt) = n; } -#line 27982 "gram.c" /* yacc.c:1652 */ +#line 28474 "gram.c" break; - case 246: -#line 1769 "gram.y" /* yacc.c:1652 */ - { + case 246: /* generic_reset: ALL */ +#line 1769 "gram.y" + { VariableSetStmt *n = makeNode(VariableSetStmt); n->kind = VAR_RESET_ALL; (yyval.vsetstmt) = n; } -#line 27992 "gram.c" /* yacc.c:1652 */ +#line 28484 "gram.c" break; - case 247: -#line 1778 "gram.y" /* yacc.c:1652 */ - { (yyval.vsetstmt) = (yyvsp[0].vsetstmt); } -#line 27998 "gram.c" /* yacc.c:1652 */ + case 247: /* SetResetClause: SET set_rest */ +#line 1778 "gram.y" + { (yyval.vsetstmt) = (yyvsp[0].vsetstmt); } +#line 28490 "gram.c" break; - case 248: -#line 1779 "gram.y" /* yacc.c:1652 */ - { (yyval.vsetstmt) = (VariableSetStmt *) (yyvsp[0].node); } -#line 28004 "gram.c" /* yacc.c:1652 */ + case 248: /* SetResetClause: VariableResetStmt */ +#line 1779 "gram.y" + { (yyval.vsetstmt) = (VariableSetStmt *) (yyvsp[0].node); } +#line 28496 "gram.c" break; - case 249: -#line 1784 "gram.y" /* yacc.c:1652 */ - { (yyval.vsetstmt) = (yyvsp[0].vsetstmt); } -#line 28010 "gram.c" /* yacc.c:1652 */ + case 249: /* FunctionSetResetClause: SET set_rest_more */ +#line 1784 "gram.y" + { (yyval.vsetstmt) = (yyvsp[0].vsetstmt); } +#line 28502 "gram.c" break; - case 250: -#line 1785 "gram.y" /* yacc.c:1652 */ - { (yyval.vsetstmt) = (VariableSetStmt *) (yyvsp[0].node); } -#line 28016 "gram.c" /* yacc.c:1652 */ + case 250: /* FunctionSetResetClause: VariableResetStmt */ +#line 1785 "gram.y" + { (yyval.vsetstmt) = (VariableSetStmt *) (yyvsp[0].node); } +#line 28508 "gram.c" break; - case 251: -#line 1791 "gram.y" /* yacc.c:1652 */ - { + case 251: /* VariableShowStmt: SHOW var_name */ +#line 1791 "gram.y" + { VariableShowStmt *n = makeNode(VariableShowStmt); n->name = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 28026 "gram.c" /* yacc.c:1652 */ +#line 28518 "gram.c" break; - case 252: -#line 1797 "gram.y" /* yacc.c:1652 */ - { + case 252: /* VariableShowStmt: SHOW TIME ZONE */ +#line 1797 "gram.y" + { VariableShowStmt *n = makeNode(VariableShowStmt); n->name = "timezone"; (yyval.node) = (Node *) n; } -#line 28036 "gram.c" /* yacc.c:1652 */ +#line 28528 "gram.c" break; - case 253: -#line 1803 "gram.y" /* yacc.c:1652 */ - { + case 253: /* VariableShowStmt: SHOW TRANSACTION ISOLATION LEVEL */ +#line 1803 "gram.y" + { VariableShowStmt *n = makeNode(VariableShowStmt); n->name = "transaction_isolation"; (yyval.node) = (Node *) n; } -#line 28046 "gram.c" /* yacc.c:1652 */ +#line 28538 "gram.c" break; - case 254: -#line 1809 "gram.y" /* yacc.c:1652 */ - { + case 254: /* VariableShowStmt: SHOW SESSION AUTHORIZATION */ +#line 1809 "gram.y" + { VariableShowStmt *n = makeNode(VariableShowStmt); n->name = "session_authorization"; (yyval.node) = (Node *) n; } -#line 28056 "gram.c" /* yacc.c:1652 */ +#line 28548 "gram.c" break; - case 255: -#line 1815 "gram.y" /* yacc.c:1652 */ - { + case 255: /* VariableShowStmt: SHOW ALL */ +#line 1815 "gram.y" + { VariableShowStmt *n = makeNode(VariableShowStmt); n->name = "all"; (yyval.node) = (Node *) n; } -#line 28066 "gram.c" /* yacc.c:1652 */ +#line 28558 "gram.c" break; - case 256: -#line 1825 "gram.y" /* yacc.c:1652 */ - { + case 256: /* ConstraintsSetStmt: SET CONSTRAINTS constraints_set_list constraints_set_mode */ +#line 1825 "gram.y" + { ConstraintsSetStmt *n = makeNode(ConstraintsSetStmt); n->constraints = (yyvsp[-1].list); n->deferred = (yyvsp[0].boolean); (yyval.node) = (Node *) n; } -#line 28077 "gram.c" /* yacc.c:1652 */ +#line 28569 "gram.c" break; - case 257: -#line 1834 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 28083 "gram.c" /* yacc.c:1652 */ + case 257: /* constraints_set_list: ALL */ +#line 1834 "gram.y" + { (yyval.list) = NIL; } +#line 28575 "gram.c" break; - case 258: -#line 1835 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 28089 "gram.c" /* yacc.c:1652 */ + case 258: /* constraints_set_list: qualified_name_list */ +#line 1835 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 28581 "gram.c" break; - case 259: -#line 1839 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 28095 "gram.c" /* yacc.c:1652 */ + case 259: /* constraints_set_mode: DEFERRED */ +#line 1839 "gram.y" + { (yyval.boolean) = true; } +#line 28587 "gram.c" break; - case 260: -#line 1840 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 28101 "gram.c" /* yacc.c:1652 */ + case 260: /* constraints_set_mode: IMMEDIATE */ +#line 1840 "gram.y" + { (yyval.boolean) = false; } +#line 28593 "gram.c" break; - case 261: -#line 1849 "gram.y" /* yacc.c:1652 */ - { + case 261: /* CheckPointStmt: CHECKPOINT */ +#line 1849 "gram.y" + { CheckPointStmt *n = makeNode(CheckPointStmt); (yyval.node) = (Node *)n; } -#line 28110 "gram.c" /* yacc.c:1652 */ +#line 28602 "gram.c" break; - case 262: -#line 1864 "gram.y" /* yacc.c:1652 */ - { + case 262: /* DiscardStmt: DISCARD ALL */ +#line 1864 "gram.y" + { DiscardStmt *n = makeNode(DiscardStmt); n->target = DISCARD_ALL; (yyval.node) = (Node *) n; } -#line 28120 "gram.c" /* yacc.c:1652 */ +#line 28612 "gram.c" break; - case 263: -#line 1870 "gram.y" /* yacc.c:1652 */ - { + case 263: /* DiscardStmt: DISCARD TEMP */ +#line 1870 "gram.y" + { DiscardStmt *n = makeNode(DiscardStmt); n->target = DISCARD_TEMP; (yyval.node) = (Node *) n; } -#line 28130 "gram.c" /* yacc.c:1652 */ +#line 28622 "gram.c" break; - case 264: -#line 1876 "gram.y" /* yacc.c:1652 */ - { + case 264: /* DiscardStmt: DISCARD TEMPORARY */ +#line 1876 "gram.y" + { DiscardStmt *n = makeNode(DiscardStmt); n->target = DISCARD_TEMP; (yyval.node) = (Node *) n; } -#line 28140 "gram.c" /* yacc.c:1652 */ +#line 28632 "gram.c" break; - case 265: -#line 1882 "gram.y" /* yacc.c:1652 */ - { + case 265: /* DiscardStmt: DISCARD PLANS */ +#line 1882 "gram.y" + { DiscardStmt *n = makeNode(DiscardStmt); n->target = DISCARD_PLANS; (yyval.node) = (Node *) n; } -#line 28150 "gram.c" /* yacc.c:1652 */ +#line 28642 "gram.c" break; - case 266: -#line 1888 "gram.y" /* yacc.c:1652 */ - { + case 266: /* DiscardStmt: DISCARD SEQUENCES */ +#line 1888 "gram.y" + { DiscardStmt *n = makeNode(DiscardStmt); n->target = DISCARD_SEQUENCES; (yyval.node) = (Node *) n; } -#line 28160 "gram.c" /* yacc.c:1652 */ +#line 28652 "gram.c" break; - case 267: -#line 1907 "gram.y" /* yacc.c:1652 */ - { + case 267: /* AlterTableStmt: ALTER TABLE relation_expr alter_table_cmds */ +#line 1907 "gram.y" + { AlterTableStmt *n = makeNode(AlterTableStmt); n->relation = (yyvsp[-1].range); n->cmds = (yyvsp[0].list); @@ -28169,12 +28661,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 28173 "gram.c" /* yacc.c:1652 */ +#line 28665 "gram.c" break; - case 268: -#line 1916 "gram.y" /* yacc.c:1652 */ - { + case 268: /* AlterTableStmt: ALTER TABLE IF_P EXISTS relation_expr alter_table_cmds */ +#line 1916 "gram.y" + { AlterTableStmt *n = makeNode(AlterTableStmt); n->relation = (yyvsp[-1].range); n->cmds = (yyvsp[0].list); @@ -28182,12 +28674,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 28186 "gram.c" /* yacc.c:1652 */ +#line 28678 "gram.c" break; - case 269: -#line 1925 "gram.y" /* yacc.c:1652 */ - { + case 269: /* AlterTableStmt: ALTER TABLE relation_expr partition_cmd */ +#line 1925 "gram.y" + { AlterTableStmt *n = makeNode(AlterTableStmt); n->relation = (yyvsp[-1].range); n->cmds = list_make1((yyvsp[0].node)); @@ -28195,12 +28687,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 28199 "gram.c" /* yacc.c:1652 */ +#line 28691 "gram.c" break; - case 270: -#line 1934 "gram.y" /* yacc.c:1652 */ - { + case 270: /* AlterTableStmt: ALTER TABLE IF_P EXISTS relation_expr partition_cmd */ +#line 1934 "gram.y" + { AlterTableStmt *n = makeNode(AlterTableStmt); n->relation = (yyvsp[-1].range); n->cmds = list_make1((yyvsp[0].node)); @@ -28208,12 +28700,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 28212 "gram.c" /* yacc.c:1652 */ +#line 28704 "gram.c" break; - case 271: -#line 1943 "gram.y" /* yacc.c:1652 */ - { + case 271: /* AlterTableStmt: ALTER TABLE ALL IN_P TABLESPACE name SET TABLESPACE name opt_nowait */ +#line 1943 "gram.y" + { AlterTableMoveAllStmt *n = makeNode(AlterTableMoveAllStmt); n->orig_tablespacename = (yyvsp[-4].str); @@ -28223,12 +28715,12 @@ yyreduce: n->nowait = (yyvsp[0].boolean); (yyval.node) = (Node *)n; } -#line 28227 "gram.c" /* yacc.c:1652 */ +#line 28719 "gram.c" break; - case 272: -#line 1954 "gram.y" /* yacc.c:1652 */ - { + case 272: /* AlterTableStmt: ALTER TABLE ALL IN_P TABLESPACE name OWNED BY role_list SET TABLESPACE name opt_nowait */ +#line 1954 "gram.y" + { AlterTableMoveAllStmt *n = makeNode(AlterTableMoveAllStmt); n->orig_tablespacename = (yyvsp[-7].str); @@ -28238,12 +28730,12 @@ yyreduce: n->nowait = (yyvsp[0].boolean); (yyval.node) = (Node *)n; } -#line 28242 "gram.c" /* yacc.c:1652 */ +#line 28734 "gram.c" break; - case 273: -#line 1965 "gram.y" /* yacc.c:1652 */ - { + case 273: /* AlterTableStmt: ALTER INDEX qualified_name alter_table_cmds */ +#line 1965 "gram.y" + { AlterTableStmt *n = makeNode(AlterTableStmt); n->relation = (yyvsp[-1].range); n->cmds = (yyvsp[0].list); @@ -28251,12 +28743,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 28255 "gram.c" /* yacc.c:1652 */ +#line 28747 "gram.c" break; - case 274: -#line 1974 "gram.y" /* yacc.c:1652 */ - { + case 274: /* AlterTableStmt: ALTER INDEX IF_P EXISTS qualified_name alter_table_cmds */ +#line 1974 "gram.y" + { AlterTableStmt *n = makeNode(AlterTableStmt); n->relation = (yyvsp[-1].range); n->cmds = (yyvsp[0].list); @@ -28264,12 +28756,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 28268 "gram.c" /* yacc.c:1652 */ +#line 28760 "gram.c" break; - case 275: -#line 1983 "gram.y" /* yacc.c:1652 */ - { + case 275: /* AlterTableStmt: ALTER INDEX qualified_name index_partition_cmd */ +#line 1983 "gram.y" + { AlterTableStmt *n = makeNode(AlterTableStmt); n->relation = (yyvsp[-1].range); n->cmds = list_make1((yyvsp[0].node)); @@ -28277,12 +28769,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 28281 "gram.c" /* yacc.c:1652 */ +#line 28773 "gram.c" break; - case 276: -#line 1992 "gram.y" /* yacc.c:1652 */ - { + case 276: /* AlterTableStmt: ALTER INDEX ALL IN_P TABLESPACE name SET TABLESPACE name opt_nowait */ +#line 1992 "gram.y" + { AlterTableMoveAllStmt *n = makeNode(AlterTableMoveAllStmt); n->orig_tablespacename = (yyvsp[-4].str); @@ -28292,12 +28784,12 @@ yyreduce: n->nowait = (yyvsp[0].boolean); (yyval.node) = (Node *)n; } -#line 28296 "gram.c" /* yacc.c:1652 */ +#line 28788 "gram.c" break; - case 277: -#line 2003 "gram.y" /* yacc.c:1652 */ - { + case 277: /* AlterTableStmt: ALTER INDEX ALL IN_P TABLESPACE name OWNED BY role_list SET TABLESPACE name opt_nowait */ +#line 2003 "gram.y" + { AlterTableMoveAllStmt *n = makeNode(AlterTableMoveAllStmt); n->orig_tablespacename = (yyvsp[-7].str); @@ -28307,12 +28799,12 @@ yyreduce: n->nowait = (yyvsp[0].boolean); (yyval.node) = (Node *)n; } -#line 28311 "gram.c" /* yacc.c:1652 */ +#line 28803 "gram.c" break; - case 278: -#line 2014 "gram.y" /* yacc.c:1652 */ - { + case 278: /* AlterTableStmt: ALTER SEQUENCE qualified_name alter_table_cmds */ +#line 2014 "gram.y" + { AlterTableStmt *n = makeNode(AlterTableStmt); n->relation = (yyvsp[-1].range); n->cmds = (yyvsp[0].list); @@ -28320,12 +28812,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 28324 "gram.c" /* yacc.c:1652 */ +#line 28816 "gram.c" break; - case 279: -#line 2023 "gram.y" /* yacc.c:1652 */ - { + case 279: /* AlterTableStmt: ALTER SEQUENCE IF_P EXISTS qualified_name alter_table_cmds */ +#line 2023 "gram.y" + { AlterTableStmt *n = makeNode(AlterTableStmt); n->relation = (yyvsp[-1].range); n->cmds = (yyvsp[0].list); @@ -28333,12 +28825,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 28337 "gram.c" /* yacc.c:1652 */ +#line 28829 "gram.c" break; - case 280: -#line 2032 "gram.y" /* yacc.c:1652 */ - { + case 280: /* AlterTableStmt: ALTER VIEW qualified_name alter_table_cmds */ +#line 2032 "gram.y" + { AlterTableStmt *n = makeNode(AlterTableStmt); n->relation = (yyvsp[-1].range); n->cmds = (yyvsp[0].list); @@ -28346,12 +28838,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 28350 "gram.c" /* yacc.c:1652 */ +#line 28842 "gram.c" break; - case 281: -#line 2041 "gram.y" /* yacc.c:1652 */ - { + case 281: /* AlterTableStmt: ALTER VIEW IF_P EXISTS qualified_name alter_table_cmds */ +#line 2041 "gram.y" + { AlterTableStmt *n = makeNode(AlterTableStmt); n->relation = (yyvsp[-1].range); n->cmds = (yyvsp[0].list); @@ -28359,12 +28851,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 28363 "gram.c" /* yacc.c:1652 */ +#line 28855 "gram.c" break; - case 282: -#line 2050 "gram.y" /* yacc.c:1652 */ - { + case 282: /* AlterTableStmt: ALTER MATERIALIZED VIEW qualified_name alter_table_cmds */ +#line 2050 "gram.y" + { AlterTableStmt *n = makeNode(AlterTableStmt); n->relation = (yyvsp[-1].range); n->cmds = (yyvsp[0].list); @@ -28372,12 +28864,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 28376 "gram.c" /* yacc.c:1652 */ +#line 28868 "gram.c" break; - case 283: -#line 2059 "gram.y" /* yacc.c:1652 */ - { + case 283: /* AlterTableStmt: ALTER MATERIALIZED VIEW IF_P EXISTS qualified_name alter_table_cmds */ +#line 2059 "gram.y" + { AlterTableStmt *n = makeNode(AlterTableStmt); n->relation = (yyvsp[-1].range); n->cmds = (yyvsp[0].list); @@ -28385,12 +28877,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 28389 "gram.c" /* yacc.c:1652 */ +#line 28881 "gram.c" break; - case 284: -#line 2068 "gram.y" /* yacc.c:1652 */ - { + case 284: /* AlterTableStmt: ALTER MATERIALIZED VIEW ALL IN_P TABLESPACE name SET TABLESPACE name opt_nowait */ +#line 2068 "gram.y" + { AlterTableMoveAllStmt *n = makeNode(AlterTableMoveAllStmt); n->orig_tablespacename = (yyvsp[-4].str); @@ -28400,12 +28892,12 @@ yyreduce: n->nowait = (yyvsp[0].boolean); (yyval.node) = (Node *)n; } -#line 28404 "gram.c" /* yacc.c:1652 */ +#line 28896 "gram.c" break; - case 285: -#line 2079 "gram.y" /* yacc.c:1652 */ - { + case 285: /* AlterTableStmt: ALTER MATERIALIZED VIEW ALL IN_P TABLESPACE name OWNED BY role_list SET TABLESPACE name opt_nowait */ +#line 2079 "gram.y" + { AlterTableMoveAllStmt *n = makeNode(AlterTableMoveAllStmt); n->orig_tablespacename = (yyvsp[-7].str); @@ -28415,12 +28907,12 @@ yyreduce: n->nowait = (yyvsp[0].boolean); (yyval.node) = (Node *)n; } -#line 28419 "gram.c" /* yacc.c:1652 */ +#line 28911 "gram.c" break; - case 286: -#line 2090 "gram.y" /* yacc.c:1652 */ - { + case 286: /* AlterTableStmt: ALTER FOREIGN TABLE relation_expr alter_table_cmds */ +#line 2090 "gram.y" + { AlterTableStmt *n = makeNode(AlterTableStmt); n->relation = (yyvsp[-1].range); n->cmds = (yyvsp[0].list); @@ -28428,12 +28920,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 28432 "gram.c" /* yacc.c:1652 */ +#line 28924 "gram.c" break; - case 287: -#line 2099 "gram.y" /* yacc.c:1652 */ - { + case 287: /* AlterTableStmt: ALTER FOREIGN TABLE IF_P EXISTS relation_expr alter_table_cmds */ +#line 2099 "gram.y" + { AlterTableStmt *n = makeNode(AlterTableStmt); n->relation = (yyvsp[-1].range); n->cmds = (yyvsp[0].list); @@ -28441,24 +28933,24 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 28445 "gram.c" /* yacc.c:1652 */ +#line 28937 "gram.c" break; - case 288: -#line 2110 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 28451 "gram.c" /* yacc.c:1652 */ + case 288: /* alter_table_cmds: alter_table_cmd */ +#line 2110 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 28943 "gram.c" break; - case 289: -#line 2111 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 28457 "gram.c" /* yacc.c:1652 */ + case 289: /* alter_table_cmds: alter_table_cmds ',' alter_table_cmd */ +#line 2111 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } +#line 28949 "gram.c" break; - case 290: -#line 2117 "gram.y" /* yacc.c:1652 */ - { + case 290: /* partition_cmd: ATTACH PARTITION qualified_name PartitionBoundSpec */ +#line 2117 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); PartitionCmd *cmd = makeNode(PartitionCmd); @@ -28470,12 +28962,12 @@ yyreduce: (yyval.node) = (Node *) n; } -#line 28474 "gram.c" /* yacc.c:1652 */ +#line 28966 "gram.c" break; - case 291: -#line 2131 "gram.y" /* yacc.c:1652 */ - { + case 291: /* partition_cmd: DETACH PARTITION qualified_name opt_concurrently */ +#line 2131 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); PartitionCmd *cmd = makeNode(PartitionCmd); @@ -28487,12 +28979,12 @@ yyreduce: (yyval.node) = (Node *) n; } -#line 28491 "gram.c" /* yacc.c:1652 */ +#line 28983 "gram.c" break; - case 292: -#line 2144 "gram.y" /* yacc.c:1652 */ - { + case 292: /* partition_cmd: DETACH PARTITION qualified_name FINALIZE */ +#line 2144 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); PartitionCmd *cmd = makeNode(PartitionCmd); @@ -28503,12 +28995,12 @@ yyreduce: n->def = (Node *) cmd; (yyval.node) = (Node *) n; } -#line 28507 "gram.c" /* yacc.c:1652 */ +#line 28999 "gram.c" break; - case 293: -#line 2160 "gram.y" /* yacc.c:1652 */ - { + case 293: /* index_partition_cmd: ATTACH PARTITION qualified_name */ +#line 2160 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); PartitionCmd *cmd = makeNode(PartitionCmd); @@ -28520,129 +29012,129 @@ yyreduce: (yyval.node) = (Node *) n; } -#line 28524 "gram.c" /* yacc.c:1652 */ +#line 29016 "gram.c" break; - case 294: -#line 2177 "gram.y" /* yacc.c:1652 */ - { + case 294: /* alter_table_cmd: ADD_P columnDef */ +#line 2177 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_AddColumn; n->def = (yyvsp[0].node); n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 28536 "gram.c" /* yacc.c:1652 */ +#line 29028 "gram.c" break; - case 295: -#line 2186 "gram.y" /* yacc.c:1652 */ - { + case 295: /* alter_table_cmd: ADD_P IF_P NOT EXISTS columnDef */ +#line 2186 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_AddColumn; n->def = (yyvsp[0].node); n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 28548 "gram.c" /* yacc.c:1652 */ +#line 29040 "gram.c" break; - case 296: -#line 2195 "gram.y" /* yacc.c:1652 */ - { + case 296: /* alter_table_cmd: ADD_P COLUMN columnDef */ +#line 2195 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_AddColumn; n->def = (yyvsp[0].node); n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 28560 "gram.c" /* yacc.c:1652 */ +#line 29052 "gram.c" break; - case 297: -#line 2204 "gram.y" /* yacc.c:1652 */ - { + case 297: /* alter_table_cmd: ADD_P COLUMN IF_P NOT EXISTS columnDef */ +#line 2204 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_AddColumn; n->def = (yyvsp[0].node); n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 28572 "gram.c" /* yacc.c:1652 */ +#line 29064 "gram.c" break; - case 298: -#line 2213 "gram.y" /* yacc.c:1652 */ - { + case 298: /* alter_table_cmd: ALTER opt_column ColId alter_column_default */ +#line 2213 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_ColumnDefault; n->name = (yyvsp[-1].str); n->def = (yyvsp[0].node); (yyval.node) = (Node *)n; } -#line 28584 "gram.c" /* yacc.c:1652 */ +#line 29076 "gram.c" break; - case 299: -#line 2222 "gram.y" /* yacc.c:1652 */ - { + case 299: /* alter_table_cmd: ALTER opt_column ColId DROP NOT NULL_P */ +#line 2222 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropNotNull; n->name = (yyvsp[-3].str); (yyval.node) = (Node *)n; } -#line 28595 "gram.c" /* yacc.c:1652 */ +#line 29087 "gram.c" break; - case 300: -#line 2230 "gram.y" /* yacc.c:1652 */ - { + case 300: /* alter_table_cmd: ALTER opt_column ColId SET NOT NULL_P */ +#line 2230 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_SetNotNull; n->name = (yyvsp[-3].str); (yyval.node) = (Node *)n; } -#line 28606 "gram.c" /* yacc.c:1652 */ +#line 29098 "gram.c" break; - case 301: -#line 2238 "gram.y" /* yacc.c:1652 */ - { + case 301: /* alter_table_cmd: ALTER opt_column ColId DROP EXPRESSION */ +#line 2238 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropExpression; n->name = (yyvsp[-2].str); (yyval.node) = (Node *)n; } -#line 28617 "gram.c" /* yacc.c:1652 */ +#line 29109 "gram.c" break; - case 302: -#line 2246 "gram.y" /* yacc.c:1652 */ - { + case 302: /* alter_table_cmd: ALTER opt_column ColId DROP EXPRESSION IF_P EXISTS */ +#line 2246 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropExpression; n->name = (yyvsp[-4].str); n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 28629 "gram.c" /* yacc.c:1652 */ +#line 29121 "gram.c" break; - case 303: -#line 2255 "gram.y" /* yacc.c:1652 */ - { + case 303: /* alter_table_cmd: ALTER opt_column ColId SET STATISTICS SignedIconst */ +#line 2255 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_SetStatistics; n->name = (yyvsp[-3].str); n->def = (Node *) makeInteger((yyvsp[0].ival)); (yyval.node) = (Node *)n; } -#line 28641 "gram.c" /* yacc.c:1652 */ +#line 29133 "gram.c" break; - case 304: -#line 2264 "gram.y" /* yacc.c:1652 */ - { + case 304: /* alter_table_cmd: ALTER opt_column Iconst SET STATISTICS SignedIconst */ +#line 2264 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); if ((yyvsp[-3].ival) <= 0 || (yyvsp[-3].ival) > PG_INT16_MAX) @@ -28656,60 +29148,60 @@ yyreduce: n->def = (Node *) makeInteger((yyvsp[0].ival)); (yyval.node) = (Node *)n; } -#line 28660 "gram.c" /* yacc.c:1652 */ +#line 29152 "gram.c" break; - case 305: -#line 2280 "gram.y" /* yacc.c:1652 */ - { + case 305: /* alter_table_cmd: ALTER opt_column ColId SET reloptions */ +#line 2280 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_SetOptions; n->name = (yyvsp[-2].str); n->def = (Node *) (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 28672 "gram.c" /* yacc.c:1652 */ +#line 29164 "gram.c" break; - case 306: -#line 2289 "gram.y" /* yacc.c:1652 */ - { + case 306: /* alter_table_cmd: ALTER opt_column ColId RESET reloptions */ +#line 2289 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_ResetOptions; n->name = (yyvsp[-2].str); n->def = (Node *) (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 28684 "gram.c" /* yacc.c:1652 */ +#line 29176 "gram.c" break; - case 307: -#line 2298 "gram.y" /* yacc.c:1652 */ - { + case 307: /* alter_table_cmd: ALTER opt_column ColId SET STORAGE ColId */ +#line 2298 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_SetStorage; n->name = (yyvsp[-3].str); n->def = (Node *) makeString((yyvsp[0].str)); (yyval.node) = (Node *)n; } -#line 28696 "gram.c" /* yacc.c:1652 */ +#line 29188 "gram.c" break; - case 308: -#line 2307 "gram.y" /* yacc.c:1652 */ - { + case 308: /* alter_table_cmd: ALTER opt_column ColId SET column_compression */ +#line 2307 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_SetCompression; n->name = (yyvsp[-2].str); n->def = (Node *) makeString((yyvsp[0].str)); (yyval.node) = (Node *)n; } -#line 28708 "gram.c" /* yacc.c:1652 */ +#line 29200 "gram.c" break; - case 309: -#line 2316 "gram.y" /* yacc.c:1652 */ - { + case 309: /* alter_table_cmd: ALTER opt_column ColId ADD_P GENERATED generated_when AS IDENTITY_P OptParenthesizedSeqOptList */ +#line 2316 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); Constraint *c = makeNode(Constraint); @@ -28724,48 +29216,48 @@ yyreduce: (yyval.node) = (Node *)n; } -#line 28728 "gram.c" /* yacc.c:1652 */ +#line 29220 "gram.c" break; - case 310: -#line 2333 "gram.y" /* yacc.c:1652 */ - { + case 310: /* alter_table_cmd: ALTER opt_column ColId alter_identity_column_option_list */ +#line 2333 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_SetIdentity; n->name = (yyvsp[-1].str); n->def = (Node *) (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 28740 "gram.c" /* yacc.c:1652 */ +#line 29232 "gram.c" break; - case 311: -#line 2342 "gram.y" /* yacc.c:1652 */ - { + case 311: /* alter_table_cmd: ALTER opt_column ColId DROP IDENTITY_P */ +#line 2342 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropIdentity; n->name = (yyvsp[-2].str); n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 28752 "gram.c" /* yacc.c:1652 */ +#line 29244 "gram.c" break; - case 312: -#line 2351 "gram.y" /* yacc.c:1652 */ - { + case 312: /* alter_table_cmd: ALTER opt_column ColId DROP IDENTITY_P IF_P EXISTS */ +#line 2351 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropIdentity; n->name = (yyvsp[-4].str); n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 28764 "gram.c" /* yacc.c:1652 */ +#line 29256 "gram.c" break; - case 313: -#line 2360 "gram.y" /* yacc.c:1652 */ - { + case 313: /* alter_table_cmd: DROP opt_column IF_P EXISTS ColId opt_drop_behavior */ +#line 2360 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropColumn; n->name = (yyvsp[-1].str); @@ -28773,12 +29265,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 28777 "gram.c" /* yacc.c:1652 */ +#line 29269 "gram.c" break; - case 314: -#line 2370 "gram.y" /* yacc.c:1652 */ - { + case 314: /* alter_table_cmd: DROP opt_column ColId opt_drop_behavior */ +#line 2370 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropColumn; n->name = (yyvsp[-1].str); @@ -28786,12 +29278,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 28790 "gram.c" /* yacc.c:1652 */ +#line 29282 "gram.c" break; - case 315: -#line 2383 "gram.y" /* yacc.c:1652 */ - { + case 315: /* alter_table_cmd: ALTER opt_column ColId opt_set_data TYPE_P Typename opt_collate_clause alter_using */ +#line 2383 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); ColumnDef *def = makeNode(ColumnDef); n->subtype = AT_AlterColumnType; @@ -28804,35 +29296,35 @@ yyreduce: def->location = (yylsp[-5]); (yyval.node) = (Node *)n; } -#line 28808 "gram.c" /* yacc.c:1652 */ +#line 29300 "gram.c" break; - case 316: -#line 2398 "gram.y" /* yacc.c:1652 */ - { + case 316: /* alter_table_cmd: ALTER opt_column ColId alter_generic_options */ +#line 2398 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_AlterColumnGenericOptions; n->name = (yyvsp[-1].str); n->def = (Node *) (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 28820 "gram.c" /* yacc.c:1652 */ +#line 29312 "gram.c" break; - case 317: -#line 2407 "gram.y" /* yacc.c:1652 */ - { + case 317: /* alter_table_cmd: ADD_P TableConstraint */ +#line 2407 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_AddConstraint; n->def = (yyvsp[0].node); (yyval.node) = (Node *)n; } -#line 28831 "gram.c" /* yacc.c:1652 */ +#line 29323 "gram.c" break; - case 318: -#line 2415 "gram.y" /* yacc.c:1652 */ - { + case 318: /* alter_table_cmd: ALTER CONSTRAINT name ConstraintAttributeSpec */ +#line 2415 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); Constraint *c = makeNode(Constraint); n->subtype = AT_AlterConstraint; @@ -28845,23 +29337,23 @@ yyreduce: NULL, NULL, yyscanner); (yyval.node) = (Node *)n; } -#line 28849 "gram.c" /* yacc.c:1652 */ +#line 29341 "gram.c" break; - case 319: -#line 2430 "gram.y" /* yacc.c:1652 */ - { + case 319: /* alter_table_cmd: VALIDATE CONSTRAINT name */ +#line 2430 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_ValidateConstraint; n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 28860 "gram.c" /* yacc.c:1652 */ +#line 29352 "gram.c" break; - case 320: -#line 2438 "gram.y" /* yacc.c:1652 */ - { + case 320: /* alter_table_cmd: DROP CONSTRAINT IF_P EXISTS name opt_drop_behavior */ +#line 2438 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropConstraint; n->name = (yyvsp[-1].str); @@ -28869,12 +29361,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 28873 "gram.c" /* yacc.c:1652 */ +#line 29365 "gram.c" break; - case 321: -#line 2448 "gram.y" /* yacc.c:1652 */ - { + case 321: /* alter_table_cmd: DROP CONSTRAINT name opt_drop_behavior */ +#line 2448 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropConstraint; n->name = (yyvsp[-1].str); @@ -28882,214 +29374,214 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 28886 "gram.c" /* yacc.c:1652 */ +#line 29378 "gram.c" break; - case 322: -#line 2458 "gram.y" /* yacc.c:1652 */ - { + case 322: /* alter_table_cmd: SET WITHOUT OIDS */ +#line 2458 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropOids; (yyval.node) = (Node *)n; } -#line 28896 "gram.c" /* yacc.c:1652 */ +#line 29388 "gram.c" break; - case 323: -#line 2465 "gram.y" /* yacc.c:1652 */ - { + case 323: /* alter_table_cmd: CLUSTER ON name */ +#line 2465 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_ClusterOn; n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 28907 "gram.c" /* yacc.c:1652 */ +#line 29399 "gram.c" break; - case 324: -#line 2473 "gram.y" /* yacc.c:1652 */ - { + case 324: /* alter_table_cmd: SET WITHOUT CLUSTER */ +#line 2473 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropCluster; n->name = NULL; (yyval.node) = (Node *)n; } -#line 28918 "gram.c" /* yacc.c:1652 */ +#line 29410 "gram.c" break; - case 325: -#line 2481 "gram.y" /* yacc.c:1652 */ - { + case 325: /* alter_table_cmd: SET LOGGED */ +#line 2481 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_SetLogged; (yyval.node) = (Node *)n; } -#line 28928 "gram.c" /* yacc.c:1652 */ +#line 29420 "gram.c" break; - case 326: -#line 2488 "gram.y" /* yacc.c:1652 */ - { + case 326: /* alter_table_cmd: SET UNLOGGED */ +#line 2488 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_SetUnLogged; (yyval.node) = (Node *)n; } -#line 28938 "gram.c" /* yacc.c:1652 */ +#line 29430 "gram.c" break; - case 327: -#line 2495 "gram.y" /* yacc.c:1652 */ - { + case 327: /* alter_table_cmd: ENABLE_P TRIGGER name */ +#line 2495 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_EnableTrig; n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 28949 "gram.c" /* yacc.c:1652 */ +#line 29441 "gram.c" break; - case 328: -#line 2503 "gram.y" /* yacc.c:1652 */ - { + case 328: /* alter_table_cmd: ENABLE_P ALWAYS TRIGGER name */ +#line 2503 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_EnableAlwaysTrig; n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 28960 "gram.c" /* yacc.c:1652 */ +#line 29452 "gram.c" break; - case 329: -#line 2511 "gram.y" /* yacc.c:1652 */ - { + case 329: /* alter_table_cmd: ENABLE_P REPLICA TRIGGER name */ +#line 2511 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_EnableReplicaTrig; n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 28971 "gram.c" /* yacc.c:1652 */ +#line 29463 "gram.c" break; - case 330: -#line 2519 "gram.y" /* yacc.c:1652 */ - { + case 330: /* alter_table_cmd: ENABLE_P TRIGGER ALL */ +#line 2519 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_EnableTrigAll; (yyval.node) = (Node *)n; } -#line 28981 "gram.c" /* yacc.c:1652 */ +#line 29473 "gram.c" break; - case 331: -#line 2526 "gram.y" /* yacc.c:1652 */ - { + case 331: /* alter_table_cmd: ENABLE_P TRIGGER USER */ +#line 2526 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_EnableTrigUser; (yyval.node) = (Node *)n; } -#line 28991 "gram.c" /* yacc.c:1652 */ +#line 29483 "gram.c" break; - case 332: -#line 2533 "gram.y" /* yacc.c:1652 */ - { + case 332: /* alter_table_cmd: DISABLE_P TRIGGER name */ +#line 2533 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DisableTrig; n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 29002 "gram.c" /* yacc.c:1652 */ +#line 29494 "gram.c" break; - case 333: -#line 2541 "gram.y" /* yacc.c:1652 */ - { + case 333: /* alter_table_cmd: DISABLE_P TRIGGER ALL */ +#line 2541 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DisableTrigAll; (yyval.node) = (Node *)n; } -#line 29012 "gram.c" /* yacc.c:1652 */ +#line 29504 "gram.c" break; - case 334: -#line 2548 "gram.y" /* yacc.c:1652 */ - { + case 334: /* alter_table_cmd: DISABLE_P TRIGGER USER */ +#line 2548 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DisableTrigUser; (yyval.node) = (Node *)n; } -#line 29022 "gram.c" /* yacc.c:1652 */ +#line 29514 "gram.c" break; - case 335: -#line 2555 "gram.y" /* yacc.c:1652 */ - { + case 335: /* alter_table_cmd: ENABLE_P RULE name */ +#line 2555 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_EnableRule; n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 29033 "gram.c" /* yacc.c:1652 */ +#line 29525 "gram.c" break; - case 336: -#line 2563 "gram.y" /* yacc.c:1652 */ - { + case 336: /* alter_table_cmd: ENABLE_P ALWAYS RULE name */ +#line 2563 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_EnableAlwaysRule; n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 29044 "gram.c" /* yacc.c:1652 */ +#line 29536 "gram.c" break; - case 337: -#line 2571 "gram.y" /* yacc.c:1652 */ - { + case 337: /* alter_table_cmd: ENABLE_P REPLICA RULE name */ +#line 2571 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_EnableReplicaRule; n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 29055 "gram.c" /* yacc.c:1652 */ +#line 29547 "gram.c" break; - case 338: -#line 2579 "gram.y" /* yacc.c:1652 */ - { + case 338: /* alter_table_cmd: DISABLE_P RULE name */ +#line 2579 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DisableRule; n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 29066 "gram.c" /* yacc.c:1652 */ +#line 29558 "gram.c" break; - case 339: -#line 2587 "gram.y" /* yacc.c:1652 */ - { + case 339: /* alter_table_cmd: INHERIT qualified_name */ +#line 2587 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_AddInherit; n->def = (Node *) (yyvsp[0].range); (yyval.node) = (Node *)n; } -#line 29077 "gram.c" /* yacc.c:1652 */ +#line 29569 "gram.c" break; - case 340: -#line 2595 "gram.y" /* yacc.c:1652 */ - { + case 340: /* alter_table_cmd: NO INHERIT qualified_name */ +#line 2595 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropInherit; n->def = (Node *) (yyvsp[0].range); (yyval.node) = (Node *)n; } -#line 29088 "gram.c" /* yacc.c:1652 */ +#line 29580 "gram.c" break; - case 341: -#line 2603 "gram.y" /* yacc.c:1652 */ - { + case 341: /* alter_table_cmd: OF any_name */ +#line 2603 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); TypeName *def = makeTypeNameFromNameList((yyvsp[0].list)); def->location = (yylsp[0]); @@ -29097,323 +29589,323 @@ yyreduce: n->def = (Node *) def; (yyval.node) = (Node *)n; } -#line 29101 "gram.c" /* yacc.c:1652 */ +#line 29593 "gram.c" break; - case 342: -#line 2613 "gram.y" /* yacc.c:1652 */ - { + case 342: /* alter_table_cmd: NOT OF */ +#line 2613 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropOf; (yyval.node) = (Node *)n; } -#line 29111 "gram.c" /* yacc.c:1652 */ +#line 29603 "gram.c" break; - case 343: -#line 2620 "gram.y" /* yacc.c:1652 */ - { + case 343: /* alter_table_cmd: OWNER TO RoleSpec */ +#line 2620 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_ChangeOwner; n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 29122 "gram.c" /* yacc.c:1652 */ +#line 29614 "gram.c" break; - case 344: -#line 2628 "gram.y" /* yacc.c:1652 */ - { + case 344: /* alter_table_cmd: SET TABLESPACE name */ +#line 2628 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_SetTableSpace; n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 29133 "gram.c" /* yacc.c:1652 */ +#line 29625 "gram.c" break; - case 345: -#line 2636 "gram.y" /* yacc.c:1652 */ - { + case 345: /* alter_table_cmd: SET reloptions */ +#line 2636 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_SetRelOptions; n->def = (Node *)(yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 29144 "gram.c" /* yacc.c:1652 */ +#line 29636 "gram.c" break; - case 346: -#line 2644 "gram.y" /* yacc.c:1652 */ - { + case 346: /* alter_table_cmd: RESET reloptions */ +#line 2644 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_ResetRelOptions; n->def = (Node *)(yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 29155 "gram.c" /* yacc.c:1652 */ +#line 29647 "gram.c" break; - case 347: -#line 2652 "gram.y" /* yacc.c:1652 */ - { + case 347: /* alter_table_cmd: REPLICA IDENTITY_P replica_identity */ +#line 2652 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_ReplicaIdentity; n->def = (yyvsp[0].node); (yyval.node) = (Node *)n; } -#line 29166 "gram.c" /* yacc.c:1652 */ +#line 29658 "gram.c" break; - case 348: -#line 2660 "gram.y" /* yacc.c:1652 */ - { + case 348: /* alter_table_cmd: ENABLE_P ROW LEVEL SECURITY */ +#line 2660 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_EnableRowSecurity; (yyval.node) = (Node *)n; } -#line 29176 "gram.c" /* yacc.c:1652 */ +#line 29668 "gram.c" break; - case 349: -#line 2667 "gram.y" /* yacc.c:1652 */ - { + case 349: /* alter_table_cmd: DISABLE_P ROW LEVEL SECURITY */ +#line 2667 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DisableRowSecurity; (yyval.node) = (Node *)n; } -#line 29186 "gram.c" /* yacc.c:1652 */ +#line 29678 "gram.c" break; - case 350: -#line 2674 "gram.y" /* yacc.c:1652 */ - { + case 350: /* alter_table_cmd: FORCE ROW LEVEL SECURITY */ +#line 2674 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_ForceRowSecurity; (yyval.node) = (Node *)n; } -#line 29196 "gram.c" /* yacc.c:1652 */ +#line 29688 "gram.c" break; - case 351: -#line 2681 "gram.y" /* yacc.c:1652 */ - { + case 351: /* alter_table_cmd: NO FORCE ROW LEVEL SECURITY */ +#line 2681 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_NoForceRowSecurity; (yyval.node) = (Node *)n; } -#line 29206 "gram.c" /* yacc.c:1652 */ +#line 29698 "gram.c" break; - case 352: -#line 2687 "gram.y" /* yacc.c:1652 */ - { + case 352: /* alter_table_cmd: alter_generic_options */ +#line 2687 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_GenericOptions; n->def = (Node *)(yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 29217 "gram.c" /* yacc.c:1652 */ +#line 29709 "gram.c" break; - case 353: -#line 2696 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 29223 "gram.c" /* yacc.c:1652 */ + case 353: /* alter_column_default: SET DEFAULT a_expr */ +#line 2696 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 29715 "gram.c" break; - case 354: -#line 2697 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 29229 "gram.c" /* yacc.c:1652 */ + case 354: /* alter_column_default: DROP DEFAULT */ +#line 2697 "gram.y" + { (yyval.node) = NULL; } +#line 29721 "gram.c" break; - case 355: -#line 2701 "gram.y" /* yacc.c:1652 */ - { (yyval.dbehavior) = DROP_CASCADE; } -#line 29235 "gram.c" /* yacc.c:1652 */ + case 355: /* opt_drop_behavior: CASCADE */ +#line 2701 "gram.y" + { (yyval.dbehavior) = DROP_CASCADE; } +#line 29727 "gram.c" break; - case 356: -#line 2702 "gram.y" /* yacc.c:1652 */ - { (yyval.dbehavior) = DROP_RESTRICT; } -#line 29241 "gram.c" /* yacc.c:1652 */ + case 356: /* opt_drop_behavior: RESTRICT */ +#line 2702 "gram.y" + { (yyval.dbehavior) = DROP_RESTRICT; } +#line 29733 "gram.c" break; - case 357: -#line 2703 "gram.y" /* yacc.c:1652 */ - { (yyval.dbehavior) = DROP_RESTRICT; /* default */ } -#line 29247 "gram.c" /* yacc.c:1652 */ + case 357: /* opt_drop_behavior: %empty */ +#line 2703 "gram.y" + { (yyval.dbehavior) = DROP_RESTRICT; /* default */ } +#line 29739 "gram.c" break; - case 358: -#line 2708 "gram.y" /* yacc.c:1652 */ - { + case 358: /* opt_collate_clause: COLLATE any_name */ +#line 2708 "gram.y" + { CollateClause *n = makeNode(CollateClause); n->arg = NULL; n->collname = (yyvsp[0].list); n->location = (yylsp[-1]); (yyval.node) = (Node *) n; } -#line 29259 "gram.c" /* yacc.c:1652 */ +#line 29751 "gram.c" break; - case 359: -#line 2715 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 29265 "gram.c" /* yacc.c:1652 */ + case 359: /* opt_collate_clause: %empty */ +#line 2715 "gram.y" + { (yyval.node) = NULL; } +#line 29757 "gram.c" break; - case 360: -#line 2719 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 29271 "gram.c" /* yacc.c:1652 */ + case 360: /* alter_using: USING a_expr */ +#line 2719 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 29763 "gram.c" break; - case 361: -#line 2720 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 29277 "gram.c" /* yacc.c:1652 */ + case 361: /* alter_using: %empty */ +#line 2720 "gram.y" + { (yyval.node) = NULL; } +#line 29769 "gram.c" break; - case 362: -#line 2725 "gram.y" /* yacc.c:1652 */ - { + case 362: /* replica_identity: NOTHING */ +#line 2725 "gram.y" + { ReplicaIdentityStmt *n = makeNode(ReplicaIdentityStmt); n->identity_type = REPLICA_IDENTITY_NOTHING; n->name = NULL; (yyval.node) = (Node *) n; } -#line 29288 "gram.c" /* yacc.c:1652 */ +#line 29780 "gram.c" break; - case 363: -#line 2732 "gram.y" /* yacc.c:1652 */ - { + case 363: /* replica_identity: FULL */ +#line 2732 "gram.y" + { ReplicaIdentityStmt *n = makeNode(ReplicaIdentityStmt); n->identity_type = REPLICA_IDENTITY_FULL; n->name = NULL; (yyval.node) = (Node *) n; } -#line 29299 "gram.c" /* yacc.c:1652 */ +#line 29791 "gram.c" break; - case 364: -#line 2739 "gram.y" /* yacc.c:1652 */ - { + case 364: /* replica_identity: DEFAULT */ +#line 2739 "gram.y" + { ReplicaIdentityStmt *n = makeNode(ReplicaIdentityStmt); n->identity_type = REPLICA_IDENTITY_DEFAULT; n->name = NULL; (yyval.node) = (Node *) n; } -#line 29310 "gram.c" /* yacc.c:1652 */ +#line 29802 "gram.c" break; - case 365: -#line 2746 "gram.y" /* yacc.c:1652 */ - { + case 365: /* replica_identity: USING INDEX name */ +#line 2746 "gram.y" + { ReplicaIdentityStmt *n = makeNode(ReplicaIdentityStmt); n->identity_type = REPLICA_IDENTITY_INDEX; n->name = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 29321 "gram.c" /* yacc.c:1652 */ +#line 29813 "gram.c" break; - case 366: -#line 2755 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 29327 "gram.c" /* yacc.c:1652 */ + case 366: /* reloptions: '(' reloption_list ')' */ +#line 2755 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 29819 "gram.c" break; - case 367: -#line 2758 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 29333 "gram.c" /* yacc.c:1652 */ + case 367: /* opt_reloptions: WITH reloptions */ +#line 2758 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 29825 "gram.c" break; - case 368: -#line 2759 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 29339 "gram.c" /* yacc.c:1652 */ + case 368: /* opt_reloptions: %empty */ +#line 2759 "gram.y" + { (yyval.list) = NIL; } +#line 29831 "gram.c" break; - case 369: -#line 2763 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 29345 "gram.c" /* yacc.c:1652 */ + case 369: /* reloption_list: reloption_elem */ +#line 2763 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } +#line 29837 "gram.c" break; - case 370: -#line 2764 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } -#line 29351 "gram.c" /* yacc.c:1652 */ + case 370: /* reloption_list: reloption_list ',' reloption_elem */ +#line 2764 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } +#line 29843 "gram.c" break; - case 371: -#line 2770 "gram.y" /* yacc.c:1652 */ - { + case 371: /* reloption_elem: ColLabel '=' def_arg */ +#line 2770 "gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[-2].str), (Node *) (yyvsp[0].node), (yylsp[-2])); } -#line 29359 "gram.c" /* yacc.c:1652 */ +#line 29851 "gram.c" break; - case 372: -#line 2774 "gram.y" /* yacc.c:1652 */ - { + case 372: /* reloption_elem: ColLabel */ +#line 2774 "gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[0].str), NULL, (yylsp[0])); } -#line 29367 "gram.c" /* yacc.c:1652 */ +#line 29859 "gram.c" break; - case 373: -#line 2778 "gram.y" /* yacc.c:1652 */ - { + case 373: /* reloption_elem: ColLabel '.' ColLabel '=' def_arg */ +#line 2778 "gram.y" + { (yyval.defelt) = makeDefElemExtended((yyvsp[-4].str), (yyvsp[-2].str), (Node *) (yyvsp[0].node), DEFELEM_UNSPEC, (yylsp[-4])); } -#line 29376 "gram.c" /* yacc.c:1652 */ +#line 29868 "gram.c" break; - case 374: -#line 2783 "gram.y" /* yacc.c:1652 */ - { + case 374: /* reloption_elem: ColLabel '.' ColLabel */ +#line 2783 "gram.y" + { (yyval.defelt) = makeDefElemExtended((yyvsp[-2].str), (yyvsp[0].str), NULL, DEFELEM_UNSPEC, (yylsp[-2])); } -#line 29384 "gram.c" /* yacc.c:1652 */ +#line 29876 "gram.c" break; - case 375: -#line 2790 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 29390 "gram.c" /* yacc.c:1652 */ + case 375: /* alter_identity_column_option_list: alter_identity_column_option */ +#line 2790 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } +#line 29882 "gram.c" break; - case 376: -#line 2792 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 29396 "gram.c" /* yacc.c:1652 */ + case 376: /* alter_identity_column_option_list: alter_identity_column_option_list alter_identity_column_option */ +#line 2792 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 29888 "gram.c" break; - case 377: -#line 2797 "gram.y" /* yacc.c:1652 */ - { + case 377: /* alter_identity_column_option: RESTART */ +#line 2797 "gram.y" + { (yyval.defelt) = makeDefElem("restart", NULL, (yylsp[0])); } -#line 29404 "gram.c" /* yacc.c:1652 */ +#line 29896 "gram.c" break; - case 378: -#line 2801 "gram.y" /* yacc.c:1652 */ - { + case 378: /* alter_identity_column_option: RESTART opt_with NumericOnly */ +#line 2801 "gram.y" + { (yyval.defelt) = makeDefElem("restart", (Node *)(yyvsp[0].value), (yylsp[-2])); } -#line 29412 "gram.c" /* yacc.c:1652 */ +#line 29904 "gram.c" break; - case 379: -#line 2805 "gram.y" /* yacc.c:1652 */ - { + case 379: /* alter_identity_column_option: SET SeqOptElem */ +#line 2805 "gram.y" + { if (strcmp((yyvsp[0].defelt)->defname, "as") == 0 || strcmp((yyvsp[0].defelt)->defname, "restart") == 0 || strcmp((yyvsp[0].defelt)->defname, "owned_by") == 0) @@ -29423,20 +29915,20 @@ yyreduce: parser_errposition((yylsp[0])))); (yyval.defelt) = (yyvsp[0].defelt); } -#line 29427 "gram.c" /* yacc.c:1652 */ +#line 29919 "gram.c" break; - case 380: -#line 2816 "gram.y" /* yacc.c:1652 */ - { + case 380: /* alter_identity_column_option: SET GENERATED generated_when */ +#line 2816 "gram.y" + { (yyval.defelt) = makeDefElem("generated", (Node *) makeInteger((yyvsp[0].ival)), (yylsp[-2])); } -#line 29435 "gram.c" /* yacc.c:1652 */ +#line 29927 "gram.c" break; - case 381: -#line 2824 "gram.y" /* yacc.c:1652 */ - { + case 381: /* PartitionBoundSpec: FOR VALUES WITH '(' hash_partbound ')' */ +#line 2824 "gram.y" + { ListCell *lc; PartitionBoundSpec *n = makeNode(PartitionBoundSpec); @@ -29486,12 +29978,12 @@ yyreduce: (yyval.partboundspec) = n; } -#line 29490 "gram.c" /* yacc.c:1652 */ +#line 29982 "gram.c" break; - case 382: -#line 2877 "gram.y" /* yacc.c:1652 */ - { + case 382: /* PartitionBoundSpec: FOR VALUES IN_P '(' expr_list ')' */ +#line 2877 "gram.y" + { PartitionBoundSpec *n = makeNode(PartitionBoundSpec); n->strategy = PARTITION_STRATEGY_LIST; @@ -29501,12 +29993,12 @@ yyreduce: (yyval.partboundspec) = n; } -#line 29505 "gram.c" /* yacc.c:1652 */ +#line 29997 "gram.c" break; - case 383: -#line 2890 "gram.y" /* yacc.c:1652 */ - { + case 383: /* PartitionBoundSpec: FOR VALUES FROM '(' expr_list ')' TO '(' expr_list ')' */ +#line 2890 "gram.y" + { PartitionBoundSpec *n = makeNode(PartitionBoundSpec); n->strategy = PARTITION_STRATEGY_RANGE; @@ -29517,12 +30009,12 @@ yyreduce: (yyval.partboundspec) = n; } -#line 29521 "gram.c" /* yacc.c:1652 */ +#line 30013 "gram.c" break; - case 384: -#line 2904 "gram.y" /* yacc.c:1652 */ - { + case 384: /* PartitionBoundSpec: DEFAULT */ +#line 2904 "gram.y" + { PartitionBoundSpec *n = makeNode(PartitionBoundSpec); n->is_default = true; @@ -29530,36 +30022,36 @@ yyreduce: (yyval.partboundspec) = n; } -#line 29534 "gram.c" /* yacc.c:1652 */ +#line 30026 "gram.c" break; - case 385: -#line 2916 "gram.y" /* yacc.c:1652 */ - { + case 385: /* hash_partbound_elem: NonReservedWord Iconst */ +#line 2916 "gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[-1].str), (Node *)makeInteger((yyvsp[0].ival)), (yylsp[-1])); } -#line 29542 "gram.c" /* yacc.c:1652 */ +#line 30034 "gram.c" break; - case 386: -#line 2923 "gram.y" /* yacc.c:1652 */ - { + case 386: /* hash_partbound: hash_partbound_elem */ +#line 2923 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 29550 "gram.c" /* yacc.c:1652 */ +#line 30042 "gram.c" break; - case 387: -#line 2927 "gram.y" /* yacc.c:1652 */ - { + case 387: /* hash_partbound: hash_partbound ',' hash_partbound_elem */ +#line 2927 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } -#line 29558 "gram.c" /* yacc.c:1652 */ +#line 30050 "gram.c" break; - case 388: -#line 2941 "gram.y" /* yacc.c:1652 */ - { + case 388: /* AlterCompositeTypeStmt: ALTER TYPE_P any_name alter_type_cmds */ +#line 2941 "gram.y" + { AlterTableStmt *n = makeNode(AlterTableStmt); /* can't use qualified_name, sigh */ @@ -29568,36 +30060,36 @@ yyreduce: n->objtype = OBJECT_TYPE; (yyval.node) = (Node *)n; } -#line 29572 "gram.c" /* yacc.c:1652 */ +#line 30064 "gram.c" break; - case 389: -#line 2953 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 29578 "gram.c" /* yacc.c:1652 */ + case 389: /* alter_type_cmds: alter_type_cmd */ +#line 2953 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 30070 "gram.c" break; - case 390: -#line 2954 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 29584 "gram.c" /* yacc.c:1652 */ + case 390: /* alter_type_cmds: alter_type_cmds ',' alter_type_cmd */ +#line 2954 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } +#line 30076 "gram.c" break; - case 391: -#line 2960 "gram.y" /* yacc.c:1652 */ - { + case 391: /* alter_type_cmd: ADD_P ATTRIBUTE TableFuncElement opt_drop_behavior */ +#line 2960 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_AddColumn; n->def = (yyvsp[-1].node); n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *)n; } -#line 29596 "gram.c" /* yacc.c:1652 */ +#line 30088 "gram.c" break; - case 392: -#line 2969 "gram.y" /* yacc.c:1652 */ - { + case 392: /* alter_type_cmd: DROP ATTRIBUTE IF_P EXISTS ColId opt_drop_behavior */ +#line 2969 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropColumn; n->name = (yyvsp[-1].str); @@ -29605,12 +30097,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 29609 "gram.c" /* yacc.c:1652 */ +#line 30101 "gram.c" break; - case 393: -#line 2979 "gram.y" /* yacc.c:1652 */ - { + case 393: /* alter_type_cmd: DROP ATTRIBUTE ColId opt_drop_behavior */ +#line 2979 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); n->subtype = AT_DropColumn; n->name = (yyvsp[-1].str); @@ -29618,12 +30110,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 29622 "gram.c" /* yacc.c:1652 */ +#line 30114 "gram.c" break; - case 394: -#line 2989 "gram.y" /* yacc.c:1652 */ - { + case 394: /* alter_type_cmd: ALTER ATTRIBUTE ColId opt_set_data TYPE_P Typename opt_collate_clause opt_drop_behavior */ +#line 2989 "gram.y" + { AlterTableCmd *n = makeNode(AlterTableCmd); ColumnDef *def = makeNode(ColumnDef); n->subtype = AT_AlterColumnType; @@ -29637,32 +30129,32 @@ yyreduce: def->location = (yylsp[-5]); (yyval.node) = (Node *)n; } -#line 29641 "gram.c" /* yacc.c:1652 */ +#line 30133 "gram.c" break; - case 395: -#line 3015 "gram.y" /* yacc.c:1652 */ - { + case 395: /* ClosePortalStmt: CLOSE cursor_name */ +#line 3015 "gram.y" + { ClosePortalStmt *n = makeNode(ClosePortalStmt); n->portalname = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 29651 "gram.c" /* yacc.c:1652 */ +#line 30143 "gram.c" break; - case 396: -#line 3021 "gram.y" /* yacc.c:1652 */ - { + case 396: /* ClosePortalStmt: CLOSE ALL */ +#line 3021 "gram.y" + { ClosePortalStmt *n = makeNode(ClosePortalStmt); n->portalname = NULL; (yyval.node) = (Node *)n; } -#line 29661 "gram.c" /* yacc.c:1652 */ +#line 30153 "gram.c" break; - case 397: -#line 3056 "gram.y" /* yacc.c:1652 */ - { + case 397: /* CopyStmt: COPY opt_binary qualified_name opt_column_list copy_from opt_program copy_file_name copy_delimiter opt_with copy_options where_clause */ +#line 3056 "gram.y" + { CopyStmt *n = makeNode(CopyStmt); n->relation = (yyvsp[-8].range); n->query = NULL; @@ -29694,12 +30186,12 @@ yyreduce: n->options = list_concat(n->options, (yyvsp[-1].list)); (yyval.node) = (Node *)n; } -#line 29698 "gram.c" /* yacc.c:1652 */ +#line 30190 "gram.c" break; - case 398: -#line 3089 "gram.y" /* yacc.c:1652 */ - { + case 398: /* CopyStmt: COPY '(' PreparableStmt ')' TO opt_program copy_file_name opt_with copy_options */ +#line 3089 "gram.y" + { CopyStmt *n = makeNode(CopyStmt); n->relation = NULL; n->query = (yyvsp[-6].node); @@ -29717,286 +30209,286 @@ yyreduce: (yyval.node) = (Node *)n; } -#line 29721 "gram.c" /* yacc.c:1652 */ +#line 30213 "gram.c" break; - case 399: -#line 3110 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 29727 "gram.c" /* yacc.c:1652 */ + case 399: /* copy_from: FROM */ +#line 3110 "gram.y" + { (yyval.boolean) = true; } +#line 30219 "gram.c" break; - case 400: -#line 3111 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 29733 "gram.c" /* yacc.c:1652 */ + case 400: /* copy_from: TO */ +#line 3111 "gram.y" + { (yyval.boolean) = false; } +#line 30225 "gram.c" break; - case 401: -#line 3115 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 29739 "gram.c" /* yacc.c:1652 */ + case 401: /* opt_program: PROGRAM */ +#line 3115 "gram.y" + { (yyval.boolean) = true; } +#line 30231 "gram.c" break; - case 402: -#line 3116 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 29745 "gram.c" /* yacc.c:1652 */ + case 402: /* opt_program: %empty */ +#line 3116 "gram.y" + { (yyval.boolean) = false; } +#line 30237 "gram.c" break; - case 403: -#line 3125 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 29751 "gram.c" /* yacc.c:1652 */ + case 403: /* copy_file_name: Sconst */ +#line 3125 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 30243 "gram.c" break; - case 404: -#line 3126 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 29757 "gram.c" /* yacc.c:1652 */ + case 404: /* copy_file_name: STDIN */ +#line 3126 "gram.y" + { (yyval.str) = NULL; } +#line 30249 "gram.c" break; - case 405: -#line 3127 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 29763 "gram.c" /* yacc.c:1652 */ + case 405: /* copy_file_name: STDOUT */ +#line 3127 "gram.y" + { (yyval.str) = NULL; } +#line 30255 "gram.c" break; - case 406: -#line 3130 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 29769 "gram.c" /* yacc.c:1652 */ + case 406: /* copy_options: copy_opt_list */ +#line 3130 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 30261 "gram.c" break; - case 407: -#line 3131 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 29775 "gram.c" /* yacc.c:1652 */ + case 407: /* copy_options: '(' copy_generic_opt_list ')' */ +#line 3131 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 30267 "gram.c" break; - case 408: -#line 3136 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 29781 "gram.c" /* yacc.c:1652 */ + case 408: /* copy_opt_list: copy_opt_list copy_opt_item */ +#line 3136 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 30273 "gram.c" break; - case 409: -#line 3137 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 29787 "gram.c" /* yacc.c:1652 */ + case 409: /* copy_opt_list: %empty */ +#line 3137 "gram.y" + { (yyval.list) = NIL; } +#line 30279 "gram.c" break; - case 410: -#line 3142 "gram.y" /* yacc.c:1652 */ - { + case 410: /* copy_opt_item: BINARY */ +#line 3142 "gram.y" + { (yyval.defelt) = makeDefElem("format", (Node *)makeString("binary"), (yylsp[0])); } -#line 29795 "gram.c" /* yacc.c:1652 */ +#line 30287 "gram.c" break; - case 411: -#line 3146 "gram.y" /* yacc.c:1652 */ - { + case 411: /* copy_opt_item: FREEZE */ +#line 3146 "gram.y" + { (yyval.defelt) = makeDefElem("freeze", (Node *)makeInteger(true), (yylsp[0])); } -#line 29803 "gram.c" /* yacc.c:1652 */ +#line 30295 "gram.c" break; - case 412: -#line 3150 "gram.y" /* yacc.c:1652 */ - { + case 412: /* copy_opt_item: DELIMITER opt_as Sconst */ +#line 3150 "gram.y" + { (yyval.defelt) = makeDefElem("delimiter", (Node *)makeString((yyvsp[0].str)), (yylsp[-2])); } -#line 29811 "gram.c" /* yacc.c:1652 */ +#line 30303 "gram.c" break; - case 413: -#line 3154 "gram.y" /* yacc.c:1652 */ - { + case 413: /* copy_opt_item: NULL_P opt_as Sconst */ +#line 3154 "gram.y" + { (yyval.defelt) = makeDefElem("null", (Node *)makeString((yyvsp[0].str)), (yylsp[-2])); } -#line 29819 "gram.c" /* yacc.c:1652 */ +#line 30311 "gram.c" break; - case 414: -#line 3158 "gram.y" /* yacc.c:1652 */ - { + case 414: /* copy_opt_item: CSV */ +#line 3158 "gram.y" + { (yyval.defelt) = makeDefElem("format", (Node *)makeString("csv"), (yylsp[0])); } -#line 29827 "gram.c" /* yacc.c:1652 */ +#line 30319 "gram.c" break; - case 415: -#line 3162 "gram.y" /* yacc.c:1652 */ - { + case 415: /* copy_opt_item: HEADER_P */ +#line 3162 "gram.y" + { (yyval.defelt) = makeDefElem("header", (Node *)makeInteger(true), (yylsp[0])); } -#line 29835 "gram.c" /* yacc.c:1652 */ +#line 30327 "gram.c" break; - case 416: -#line 3166 "gram.y" /* yacc.c:1652 */ - { + case 416: /* copy_opt_item: QUOTE opt_as Sconst */ +#line 3166 "gram.y" + { (yyval.defelt) = makeDefElem("quote", (Node *)makeString((yyvsp[0].str)), (yylsp[-2])); } -#line 29843 "gram.c" /* yacc.c:1652 */ +#line 30335 "gram.c" break; - case 417: -#line 3170 "gram.y" /* yacc.c:1652 */ - { + case 417: /* copy_opt_item: ESCAPE opt_as Sconst */ +#line 3170 "gram.y" + { (yyval.defelt) = makeDefElem("escape", (Node *)makeString((yyvsp[0].str)), (yylsp[-2])); } -#line 29851 "gram.c" /* yacc.c:1652 */ +#line 30343 "gram.c" break; - case 418: -#line 3174 "gram.y" /* yacc.c:1652 */ - { + case 418: /* copy_opt_item: FORCE QUOTE columnList */ +#line 3174 "gram.y" + { (yyval.defelt) = makeDefElem("force_quote", (Node *)(yyvsp[0].list), (yylsp[-2])); } -#line 29859 "gram.c" /* yacc.c:1652 */ +#line 30351 "gram.c" break; - case 419: -#line 3178 "gram.y" /* yacc.c:1652 */ - { + case 419: /* copy_opt_item: FORCE QUOTE '*' */ +#line 3178 "gram.y" + { (yyval.defelt) = makeDefElem("force_quote", (Node *)makeNode(A_Star), (yylsp[-2])); } -#line 29867 "gram.c" /* yacc.c:1652 */ +#line 30359 "gram.c" break; - case 420: -#line 3182 "gram.y" /* yacc.c:1652 */ - { + case 420: /* copy_opt_item: FORCE NOT NULL_P columnList */ +#line 3182 "gram.y" + { (yyval.defelt) = makeDefElem("force_not_null", (Node *)(yyvsp[0].list), (yylsp[-3])); } -#line 29875 "gram.c" /* yacc.c:1652 */ +#line 30367 "gram.c" break; - case 421: -#line 3186 "gram.y" /* yacc.c:1652 */ - { + case 421: /* copy_opt_item: FORCE NULL_P columnList */ +#line 3186 "gram.y" + { (yyval.defelt) = makeDefElem("force_null", (Node *)(yyvsp[0].list), (yylsp[-2])); } -#line 29883 "gram.c" /* yacc.c:1652 */ +#line 30375 "gram.c" break; - case 422: -#line 3190 "gram.y" /* yacc.c:1652 */ - { + case 422: /* copy_opt_item: ENCODING Sconst */ +#line 3190 "gram.y" + { (yyval.defelt) = makeDefElem("encoding", (Node *)makeString((yyvsp[0].str)), (yylsp[-1])); } -#line 29891 "gram.c" /* yacc.c:1652 */ +#line 30383 "gram.c" break; - case 423: -#line 3199 "gram.y" /* yacc.c:1652 */ - { + case 423: /* opt_binary: BINARY */ +#line 3199 "gram.y" + { (yyval.defelt) = makeDefElem("format", (Node *)makeString("binary"), (yylsp[0])); } -#line 29899 "gram.c" /* yacc.c:1652 */ +#line 30391 "gram.c" break; - case 424: -#line 3202 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = NULL; } -#line 29905 "gram.c" /* yacc.c:1652 */ + case 424: /* opt_binary: %empty */ +#line 3202 "gram.y" + { (yyval.defelt) = NULL; } +#line 30397 "gram.c" break; - case 425: -#line 3207 "gram.y" /* yacc.c:1652 */ - { + case 425: /* copy_delimiter: opt_using DELIMITERS Sconst */ +#line 3207 "gram.y" + { (yyval.defelt) = makeDefElem("delimiter", (Node *)makeString((yyvsp[0].str)), (yylsp[-1])); } -#line 29913 "gram.c" /* yacc.c:1652 */ +#line 30405 "gram.c" break; - case 426: -#line 3210 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = NULL; } -#line 29919 "gram.c" /* yacc.c:1652 */ + case 426: /* copy_delimiter: %empty */ +#line 3210 "gram.y" + { (yyval.defelt) = NULL; } +#line 30411 "gram.c" break; - case 429: -#line 3221 "gram.y" /* yacc.c:1652 */ - { + case 429: /* copy_generic_opt_list: copy_generic_opt_elem */ +#line 3221 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 29927 "gram.c" /* yacc.c:1652 */ +#line 30419 "gram.c" break; - case 430: -#line 3225 "gram.y" /* yacc.c:1652 */ - { + case 430: /* copy_generic_opt_list: copy_generic_opt_list ',' copy_generic_opt_elem */ +#line 3225 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } -#line 29935 "gram.c" /* yacc.c:1652 */ +#line 30427 "gram.c" break; - case 431: -#line 3232 "gram.y" /* yacc.c:1652 */ - { + case 431: /* copy_generic_opt_elem: ColLabel copy_generic_opt_arg */ +#line 3232 "gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[-1].str), (yyvsp[0].node), (yylsp[-1])); } -#line 29943 "gram.c" /* yacc.c:1652 */ +#line 30435 "gram.c" break; - case 432: -#line 3238 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeString((yyvsp[0].str)); } -#line 29949 "gram.c" /* yacc.c:1652 */ + case 432: /* copy_generic_opt_arg: opt_boolean_or_string */ +#line 3238 "gram.y" + { (yyval.node) = (Node *) makeString((yyvsp[0].str)); } +#line 30441 "gram.c" break; - case 433: -#line 3239 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) (yyvsp[0].value); } -#line 29955 "gram.c" /* yacc.c:1652 */ + case 433: /* copy_generic_opt_arg: NumericOnly */ +#line 3239 "gram.y" + { (yyval.node) = (Node *) (yyvsp[0].value); } +#line 30447 "gram.c" break; - case 434: -#line 3240 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeNode(A_Star); } -#line 29961 "gram.c" /* yacc.c:1652 */ + case 434: /* copy_generic_opt_arg: '*' */ +#line 3240 "gram.y" + { (yyval.node) = (Node *) makeNode(A_Star); } +#line 30453 "gram.c" break; - case 435: -#line 3241 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) (yyvsp[-1].list); } -#line 29967 "gram.c" /* yacc.c:1652 */ + case 435: /* copy_generic_opt_arg: '(' copy_generic_opt_arg_list ')' */ +#line 3241 "gram.y" + { (yyval.node) = (Node *) (yyvsp[-1].list); } +#line 30459 "gram.c" break; - case 436: -#line 3242 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 29973 "gram.c" /* yacc.c:1652 */ + case 436: /* copy_generic_opt_arg: %empty */ +#line 3242 "gram.y" + { (yyval.node) = NULL; } +#line 30465 "gram.c" break; - case 437: -#line 3247 "gram.y" /* yacc.c:1652 */ - { + case 437: /* copy_generic_opt_arg_list: copy_generic_opt_arg_list_item */ +#line 3247 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 29981 "gram.c" /* yacc.c:1652 */ +#line 30473 "gram.c" break; - case 438: -#line 3251 "gram.y" /* yacc.c:1652 */ - { + case 438: /* copy_generic_opt_arg_list: copy_generic_opt_arg_list ',' copy_generic_opt_arg_list_item */ +#line 3251 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 29989 "gram.c" /* yacc.c:1652 */ +#line 30481 "gram.c" break; - case 439: -#line 3258 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeString((yyvsp[0].str)); } -#line 29995 "gram.c" /* yacc.c:1652 */ + case 439: /* copy_generic_opt_arg_list_item: opt_boolean_or_string */ +#line 3258 "gram.y" + { (yyval.node) = (Node *) makeString((yyvsp[0].str)); } +#line 30487 "gram.c" break; - case 440: -#line 3272 "gram.y" /* yacc.c:1652 */ - { + case 440: /* CreateStmt: CREATE OptTemp TABLE qualified_name '(' OptTableElementList ')' OptInherit OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace */ +#line 3272 "gram.y" + { CreateStmt *n = makeNode(CreateStmt); (yyvsp[-9].range)->relpersistence = (yyvsp[-11].ival); n->relation = (yyvsp[-9].range); @@ -30012,12 +30504,12 @@ yyreduce: n->if_not_exists = false; (yyval.node) = (Node *)n; } -#line 30016 "gram.c" /* yacc.c:1652 */ +#line 30508 "gram.c" break; - case 441: -#line 3291 "gram.y" /* yacc.c:1652 */ - { + case 441: /* CreateStmt: CREATE OptTemp TABLE IF_P NOT EXISTS qualified_name '(' OptTableElementList ')' OptInherit OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace */ +#line 3291 "gram.y" + { CreateStmt *n = makeNode(CreateStmt); (yyvsp[-9].range)->relpersistence = (yyvsp[-14].ival); n->relation = (yyvsp[-9].range); @@ -30033,12 +30525,12 @@ yyreduce: n->if_not_exists = true; (yyval.node) = (Node *)n; } -#line 30037 "gram.c" /* yacc.c:1652 */ +#line 30529 "gram.c" break; - case 442: -#line 3310 "gram.y" /* yacc.c:1652 */ - { + case 442: /* CreateStmt: CREATE OptTemp TABLE qualified_name OF any_name OptTypedTableElementList OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace */ +#line 3310 "gram.y" + { CreateStmt *n = makeNode(CreateStmt); (yyvsp[-8].range)->relpersistence = (yyvsp[-10].ival); n->relation = (yyvsp[-8].range); @@ -30055,12 +30547,12 @@ yyreduce: n->if_not_exists = false; (yyval.node) = (Node *)n; } -#line 30059 "gram.c" /* yacc.c:1652 */ +#line 30551 "gram.c" break; - case 443: -#line 3330 "gram.y" /* yacc.c:1652 */ - { + case 443: /* CreateStmt: CREATE OptTemp TABLE IF_P NOT EXISTS qualified_name OF any_name OptTypedTableElementList OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace */ +#line 3330 "gram.y" + { CreateStmt *n = makeNode(CreateStmt); (yyvsp[-8].range)->relpersistence = (yyvsp[-13].ival); n->relation = (yyvsp[-8].range); @@ -30077,12 +30569,12 @@ yyreduce: n->if_not_exists = true; (yyval.node) = (Node *)n; } -#line 30081 "gram.c" /* yacc.c:1652 */ +#line 30573 "gram.c" break; - case 444: -#line 3350 "gram.y" /* yacc.c:1652 */ - { + case 444: /* CreateStmt: CREATE OptTemp TABLE qualified_name PARTITION OF qualified_name OptTypedTableElementList PartitionBoundSpec OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace */ +#line 3350 "gram.y" + { CreateStmt *n = makeNode(CreateStmt); (yyvsp[-10].range)->relpersistence = (yyvsp[-12].ival); n->relation = (yyvsp[-10].range); @@ -30099,12 +30591,12 @@ yyreduce: n->if_not_exists = false; (yyval.node) = (Node *)n; } -#line 30103 "gram.c" /* yacc.c:1652 */ +#line 30595 "gram.c" break; - case 445: -#line 3370 "gram.y" /* yacc.c:1652 */ - { + case 445: /* CreateStmt: CREATE OptTemp TABLE IF_P NOT EXISTS qualified_name PARTITION OF qualified_name OptTypedTableElementList PartitionBoundSpec OptPartitionSpec table_access_method_clause OptWith OnCommitOption OptTableSpace */ +#line 3370 "gram.y" + { CreateStmt *n = makeNode(CreateStmt); (yyvsp[-10].range)->relpersistence = (yyvsp[-15].ival); n->relation = (yyvsp[-10].range); @@ -30121,156 +30613,156 @@ yyreduce: n->if_not_exists = true; (yyval.node) = (Node *)n; } -#line 30125 "gram.c" /* yacc.c:1652 */ +#line 30617 "gram.c" break; - case 446: -#line 3400 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = RELPERSISTENCE_TEMP; } -#line 30131 "gram.c" /* yacc.c:1652 */ + case 446: /* OptTemp: TEMPORARY */ +#line 3400 "gram.y" + { (yyval.ival) = RELPERSISTENCE_TEMP; } +#line 30623 "gram.c" break; - case 447: -#line 3401 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = RELPERSISTENCE_TEMP; } -#line 30137 "gram.c" /* yacc.c:1652 */ + case 447: /* OptTemp: TEMP */ +#line 3401 "gram.y" + { (yyval.ival) = RELPERSISTENCE_TEMP; } +#line 30629 "gram.c" break; - case 448: -#line 3402 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = RELPERSISTENCE_TEMP; } -#line 30143 "gram.c" /* yacc.c:1652 */ + case 448: /* OptTemp: LOCAL TEMPORARY */ +#line 3402 "gram.y" + { (yyval.ival) = RELPERSISTENCE_TEMP; } +#line 30635 "gram.c" break; - case 449: -#line 3403 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = RELPERSISTENCE_TEMP; } -#line 30149 "gram.c" /* yacc.c:1652 */ + case 449: /* OptTemp: LOCAL TEMP */ +#line 3403 "gram.y" + { (yyval.ival) = RELPERSISTENCE_TEMP; } +#line 30641 "gram.c" break; - case 450: -#line 3405 "gram.y" /* yacc.c:1652 */ - { + case 450: /* OptTemp: GLOBAL TEMPORARY */ +#line 3405 "gram.y" + { ereport(WARNING, (errmsg("GLOBAL is deprecated in temporary table creation"), parser_errposition((yylsp[-1])))); (yyval.ival) = RELPERSISTENCE_TEMP; } -#line 30160 "gram.c" /* yacc.c:1652 */ +#line 30652 "gram.c" break; - case 451: -#line 3412 "gram.y" /* yacc.c:1652 */ - { + case 451: /* OptTemp: GLOBAL TEMP */ +#line 3412 "gram.y" + { ereport(WARNING, (errmsg("GLOBAL is deprecated in temporary table creation"), parser_errposition((yylsp[-1])))); (yyval.ival) = RELPERSISTENCE_TEMP; } -#line 30171 "gram.c" /* yacc.c:1652 */ +#line 30663 "gram.c" break; - case 452: -#line 3418 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = RELPERSISTENCE_UNLOGGED; } -#line 30177 "gram.c" /* yacc.c:1652 */ + case 452: /* OptTemp: UNLOGGED */ +#line 3418 "gram.y" + { (yyval.ival) = RELPERSISTENCE_UNLOGGED; } +#line 30669 "gram.c" break; - case 453: -#line 3419 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = RELPERSISTENCE_PERMANENT; } -#line 30183 "gram.c" /* yacc.c:1652 */ + case 453: /* OptTemp: %empty */ +#line 3419 "gram.y" + { (yyval.ival) = RELPERSISTENCE_PERMANENT; } +#line 30675 "gram.c" break; - case 454: -#line 3423 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 30189 "gram.c" /* yacc.c:1652 */ + case 454: /* OptTableElementList: TableElementList */ +#line 3423 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 30681 "gram.c" break; - case 455: -#line 3424 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 30195 "gram.c" /* yacc.c:1652 */ + case 455: /* OptTableElementList: %empty */ +#line 3424 "gram.y" + { (yyval.list) = NIL; } +#line 30687 "gram.c" break; - case 456: -#line 3428 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 30201 "gram.c" /* yacc.c:1652 */ + case 456: /* OptTypedTableElementList: '(' TypedTableElementList ')' */ +#line 3428 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 30693 "gram.c" break; - case 457: -#line 3429 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 30207 "gram.c" /* yacc.c:1652 */ + case 457: /* OptTypedTableElementList: %empty */ +#line 3429 "gram.y" + { (yyval.list) = NIL; } +#line 30699 "gram.c" break; - case 458: -#line 3434 "gram.y" /* yacc.c:1652 */ - { + case 458: /* TableElementList: TableElement */ +#line 3434 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 30215 "gram.c" /* yacc.c:1652 */ +#line 30707 "gram.c" break; - case 459: -#line 3438 "gram.y" /* yacc.c:1652 */ - { + case 459: /* TableElementList: TableElementList ',' TableElement */ +#line 3438 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 30223 "gram.c" /* yacc.c:1652 */ +#line 30715 "gram.c" break; - case 460: -#line 3445 "gram.y" /* yacc.c:1652 */ - { + case 460: /* TypedTableElementList: TypedTableElement */ +#line 3445 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 30231 "gram.c" /* yacc.c:1652 */ +#line 30723 "gram.c" break; - case 461: -#line 3449 "gram.y" /* yacc.c:1652 */ - { + case 461: /* TypedTableElementList: TypedTableElementList ',' TypedTableElement */ +#line 3449 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 30239 "gram.c" /* yacc.c:1652 */ +#line 30731 "gram.c" break; - case 462: -#line 3455 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 30245 "gram.c" /* yacc.c:1652 */ + case 462: /* TableElement: columnDef */ +#line 3455 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 30737 "gram.c" break; - case 463: -#line 3456 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 30251 "gram.c" /* yacc.c:1652 */ + case 463: /* TableElement: TableLikeClause */ +#line 3456 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 30743 "gram.c" break; - case 464: -#line 3457 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 30257 "gram.c" /* yacc.c:1652 */ + case 464: /* TableElement: TableConstraint */ +#line 3457 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 30749 "gram.c" break; - case 465: -#line 3461 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 30263 "gram.c" /* yacc.c:1652 */ + case 465: /* TypedTableElement: columnOptions */ +#line 3461 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 30755 "gram.c" break; - case 466: -#line 3462 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 30269 "gram.c" /* yacc.c:1652 */ + case 466: /* TypedTableElement: TableConstraint */ +#line 3462 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 30761 "gram.c" break; - case 467: -#line 3466 "gram.y" /* yacc.c:1652 */ - { + case 467: /* columnDef: ColId Typename opt_column_compression create_generic_options ColQualList */ +#line 3466 "gram.y" + { ColumnDef *n = makeNode(ColumnDef); n->colname = (yyvsp[-4].str); n->typeName = (yyvsp[-3].typnam); @@ -30289,12 +30781,12 @@ yyreduce: n->location = (yylsp[-4]); (yyval.node) = (Node *)n; } -#line 30293 "gram.c" /* yacc.c:1652 */ +#line 30785 "gram.c" break; - case 468: -#line 3488 "gram.y" /* yacc.c:1652 */ - { + case 468: /* columnOptions: ColId ColQualList */ +#line 3488 "gram.y" + { ColumnDef *n = makeNode(ColumnDef); n->colname = (yyvsp[-1].str); n->typeName = NULL; @@ -30311,12 +30803,12 @@ yyreduce: n->location = (yylsp[-1]); (yyval.node) = (Node *)n; } -#line 30315 "gram.c" /* yacc.c:1652 */ +#line 30807 "gram.c" break; - case 469: -#line 3506 "gram.y" /* yacc.c:1652 */ - { + case 469: /* columnOptions: ColId WITH OPTIONS ColQualList */ +#line 3506 "gram.y" + { ColumnDef *n = makeNode(ColumnDef); n->colname = (yyvsp[-3].str); n->typeName = NULL; @@ -30333,71 +30825,71 @@ yyreduce: n->location = (yylsp[-3]); (yyval.node) = (Node *)n; } -#line 30337 "gram.c" /* yacc.c:1652 */ +#line 30829 "gram.c" break; - case 470: -#line 3526 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 30343 "gram.c" /* yacc.c:1652 */ + case 470: /* column_compression: COMPRESSION ColId */ +#line 3526 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 30835 "gram.c" break; - case 471: -#line 3527 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup("default"); } -#line 30349 "gram.c" /* yacc.c:1652 */ + case 471: /* column_compression: COMPRESSION DEFAULT */ +#line 3527 "gram.y" + { (yyval.str) = pstrdup("default"); } +#line 30841 "gram.c" break; - case 472: -#line 3531 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 30355 "gram.c" /* yacc.c:1652 */ + case 472: /* opt_column_compression: column_compression */ +#line 3531 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 30847 "gram.c" break; - case 473: -#line 3532 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 30361 "gram.c" /* yacc.c:1652 */ + case 473: /* opt_column_compression: %empty */ +#line 3532 "gram.y" + { (yyval.str) = NULL; } +#line 30853 "gram.c" break; - case 474: -#line 3536 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } -#line 30367 "gram.c" /* yacc.c:1652 */ + case 474: /* ColQualList: ColQualList ColConstraint */ +#line 3536 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } +#line 30859 "gram.c" break; - case 475: -#line 3537 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 30373 "gram.c" /* yacc.c:1652 */ + case 475: /* ColQualList: %empty */ +#line 3537 "gram.y" + { (yyval.list) = NIL; } +#line 30865 "gram.c" break; - case 476: -#line 3542 "gram.y" /* yacc.c:1652 */ - { + case 476: /* ColConstraint: CONSTRAINT name ColConstraintElem */ +#line 3542 "gram.y" + { Constraint *n = castNode(Constraint, (yyvsp[0].node)); n->conname = (yyvsp[-1].str); n->location = (yylsp[-2]); (yyval.node) = (Node *) n; } -#line 30384 "gram.c" /* yacc.c:1652 */ +#line 30876 "gram.c" break; - case 477: -#line 3548 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 30390 "gram.c" /* yacc.c:1652 */ + case 477: /* ColConstraint: ColConstraintElem */ +#line 3548 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 30882 "gram.c" break; - case 478: -#line 3549 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 30396 "gram.c" /* yacc.c:1652 */ + case 478: /* ColConstraint: ConstraintAttr */ +#line 3549 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 30888 "gram.c" break; - case 479: -#line 3551 "gram.y" /* yacc.c:1652 */ - { + case 479: /* ColConstraint: COLLATE any_name */ +#line 3551 "gram.y" + { /* * Note: the CollateClause is momentarily included in * the list built by ColQualList, but we split it out @@ -30409,34 +30901,34 @@ yyreduce: n->location = (yylsp[-1]); (yyval.node) = (Node *) n; } -#line 30413 "gram.c" /* yacc.c:1652 */ +#line 30905 "gram.c" break; - case 480: -#line 3582 "gram.y" /* yacc.c:1652 */ - { + case 480: /* ColConstraintElem: NOT NULL_P */ +#line 3582 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_NOTNULL; n->location = (yylsp[-1]); (yyval.node) = (Node *)n; } -#line 30424 "gram.c" /* yacc.c:1652 */ +#line 30916 "gram.c" break; - case 481: -#line 3589 "gram.y" /* yacc.c:1652 */ - { + case 481: /* ColConstraintElem: NULL_P */ +#line 3589 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_NULL; n->location = (yylsp[0]); (yyval.node) = (Node *)n; } -#line 30435 "gram.c" /* yacc.c:1652 */ +#line 30927 "gram.c" break; - case 482: -#line 3596 "gram.y" /* yacc.c:1652 */ - { + case 482: /* ColConstraintElem: UNIQUE opt_definition OptConsTableSpace */ +#line 3596 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_UNIQUE; n->location = (yylsp[-2]); @@ -30446,12 +30938,12 @@ yyreduce: n->indexspace = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 30450 "gram.c" /* yacc.c:1652 */ +#line 30942 "gram.c" break; - case 483: -#line 3607 "gram.y" /* yacc.c:1652 */ - { + case 483: /* ColConstraintElem: PRIMARY KEY opt_definition OptConsTableSpace */ +#line 3607 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_PRIMARY; n->location = (yylsp[-3]); @@ -30461,12 +30953,12 @@ yyreduce: n->indexspace = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 30465 "gram.c" /* yacc.c:1652 */ +#line 30957 "gram.c" break; - case 484: -#line 3618 "gram.y" /* yacc.c:1652 */ - { + case 484: /* ColConstraintElem: CHECK '(' a_expr ')' opt_no_inherit */ +#line 3618 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_CHECK; n->location = (yylsp[-4]); @@ -30477,12 +30969,12 @@ yyreduce: n->initially_valid = true; (yyval.node) = (Node *)n; } -#line 30481 "gram.c" /* yacc.c:1652 */ +#line 30973 "gram.c" break; - case 485: -#line 3630 "gram.y" /* yacc.c:1652 */ - { + case 485: /* ColConstraintElem: DEFAULT b_expr */ +#line 3630 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_DEFAULT; n->location = (yylsp[-1]); @@ -30490,12 +30982,12 @@ yyreduce: n->cooked_expr = NULL; (yyval.node) = (Node *)n; } -#line 30494 "gram.c" /* yacc.c:1652 */ +#line 30986 "gram.c" break; - case 486: -#line 3639 "gram.y" /* yacc.c:1652 */ - { + case 486: /* ColConstraintElem: GENERATED generated_when AS IDENTITY_P OptParenthesizedSeqOptList */ +#line 3639 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_IDENTITY; n->generated_when = (yyvsp[-3].ival); @@ -30503,12 +30995,12 @@ yyreduce: n->location = (yylsp[-4]); (yyval.node) = (Node *)n; } -#line 30507 "gram.c" /* yacc.c:1652 */ +#line 30999 "gram.c" break; - case 487: -#line 3648 "gram.y" /* yacc.c:1652 */ - { + case 487: /* ColConstraintElem: GENERATED generated_when AS '(' a_expr ')' STORED */ +#line 3648 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_GENERATED; n->generated_when = (yyvsp[-5].ival); @@ -30530,12 +31022,12 @@ yyreduce: (yyval.node) = (Node *)n; } -#line 30534 "gram.c" /* yacc.c:1652 */ +#line 31026 "gram.c" break; - case 488: -#line 3671 "gram.y" /* yacc.c:1652 */ - { + case 488: /* ColConstraintElem: REFERENCES qualified_name opt_column_list key_match key_actions */ +#line 3671 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_FOREIGN; n->location = (yylsp[-4]); @@ -30549,175 +31041,175 @@ yyreduce: n->initially_valid = true; (yyval.node) = (Node *)n; } -#line 30553 "gram.c" /* yacc.c:1652 */ +#line 31045 "gram.c" break; - case 489: -#line 3688 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = ATTRIBUTE_IDENTITY_ALWAYS; } -#line 30559 "gram.c" /* yacc.c:1652 */ + case 489: /* generated_when: ALWAYS */ +#line 3688 "gram.y" + { (yyval.ival) = ATTRIBUTE_IDENTITY_ALWAYS; } +#line 31051 "gram.c" break; - case 490: -#line 3689 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = ATTRIBUTE_IDENTITY_BY_DEFAULT; } -#line 30565 "gram.c" /* yacc.c:1652 */ + case 490: /* generated_when: BY DEFAULT */ +#line 3689 "gram.y" + { (yyval.ival) = ATTRIBUTE_IDENTITY_BY_DEFAULT; } +#line 31057 "gram.c" break; - case 491: -#line 3709 "gram.y" /* yacc.c:1652 */ - { + case 491: /* ConstraintAttr: DEFERRABLE */ +#line 3709 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_ATTR_DEFERRABLE; n->location = (yylsp[0]); (yyval.node) = (Node *)n; } -#line 30576 "gram.c" /* yacc.c:1652 */ +#line 31068 "gram.c" break; - case 492: -#line 3716 "gram.y" /* yacc.c:1652 */ - { + case 492: /* ConstraintAttr: NOT DEFERRABLE */ +#line 3716 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_ATTR_NOT_DEFERRABLE; n->location = (yylsp[-1]); (yyval.node) = (Node *)n; } -#line 30587 "gram.c" /* yacc.c:1652 */ +#line 31079 "gram.c" break; - case 493: -#line 3723 "gram.y" /* yacc.c:1652 */ - { + case 493: /* ConstraintAttr: INITIALLY DEFERRED */ +#line 3723 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_ATTR_DEFERRED; n->location = (yylsp[-1]); (yyval.node) = (Node *)n; } -#line 30598 "gram.c" /* yacc.c:1652 */ +#line 31090 "gram.c" break; - case 494: -#line 3730 "gram.y" /* yacc.c:1652 */ - { + case 494: /* ConstraintAttr: INITIALLY IMMEDIATE */ +#line 3730 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_ATTR_IMMEDIATE; n->location = (yylsp[-1]); (yyval.node) = (Node *)n; } -#line 30609 "gram.c" /* yacc.c:1652 */ +#line 31101 "gram.c" break; - case 495: -#line 3741 "gram.y" /* yacc.c:1652 */ - { + case 495: /* TableLikeClause: LIKE qualified_name TableLikeOptionList */ +#line 3741 "gram.y" + { TableLikeClause *n = makeNode(TableLikeClause); n->relation = (yyvsp[-1].range); n->options = (yyvsp[0].ival); n->relationOid = InvalidOid; (yyval.node) = (Node *)n; } -#line 30621 "gram.c" /* yacc.c:1652 */ +#line 31113 "gram.c" break; - case 496: -#line 3751 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = (yyvsp[-2].ival) | (yyvsp[0].ival); } -#line 30627 "gram.c" /* yacc.c:1652 */ + case 496: /* TableLikeOptionList: TableLikeOptionList INCLUDING TableLikeOption */ +#line 3751 "gram.y" + { (yyval.ival) = (yyvsp[-2].ival) | (yyvsp[0].ival); } +#line 31119 "gram.c" break; - case 497: -#line 3752 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = (yyvsp[-2].ival) & ~(yyvsp[0].ival); } -#line 30633 "gram.c" /* yacc.c:1652 */ + case 497: /* TableLikeOptionList: TableLikeOptionList EXCLUDING TableLikeOption */ +#line 3752 "gram.y" + { (yyval.ival) = (yyvsp[-2].ival) & ~(yyvsp[0].ival); } +#line 31125 "gram.c" break; - case 498: -#line 3753 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = 0; } -#line 30639 "gram.c" /* yacc.c:1652 */ + case 498: /* TableLikeOptionList: %empty */ +#line 3753 "gram.y" + { (yyval.ival) = 0; } +#line 31131 "gram.c" break; - case 499: -#line 3757 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CREATE_TABLE_LIKE_COMMENTS; } -#line 30645 "gram.c" /* yacc.c:1652 */ + case 499: /* TableLikeOption: COMMENTS */ +#line 3757 "gram.y" + { (yyval.ival) = CREATE_TABLE_LIKE_COMMENTS; } +#line 31137 "gram.c" break; - case 500: -#line 3758 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CREATE_TABLE_LIKE_COMPRESSION; } -#line 30651 "gram.c" /* yacc.c:1652 */ + case 500: /* TableLikeOption: COMPRESSION */ +#line 3758 "gram.y" + { (yyval.ival) = CREATE_TABLE_LIKE_COMPRESSION; } +#line 31143 "gram.c" break; - case 501: -#line 3759 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CREATE_TABLE_LIKE_CONSTRAINTS; } -#line 30657 "gram.c" /* yacc.c:1652 */ + case 501: /* TableLikeOption: CONSTRAINTS */ +#line 3759 "gram.y" + { (yyval.ival) = CREATE_TABLE_LIKE_CONSTRAINTS; } +#line 31149 "gram.c" break; - case 502: -#line 3760 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CREATE_TABLE_LIKE_DEFAULTS; } -#line 30663 "gram.c" /* yacc.c:1652 */ + case 502: /* TableLikeOption: DEFAULTS */ +#line 3760 "gram.y" + { (yyval.ival) = CREATE_TABLE_LIKE_DEFAULTS; } +#line 31155 "gram.c" break; - case 503: -#line 3761 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CREATE_TABLE_LIKE_IDENTITY; } -#line 30669 "gram.c" /* yacc.c:1652 */ + case 503: /* TableLikeOption: IDENTITY_P */ +#line 3761 "gram.y" + { (yyval.ival) = CREATE_TABLE_LIKE_IDENTITY; } +#line 31161 "gram.c" break; - case 504: -#line 3762 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CREATE_TABLE_LIKE_GENERATED; } -#line 30675 "gram.c" /* yacc.c:1652 */ + case 504: /* TableLikeOption: GENERATED */ +#line 3762 "gram.y" + { (yyval.ival) = CREATE_TABLE_LIKE_GENERATED; } +#line 31167 "gram.c" break; - case 505: -#line 3763 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CREATE_TABLE_LIKE_INDEXES; } -#line 30681 "gram.c" /* yacc.c:1652 */ + case 505: /* TableLikeOption: INDEXES */ +#line 3763 "gram.y" + { (yyval.ival) = CREATE_TABLE_LIKE_INDEXES; } +#line 31173 "gram.c" break; - case 506: -#line 3764 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CREATE_TABLE_LIKE_STATISTICS; } -#line 30687 "gram.c" /* yacc.c:1652 */ + case 506: /* TableLikeOption: STATISTICS */ +#line 3764 "gram.y" + { (yyval.ival) = CREATE_TABLE_LIKE_STATISTICS; } +#line 31179 "gram.c" break; - case 507: -#line 3765 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CREATE_TABLE_LIKE_STORAGE; } -#line 30693 "gram.c" /* yacc.c:1652 */ + case 507: /* TableLikeOption: STORAGE */ +#line 3765 "gram.y" + { (yyval.ival) = CREATE_TABLE_LIKE_STORAGE; } +#line 31185 "gram.c" break; - case 508: -#line 3766 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CREATE_TABLE_LIKE_ALL; } -#line 30699 "gram.c" /* yacc.c:1652 */ + case 508: /* TableLikeOption: ALL */ +#line 3766 "gram.y" + { (yyval.ival) = CREATE_TABLE_LIKE_ALL; } +#line 31191 "gram.c" break; - case 509: -#line 3776 "gram.y" /* yacc.c:1652 */ - { + case 509: /* TableConstraint: CONSTRAINT name ConstraintElem */ +#line 3776 "gram.y" + { Constraint *n = castNode(Constraint, (yyvsp[0].node)); n->conname = (yyvsp[-1].str); n->location = (yylsp[-2]); (yyval.node) = (Node *) n; } -#line 30710 "gram.c" /* yacc.c:1652 */ +#line 31202 "gram.c" break; - case 510: -#line 3782 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 30716 "gram.c" /* yacc.c:1652 */ + case 510: /* TableConstraint: ConstraintElem */ +#line 3782 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 31208 "gram.c" break; - case 511: -#line 3787 "gram.y" /* yacc.c:1652 */ - { + case 511: /* ConstraintElem: CHECK '(' a_expr ')' ConstraintAttributeSpec */ +#line 3787 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_CHECK; n->location = (yylsp[-4]); @@ -30729,12 +31221,12 @@ yyreduce: n->initially_valid = !n->skip_validation; (yyval.node) = (Node *)n; } -#line 30733 "gram.c" /* yacc.c:1652 */ +#line 31225 "gram.c" break; - case 512: -#line 3801 "gram.y" /* yacc.c:1652 */ - { + case 512: /* ConstraintElem: UNIQUE '(' columnList ')' opt_c_include opt_definition OptConsTableSpace ConstraintAttributeSpec */ +#line 3801 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_UNIQUE; n->location = (yylsp[-7]); @@ -30748,12 +31240,12 @@ yyreduce: NULL, yyscanner); (yyval.node) = (Node *)n; } -#line 30752 "gram.c" /* yacc.c:1652 */ +#line 31244 "gram.c" break; - case 513: -#line 3816 "gram.y" /* yacc.c:1652 */ - { + case 513: /* ConstraintElem: UNIQUE ExistingIndex ConstraintAttributeSpec */ +#line 3816 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_UNIQUE; n->location = (yylsp[-2]); @@ -30767,12 +31259,12 @@ yyreduce: NULL, yyscanner); (yyval.node) = (Node *)n; } -#line 30771 "gram.c" /* yacc.c:1652 */ +#line 31263 "gram.c" break; - case 514: -#line 3832 "gram.y" /* yacc.c:1652 */ - { + case 514: /* ConstraintElem: PRIMARY KEY '(' columnList ')' opt_c_include opt_definition OptConsTableSpace ConstraintAttributeSpec */ +#line 3832 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_PRIMARY; n->location = (yylsp[-8]); @@ -30786,12 +31278,12 @@ yyreduce: NULL, yyscanner); (yyval.node) = (Node *)n; } -#line 30790 "gram.c" /* yacc.c:1652 */ +#line 31282 "gram.c" break; - case 515: -#line 3847 "gram.y" /* yacc.c:1652 */ - { + case 515: /* ConstraintElem: PRIMARY KEY ExistingIndex ConstraintAttributeSpec */ +#line 3847 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_PRIMARY; n->location = (yylsp[-3]); @@ -30805,12 +31297,12 @@ yyreduce: NULL, yyscanner); (yyval.node) = (Node *)n; } -#line 30809 "gram.c" /* yacc.c:1652 */ +#line 31301 "gram.c" break; - case 516: -#line 3864 "gram.y" /* yacc.c:1652 */ - { + case 516: /* ConstraintElem: EXCLUDE access_method_clause '(' ExclusionConstraintList ')' opt_c_include opt_definition OptConsTableSpace OptWhereClause ConstraintAttributeSpec */ +#line 3864 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_EXCLUSION; n->location = (yylsp[-9]); @@ -30826,12 +31318,12 @@ yyreduce: NULL, yyscanner); (yyval.node) = (Node *)n; } -#line 30830 "gram.c" /* yacc.c:1652 */ +#line 31322 "gram.c" break; - case 517: -#line 3882 "gram.y" /* yacc.c:1652 */ - { + case 517: /* ConstraintElem: FOREIGN KEY '(' columnList ')' REFERENCES qualified_name opt_column_list key_match key_actions ConstraintAttributeSpec */ +#line 3882 "gram.y" + { Constraint *n = makeNode(Constraint); n->contype = CONSTR_FOREIGN; n->location = (yylsp[-10]); @@ -30848,240 +31340,240 @@ yyreduce: n->initially_valid = !n->skip_validation; (yyval.node) = (Node *)n; } -#line 30852 "gram.c" /* yacc.c:1652 */ +#line 31344 "gram.c" break; - case 518: -#line 3901 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 30858 "gram.c" /* yacc.c:1652 */ + case 518: /* opt_no_inherit: NO INHERIT */ +#line 3901 "gram.y" + { (yyval.boolean) = true; } +#line 31350 "gram.c" break; - case 519: -#line 3902 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 30864 "gram.c" /* yacc.c:1652 */ + case 519: /* opt_no_inherit: %empty */ +#line 3902 "gram.y" + { (yyval.boolean) = false; } +#line 31356 "gram.c" break; - case 520: -#line 3906 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 30870 "gram.c" /* yacc.c:1652 */ + case 520: /* opt_column_list: '(' columnList ')' */ +#line 3906 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 31362 "gram.c" break; - case 521: -#line 3907 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 30876 "gram.c" /* yacc.c:1652 */ + case 521: /* opt_column_list: %empty */ +#line 3907 "gram.y" + { (yyval.list) = NIL; } +#line 31368 "gram.c" break; - case 522: -#line 3911 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 30882 "gram.c" /* yacc.c:1652 */ + case 522: /* columnList: columnElem */ +#line 3911 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 31374 "gram.c" break; - case 523: -#line 3912 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 30888 "gram.c" /* yacc.c:1652 */ + case 523: /* columnList: columnList ',' columnElem */ +#line 3912 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } +#line 31380 "gram.c" break; - case 524: -#line 3916 "gram.y" /* yacc.c:1652 */ - { + case 524: /* columnElem: ColId */ +#line 3916 "gram.y" + { (yyval.node) = (Node *) makeString((yyvsp[0].str)); } -#line 30896 "gram.c" /* yacc.c:1652 */ +#line 31388 "gram.c" break; - case 525: -#line 3921 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 30902 "gram.c" /* yacc.c:1652 */ + case 525: /* opt_c_include: INCLUDE '(' columnList ')' */ +#line 3921 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 31394 "gram.c" break; - case 526: -#line 3922 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 30908 "gram.c" /* yacc.c:1652 */ + case 526: /* opt_c_include: %empty */ +#line 3922 "gram.y" + { (yyval.list) = NIL; } +#line 31400 "gram.c" break; - case 527: -#line 3926 "gram.y" /* yacc.c:1652 */ - { + case 527: /* key_match: MATCH FULL */ +#line 3926 "gram.y" + { (yyval.ival) = FKCONSTR_MATCH_FULL; } -#line 30916 "gram.c" /* yacc.c:1652 */ +#line 31408 "gram.c" break; - case 528: -#line 3930 "gram.y" /* yacc.c:1652 */ - { + case 528: /* key_match: MATCH PARTIAL */ +#line 3930 "gram.y" + { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("MATCH PARTIAL not yet implemented"), parser_errposition((yylsp[-1])))); (yyval.ival) = FKCONSTR_MATCH_PARTIAL; } -#line 30928 "gram.c" /* yacc.c:1652 */ +#line 31420 "gram.c" break; - case 529: -#line 3938 "gram.y" /* yacc.c:1652 */ - { + case 529: /* key_match: MATCH SIMPLE */ +#line 3938 "gram.y" + { (yyval.ival) = FKCONSTR_MATCH_SIMPLE; } -#line 30936 "gram.c" /* yacc.c:1652 */ +#line 31428 "gram.c" break; - case 530: -#line 3942 "gram.y" /* yacc.c:1652 */ - { + case 530: /* key_match: %empty */ +#line 3942 "gram.y" + { (yyval.ival) = FKCONSTR_MATCH_SIMPLE; } -#line 30944 "gram.c" /* yacc.c:1652 */ +#line 31436 "gram.c" break; - case 531: -#line 3948 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].list)); } -#line 30950 "gram.c" /* yacc.c:1652 */ + case 531: /* ExclusionConstraintList: ExclusionConstraintElem */ +#line 3948 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].list)); } +#line 31442 "gram.c" break; - case 532: -#line 3950 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].list)); } -#line 30956 "gram.c" /* yacc.c:1652 */ + case 532: /* ExclusionConstraintList: ExclusionConstraintList ',' ExclusionConstraintElem */ +#line 3950 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].list)); } +#line 31448 "gram.c" break; - case 533: -#line 3954 "gram.y" /* yacc.c:1652 */ - { + case 533: /* ExclusionConstraintElem: index_elem WITH any_operator */ +#line 3954 "gram.y" + { (yyval.list) = list_make2((yyvsp[-2].ielem), (yyvsp[0].list)); } -#line 30964 "gram.c" /* yacc.c:1652 */ +#line 31456 "gram.c" break; - case 534: -#line 3959 "gram.y" /* yacc.c:1652 */ - { + case 534: /* ExclusionConstraintElem: index_elem WITH OPERATOR '(' any_operator ')' */ +#line 3959 "gram.y" + { (yyval.list) = list_make2((yyvsp[-5].ielem), (yyvsp[-1].list)); } -#line 30972 "gram.c" /* yacc.c:1652 */ +#line 31464 "gram.c" break; - case 535: -#line 3965 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[-1].node); } -#line 30978 "gram.c" /* yacc.c:1652 */ + case 535: /* OptWhereClause: WHERE '(' a_expr ')' */ +#line 3965 "gram.y" + { (yyval.node) = (yyvsp[-1].node); } +#line 31470 "gram.c" break; - case 536: -#line 3966 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 30984 "gram.c" /* yacc.c:1652 */ + case 536: /* OptWhereClause: %empty */ +#line 3966 "gram.y" + { (yyval.node) = NULL; } +#line 31476 "gram.c" break; - case 537: -#line 3977 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = ((yyvsp[0].ival) << 8) | (FKCONSTR_ACTION_NOACTION & 0xFF); } -#line 30990 "gram.c" /* yacc.c:1652 */ + case 537: /* key_actions: key_update */ +#line 3977 "gram.y" + { (yyval.ival) = ((yyvsp[0].ival) << 8) | (FKCONSTR_ACTION_NOACTION & 0xFF); } +#line 31482 "gram.c" break; - case 538: -#line 3979 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = (FKCONSTR_ACTION_NOACTION << 8) | ((yyvsp[0].ival) & 0xFF); } -#line 30996 "gram.c" /* yacc.c:1652 */ + case 538: /* key_actions: key_delete */ +#line 3979 "gram.y" + { (yyval.ival) = (FKCONSTR_ACTION_NOACTION << 8) | ((yyvsp[0].ival) & 0xFF); } +#line 31488 "gram.c" break; - case 539: -#line 3981 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = ((yyvsp[-1].ival) << 8) | ((yyvsp[0].ival) & 0xFF); } -#line 31002 "gram.c" /* yacc.c:1652 */ + case 539: /* key_actions: key_update key_delete */ +#line 3981 "gram.y" + { (yyval.ival) = ((yyvsp[-1].ival) << 8) | ((yyvsp[0].ival) & 0xFF); } +#line 31494 "gram.c" break; - case 540: -#line 3983 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = ((yyvsp[0].ival) << 8) | ((yyvsp[-1].ival) & 0xFF); } -#line 31008 "gram.c" /* yacc.c:1652 */ + case 540: /* key_actions: key_delete key_update */ +#line 3983 "gram.y" + { (yyval.ival) = ((yyvsp[0].ival) << 8) | ((yyvsp[-1].ival) & 0xFF); } +#line 31500 "gram.c" break; - case 541: -#line 3985 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = (FKCONSTR_ACTION_NOACTION << 8) | (FKCONSTR_ACTION_NOACTION & 0xFF); } -#line 31014 "gram.c" /* yacc.c:1652 */ + case 541: /* key_actions: %empty */ +#line 3985 "gram.y" + { (yyval.ival) = (FKCONSTR_ACTION_NOACTION << 8) | (FKCONSTR_ACTION_NOACTION & 0xFF); } +#line 31506 "gram.c" break; - case 542: -#line 3988 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = (yyvsp[0].ival); } -#line 31020 "gram.c" /* yacc.c:1652 */ + case 542: /* key_update: ON UPDATE key_action */ +#line 3988 "gram.y" + { (yyval.ival) = (yyvsp[0].ival); } +#line 31512 "gram.c" break; - case 543: -#line 3991 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = (yyvsp[0].ival); } -#line 31026 "gram.c" /* yacc.c:1652 */ + case 543: /* key_delete: ON DELETE_P key_action */ +#line 3991 "gram.y" + { (yyval.ival) = (yyvsp[0].ival); } +#line 31518 "gram.c" break; - case 544: -#line 3995 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = FKCONSTR_ACTION_NOACTION; } -#line 31032 "gram.c" /* yacc.c:1652 */ + case 544: /* key_action: NO ACTION */ +#line 3995 "gram.y" + { (yyval.ival) = FKCONSTR_ACTION_NOACTION; } +#line 31524 "gram.c" break; - case 545: -#line 3996 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = FKCONSTR_ACTION_RESTRICT; } -#line 31038 "gram.c" /* yacc.c:1652 */ + case 545: /* key_action: RESTRICT */ +#line 3996 "gram.y" + { (yyval.ival) = FKCONSTR_ACTION_RESTRICT; } +#line 31530 "gram.c" break; - case 546: -#line 3997 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = FKCONSTR_ACTION_CASCADE; } -#line 31044 "gram.c" /* yacc.c:1652 */ + case 546: /* key_action: CASCADE */ +#line 3997 "gram.y" + { (yyval.ival) = FKCONSTR_ACTION_CASCADE; } +#line 31536 "gram.c" break; - case 547: -#line 3998 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = FKCONSTR_ACTION_SETNULL; } -#line 31050 "gram.c" /* yacc.c:1652 */ + case 547: /* key_action: SET NULL_P */ +#line 3998 "gram.y" + { (yyval.ival) = FKCONSTR_ACTION_SETNULL; } +#line 31542 "gram.c" break; - case 548: -#line 3999 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = FKCONSTR_ACTION_SETDEFAULT; } -#line 31056 "gram.c" /* yacc.c:1652 */ + case 548: /* key_action: SET DEFAULT */ +#line 3999 "gram.y" + { (yyval.ival) = FKCONSTR_ACTION_SETDEFAULT; } +#line 31548 "gram.c" break; - case 549: -#line 4002 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 31062 "gram.c" /* yacc.c:1652 */ + case 549: /* OptInherit: INHERITS '(' qualified_name_list ')' */ +#line 4002 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 31554 "gram.c" break; - case 550: -#line 4003 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 31068 "gram.c" /* yacc.c:1652 */ + case 550: /* OptInherit: %empty */ +#line 4003 "gram.y" + { (yyval.list) = NIL; } +#line 31560 "gram.c" break; - case 551: -#line 4007 "gram.y" /* yacc.c:1652 */ - { (yyval.partspec) = (yyvsp[0].partspec); } -#line 31074 "gram.c" /* yacc.c:1652 */ + case 551: /* OptPartitionSpec: PartitionSpec */ +#line 4007 "gram.y" + { (yyval.partspec) = (yyvsp[0].partspec); } +#line 31566 "gram.c" break; - case 552: -#line 4008 "gram.y" /* yacc.c:1652 */ - { (yyval.partspec) = NULL; } -#line 31080 "gram.c" /* yacc.c:1652 */ + case 552: /* OptPartitionSpec: %empty */ +#line 4008 "gram.y" + { (yyval.partspec) = NULL; } +#line 31572 "gram.c" break; - case 553: -#line 4012 "gram.y" /* yacc.c:1652 */ - { + case 553: /* PartitionSpec: PARTITION BY ColId '(' part_params ')' */ +#line 4012 "gram.y" + { PartitionSpec *n = makeNode(PartitionSpec); n->strategy = (yyvsp[-3].str); @@ -31090,24 +31582,24 @@ yyreduce: (yyval.partspec) = n; } -#line 31094 "gram.c" /* yacc.c:1652 */ +#line 31586 "gram.c" break; - case 554: -#line 4023 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].partelem)); } -#line 31100 "gram.c" /* yacc.c:1652 */ + case 554: /* part_params: part_elem */ +#line 4023 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].partelem)); } +#line 31592 "gram.c" break; - case 555: -#line 4024 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].partelem)); } -#line 31106 "gram.c" /* yacc.c:1652 */ + case 555: /* part_params: part_params ',' part_elem */ +#line 4024 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].partelem)); } +#line 31598 "gram.c" break; - case 556: -#line 4028 "gram.y" /* yacc.c:1652 */ - { + case 556: /* part_elem: ColId opt_collate opt_class */ +#line 4028 "gram.y" + { PartitionElem *n = makeNode(PartitionElem); n->name = (yyvsp[-2].str); @@ -31117,12 +31609,12 @@ yyreduce: n->location = (yylsp[-2]); (yyval.partelem) = n; } -#line 31121 "gram.c" /* yacc.c:1652 */ +#line 31613 "gram.c" break; - case 557: -#line 4039 "gram.y" /* yacc.c:1652 */ - { + case 557: /* part_elem: func_expr_windowless opt_collate opt_class */ +#line 4039 "gram.y" + { PartitionElem *n = makeNode(PartitionElem); n->name = NULL; @@ -31132,12 +31624,12 @@ yyreduce: n->location = (yylsp[-2]); (yyval.partelem) = n; } -#line 31136 "gram.c" /* yacc.c:1652 */ +#line 31628 "gram.c" break; - case 558: -#line 4050 "gram.y" /* yacc.c:1652 */ - { + case 558: /* part_elem: '(' a_expr ')' opt_collate opt_class */ +#line 4050 "gram.y" + { PartitionElem *n = makeNode(PartitionElem); n->name = NULL; @@ -31147,96 +31639,96 @@ yyreduce: n->location = (yylsp[-4]); (yyval.partelem) = n; } -#line 31151 "gram.c" /* yacc.c:1652 */ +#line 31643 "gram.c" break; - case 559: -#line 4063 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 31157 "gram.c" /* yacc.c:1652 */ + case 559: /* table_access_method_clause: USING name */ +#line 4063 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 31649 "gram.c" break; - case 560: -#line 4064 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 31163 "gram.c" /* yacc.c:1652 */ + case 560: /* table_access_method_clause: %empty */ +#line 4064 "gram.y" + { (yyval.str) = NULL; } +#line 31655 "gram.c" break; - case 561: -#line 4069 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 31169 "gram.c" /* yacc.c:1652 */ + case 561: /* OptWith: WITH reloptions */ +#line 4069 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 31661 "gram.c" break; - case 562: -#line 4070 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 31175 "gram.c" /* yacc.c:1652 */ + case 562: /* OptWith: WITHOUT OIDS */ +#line 4070 "gram.y" + { (yyval.list) = NIL; } +#line 31667 "gram.c" break; - case 563: -#line 4071 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 31181 "gram.c" /* yacc.c:1652 */ + case 563: /* OptWith: %empty */ +#line 4071 "gram.y" + { (yyval.list) = NIL; } +#line 31673 "gram.c" break; - case 564: -#line 4074 "gram.y" /* yacc.c:1652 */ - { (yyval.oncommit) = ONCOMMIT_DROP; } -#line 31187 "gram.c" /* yacc.c:1652 */ + case 564: /* OnCommitOption: ON COMMIT DROP */ +#line 4074 "gram.y" + { (yyval.oncommit) = ONCOMMIT_DROP; } +#line 31679 "gram.c" break; - case 565: -#line 4075 "gram.y" /* yacc.c:1652 */ - { (yyval.oncommit) = ONCOMMIT_DELETE_ROWS; } -#line 31193 "gram.c" /* yacc.c:1652 */ + case 565: /* OnCommitOption: ON COMMIT DELETE_P ROWS */ +#line 4075 "gram.y" + { (yyval.oncommit) = ONCOMMIT_DELETE_ROWS; } +#line 31685 "gram.c" break; - case 566: -#line 4076 "gram.y" /* yacc.c:1652 */ - { (yyval.oncommit) = ONCOMMIT_PRESERVE_ROWS; } -#line 31199 "gram.c" /* yacc.c:1652 */ + case 566: /* OnCommitOption: ON COMMIT PRESERVE ROWS */ +#line 4076 "gram.y" + { (yyval.oncommit) = ONCOMMIT_PRESERVE_ROWS; } +#line 31691 "gram.c" break; - case 567: -#line 4077 "gram.y" /* yacc.c:1652 */ - { (yyval.oncommit) = ONCOMMIT_NOOP; } -#line 31205 "gram.c" /* yacc.c:1652 */ + case 567: /* OnCommitOption: %empty */ +#line 4077 "gram.y" + { (yyval.oncommit) = ONCOMMIT_NOOP; } +#line 31697 "gram.c" break; - case 568: -#line 4080 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 31211 "gram.c" /* yacc.c:1652 */ + case 568: /* OptTableSpace: TABLESPACE name */ +#line 4080 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 31703 "gram.c" break; - case 569: -#line 4081 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 31217 "gram.c" /* yacc.c:1652 */ + case 569: /* OptTableSpace: %empty */ +#line 4081 "gram.y" + { (yyval.str) = NULL; } +#line 31709 "gram.c" break; - case 570: -#line 4084 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 31223 "gram.c" /* yacc.c:1652 */ + case 570: /* OptConsTableSpace: USING INDEX TABLESPACE name */ +#line 4084 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 31715 "gram.c" break; - case 571: -#line 4085 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 31229 "gram.c" /* yacc.c:1652 */ + case 571: /* OptConsTableSpace: %empty */ +#line 4085 "gram.y" + { (yyval.str) = NULL; } +#line 31721 "gram.c" break; - case 572: -#line 4088 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 31235 "gram.c" /* yacc.c:1652 */ + case 572: /* ExistingIndex: USING INDEX name */ +#line 4088 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 31727 "gram.c" break; - case 573: -#line 4108 "gram.y" /* yacc.c:1652 */ - { + case 573: /* CreateStatsStmt: CREATE STATISTICS any_name opt_name_list ON stats_params FROM from_list */ +#line 4108 "gram.y" + { CreateStatsStmt *n = makeNode(CreateStatsStmt); n->defnames = (yyvsp[-5].list); n->stat_types = (yyvsp[-4].list); @@ -31246,12 +31738,12 @@ yyreduce: n->if_not_exists = false; (yyval.node) = (Node *)n; } -#line 31250 "gram.c" /* yacc.c:1652 */ +#line 31742 "gram.c" break; - case 574: -#line 4120 "gram.y" /* yacc.c:1652 */ - { + case 574: /* CreateStatsStmt: CREATE STATISTICS IF_P NOT EXISTS any_name opt_name_list ON stats_params FROM from_list */ +#line 4120 "gram.y" + { CreateStatsStmt *n = makeNode(CreateStatsStmt); n->defnames = (yyvsp[-5].list); n->stat_types = (yyvsp[-4].list); @@ -31261,78 +31753,78 @@ yyreduce: n->if_not_exists = true; (yyval.node) = (Node *)n; } -#line 31265 "gram.c" /* yacc.c:1652 */ +#line 31757 "gram.c" break; - case 575: -#line 4139 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].selem)); } -#line 31271 "gram.c" /* yacc.c:1652 */ + case 575: /* stats_params: stats_param */ +#line 4139 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].selem)); } +#line 31763 "gram.c" break; - case 576: -#line 4140 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].selem)); } -#line 31277 "gram.c" /* yacc.c:1652 */ + case 576: /* stats_params: stats_params ',' stats_param */ +#line 4140 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].selem)); } +#line 31769 "gram.c" break; - case 577: -#line 4144 "gram.y" /* yacc.c:1652 */ - { + case 577: /* stats_param: ColId */ +#line 4144 "gram.y" + { (yyval.selem) = makeNode(StatsElem); (yyval.selem)->name = (yyvsp[0].str); (yyval.selem)->expr = NULL; } -#line 31287 "gram.c" /* yacc.c:1652 */ +#line 31779 "gram.c" break; - case 578: -#line 4150 "gram.y" /* yacc.c:1652 */ - { + case 578: /* stats_param: func_expr_windowless */ +#line 4150 "gram.y" + { (yyval.selem) = makeNode(StatsElem); (yyval.selem)->name = NULL; (yyval.selem)->expr = (yyvsp[0].node); } -#line 31297 "gram.c" /* yacc.c:1652 */ +#line 31789 "gram.c" break; - case 579: -#line 4156 "gram.y" /* yacc.c:1652 */ - { + case 579: /* stats_param: '(' a_expr ')' */ +#line 4156 "gram.y" + { (yyval.selem) = makeNode(StatsElem); (yyval.selem)->name = NULL; (yyval.selem)->expr = (yyvsp[-1].node); } -#line 31307 "gram.c" /* yacc.c:1652 */ +#line 31799 "gram.c" break; - case 580: -#line 4173 "gram.y" /* yacc.c:1652 */ - { + case 580: /* AlterStatsStmt: ALTER STATISTICS any_name SET STATISTICS SignedIconst */ +#line 4173 "gram.y" + { AlterStatsStmt *n = makeNode(AlterStatsStmt); n->defnames = (yyvsp[-3].list); n->missing_ok = false; n->stxstattarget = (yyvsp[0].ival); (yyval.node) = (Node *)n; } -#line 31319 "gram.c" /* yacc.c:1652 */ +#line 31811 "gram.c" break; - case 581: -#line 4181 "gram.y" /* yacc.c:1652 */ - { + case 581: /* AlterStatsStmt: ALTER STATISTICS IF_P EXISTS any_name SET STATISTICS SignedIconst */ +#line 4181 "gram.y" + { AlterStatsStmt *n = makeNode(AlterStatsStmt); n->defnames = (yyvsp[-3].list); n->missing_ok = true; n->stxstattarget = (yyvsp[0].ival); (yyval.node) = (Node *)n; } -#line 31331 "gram.c" /* yacc.c:1652 */ +#line 31823 "gram.c" break; - case 582: -#line 4202 "gram.y" /* yacc.c:1652 */ - { + case 582: /* CreateAsStmt: CREATE OptTemp TABLE create_as_target AS SelectStmt opt_with_data */ +#line 4202 "gram.y" + { CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt); ctas->query = (yyvsp[-1].node); ctas->into = (yyvsp[-3].into); @@ -31344,12 +31836,12 @@ yyreduce: (yyvsp[-3].into)->skipData = !((yyvsp[0].boolean)); (yyval.node) = (Node *) ctas; } -#line 31348 "gram.c" /* yacc.c:1652 */ +#line 31840 "gram.c" break; - case 583: -#line 4215 "gram.y" /* yacc.c:1652 */ - { + case 583: /* CreateAsStmt: CREATE OptTemp TABLE IF_P NOT EXISTS create_as_target AS SelectStmt opt_with_data */ +#line 4215 "gram.y" + { CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt); ctas->query = (yyvsp[-1].node); ctas->into = (yyvsp[-3].into); @@ -31361,12 +31853,12 @@ yyreduce: (yyvsp[-3].into)->skipData = !((yyvsp[0].boolean)); (yyval.node) = (Node *) ctas; } -#line 31365 "gram.c" /* yacc.c:1652 */ +#line 31857 "gram.c" break; - case 584: -#line 4232 "gram.y" /* yacc.c:1652 */ - { + case 584: /* create_as_target: qualified_name opt_column_list table_access_method_clause OptWith OnCommitOption OptTableSpace */ +#line 4232 "gram.y" + { (yyval.into) = makeNode(IntoClause); (yyval.into)->rel = (yyvsp[-5].range); (yyval.into)->colNames = (yyvsp[-4].list); @@ -31377,30 +31869,30 @@ yyreduce: (yyval.into)->viewQuery = NULL; (yyval.into)->skipData = false; /* might get changed later */ } -#line 31381 "gram.c" /* yacc.c:1652 */ +#line 31873 "gram.c" break; - case 585: -#line 4246 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 31387 "gram.c" /* yacc.c:1652 */ + case 585: /* opt_with_data: WITH DATA_P */ +#line 4246 "gram.y" + { (yyval.boolean) = true; } +#line 31879 "gram.c" break; - case 586: -#line 4247 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 31393 "gram.c" /* yacc.c:1652 */ + case 586: /* opt_with_data: WITH NO DATA_P */ +#line 4247 "gram.y" + { (yyval.boolean) = false; } +#line 31885 "gram.c" break; - case 587: -#line 4248 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 31399 "gram.c" /* yacc.c:1652 */ + case 587: /* opt_with_data: %empty */ +#line 4248 "gram.y" + { (yyval.boolean) = true; } +#line 31891 "gram.c" break; - case 588: -#line 4261 "gram.y" /* yacc.c:1652 */ - { + case 588: /* CreateMatViewStmt: CREATE OptNoLog MATERIALIZED VIEW create_mv_target AS SelectStmt opt_with_data */ +#line 4261 "gram.y" + { CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt); ctas->query = (yyvsp[-1].node); ctas->into = (yyvsp[-3].into); @@ -31412,12 +31904,12 @@ yyreduce: (yyvsp[-3].into)->skipData = !((yyvsp[0].boolean)); (yyval.node) = (Node *) ctas; } -#line 31416 "gram.c" /* yacc.c:1652 */ +#line 31908 "gram.c" break; - case 589: -#line 4274 "gram.y" /* yacc.c:1652 */ - { + case 589: /* CreateMatViewStmt: CREATE OptNoLog MATERIALIZED VIEW IF_P NOT EXISTS create_mv_target AS SelectStmt opt_with_data */ +#line 4274 "gram.y" + { CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt); ctas->query = (yyvsp[-1].node); ctas->into = (yyvsp[-3].into); @@ -31429,12 +31921,12 @@ yyreduce: (yyvsp[-3].into)->skipData = !((yyvsp[0].boolean)); (yyval.node) = (Node *) ctas; } -#line 31433 "gram.c" /* yacc.c:1652 */ +#line 31925 "gram.c" break; - case 590: -#line 4290 "gram.y" /* yacc.c:1652 */ - { + case 590: /* create_mv_target: qualified_name opt_column_list table_access_method_clause opt_reloptions OptTableSpace */ +#line 4290 "gram.y" + { (yyval.into) = makeNode(IntoClause); (yyval.into)->rel = (yyvsp[-4].range); (yyval.into)->colNames = (yyvsp[-3].list); @@ -31445,36 +31937,36 @@ yyreduce: (yyval.into)->viewQuery = NULL; /* filled at analysis time */ (yyval.into)->skipData = false; /* might get changed later */ } -#line 31449 "gram.c" /* yacc.c:1652 */ +#line 31941 "gram.c" break; - case 591: -#line 4303 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = RELPERSISTENCE_UNLOGGED; } -#line 31455 "gram.c" /* yacc.c:1652 */ + case 591: /* OptNoLog: UNLOGGED */ +#line 4303 "gram.y" + { (yyval.ival) = RELPERSISTENCE_UNLOGGED; } +#line 31947 "gram.c" break; - case 592: -#line 4304 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = RELPERSISTENCE_PERMANENT; } -#line 31461 "gram.c" /* yacc.c:1652 */ + case 592: /* OptNoLog: %empty */ +#line 4304 "gram.y" + { (yyval.ival) = RELPERSISTENCE_PERMANENT; } +#line 31953 "gram.c" break; - case 593: -#line 4317 "gram.y" /* yacc.c:1652 */ - { + case 593: /* RefreshMatViewStmt: REFRESH MATERIALIZED VIEW opt_concurrently qualified_name opt_with_data */ +#line 4317 "gram.y" + { RefreshMatViewStmt *n = makeNode(RefreshMatViewStmt); n->concurrent = (yyvsp[-2].boolean); n->relation = (yyvsp[-1].range); n->skipData = !((yyvsp[0].boolean)); (yyval.node) = (Node *) n; } -#line 31473 "gram.c" /* yacc.c:1652 */ +#line 31965 "gram.c" break; - case 594: -#line 4337 "gram.y" /* yacc.c:1652 */ - { + case 594: /* CreateSeqStmt: CREATE OptTemp SEQUENCE qualified_name OptSeqOptList */ +#line 4337 "gram.y" + { CreateSeqStmt *n = makeNode(CreateSeqStmt); (yyvsp[-1].range)->relpersistence = (yyvsp[-3].ival); n->sequence = (yyvsp[-1].range); @@ -31483,12 +31975,12 @@ yyreduce: n->if_not_exists = false; (yyval.node) = (Node *)n; } -#line 31487 "gram.c" /* yacc.c:1652 */ +#line 31979 "gram.c" break; - case 595: -#line 4347 "gram.y" /* yacc.c:1652 */ - { + case 595: /* CreateSeqStmt: CREATE OptTemp SEQUENCE IF_P NOT EXISTS qualified_name OptSeqOptList */ +#line 4347 "gram.y" + { CreateSeqStmt *n = makeNode(CreateSeqStmt); (yyvsp[-1].range)->relpersistence = (yyvsp[-6].ival); n->sequence = (yyvsp[-1].range); @@ -31497,224 +31989,224 @@ yyreduce: n->if_not_exists = true; (yyval.node) = (Node *)n; } -#line 31501 "gram.c" /* yacc.c:1652 */ +#line 31993 "gram.c" break; - case 596: -#line 4360 "gram.y" /* yacc.c:1652 */ - { + case 596: /* AlterSeqStmt: ALTER SEQUENCE qualified_name SeqOptList */ +#line 4360 "gram.y" + { AlterSeqStmt *n = makeNode(AlterSeqStmt); n->sequence = (yyvsp[-1].range); n->options = (yyvsp[0].list); n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 31513 "gram.c" /* yacc.c:1652 */ +#line 32005 "gram.c" break; - case 597: -#line 4368 "gram.y" /* yacc.c:1652 */ - { + case 597: /* AlterSeqStmt: ALTER SEQUENCE IF_P EXISTS qualified_name SeqOptList */ +#line 4368 "gram.y" + { AlterSeqStmt *n = makeNode(AlterSeqStmt); n->sequence = (yyvsp[-1].range); n->options = (yyvsp[0].list); n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 31525 "gram.c" /* yacc.c:1652 */ +#line 32017 "gram.c" break; - case 598: -#line 4378 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 31531 "gram.c" /* yacc.c:1652 */ + case 598: /* OptSeqOptList: SeqOptList */ +#line 4378 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 32023 "gram.c" break; - case 599: -#line 4379 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 31537 "gram.c" /* yacc.c:1652 */ + case 599: /* OptSeqOptList: %empty */ +#line 4379 "gram.y" + { (yyval.list) = NIL; } +#line 32029 "gram.c" break; - case 600: -#line 4382 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 31543 "gram.c" /* yacc.c:1652 */ + case 600: /* OptParenthesizedSeqOptList: '(' SeqOptList ')' */ +#line 4382 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 32035 "gram.c" break; - case 601: -#line 4383 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 31549 "gram.c" /* yacc.c:1652 */ + case 601: /* OptParenthesizedSeqOptList: %empty */ +#line 4383 "gram.y" + { (yyval.list) = NIL; } +#line 32041 "gram.c" break; - case 602: -#line 4386 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 31555 "gram.c" /* yacc.c:1652 */ + case 602: /* SeqOptList: SeqOptElem */ +#line 4386 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } +#line 32047 "gram.c" break; - case 603: -#line 4387 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 31561 "gram.c" /* yacc.c:1652 */ + case 603: /* SeqOptList: SeqOptList SeqOptElem */ +#line 4387 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 32053 "gram.c" break; - case 604: -#line 4391 "gram.y" /* yacc.c:1652 */ - { + case 604: /* SeqOptElem: AS SimpleTypename */ +#line 4391 "gram.y" + { (yyval.defelt) = makeDefElem("as", (Node *)(yyvsp[0].typnam), (yylsp[-1])); } -#line 31569 "gram.c" /* yacc.c:1652 */ +#line 32061 "gram.c" break; - case 605: -#line 4395 "gram.y" /* yacc.c:1652 */ - { + case 605: /* SeqOptElem: CACHE NumericOnly */ +#line 4395 "gram.y" + { (yyval.defelt) = makeDefElem("cache", (Node *)(yyvsp[0].value), (yylsp[-1])); } -#line 31577 "gram.c" /* yacc.c:1652 */ +#line 32069 "gram.c" break; - case 606: -#line 4399 "gram.y" /* yacc.c:1652 */ - { + case 606: /* SeqOptElem: CYCLE */ +#line 4399 "gram.y" + { (yyval.defelt) = makeDefElem("cycle", (Node *)makeInteger(true), (yylsp[0])); } -#line 31585 "gram.c" /* yacc.c:1652 */ +#line 32077 "gram.c" break; - case 607: -#line 4403 "gram.y" /* yacc.c:1652 */ - { + case 607: /* SeqOptElem: NO CYCLE */ +#line 4403 "gram.y" + { (yyval.defelt) = makeDefElem("cycle", (Node *)makeInteger(false), (yylsp[-1])); } -#line 31593 "gram.c" /* yacc.c:1652 */ +#line 32085 "gram.c" break; - case 608: -#line 4407 "gram.y" /* yacc.c:1652 */ - { + case 608: /* SeqOptElem: INCREMENT opt_by NumericOnly */ +#line 4407 "gram.y" + { (yyval.defelt) = makeDefElem("increment", (Node *)(yyvsp[0].value), (yylsp[-2])); } -#line 31601 "gram.c" /* yacc.c:1652 */ +#line 32093 "gram.c" break; - case 609: -#line 4411 "gram.y" /* yacc.c:1652 */ - { + case 609: /* SeqOptElem: MAXVALUE NumericOnly */ +#line 4411 "gram.y" + { (yyval.defelt) = makeDefElem("maxvalue", (Node *)(yyvsp[0].value), (yylsp[-1])); } -#line 31609 "gram.c" /* yacc.c:1652 */ +#line 32101 "gram.c" break; - case 610: -#line 4415 "gram.y" /* yacc.c:1652 */ - { + case 610: /* SeqOptElem: MINVALUE NumericOnly */ +#line 4415 "gram.y" + { (yyval.defelt) = makeDefElem("minvalue", (Node *)(yyvsp[0].value), (yylsp[-1])); } -#line 31617 "gram.c" /* yacc.c:1652 */ +#line 32109 "gram.c" break; - case 611: -#line 4419 "gram.y" /* yacc.c:1652 */ - { + case 611: /* SeqOptElem: NO MAXVALUE */ +#line 4419 "gram.y" + { (yyval.defelt) = makeDefElem("maxvalue", NULL, (yylsp[-1])); } -#line 31625 "gram.c" /* yacc.c:1652 */ +#line 32117 "gram.c" break; - case 612: -#line 4423 "gram.y" /* yacc.c:1652 */ - { + case 612: /* SeqOptElem: NO MINVALUE */ +#line 4423 "gram.y" + { (yyval.defelt) = makeDefElem("minvalue", NULL, (yylsp[-1])); } -#line 31633 "gram.c" /* yacc.c:1652 */ +#line 32125 "gram.c" break; - case 613: -#line 4427 "gram.y" /* yacc.c:1652 */ - { + case 613: /* SeqOptElem: OWNED BY any_name */ +#line 4427 "gram.y" + { (yyval.defelt) = makeDefElem("owned_by", (Node *)(yyvsp[0].list), (yylsp[-2])); } -#line 31641 "gram.c" /* yacc.c:1652 */ +#line 32133 "gram.c" break; - case 614: -#line 4431 "gram.y" /* yacc.c:1652 */ - { + case 614: /* SeqOptElem: SEQUENCE NAME_P any_name */ +#line 4431 "gram.y" + { /* not documented, only used by pg_dump */ (yyval.defelt) = makeDefElem("sequence_name", (Node *)(yyvsp[0].list), (yylsp[-2])); } -#line 31650 "gram.c" /* yacc.c:1652 */ +#line 32142 "gram.c" break; - case 615: -#line 4436 "gram.y" /* yacc.c:1652 */ - { + case 615: /* SeqOptElem: START opt_with NumericOnly */ +#line 4436 "gram.y" + { (yyval.defelt) = makeDefElem("start", (Node *)(yyvsp[0].value), (yylsp[-2])); } -#line 31658 "gram.c" /* yacc.c:1652 */ +#line 32150 "gram.c" break; - case 616: -#line 4440 "gram.y" /* yacc.c:1652 */ - { + case 616: /* SeqOptElem: RESTART */ +#line 4440 "gram.y" + { (yyval.defelt) = makeDefElem("restart", NULL, (yylsp[0])); } -#line 31666 "gram.c" /* yacc.c:1652 */ +#line 32158 "gram.c" break; - case 617: -#line 4444 "gram.y" /* yacc.c:1652 */ - { + case 617: /* SeqOptElem: RESTART opt_with NumericOnly */ +#line 4444 "gram.y" + { (yyval.defelt) = makeDefElem("restart", (Node *)(yyvsp[0].value), (yylsp[-2])); } -#line 31674 "gram.c" /* yacc.c:1652 */ +#line 32166 "gram.c" break; - case 620: -#line 4454 "gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeFloat((yyvsp[0].str)); } -#line 31680 "gram.c" /* yacc.c:1652 */ + case 620: /* NumericOnly: FCONST */ +#line 4454 "gram.y" + { (yyval.value) = makeFloat((yyvsp[0].str)); } +#line 32172 "gram.c" break; - case 621: -#line 4455 "gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeFloat((yyvsp[0].str)); } -#line 31686 "gram.c" /* yacc.c:1652 */ + case 621: /* NumericOnly: '+' FCONST */ +#line 4455 "gram.y" + { (yyval.value) = makeFloat((yyvsp[0].str)); } +#line 32178 "gram.c" break; - case 622: -#line 4457 "gram.y" /* yacc.c:1652 */ - { + case 622: /* NumericOnly: '-' FCONST */ +#line 4457 "gram.y" + { (yyval.value) = makeFloat((yyvsp[0].str)); doNegateFloat((yyval.value)); } -#line 31695 "gram.c" /* yacc.c:1652 */ +#line 32187 "gram.c" break; - case 623: -#line 4461 "gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeInteger((yyvsp[0].ival)); } -#line 31701 "gram.c" /* yacc.c:1652 */ + case 623: /* NumericOnly: SignedIconst */ +#line 4461 "gram.y" + { (yyval.value) = makeInteger((yyvsp[0].ival)); } +#line 32193 "gram.c" break; - case 624: -#line 4464 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].value)); } -#line 31707 "gram.c" /* yacc.c:1652 */ + case 624: /* NumericOnly_list: NumericOnly */ +#line 4464 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].value)); } +#line 32199 "gram.c" break; - case 625: -#line 4465 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].value)); } -#line 31713 "gram.c" /* yacc.c:1652 */ + case 625: /* NumericOnly_list: NumericOnly_list ',' NumericOnly */ +#line 4465 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].value)); } +#line 32205 "gram.c" break; - case 626: -#line 4478 "gram.y" /* yacc.c:1652 */ - { + case 626: /* CreatePLangStmt: CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE name */ +#line 4478 "gram.y" + { /* * We now interpret parameterless CREATE LANGUAGE as * CREATE EXTENSION. "OR REPLACE" is silently translated @@ -31728,12 +32220,12 @@ yyreduce: n->options = NIL; (yyval.node) = (Node *)n; } -#line 31732 "gram.c" /* yacc.c:1652 */ +#line 32224 "gram.c" break; - case 627: -#line 4494 "gram.y" /* yacc.c:1652 */ - { + case 627: /* CreatePLangStmt: CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE name HANDLER handler_name opt_inline_handler opt_validator */ +#line 4494 "gram.y" + { CreatePLangStmt *n = makeNode(CreatePLangStmt); n->replace = (yyvsp[-8].boolean); n->plname = (yyvsp[-4].str); @@ -31743,72 +32235,72 @@ yyreduce: n->pltrusted = (yyvsp[-7].boolean); (yyval.node) = (Node *)n; } -#line 31747 "gram.c" /* yacc.c:1652 */ +#line 32239 "gram.c" break; - case 628: -#line 4507 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 31753 "gram.c" /* yacc.c:1652 */ + case 628: /* opt_trusted: TRUSTED */ +#line 4507 "gram.y" + { (yyval.boolean) = true; } +#line 32245 "gram.c" break; - case 629: -#line 4508 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 31759 "gram.c" /* yacc.c:1652 */ + case 629: /* opt_trusted: %empty */ +#line 4508 "gram.y" + { (yyval.boolean) = false; } +#line 32251 "gram.c" break; - case 630: -#line 4516 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } -#line 31765 "gram.c" /* yacc.c:1652 */ + case 630: /* handler_name: name */ +#line 4516 "gram.y" + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } +#line 32257 "gram.c" break; - case 631: -#line 4517 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lcons(makeString((yyvsp[-1].str)), (yyvsp[0].list)); } -#line 31771 "gram.c" /* yacc.c:1652 */ + case 631: /* handler_name: name attrs */ +#line 4517 "gram.y" + { (yyval.list) = lcons(makeString((yyvsp[-1].str)), (yyvsp[0].list)); } +#line 32263 "gram.c" break; - case 632: -#line 4521 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 31777 "gram.c" /* yacc.c:1652 */ + case 632: /* opt_inline_handler: INLINE_P handler_name */ +#line 4521 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 32269 "gram.c" break; - case 633: -#line 4522 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 31783 "gram.c" /* yacc.c:1652 */ + case 633: /* opt_inline_handler: %empty */ +#line 4522 "gram.y" + { (yyval.list) = NIL; } +#line 32275 "gram.c" break; - case 634: -#line 4526 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 31789 "gram.c" /* yacc.c:1652 */ + case 634: /* validator_clause: VALIDATOR handler_name */ +#line 4526 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 32281 "gram.c" break; - case 635: -#line 4527 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 31795 "gram.c" /* yacc.c:1652 */ + case 635: /* validator_clause: NO VALIDATOR */ +#line 4527 "gram.y" + { (yyval.list) = NIL; } +#line 32287 "gram.c" break; - case 636: -#line 4531 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 31801 "gram.c" /* yacc.c:1652 */ + case 636: /* opt_validator: validator_clause */ +#line 4531 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 32293 "gram.c" break; - case 637: -#line 4532 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 31807 "gram.c" /* yacc.c:1652 */ + case 637: /* opt_validator: %empty */ +#line 4532 "gram.y" + { (yyval.list) = NIL; } +#line 32299 "gram.c" break; - case 640: -#line 4548 "gram.y" /* yacc.c:1652 */ - { + case 640: /* CreateTableSpaceStmt: CREATE TABLESPACE name OptTableSpaceOwner LOCATION Sconst opt_reloptions */ +#line 4548 "gram.y" + { CreateTableSpaceStmt *n = makeNode(CreateTableSpaceStmt); n->tablespacename = (yyvsp[-4].str); n->owner = (yyvsp[-3].rolespec); @@ -31816,148 +32308,148 @@ yyreduce: n->options = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 31820 "gram.c" /* yacc.c:1652 */ +#line 32312 "gram.c" break; - case 641: -#line 4558 "gram.y" /* yacc.c:1652 */ - { (yyval.rolespec) = (yyvsp[0].rolespec); } -#line 31826 "gram.c" /* yacc.c:1652 */ + case 641: /* OptTableSpaceOwner: OWNER RoleSpec */ +#line 4558 "gram.y" + { (yyval.rolespec) = (yyvsp[0].rolespec); } +#line 32318 "gram.c" break; - case 642: -#line 4559 "gram.y" /* yacc.c:1652 */ - { (yyval.rolespec) = NULL; } -#line 31832 "gram.c" /* yacc.c:1652 */ + case 642: /* OptTableSpaceOwner: %empty */ +#line 4559 "gram.y" + { (yyval.rolespec) = NULL; } +#line 32324 "gram.c" break; - case 643: -#line 4573 "gram.y" /* yacc.c:1652 */ - { + case 643: /* DropTableSpaceStmt: DROP TABLESPACE name */ +#line 4573 "gram.y" + { DropTableSpaceStmt *n = makeNode(DropTableSpaceStmt); n->tablespacename = (yyvsp[0].str); n->missing_ok = false; (yyval.node) = (Node *) n; } -#line 31843 "gram.c" /* yacc.c:1652 */ +#line 32335 "gram.c" break; - case 644: -#line 4580 "gram.y" /* yacc.c:1652 */ - { + case 644: /* DropTableSpaceStmt: DROP TABLESPACE IF_P EXISTS name */ +#line 4580 "gram.y" + { DropTableSpaceStmt *n = makeNode(DropTableSpaceStmt); n->tablespacename = (yyvsp[0].str); n->missing_ok = true; (yyval.node) = (Node *) n; } -#line 31854 "gram.c" /* yacc.c:1652 */ +#line 32346 "gram.c" break; - case 645: -#line 4597 "gram.y" /* yacc.c:1652 */ - { + case 645: /* CreateExtensionStmt: CREATE EXTENSION name opt_with create_extension_opt_list */ +#line 4597 "gram.y" + { CreateExtensionStmt *n = makeNode(CreateExtensionStmt); n->extname = (yyvsp[-2].str); n->if_not_exists = false; n->options = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 31866 "gram.c" /* yacc.c:1652 */ +#line 32358 "gram.c" break; - case 646: -#line 4605 "gram.y" /* yacc.c:1652 */ - { + case 646: /* CreateExtensionStmt: CREATE EXTENSION IF_P NOT EXISTS name opt_with create_extension_opt_list */ +#line 4605 "gram.y" + { CreateExtensionStmt *n = makeNode(CreateExtensionStmt); n->extname = (yyvsp[-2].str); n->if_not_exists = true; n->options = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 31878 "gram.c" /* yacc.c:1652 */ +#line 32370 "gram.c" break; - case 647: -#line 4616 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 31884 "gram.c" /* yacc.c:1652 */ + case 647: /* create_extension_opt_list: create_extension_opt_list create_extension_opt_item */ +#line 4616 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 32376 "gram.c" break; - case 648: -#line 4618 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 31890 "gram.c" /* yacc.c:1652 */ + case 648: /* create_extension_opt_list: %empty */ +#line 4618 "gram.y" + { (yyval.list) = NIL; } +#line 32382 "gram.c" break; - case 649: -#line 4623 "gram.y" /* yacc.c:1652 */ - { + case 649: /* create_extension_opt_item: SCHEMA name */ +#line 4623 "gram.y" + { (yyval.defelt) = makeDefElem("schema", (Node *)makeString((yyvsp[0].str)), (yylsp[-1])); } -#line 31898 "gram.c" /* yacc.c:1652 */ +#line 32390 "gram.c" break; - case 650: -#line 4627 "gram.y" /* yacc.c:1652 */ - { + case 650: /* create_extension_opt_item: VERSION_P NonReservedWord_or_Sconst */ +#line 4627 "gram.y" + { (yyval.defelt) = makeDefElem("new_version", (Node *)makeString((yyvsp[0].str)), (yylsp[-1])); } -#line 31906 "gram.c" /* yacc.c:1652 */ +#line 32398 "gram.c" break; - case 651: -#line 4631 "gram.y" /* yacc.c:1652 */ - { + case 651: /* create_extension_opt_item: FROM NonReservedWord_or_Sconst */ +#line 4631 "gram.y" + { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("CREATE EXTENSION ... FROM is no longer supported"), parser_errposition((yylsp[-1])))); } -#line 31917 "gram.c" /* yacc.c:1652 */ +#line 32409 "gram.c" break; - case 652: -#line 4638 "gram.y" /* yacc.c:1652 */ - { + case 652: /* create_extension_opt_item: CASCADE */ +#line 4638 "gram.y" + { (yyval.defelt) = makeDefElem("cascade", (Node *)makeInteger(true), (yylsp[0])); } -#line 31925 "gram.c" /* yacc.c:1652 */ +#line 32417 "gram.c" break; - case 653: -#line 4650 "gram.y" /* yacc.c:1652 */ - { + case 653: /* AlterExtensionStmt: ALTER EXTENSION name UPDATE alter_extension_opt_list */ +#line 4650 "gram.y" + { AlterExtensionStmt *n = makeNode(AlterExtensionStmt); n->extname = (yyvsp[-2].str); n->options = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 31936 "gram.c" /* yacc.c:1652 */ +#line 32428 "gram.c" break; - case 654: -#line 4660 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 31942 "gram.c" /* yacc.c:1652 */ + case 654: /* alter_extension_opt_list: alter_extension_opt_list alter_extension_opt_item */ +#line 4660 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 32434 "gram.c" break; - case 655: -#line 4662 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 31948 "gram.c" /* yacc.c:1652 */ + case 655: /* alter_extension_opt_list: %empty */ +#line 4662 "gram.y" + { (yyval.list) = NIL; } +#line 32440 "gram.c" break; - case 656: -#line 4667 "gram.y" /* yacc.c:1652 */ - { + case 656: /* alter_extension_opt_item: TO NonReservedWord_or_Sconst */ +#line 4667 "gram.y" + { (yyval.defelt) = makeDefElem("new_version", (Node *)makeString((yyvsp[0].str)), (yylsp[-1])); } -#line 31956 "gram.c" /* yacc.c:1652 */ +#line 32448 "gram.c" break; - case 657: -#line 4680 "gram.y" /* yacc.c:1652 */ - { + case 657: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop object_type_name name */ +#line 4680 "gram.y" + { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); n->extname = (yyvsp[-3].str); n->action = (yyvsp[-2].ival); @@ -31965,12 +32457,12 @@ yyreduce: n->object = (Node *) makeString((yyvsp[0].str)); (yyval.node) = (Node *)n; } -#line 31969 "gram.c" /* yacc.c:1652 */ +#line 32461 "gram.c" break; - case 658: -#line 4689 "gram.y" /* yacc.c:1652 */ - { + case 658: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop object_type_any_name any_name */ +#line 4689 "gram.y" + { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); n->extname = (yyvsp[-3].str); n->action = (yyvsp[-2].ival); @@ -31978,12 +32470,12 @@ yyreduce: n->object = (Node *) (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 31982 "gram.c" /* yacc.c:1652 */ +#line 32474 "gram.c" break; - case 659: -#line 4698 "gram.y" /* yacc.c:1652 */ - { + case 659: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop AGGREGATE aggregate_with_argtypes */ +#line 4698 "gram.y" + { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); n->extname = (yyvsp[-3].str); n->action = (yyvsp[-2].ival); @@ -31991,12 +32483,12 @@ yyreduce: n->object = (Node *) (yyvsp[0].objwithargs); (yyval.node) = (Node *)n; } -#line 31995 "gram.c" /* yacc.c:1652 */ +#line 32487 "gram.c" break; - case 660: -#line 4707 "gram.y" /* yacc.c:1652 */ - { + case 660: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop CAST '(' Typename AS Typename ')' */ +#line 4707 "gram.y" + { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); n->extname = (yyvsp[-7].str); n->action = (yyvsp[-6].ival); @@ -32004,12 +32496,12 @@ yyreduce: n->object = (Node *) list_make2((yyvsp[-3].typnam), (yyvsp[-1].typnam)); (yyval.node) = (Node *) n; } -#line 32008 "gram.c" /* yacc.c:1652 */ +#line 32500 "gram.c" break; - case 661: -#line 4716 "gram.y" /* yacc.c:1652 */ - { + case 661: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop DOMAIN_P Typename */ +#line 4716 "gram.y" + { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); n->extname = (yyvsp[-3].str); n->action = (yyvsp[-2].ival); @@ -32017,12 +32509,12 @@ yyreduce: n->object = (Node *) (yyvsp[0].typnam); (yyval.node) = (Node *)n; } -#line 32021 "gram.c" /* yacc.c:1652 */ +#line 32513 "gram.c" break; - case 662: -#line 4725 "gram.y" /* yacc.c:1652 */ - { + case 662: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop FUNCTION function_with_argtypes */ +#line 4725 "gram.y" + { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); n->extname = (yyvsp[-3].str); n->action = (yyvsp[-2].ival); @@ -32030,12 +32522,12 @@ yyreduce: n->object = (Node *) (yyvsp[0].objwithargs); (yyval.node) = (Node *)n; } -#line 32034 "gram.c" /* yacc.c:1652 */ +#line 32526 "gram.c" break; - case 663: -#line 4734 "gram.y" /* yacc.c:1652 */ - { + case 663: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop OPERATOR operator_with_argtypes */ +#line 4734 "gram.y" + { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); n->extname = (yyvsp[-3].str); n->action = (yyvsp[-2].ival); @@ -32043,12 +32535,12 @@ yyreduce: n->object = (Node *) (yyvsp[0].objwithargs); (yyval.node) = (Node *)n; } -#line 32047 "gram.c" /* yacc.c:1652 */ +#line 32539 "gram.c" break; - case 664: -#line 4743 "gram.y" /* yacc.c:1652 */ - { + case 664: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop OPERATOR CLASS any_name USING name */ +#line 4743 "gram.y" + { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); n->extname = (yyvsp[-6].str); n->action = (yyvsp[-5].ival); @@ -32056,12 +32548,12 @@ yyreduce: n->object = (Node *) lcons(makeString((yyvsp[0].str)), (yyvsp[-2].list)); (yyval.node) = (Node *)n; } -#line 32060 "gram.c" /* yacc.c:1652 */ +#line 32552 "gram.c" break; - case 665: -#line 4752 "gram.y" /* yacc.c:1652 */ - { + case 665: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop OPERATOR FAMILY any_name USING name */ +#line 4752 "gram.y" + { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); n->extname = (yyvsp[-6].str); n->action = (yyvsp[-5].ival); @@ -32069,12 +32561,12 @@ yyreduce: n->object = (Node *) lcons(makeString((yyvsp[0].str)), (yyvsp[-2].list)); (yyval.node) = (Node *)n; } -#line 32073 "gram.c" /* yacc.c:1652 */ +#line 32565 "gram.c" break; - case 666: -#line 4761 "gram.y" /* yacc.c:1652 */ - { + case 666: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop PROCEDURE function_with_argtypes */ +#line 4761 "gram.y" + { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); n->extname = (yyvsp[-3].str); n->action = (yyvsp[-2].ival); @@ -32082,12 +32574,12 @@ yyreduce: n->object = (Node *) (yyvsp[0].objwithargs); (yyval.node) = (Node *)n; } -#line 32086 "gram.c" /* yacc.c:1652 */ +#line 32578 "gram.c" break; - case 667: -#line 4770 "gram.y" /* yacc.c:1652 */ - { + case 667: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop ROUTINE function_with_argtypes */ +#line 4770 "gram.y" + { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); n->extname = (yyvsp[-3].str); n->action = (yyvsp[-2].ival); @@ -32095,12 +32587,12 @@ yyreduce: n->object = (Node *) (yyvsp[0].objwithargs); (yyval.node) = (Node *)n; } -#line 32099 "gram.c" /* yacc.c:1652 */ +#line 32591 "gram.c" break; - case 668: -#line 4779 "gram.y" /* yacc.c:1652 */ - { + case 668: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop TRANSFORM FOR Typename LANGUAGE name */ +#line 4779 "gram.y" + { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); n->extname = (yyvsp[-6].str); n->action = (yyvsp[-5].ival); @@ -32108,12 +32600,12 @@ yyreduce: n->object = (Node *) list_make2((yyvsp[-2].typnam), makeString((yyvsp[0].str))); (yyval.node) = (Node *)n; } -#line 32112 "gram.c" /* yacc.c:1652 */ +#line 32604 "gram.c" break; - case 669: -#line 4788 "gram.y" /* yacc.c:1652 */ - { + case 669: /* AlterExtensionContentsStmt: ALTER EXTENSION name add_drop TYPE_P Typename */ +#line 4788 "gram.y" + { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); n->extname = (yyvsp[-3].str); n->action = (yyvsp[-2].ival); @@ -32121,200 +32613,200 @@ yyreduce: n->object = (Node *) (yyvsp[0].typnam); (yyval.node) = (Node *)n; } -#line 32125 "gram.c" /* yacc.c:1652 */ +#line 32617 "gram.c" break; - case 670: -#line 4806 "gram.y" /* yacc.c:1652 */ - { + case 670: /* CreateFdwStmt: CREATE FOREIGN DATA_P WRAPPER name opt_fdw_options create_generic_options */ +#line 4806 "gram.y" + { CreateFdwStmt *n = makeNode(CreateFdwStmt); n->fdwname = (yyvsp[-2].str); n->func_options = (yyvsp[-1].list); n->options = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 32137 "gram.c" /* yacc.c:1652 */ +#line 32629 "gram.c" break; - case 671: -#line 4816 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = makeDefElem("handler", (Node *)(yyvsp[0].list), (yylsp[-1])); } -#line 32143 "gram.c" /* yacc.c:1652 */ + case 671: /* fdw_option: HANDLER handler_name */ +#line 4816 "gram.y" + { (yyval.defelt) = makeDefElem("handler", (Node *)(yyvsp[0].list), (yylsp[-1])); } +#line 32635 "gram.c" break; - case 672: -#line 4817 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = makeDefElem("handler", NULL, (yylsp[-1])); } -#line 32149 "gram.c" /* yacc.c:1652 */ + case 672: /* fdw_option: NO HANDLER */ +#line 4817 "gram.y" + { (yyval.defelt) = makeDefElem("handler", NULL, (yylsp[-1])); } +#line 32641 "gram.c" break; - case 673: -#line 4818 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = makeDefElem("validator", (Node *)(yyvsp[0].list), (yylsp[-1])); } -#line 32155 "gram.c" /* yacc.c:1652 */ + case 673: /* fdw_option: VALIDATOR handler_name */ +#line 4818 "gram.y" + { (yyval.defelt) = makeDefElem("validator", (Node *)(yyvsp[0].list), (yylsp[-1])); } +#line 32647 "gram.c" break; - case 674: -#line 4819 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = makeDefElem("validator", NULL, (yylsp[-1])); } -#line 32161 "gram.c" /* yacc.c:1652 */ + case 674: /* fdw_option: NO VALIDATOR */ +#line 4819 "gram.y" + { (yyval.defelt) = makeDefElem("validator", NULL, (yylsp[-1])); } +#line 32653 "gram.c" break; - case 675: -#line 4823 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 32167 "gram.c" /* yacc.c:1652 */ + case 675: /* fdw_options: fdw_option */ +#line 4823 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } +#line 32659 "gram.c" break; - case 676: -#line 4824 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 32173 "gram.c" /* yacc.c:1652 */ + case 676: /* fdw_options: fdw_options fdw_option */ +#line 4824 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 32665 "gram.c" break; - case 677: -#line 4828 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 32179 "gram.c" /* yacc.c:1652 */ + case 677: /* opt_fdw_options: fdw_options */ +#line 4828 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 32671 "gram.c" break; - case 678: -#line 4829 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 32185 "gram.c" /* yacc.c:1652 */ + case 678: /* opt_fdw_options: %empty */ +#line 4829 "gram.y" + { (yyval.list) = NIL; } +#line 32677 "gram.c" break; - case 679: -#line 4840 "gram.y" /* yacc.c:1652 */ - { + case 679: /* AlterFdwStmt: ALTER FOREIGN DATA_P WRAPPER name opt_fdw_options alter_generic_options */ +#line 4840 "gram.y" + { AlterFdwStmt *n = makeNode(AlterFdwStmt); n->fdwname = (yyvsp[-2].str); n->func_options = (yyvsp[-1].list); n->options = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 32197 "gram.c" /* yacc.c:1652 */ +#line 32689 "gram.c" break; - case 680: -#line 4848 "gram.y" /* yacc.c:1652 */ - { + case 680: /* AlterFdwStmt: ALTER FOREIGN DATA_P WRAPPER name fdw_options */ +#line 4848 "gram.y" + { AlterFdwStmt *n = makeNode(AlterFdwStmt); n->fdwname = (yyvsp[-1].str); n->func_options = (yyvsp[0].list); n->options = NIL; (yyval.node) = (Node *) n; } -#line 32209 "gram.c" /* yacc.c:1652 */ +#line 32701 "gram.c" break; - case 681: -#line 4859 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 32215 "gram.c" /* yacc.c:1652 */ + case 681: /* create_generic_options: OPTIONS '(' generic_option_list ')' */ +#line 4859 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 32707 "gram.c" break; - case 682: -#line 4860 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 32221 "gram.c" /* yacc.c:1652 */ + case 682: /* create_generic_options: %empty */ +#line 4860 "gram.y" + { (yyval.list) = NIL; } +#line 32713 "gram.c" break; - case 683: -#line 4865 "gram.y" /* yacc.c:1652 */ - { + case 683: /* generic_option_list: generic_option_elem */ +#line 4865 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 32229 "gram.c" /* yacc.c:1652 */ +#line 32721 "gram.c" break; - case 684: -#line 4869 "gram.y" /* yacc.c:1652 */ - { + case 684: /* generic_option_list: generic_option_list ',' generic_option_elem */ +#line 4869 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } -#line 32237 "gram.c" /* yacc.c:1652 */ +#line 32729 "gram.c" break; - case 685: -#line 4876 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 32243 "gram.c" /* yacc.c:1652 */ + case 685: /* alter_generic_options: OPTIONS '(' alter_generic_option_list ')' */ +#line 4876 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 32735 "gram.c" break; - case 686: -#line 4881 "gram.y" /* yacc.c:1652 */ - { + case 686: /* alter_generic_option_list: alter_generic_option_elem */ +#line 4881 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 32251 "gram.c" /* yacc.c:1652 */ +#line 32743 "gram.c" break; - case 687: -#line 4885 "gram.y" /* yacc.c:1652 */ - { + case 687: /* alter_generic_option_list: alter_generic_option_list ',' alter_generic_option_elem */ +#line 4885 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } -#line 32259 "gram.c" /* yacc.c:1652 */ +#line 32751 "gram.c" break; - case 688: -#line 4892 "gram.y" /* yacc.c:1652 */ - { + case 688: /* alter_generic_option_elem: generic_option_elem */ +#line 4892 "gram.y" + { (yyval.defelt) = (yyvsp[0].defelt); } -#line 32267 "gram.c" /* yacc.c:1652 */ +#line 32759 "gram.c" break; - case 689: -#line 4896 "gram.y" /* yacc.c:1652 */ - { + case 689: /* alter_generic_option_elem: SET generic_option_elem */ +#line 4896 "gram.y" + { (yyval.defelt) = (yyvsp[0].defelt); (yyval.defelt)->defaction = DEFELEM_SET; } -#line 32276 "gram.c" /* yacc.c:1652 */ +#line 32768 "gram.c" break; - case 690: -#line 4901 "gram.y" /* yacc.c:1652 */ - { + case 690: /* alter_generic_option_elem: ADD_P generic_option_elem */ +#line 4901 "gram.y" + { (yyval.defelt) = (yyvsp[0].defelt); (yyval.defelt)->defaction = DEFELEM_ADD; } -#line 32285 "gram.c" /* yacc.c:1652 */ +#line 32777 "gram.c" break; - case 691: -#line 4906 "gram.y" /* yacc.c:1652 */ - { + case 691: /* alter_generic_option_elem: DROP generic_option_name */ +#line 4906 "gram.y" + { (yyval.defelt) = makeDefElemExtended(NULL, (yyvsp[0].str), NULL, DEFELEM_DROP, (yylsp[0])); } -#line 32293 "gram.c" /* yacc.c:1652 */ +#line 32785 "gram.c" break; - case 692: -#line 4913 "gram.y" /* yacc.c:1652 */ - { + case 692: /* generic_option_elem: generic_option_name generic_option_arg */ +#line 4913 "gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[-1].str), (yyvsp[0].node), (yylsp[-1])); } -#line 32301 "gram.c" /* yacc.c:1652 */ +#line 32793 "gram.c" break; - case 693: -#line 4919 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 32307 "gram.c" /* yacc.c:1652 */ + case 693: /* generic_option_name: ColLabel */ +#line 4919 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 32799 "gram.c" break; - case 694: -#line 4924 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeString((yyvsp[0].str)); } -#line 32313 "gram.c" /* yacc.c:1652 */ + case 694: /* generic_option_arg: Sconst */ +#line 4924 "gram.y" + { (yyval.node) = (Node *) makeString((yyvsp[0].str)); } +#line 32805 "gram.c" break; - case 695: -#line 4936 "gram.y" /* yacc.c:1652 */ - { + case 695: /* CreateForeignServerStmt: CREATE SERVER name opt_type opt_foreign_server_version FOREIGN DATA_P WRAPPER name create_generic_options */ +#line 4936 "gram.y" + { CreateForeignServerStmt *n = makeNode(CreateForeignServerStmt); n->servername = (yyvsp[-7].str); n->servertype = (yyvsp[-6].str); @@ -32324,12 +32816,12 @@ yyreduce: n->if_not_exists = false; (yyval.node) = (Node *) n; } -#line 32328 "gram.c" /* yacc.c:1652 */ +#line 32820 "gram.c" break; - case 696: -#line 4948 "gram.y" /* yacc.c:1652 */ - { + case 696: /* CreateForeignServerStmt: CREATE SERVER IF_P NOT EXISTS name opt_type opt_foreign_server_version FOREIGN DATA_P WRAPPER name create_generic_options */ +#line 4948 "gram.y" + { CreateForeignServerStmt *n = makeNode(CreateForeignServerStmt); n->servername = (yyvsp[-7].str); n->servertype = (yyvsp[-6].str); @@ -32339,48 +32831,48 @@ yyreduce: n->if_not_exists = true; (yyval.node) = (Node *) n; } -#line 32343 "gram.c" /* yacc.c:1652 */ +#line 32835 "gram.c" break; - case 697: -#line 4961 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 32349 "gram.c" /* yacc.c:1652 */ + case 697: /* opt_type: TYPE_P Sconst */ +#line 4961 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 32841 "gram.c" break; - case 698: -#line 4962 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 32355 "gram.c" /* yacc.c:1652 */ + case 698: /* opt_type: %empty */ +#line 4962 "gram.y" + { (yyval.str) = NULL; } +#line 32847 "gram.c" break; - case 699: -#line 4967 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 32361 "gram.c" /* yacc.c:1652 */ + case 699: /* foreign_server_version: VERSION_P Sconst */ +#line 4967 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 32853 "gram.c" break; - case 700: -#line 4968 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 32367 "gram.c" /* yacc.c:1652 */ + case 700: /* foreign_server_version: VERSION_P NULL_P */ +#line 4968 "gram.y" + { (yyval.str) = NULL; } +#line 32859 "gram.c" break; - case 701: -#line 4972 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 32373 "gram.c" /* yacc.c:1652 */ + case 701: /* opt_foreign_server_version: foreign_server_version */ +#line 4972 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 32865 "gram.c" break; - case 702: -#line 4973 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 32379 "gram.c" /* yacc.c:1652 */ + case 702: /* opt_foreign_server_version: %empty */ +#line 4973 "gram.y" + { (yyval.str) = NULL; } +#line 32871 "gram.c" break; - case 703: -#line 4984 "gram.y" /* yacc.c:1652 */ - { + case 703: /* AlterForeignServerStmt: ALTER SERVER name foreign_server_version alter_generic_options */ +#line 4984 "gram.y" + { AlterForeignServerStmt *n = makeNode(AlterForeignServerStmt); n->servername = (yyvsp[-2].str); n->version = (yyvsp[-1].str); @@ -32388,35 +32880,35 @@ yyreduce: n->has_version = true; (yyval.node) = (Node *) n; } -#line 32392 "gram.c" /* yacc.c:1652 */ +#line 32884 "gram.c" break; - case 704: -#line 4993 "gram.y" /* yacc.c:1652 */ - { + case 704: /* AlterForeignServerStmt: ALTER SERVER name foreign_server_version */ +#line 4993 "gram.y" + { AlterForeignServerStmt *n = makeNode(AlterForeignServerStmt); n->servername = (yyvsp[-1].str); n->version = (yyvsp[0].str); n->has_version = true; (yyval.node) = (Node *) n; } -#line 32404 "gram.c" /* yacc.c:1652 */ +#line 32896 "gram.c" break; - case 705: -#line 5001 "gram.y" /* yacc.c:1652 */ - { + case 705: /* AlterForeignServerStmt: ALTER SERVER name alter_generic_options */ +#line 5001 "gram.y" + { AlterForeignServerStmt *n = makeNode(AlterForeignServerStmt); n->servername = (yyvsp[-1].str); n->options = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 32415 "gram.c" /* yacc.c:1652 */ +#line 32907 "gram.c" break; - case 706: -#line 5020 "gram.y" /* yacc.c:1652 */ - { + case 706: /* CreateForeignTableStmt: CREATE FOREIGN TABLE qualified_name '(' OptTableElementList ')' OptInherit SERVER name create_generic_options */ +#line 5020 "gram.y" + { CreateForeignTableStmt *n = makeNode(CreateForeignTableStmt); (yyvsp[-7].range)->relpersistence = RELPERSISTENCE_PERMANENT; n->base.relation = (yyvsp[-7].range); @@ -32433,12 +32925,12 @@ yyreduce: n->options = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 32437 "gram.c" /* yacc.c:1652 */ +#line 32929 "gram.c" break; - case 707: -#line 5040 "gram.y" /* yacc.c:1652 */ - { + case 707: /* CreateForeignTableStmt: CREATE FOREIGN TABLE IF_P NOT EXISTS qualified_name '(' OptTableElementList ')' OptInherit SERVER name create_generic_options */ +#line 5040 "gram.y" + { CreateForeignTableStmt *n = makeNode(CreateForeignTableStmt); (yyvsp[-7].range)->relpersistence = RELPERSISTENCE_PERMANENT; n->base.relation = (yyvsp[-7].range); @@ -32455,12 +32947,12 @@ yyreduce: n->options = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 32459 "gram.c" /* yacc.c:1652 */ +#line 32951 "gram.c" break; - case 708: -#line 5060 "gram.y" /* yacc.c:1652 */ - { + case 708: /* CreateForeignTableStmt: CREATE FOREIGN TABLE qualified_name PARTITION OF qualified_name OptTypedTableElementList PartitionBoundSpec SERVER name create_generic_options */ +#line 5060 "gram.y" + { CreateForeignTableStmt *n = makeNode(CreateForeignTableStmt); (yyvsp[-8].range)->relpersistence = RELPERSISTENCE_PERMANENT; n->base.relation = (yyvsp[-8].range); @@ -32478,12 +32970,12 @@ yyreduce: n->options = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 32482 "gram.c" /* yacc.c:1652 */ +#line 32974 "gram.c" break; - case 709: -#line 5081 "gram.y" /* yacc.c:1652 */ - { + case 709: /* CreateForeignTableStmt: CREATE FOREIGN TABLE IF_P NOT EXISTS qualified_name PARTITION OF qualified_name OptTypedTableElementList PartitionBoundSpec SERVER name create_generic_options */ +#line 5081 "gram.y" + { CreateForeignTableStmt *n = makeNode(CreateForeignTableStmt); (yyvsp[-8].range)->relpersistence = RELPERSISTENCE_PERMANENT; n->base.relation = (yyvsp[-8].range); @@ -32501,12 +32993,12 @@ yyreduce: n->options = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 32505 "gram.c" /* yacc.c:1652 */ +#line 32997 "gram.c" break; - case 710: -#line 5113 "gram.y" /* yacc.c:1652 */ - { + case 710: /* ImportForeignSchemaStmt: IMPORT_P FOREIGN SCHEMA name import_qualification FROM SERVER name INTO name create_generic_options */ +#line 5113 "gram.y" + { ImportForeignSchemaStmt *n = makeNode(ImportForeignSchemaStmt); n->server_name = (yyvsp[-3].str); n->remote_schema = (yyvsp[-7].str); @@ -32516,46 +33008,46 @@ yyreduce: n->options = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 32520 "gram.c" /* yacc.c:1652 */ +#line 33012 "gram.c" break; - case 711: -#line 5126 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = FDW_IMPORT_SCHEMA_LIMIT_TO; } -#line 32526 "gram.c" /* yacc.c:1652 */ + case 711: /* import_qualification_type: LIMIT TO */ +#line 5126 "gram.y" + { (yyval.ival) = FDW_IMPORT_SCHEMA_LIMIT_TO; } +#line 33018 "gram.c" break; - case 712: -#line 5127 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = FDW_IMPORT_SCHEMA_EXCEPT; } -#line 32532 "gram.c" /* yacc.c:1652 */ + case 712: /* import_qualification_type: EXCEPT */ +#line 5127 "gram.y" + { (yyval.ival) = FDW_IMPORT_SCHEMA_EXCEPT; } +#line 33024 "gram.c" break; - case 713: -#line 5132 "gram.y" /* yacc.c:1652 */ - { + case 713: /* import_qualification: import_qualification_type '(' relation_expr_list ')' */ +#line 5132 "gram.y" + { ImportQual *n = (ImportQual *) palloc(sizeof(ImportQual)); n->type = (yyvsp[-3].ival); n->table_names = (yyvsp[-1].list); (yyval.importqual) = n; } -#line 32543 "gram.c" /* yacc.c:1652 */ +#line 33035 "gram.c" break; - case 714: -#line 5139 "gram.y" /* yacc.c:1652 */ - { + case 714: /* import_qualification: %empty */ +#line 5139 "gram.y" + { ImportQual *n = (ImportQual *) palloc(sizeof(ImportQual)); n->type = FDW_IMPORT_SCHEMA_ALL; n->table_names = NIL; (yyval.importqual) = n; } -#line 32554 "gram.c" /* yacc.c:1652 */ +#line 33046 "gram.c" break; - case 715: -#line 5155 "gram.y" /* yacc.c:1652 */ - { + case 715: /* CreateUserMappingStmt: CREATE USER MAPPING FOR auth_ident SERVER name create_generic_options */ +#line 5155 "gram.y" + { CreateUserMappingStmt *n = makeNode(CreateUserMappingStmt); n->user = (yyvsp[-3].rolespec); n->servername = (yyvsp[-1].str); @@ -32563,12 +33055,12 @@ yyreduce: n->if_not_exists = false; (yyval.node) = (Node *) n; } -#line 32567 "gram.c" /* yacc.c:1652 */ +#line 33059 "gram.c" break; - case 716: -#line 5164 "gram.y" /* yacc.c:1652 */ - { + case 716: /* CreateUserMappingStmt: CREATE USER MAPPING IF_P NOT EXISTS FOR auth_ident SERVER name create_generic_options */ +#line 5164 "gram.y" + { CreateUserMappingStmt *n = makeNode(CreateUserMappingStmt); n->user = (yyvsp[-3].rolespec); n->servername = (yyvsp[-1].str); @@ -32576,60 +33068,60 @@ yyreduce: n->if_not_exists = true; (yyval.node) = (Node *) n; } -#line 32580 "gram.c" /* yacc.c:1652 */ +#line 33072 "gram.c" break; - case 717: -#line 5175 "gram.y" /* yacc.c:1652 */ - { (yyval.rolespec) = (yyvsp[0].rolespec); } -#line 32586 "gram.c" /* yacc.c:1652 */ + case 717: /* auth_ident: RoleSpec */ +#line 5175 "gram.y" + { (yyval.rolespec) = (yyvsp[0].rolespec); } +#line 33078 "gram.c" break; - case 718: -#line 5176 "gram.y" /* yacc.c:1652 */ - { (yyval.rolespec) = makeRoleSpec(ROLESPEC_CURRENT_USER, (yylsp[0])); } -#line 32592 "gram.c" /* yacc.c:1652 */ + case 718: /* auth_ident: USER */ +#line 5176 "gram.y" + { (yyval.rolespec) = makeRoleSpec(ROLESPEC_CURRENT_USER, (yylsp[0])); } +#line 33084 "gram.c" break; - case 719: -#line 5189 "gram.y" /* yacc.c:1652 */ - { + case 719: /* DropUserMappingStmt: DROP USER MAPPING FOR auth_ident SERVER name */ +#line 5189 "gram.y" + { DropUserMappingStmt *n = makeNode(DropUserMappingStmt); n->user = (yyvsp[-2].rolespec); n->servername = (yyvsp[0].str); n->missing_ok = false; (yyval.node) = (Node *) n; } -#line 32604 "gram.c" /* yacc.c:1652 */ +#line 33096 "gram.c" break; - case 720: -#line 5197 "gram.y" /* yacc.c:1652 */ - { + case 720: /* DropUserMappingStmt: DROP USER MAPPING IF_P EXISTS FOR auth_ident SERVER name */ +#line 5197 "gram.y" + { DropUserMappingStmt *n = makeNode(DropUserMappingStmt); n->user = (yyvsp[-2].rolespec); n->servername = (yyvsp[0].str); n->missing_ok = true; (yyval.node) = (Node *) n; } -#line 32616 "gram.c" /* yacc.c:1652 */ +#line 33108 "gram.c" break; - case 721: -#line 5214 "gram.y" /* yacc.c:1652 */ - { + case 721: /* AlterUserMappingStmt: ALTER USER MAPPING FOR auth_ident SERVER name alter_generic_options */ +#line 5214 "gram.y" + { AlterUserMappingStmt *n = makeNode(AlterUserMappingStmt); n->user = (yyvsp[-3].rolespec); n->servername = (yyvsp[-1].str); n->options = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 32628 "gram.c" /* yacc.c:1652 */ +#line 33120 "gram.c" break; - case 722: -#line 5240 "gram.y" /* yacc.c:1652 */ - { + case 722: /* CreatePolicyStmt: CREATE POLICY name ON qualified_name RowSecurityDefaultPermissive RowSecurityDefaultForCmd RowSecurityDefaultToRole RowSecurityOptionalExpr RowSecurityOptionalWithCheck */ +#line 5240 "gram.y" + { CreatePolicyStmt *n = makeNode(CreatePolicyStmt); n->policy_name = (yyvsp[-7].str); n->table = (yyvsp[-5].range); @@ -32640,12 +33132,12 @@ yyreduce: n->with_check = (yyvsp[0].node); (yyval.node) = (Node *) n; } -#line 32644 "gram.c" /* yacc.c:1652 */ +#line 33136 "gram.c" break; - case 723: -#line 5256 "gram.y" /* yacc.c:1652 */ - { + case 723: /* AlterPolicyStmt: ALTER POLICY name ON qualified_name RowSecurityOptionalToRole RowSecurityOptionalExpr RowSecurityOptionalWithCheck */ +#line 5256 "gram.y" + { AlterPolicyStmt *n = makeNode(AlterPolicyStmt); n->policy_name = (yyvsp[-5].str); n->table = (yyvsp[-3].range); @@ -32654,60 +33146,60 @@ yyreduce: n->with_check = (yyvsp[0].node); (yyval.node) = (Node *) n; } -#line 32658 "gram.c" /* yacc.c:1652 */ +#line 33150 "gram.c" break; - case 724: -#line 5268 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[-1].node); } -#line 32664 "gram.c" /* yacc.c:1652 */ + case 724: /* RowSecurityOptionalExpr: USING '(' a_expr ')' */ +#line 5268 "gram.y" + { (yyval.node) = (yyvsp[-1].node); } +#line 33156 "gram.c" break; - case 725: -#line 5269 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 32670 "gram.c" /* yacc.c:1652 */ + case 725: /* RowSecurityOptionalExpr: %empty */ +#line 5269 "gram.y" + { (yyval.node) = NULL; } +#line 33162 "gram.c" break; - case 726: -#line 5273 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[-1].node); } -#line 32676 "gram.c" /* yacc.c:1652 */ + case 726: /* RowSecurityOptionalWithCheck: WITH CHECK '(' a_expr ')' */ +#line 5273 "gram.y" + { (yyval.node) = (yyvsp[-1].node); } +#line 33168 "gram.c" break; - case 727: -#line 5274 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 32682 "gram.c" /* yacc.c:1652 */ + case 727: /* RowSecurityOptionalWithCheck: %empty */ +#line 5274 "gram.y" + { (yyval.node) = NULL; } +#line 33174 "gram.c" break; - case 728: -#line 5278 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 32688 "gram.c" /* yacc.c:1652 */ + case 728: /* RowSecurityDefaultToRole: TO role_list */ +#line 5278 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 33180 "gram.c" break; - case 729: -#line 5279 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeRoleSpec(ROLESPEC_PUBLIC, -1)); } -#line 32694 "gram.c" /* yacc.c:1652 */ + case 729: /* RowSecurityDefaultToRole: %empty */ +#line 5279 "gram.y" + { (yyval.list) = list_make1(makeRoleSpec(ROLESPEC_PUBLIC, -1)); } +#line 33186 "gram.c" break; - case 730: -#line 5283 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 32700 "gram.c" /* yacc.c:1652 */ + case 730: /* RowSecurityOptionalToRole: TO role_list */ +#line 5283 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 33192 "gram.c" break; - case 731: -#line 5284 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NULL; } -#line 32706 "gram.c" /* yacc.c:1652 */ + case 731: /* RowSecurityOptionalToRole: %empty */ +#line 5284 "gram.y" + { (yyval.list) = NULL; } +#line 33198 "gram.c" break; - case 732: -#line 5289 "gram.y" /* yacc.c:1652 */ - { + case 732: /* RowSecurityDefaultPermissive: AS IDENT */ +#line 5289 "gram.y" + { if (strcmp((yyvsp[0].str), "permissive") == 0) (yyval.boolean) = true; else if (strcmp((yyvsp[0].str), "restrictive") == 0) @@ -32720,84 +33212,84 @@ yyreduce: parser_errposition((yylsp[0])))); } -#line 32724 "gram.c" /* yacc.c:1652 */ +#line 33216 "gram.c" break; - case 733: -#line 5302 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 32730 "gram.c" /* yacc.c:1652 */ + case 733: /* RowSecurityDefaultPermissive: %empty */ +#line 5302 "gram.y" + { (yyval.boolean) = true; } +#line 33222 "gram.c" break; - case 734: -#line 5306 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 32736 "gram.c" /* yacc.c:1652 */ + case 734: /* RowSecurityDefaultForCmd: FOR row_security_cmd */ +#line 5306 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 33228 "gram.c" break; - case 735: -#line 5307 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "all"; } -#line 32742 "gram.c" /* yacc.c:1652 */ + case 735: /* RowSecurityDefaultForCmd: %empty */ +#line 5307 "gram.y" + { (yyval.str) = "all"; } +#line 33234 "gram.c" break; - case 736: -#line 5311 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "all"; } -#line 32748 "gram.c" /* yacc.c:1652 */ + case 736: /* row_security_cmd: ALL */ +#line 5311 "gram.y" + { (yyval.str) = "all"; } +#line 33240 "gram.c" break; - case 737: -#line 5312 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "select"; } -#line 32754 "gram.c" /* yacc.c:1652 */ + case 737: /* row_security_cmd: SELECT */ +#line 5312 "gram.y" + { (yyval.str) = "select"; } +#line 33246 "gram.c" break; - case 738: -#line 5313 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "insert"; } -#line 32760 "gram.c" /* yacc.c:1652 */ + case 738: /* row_security_cmd: INSERT */ +#line 5313 "gram.y" + { (yyval.str) = "insert"; } +#line 33252 "gram.c" break; - case 739: -#line 5314 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "update"; } -#line 32766 "gram.c" /* yacc.c:1652 */ + case 739: /* row_security_cmd: UPDATE */ +#line 5314 "gram.y" + { (yyval.str) = "update"; } +#line 33258 "gram.c" break; - case 740: -#line 5315 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "delete"; } -#line 32772 "gram.c" /* yacc.c:1652 */ + case 740: /* row_security_cmd: DELETE_P */ +#line 5315 "gram.y" + { (yyval.str) = "delete"; } +#line 33264 "gram.c" break; - case 741: -#line 5326 "gram.y" /* yacc.c:1652 */ - { + case 741: /* CreateAmStmt: CREATE ACCESS METHOD name TYPE_P am_type HANDLER handler_name */ +#line 5326 "gram.y" + { CreateAmStmt *n = makeNode(CreateAmStmt); n->amname = (yyvsp[-4].str); n->handler_name = (yyvsp[0].list); n->amtype = (yyvsp[-2].chr); (yyval.node) = (Node *) n; } -#line 32784 "gram.c" /* yacc.c:1652 */ +#line 33276 "gram.c" break; - case 742: -#line 5336 "gram.y" /* yacc.c:1652 */ - { (yyval.chr) = AMTYPE_INDEX; } -#line 32790 "gram.c" /* yacc.c:1652 */ + case 742: /* am_type: INDEX */ +#line 5336 "gram.y" + { (yyval.chr) = AMTYPE_INDEX; } +#line 33282 "gram.c" break; - case 743: -#line 5337 "gram.y" /* yacc.c:1652 */ - { (yyval.chr) = AMTYPE_TABLE; } -#line 32796 "gram.c" /* yacc.c:1652 */ + case 743: /* am_type: TABLE */ +#line 5337 "gram.y" + { (yyval.chr) = AMTYPE_TABLE; } +#line 33288 "gram.c" break; - case 744: -#line 5351 "gram.y" /* yacc.c:1652 */ - { + case 744: /* CreateTrigStmt: CREATE opt_or_replace TRIGGER name TriggerActionTime TriggerEvents ON qualified_name TriggerReferencing TriggerForSpec TriggerWhen EXECUTE FUNCTION_or_PROCEDURE func_name '(' TriggerFuncArgs ')' */ +#line 5351 "gram.y" + { CreateTrigStmt *n = makeNode(CreateTrigStmt); n->replace = (yyvsp[-15].boolean); n->isconstraint = false; @@ -32816,12 +33308,12 @@ yyreduce: n->constrrel = NULL; (yyval.node) = (Node *)n; } -#line 32820 "gram.c" /* yacc.c:1652 */ +#line 33312 "gram.c" break; - case 745: -#line 5374 "gram.y" /* yacc.c:1652 */ - { + case 745: /* CreateTrigStmt: CREATE opt_or_replace CONSTRAINT TRIGGER name AFTER TriggerEvents ON qualified_name OptConstrFromTable ConstraintAttributeSpec FOR EACH ROW TriggerWhen EXECUTE FUNCTION_or_PROCEDURE func_name '(' TriggerFuncArgs ')' */ +#line 5374 "gram.y" + { CreateTrigStmt *n = makeNode(CreateTrigStmt); n->replace = (yyvsp[-19].boolean); if (n->replace) /* not supported, see CreateTrigger */ @@ -32845,36 +33337,36 @@ yyreduce: n->constrrel = (yyvsp[-11].range); (yyval.node) = (Node *)n; } -#line 32849 "gram.c" /* yacc.c:1652 */ +#line 33341 "gram.c" break; - case 746: -#line 5401 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = TRIGGER_TYPE_BEFORE; } -#line 32855 "gram.c" /* yacc.c:1652 */ + case 746: /* TriggerActionTime: BEFORE */ +#line 5401 "gram.y" + { (yyval.ival) = TRIGGER_TYPE_BEFORE; } +#line 33347 "gram.c" break; - case 747: -#line 5402 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = TRIGGER_TYPE_AFTER; } -#line 32861 "gram.c" /* yacc.c:1652 */ + case 747: /* TriggerActionTime: AFTER */ +#line 5402 "gram.y" + { (yyval.ival) = TRIGGER_TYPE_AFTER; } +#line 33353 "gram.c" break; - case 748: -#line 5403 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = TRIGGER_TYPE_INSTEAD; } -#line 32867 "gram.c" /* yacc.c:1652 */ + case 748: /* TriggerActionTime: INSTEAD OF */ +#line 5403 "gram.y" + { (yyval.ival) = TRIGGER_TYPE_INSTEAD; } +#line 33359 "gram.c" break; - case 749: -#line 5408 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 32873 "gram.c" /* yacc.c:1652 */ + case 749: /* TriggerEvents: TriggerOneEvent */ +#line 5408 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 33365 "gram.c" break; - case 750: -#line 5410 "gram.y" /* yacc.c:1652 */ - { + case 750: /* TriggerEvents: TriggerEvents OR TriggerOneEvent */ +#line 5410 "gram.y" + { int events1 = intVal(linitial((yyvsp[-2].list))); int events2 = intVal(linitial((yyvsp[0].list))); List *columns1 = (List *) lsecond((yyvsp[-2].list)); @@ -32892,214 +33384,214 @@ yyreduce: (yyval.list) = list_make2(makeInteger(events1 | events2), list_concat(columns1, columns2)); } -#line 32896 "gram.c" /* yacc.c:1652 */ +#line 33388 "gram.c" break; - case 751: -#line 5432 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make2(makeInteger(TRIGGER_TYPE_INSERT), NIL); } -#line 32902 "gram.c" /* yacc.c:1652 */ + case 751: /* TriggerOneEvent: INSERT */ +#line 5432 "gram.y" + { (yyval.list) = list_make2(makeInteger(TRIGGER_TYPE_INSERT), NIL); } +#line 33394 "gram.c" break; - case 752: -#line 5434 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make2(makeInteger(TRIGGER_TYPE_DELETE), NIL); } -#line 32908 "gram.c" /* yacc.c:1652 */ + case 752: /* TriggerOneEvent: DELETE_P */ +#line 5434 "gram.y" + { (yyval.list) = list_make2(makeInteger(TRIGGER_TYPE_DELETE), NIL); } +#line 33400 "gram.c" break; - case 753: -#line 5436 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), NIL); } -#line 32914 "gram.c" /* yacc.c:1652 */ + case 753: /* TriggerOneEvent: UPDATE */ +#line 5436 "gram.y" + { (yyval.list) = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), NIL); } +#line 33406 "gram.c" break; - case 754: -#line 5438 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), (yyvsp[0].list)); } -#line 32920 "gram.c" /* yacc.c:1652 */ + case 754: /* TriggerOneEvent: UPDATE OF columnList */ +#line 5438 "gram.y" + { (yyval.list) = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), (yyvsp[0].list)); } +#line 33412 "gram.c" break; - case 755: -#line 5440 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make2(makeInteger(TRIGGER_TYPE_TRUNCATE), NIL); } -#line 32926 "gram.c" /* yacc.c:1652 */ + case 755: /* TriggerOneEvent: TRUNCATE */ +#line 5440 "gram.y" + { (yyval.list) = list_make2(makeInteger(TRIGGER_TYPE_TRUNCATE), NIL); } +#line 33418 "gram.c" break; - case 756: -#line 5444 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 32932 "gram.c" /* yacc.c:1652 */ + case 756: /* TriggerReferencing: REFERENCING TriggerTransitions */ +#line 5444 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 33424 "gram.c" break; - case 757: -#line 5445 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 32938 "gram.c" /* yacc.c:1652 */ + case 757: /* TriggerReferencing: %empty */ +#line 5445 "gram.y" + { (yyval.list) = NIL; } +#line 33430 "gram.c" break; - case 758: -#line 5449 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 32944 "gram.c" /* yacc.c:1652 */ + case 758: /* TriggerTransitions: TriggerTransition */ +#line 5449 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 33436 "gram.c" break; - case 759: -#line 5450 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } -#line 32950 "gram.c" /* yacc.c:1652 */ + case 759: /* TriggerTransitions: TriggerTransitions TriggerTransition */ +#line 5450 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } +#line 33442 "gram.c" break; - case 760: -#line 5455 "gram.y" /* yacc.c:1652 */ - { + case 760: /* TriggerTransition: TransitionOldOrNew TransitionRowOrTable opt_as TransitionRelName */ +#line 5455 "gram.y" + { TriggerTransition *n = makeNode(TriggerTransition); n->name = (yyvsp[0].str); n->isNew = (yyvsp[-3].boolean); n->isTable = (yyvsp[-2].boolean); (yyval.node) = (Node *)n; } -#line 32962 "gram.c" /* yacc.c:1652 */ +#line 33454 "gram.c" break; - case 761: -#line 5465 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 32968 "gram.c" /* yacc.c:1652 */ + case 761: /* TransitionOldOrNew: NEW */ +#line 5465 "gram.y" + { (yyval.boolean) = true; } +#line 33460 "gram.c" break; - case 762: -#line 5466 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 32974 "gram.c" /* yacc.c:1652 */ + case 762: /* TransitionOldOrNew: OLD */ +#line 5466 "gram.y" + { (yyval.boolean) = false; } +#line 33466 "gram.c" break; - case 763: -#line 5470 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 32980 "gram.c" /* yacc.c:1652 */ + case 763: /* TransitionRowOrTable: TABLE */ +#line 5470 "gram.y" + { (yyval.boolean) = true; } +#line 33472 "gram.c" break; - case 764: -#line 5479 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 32986 "gram.c" /* yacc.c:1652 */ + case 764: /* TransitionRowOrTable: ROW */ +#line 5479 "gram.y" + { (yyval.boolean) = false; } +#line 33478 "gram.c" break; - case 765: -#line 5483 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 32992 "gram.c" /* yacc.c:1652 */ + case 765: /* TransitionRelName: ColId */ +#line 5483 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 33484 "gram.c" break; - case 766: -#line 5488 "gram.y" /* yacc.c:1652 */ - { + case 766: /* TriggerForSpec: FOR TriggerForOptEach TriggerForType */ +#line 5488 "gram.y" + { (yyval.boolean) = (yyvsp[0].boolean); } -#line 33000 "gram.c" /* yacc.c:1652 */ +#line 33492 "gram.c" break; - case 767: -#line 5492 "gram.y" /* yacc.c:1652 */ - { + case 767: /* TriggerForSpec: %empty */ +#line 5492 "gram.y" + { /* * If ROW/STATEMENT not specified, default to * STATEMENT, per SQL */ (yyval.boolean) = false; } -#line 33012 "gram.c" /* yacc.c:1652 */ +#line 33504 "gram.c" break; - case 770: -#line 5507 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 33018 "gram.c" /* yacc.c:1652 */ + case 770: /* TriggerForType: ROW */ +#line 5507 "gram.y" + { (yyval.boolean) = true; } +#line 33510 "gram.c" break; - case 771: -#line 5508 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 33024 "gram.c" /* yacc.c:1652 */ + case 771: /* TriggerForType: STATEMENT */ +#line 5508 "gram.y" + { (yyval.boolean) = false; } +#line 33516 "gram.c" break; - case 772: -#line 5512 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[-1].node); } -#line 33030 "gram.c" /* yacc.c:1652 */ + case 772: /* TriggerWhen: WHEN '(' a_expr ')' */ +#line 5512 "gram.y" + { (yyval.node) = (yyvsp[-1].node); } +#line 33522 "gram.c" break; - case 773: -#line 5513 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 33036 "gram.c" /* yacc.c:1652 */ + case 773: /* TriggerWhen: %empty */ +#line 5513 "gram.y" + { (yyval.node) = NULL; } +#line 33528 "gram.c" break; - case 776: -#line 5522 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].value)); } -#line 33042 "gram.c" /* yacc.c:1652 */ + case 776: /* TriggerFuncArgs: TriggerFuncArg */ +#line 5522 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].value)); } +#line 33534 "gram.c" break; - case 777: -#line 5523 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].value)); } -#line 33048 "gram.c" /* yacc.c:1652 */ + case 777: /* TriggerFuncArgs: TriggerFuncArgs ',' TriggerFuncArg */ +#line 5523 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].value)); } +#line 33540 "gram.c" break; - case 778: -#line 5524 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 33054 "gram.c" /* yacc.c:1652 */ + case 778: /* TriggerFuncArgs: %empty */ +#line 5524 "gram.y" + { (yyval.list) = NIL; } +#line 33546 "gram.c" break; - case 779: -#line 5529 "gram.y" /* yacc.c:1652 */ - { + case 779: /* TriggerFuncArg: Iconst */ +#line 5529 "gram.y" + { (yyval.value) = makeString(psprintf("%d", (yyvsp[0].ival))); } -#line 33062 "gram.c" /* yacc.c:1652 */ +#line 33554 "gram.c" break; - case 780: -#line 5532 "gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeString((yyvsp[0].str)); } -#line 33068 "gram.c" /* yacc.c:1652 */ + case 780: /* TriggerFuncArg: FCONST */ +#line 5532 "gram.y" + { (yyval.value) = makeString((yyvsp[0].str)); } +#line 33560 "gram.c" break; - case 781: -#line 5533 "gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeString((yyvsp[0].str)); } -#line 33074 "gram.c" /* yacc.c:1652 */ + case 781: /* TriggerFuncArg: Sconst */ +#line 5533 "gram.y" + { (yyval.value) = makeString((yyvsp[0].str)); } +#line 33566 "gram.c" break; - case 782: -#line 5534 "gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeString((yyvsp[0].str)); } -#line 33080 "gram.c" /* yacc.c:1652 */ + case 782: /* TriggerFuncArg: ColLabel */ +#line 5534 "gram.y" + { (yyval.value) = makeString((yyvsp[0].str)); } +#line 33572 "gram.c" break; - case 783: -#line 5538 "gram.y" /* yacc.c:1652 */ - { (yyval.range) = (yyvsp[0].range); } -#line 33086 "gram.c" /* yacc.c:1652 */ + case 783: /* OptConstrFromTable: FROM qualified_name */ +#line 5538 "gram.y" + { (yyval.range) = (yyvsp[0].range); } +#line 33578 "gram.c" break; - case 784: -#line 5539 "gram.y" /* yacc.c:1652 */ - { (yyval.range) = NULL; } -#line 33092 "gram.c" /* yacc.c:1652 */ + case 784: /* OptConstrFromTable: %empty */ +#line 5539 "gram.y" + { (yyval.range) = NULL; } +#line 33584 "gram.c" break; - case 785: -#line 5544 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = 0; } -#line 33098 "gram.c" /* yacc.c:1652 */ + case 785: /* ConstraintAttributeSpec: %empty */ +#line 5544 "gram.y" + { (yyval.ival) = 0; } +#line 33590 "gram.c" break; - case 786: -#line 5546 "gram.y" /* yacc.c:1652 */ - { + case 786: /* ConstraintAttributeSpec: ConstraintAttributeSpec ConstraintAttributeElem */ +#line 5546 "gram.y" + { /* * We must complain about conflicting options. * We could, but choose not to, complain about redundant @@ -33122,48 +33614,48 @@ yyreduce: parser_errposition((yylsp[0])))); (yyval.ival) = newspec; } -#line 33126 "gram.c" /* yacc.c:1652 */ +#line 33618 "gram.c" break; - case 787: -#line 5572 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CAS_NOT_DEFERRABLE; } -#line 33132 "gram.c" /* yacc.c:1652 */ + case 787: /* ConstraintAttributeElem: NOT DEFERRABLE */ +#line 5572 "gram.y" + { (yyval.ival) = CAS_NOT_DEFERRABLE; } +#line 33624 "gram.c" break; - case 788: -#line 5573 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CAS_DEFERRABLE; } -#line 33138 "gram.c" /* yacc.c:1652 */ + case 788: /* ConstraintAttributeElem: DEFERRABLE */ +#line 5573 "gram.y" + { (yyval.ival) = CAS_DEFERRABLE; } +#line 33630 "gram.c" break; - case 789: -#line 5574 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CAS_INITIALLY_IMMEDIATE; } -#line 33144 "gram.c" /* yacc.c:1652 */ + case 789: /* ConstraintAttributeElem: INITIALLY IMMEDIATE */ +#line 5574 "gram.y" + { (yyval.ival) = CAS_INITIALLY_IMMEDIATE; } +#line 33636 "gram.c" break; - case 790: -#line 5575 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CAS_INITIALLY_DEFERRED; } -#line 33150 "gram.c" /* yacc.c:1652 */ + case 790: /* ConstraintAttributeElem: INITIALLY DEFERRED */ +#line 5575 "gram.y" + { (yyval.ival) = CAS_INITIALLY_DEFERRED; } +#line 33642 "gram.c" break; - case 791: -#line 5576 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CAS_NOT_VALID; } -#line 33156 "gram.c" /* yacc.c:1652 */ + case 791: /* ConstraintAttributeElem: NOT VALID */ +#line 5576 "gram.y" + { (yyval.ival) = CAS_NOT_VALID; } +#line 33648 "gram.c" break; - case 792: -#line 5577 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CAS_NO_INHERIT; } -#line 33162 "gram.c" /* yacc.c:1652 */ + case 792: /* ConstraintAttributeElem: NO INHERIT */ +#line 5577 "gram.y" + { (yyval.ival) = CAS_NO_INHERIT; } +#line 33654 "gram.c" break; - case 793: -#line 5592 "gram.y" /* yacc.c:1652 */ - { + case 793: /* CreateEventTrigStmt: CREATE EVENT TRIGGER name ON ColLabel EXECUTE FUNCTION_or_PROCEDURE func_name '(' ')' */ +#line 5592 "gram.y" + { CreateEventTrigStmt *n = makeNode(CreateEventTrigStmt); n->trigname = (yyvsp[-7].str); n->eventname = (yyvsp[-5].str); @@ -33171,12 +33663,12 @@ yyreduce: n->funcname = (yyvsp[-2].list); (yyval.node) = (Node *)n; } -#line 33175 "gram.c" /* yacc.c:1652 */ +#line 33667 "gram.c" break; - case 794: -#line 5603 "gram.y" /* yacc.c:1652 */ - { + case 794: /* CreateEventTrigStmt: CREATE EVENT TRIGGER name ON ColLabel WHEN event_trigger_when_list EXECUTE FUNCTION_or_PROCEDURE func_name '(' ')' */ +#line 5603 "gram.y" + { CreateEventTrigStmt *n = makeNode(CreateEventTrigStmt); n->trigname = (yyvsp[-9].str); n->eventname = (yyvsp[-7].str); @@ -33184,89 +33676,89 @@ yyreduce: n->funcname = (yyvsp[-2].list); (yyval.node) = (Node *)n; } -#line 33188 "gram.c" /* yacc.c:1652 */ +#line 33680 "gram.c" break; - case 795: -#line 5615 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 33194 "gram.c" /* yacc.c:1652 */ + case 795: /* event_trigger_when_list: event_trigger_when_item */ +#line 5615 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } +#line 33686 "gram.c" break; - case 796: -#line 5617 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } -#line 33200 "gram.c" /* yacc.c:1652 */ + case 796: /* event_trigger_when_list: event_trigger_when_list AND event_trigger_when_item */ +#line 5617 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } +#line 33692 "gram.c" break; - case 797: -#line 5622 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = makeDefElem((yyvsp[-4].str), (Node *) (yyvsp[-1].list), (yylsp[-4])); } -#line 33206 "gram.c" /* yacc.c:1652 */ + case 797: /* event_trigger_when_item: ColId IN_P '(' event_trigger_value_list ')' */ +#line 5622 "gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[-4].str), (Node *) (yyvsp[-1].list), (yylsp[-4])); } +#line 33698 "gram.c" break; - case 798: -#line 5627 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } -#line 33212 "gram.c" /* yacc.c:1652 */ + case 798: /* event_trigger_value_list: SCONST */ +#line 5627 "gram.y" + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } +#line 33704 "gram.c" break; - case 799: -#line 5629 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), makeString((yyvsp[0].str))); } -#line 33218 "gram.c" /* yacc.c:1652 */ + case 799: /* event_trigger_value_list: event_trigger_value_list ',' SCONST */ +#line 5629 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), makeString((yyvsp[0].str))); } +#line 33710 "gram.c" break; - case 800: -#line 5634 "gram.y" /* yacc.c:1652 */ - { + case 800: /* AlterEventTrigStmt: ALTER EVENT TRIGGER name enable_trigger */ +#line 5634 "gram.y" + { AlterEventTrigStmt *n = makeNode(AlterEventTrigStmt); n->trigname = (yyvsp[-1].str); n->tgenabled = (yyvsp[0].chr); (yyval.node) = (Node *) n; } -#line 33229 "gram.c" /* yacc.c:1652 */ +#line 33721 "gram.c" break; - case 801: -#line 5643 "gram.y" /* yacc.c:1652 */ - { (yyval.chr) = TRIGGER_FIRES_ON_ORIGIN; } -#line 33235 "gram.c" /* yacc.c:1652 */ + case 801: /* enable_trigger: ENABLE_P */ +#line 5643 "gram.y" + { (yyval.chr) = TRIGGER_FIRES_ON_ORIGIN; } +#line 33727 "gram.c" break; - case 802: -#line 5644 "gram.y" /* yacc.c:1652 */ - { (yyval.chr) = TRIGGER_FIRES_ON_REPLICA; } -#line 33241 "gram.c" /* yacc.c:1652 */ + case 802: /* enable_trigger: ENABLE_P REPLICA */ +#line 5644 "gram.y" + { (yyval.chr) = TRIGGER_FIRES_ON_REPLICA; } +#line 33733 "gram.c" break; - case 803: -#line 5645 "gram.y" /* yacc.c:1652 */ - { (yyval.chr) = TRIGGER_FIRES_ALWAYS; } -#line 33247 "gram.c" /* yacc.c:1652 */ + case 803: /* enable_trigger: ENABLE_P ALWAYS */ +#line 5645 "gram.y" + { (yyval.chr) = TRIGGER_FIRES_ALWAYS; } +#line 33739 "gram.c" break; - case 804: -#line 5646 "gram.y" /* yacc.c:1652 */ - { (yyval.chr) = TRIGGER_DISABLED; } -#line 33253 "gram.c" /* yacc.c:1652 */ + case 804: /* enable_trigger: DISABLE_P */ +#line 5646 "gram.y" + { (yyval.chr) = TRIGGER_DISABLED; } +#line 33745 "gram.c" break; - case 805: -#line 5658 "gram.y" /* yacc.c:1652 */ - { + case 805: /* CreateAssertionStmt: CREATE ASSERTION any_name CHECK '(' a_expr ')' ConstraintAttributeSpec */ +#line 5658 "gram.y" + { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("CREATE ASSERTION is not yet implemented"))); (yyval.node) = NULL; } -#line 33265 "gram.c" /* yacc.c:1652 */ +#line 33757 "gram.c" break; - case 806: -#line 5677 "gram.y" /* yacc.c:1652 */ - { + case 806: /* DefineStmt: CREATE opt_or_replace AGGREGATE func_name aggr_args definition */ +#line 5677 "gram.y" + { DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_AGGREGATE; n->oldstyle = false; @@ -33276,12 +33768,12 @@ yyreduce: n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 33280 "gram.c" /* yacc.c:1652 */ +#line 33772 "gram.c" break; - case 807: -#line 5688 "gram.y" /* yacc.c:1652 */ - { + case 807: /* DefineStmt: CREATE opt_or_replace AGGREGATE func_name old_aggr_definition */ +#line 5688 "gram.y" + { /* old-style (pre-8.2) syntax for CREATE AGGREGATE */ DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_AGGREGATE; @@ -33292,12 +33784,12 @@ yyreduce: n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 33296 "gram.c" /* yacc.c:1652 */ +#line 33788 "gram.c" break; - case 808: -#line 5700 "gram.y" /* yacc.c:1652 */ - { + case 808: /* DefineStmt: CREATE OPERATOR any_operator definition */ +#line 5700 "gram.y" + { DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_OPERATOR; n->oldstyle = false; @@ -33306,12 +33798,12 @@ yyreduce: n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 33310 "gram.c" /* yacc.c:1652 */ +#line 33802 "gram.c" break; - case 809: -#line 5710 "gram.y" /* yacc.c:1652 */ - { + case 809: /* DefineStmt: CREATE TYPE_P any_name definition */ +#line 5710 "gram.y" + { DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_TYPE; n->oldstyle = false; @@ -33320,12 +33812,12 @@ yyreduce: n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 33324 "gram.c" /* yacc.c:1652 */ +#line 33816 "gram.c" break; - case 810: -#line 5720 "gram.y" /* yacc.c:1652 */ - { + case 810: /* DefineStmt: CREATE TYPE_P any_name */ +#line 5720 "gram.y" + { /* Shell type (identified by lack of definition) */ DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_TYPE; @@ -33335,12 +33827,12 @@ yyreduce: n->definition = NIL; (yyval.node) = (Node *)n; } -#line 33339 "gram.c" /* yacc.c:1652 */ +#line 33831 "gram.c" break; - case 811: -#line 5731 "gram.y" /* yacc.c:1652 */ - { + case 811: /* DefineStmt: CREATE TYPE_P any_name AS '(' OptTableFuncElementList ')' */ +#line 5731 "gram.y" + { CompositeTypeStmt *n = makeNode(CompositeTypeStmt); /* can't use qualified_name, sigh */ @@ -33348,34 +33840,34 @@ yyreduce: n->coldeflist = (yyvsp[-1].list); (yyval.node) = (Node *)n; } -#line 33352 "gram.c" /* yacc.c:1652 */ +#line 33844 "gram.c" break; - case 812: -#line 5740 "gram.y" /* yacc.c:1652 */ - { + case 812: /* DefineStmt: CREATE TYPE_P any_name AS ENUM_P '(' opt_enum_val_list ')' */ +#line 5740 "gram.y" + { CreateEnumStmt *n = makeNode(CreateEnumStmt); n->typeName = (yyvsp[-5].list); n->vals = (yyvsp[-1].list); (yyval.node) = (Node *)n; } -#line 33363 "gram.c" /* yacc.c:1652 */ +#line 33855 "gram.c" break; - case 813: -#line 5747 "gram.y" /* yacc.c:1652 */ - { + case 813: /* DefineStmt: CREATE TYPE_P any_name AS RANGE definition */ +#line 5747 "gram.y" + { CreateRangeStmt *n = makeNode(CreateRangeStmt); n->typeName = (yyvsp[-3].list); n->params = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 33374 "gram.c" /* yacc.c:1652 */ +#line 33866 "gram.c" break; - case 814: -#line 5754 "gram.y" /* yacc.c:1652 */ - { + case 814: /* DefineStmt: CREATE TEXT_P SEARCH PARSER any_name definition */ +#line 5754 "gram.y" + { DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_TSPARSER; n->args = NIL; @@ -33383,12 +33875,12 @@ yyreduce: n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 33387 "gram.c" /* yacc.c:1652 */ +#line 33879 "gram.c" break; - case 815: -#line 5763 "gram.y" /* yacc.c:1652 */ - { + case 815: /* DefineStmt: CREATE TEXT_P SEARCH DICTIONARY any_name definition */ +#line 5763 "gram.y" + { DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_TSDICTIONARY; n->args = NIL; @@ -33396,12 +33888,12 @@ yyreduce: n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 33400 "gram.c" /* yacc.c:1652 */ +#line 33892 "gram.c" break; - case 816: -#line 5772 "gram.y" /* yacc.c:1652 */ - { + case 816: /* DefineStmt: CREATE TEXT_P SEARCH TEMPLATE any_name definition */ +#line 5772 "gram.y" + { DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_TSTEMPLATE; n->args = NIL; @@ -33409,12 +33901,12 @@ yyreduce: n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 33413 "gram.c" /* yacc.c:1652 */ +#line 33905 "gram.c" break; - case 817: -#line 5781 "gram.y" /* yacc.c:1652 */ - { + case 817: /* DefineStmt: CREATE TEXT_P SEARCH CONFIGURATION any_name definition */ +#line 5781 "gram.y" + { DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_TSCONFIGURATION; n->args = NIL; @@ -33422,12 +33914,12 @@ yyreduce: n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 33426 "gram.c" /* yacc.c:1652 */ +#line 33918 "gram.c" break; - case 818: -#line 5790 "gram.y" /* yacc.c:1652 */ - { + case 818: /* DefineStmt: CREATE COLLATION any_name definition */ +#line 5790 "gram.y" + { DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_COLLATION; n->args = NIL; @@ -33435,12 +33927,12 @@ yyreduce: n->definition = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 33439 "gram.c" /* yacc.c:1652 */ +#line 33931 "gram.c" break; - case 819: -#line 5799 "gram.y" /* yacc.c:1652 */ - { + case 819: /* DefineStmt: CREATE COLLATION IF_P NOT EXISTS any_name definition */ +#line 5799 "gram.y" + { DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_COLLATION; n->args = NIL; @@ -33449,12 +33941,12 @@ yyreduce: n->if_not_exists = true; (yyval.node) = (Node *)n; } -#line 33453 "gram.c" /* yacc.c:1652 */ +#line 33945 "gram.c" break; - case 820: -#line 5809 "gram.y" /* yacc.c:1652 */ - { + case 820: /* DefineStmt: CREATE COLLATION any_name FROM any_name */ +#line 5809 "gram.y" + { DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_COLLATION; n->args = NIL; @@ -33462,12 +33954,12 @@ yyreduce: n->definition = list_make1(makeDefElem("from", (Node *) (yyvsp[0].list), (yylsp[0]))); (yyval.node) = (Node *)n; } -#line 33466 "gram.c" /* yacc.c:1652 */ +#line 33958 "gram.c" break; - case 821: -#line 5818 "gram.y" /* yacc.c:1652 */ - { + case 821: /* DefineStmt: CREATE COLLATION IF_P NOT EXISTS any_name FROM any_name */ +#line 5818 "gram.y" + { DefineStmt *n = makeNode(DefineStmt); n->kind = OBJECT_COLLATION; n->args = NIL; @@ -33476,132 +33968,132 @@ yyreduce: n->if_not_exists = true; (yyval.node) = (Node *)n; } -#line 33480 "gram.c" /* yacc.c:1652 */ +#line 33972 "gram.c" break; - case 822: -#line 5829 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 33486 "gram.c" /* yacc.c:1652 */ + case 822: /* definition: '(' def_list ')' */ +#line 5829 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 33978 "gram.c" break; - case 823: -#line 5832 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 33492 "gram.c" /* yacc.c:1652 */ + case 823: /* def_list: def_elem */ +#line 5832 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } +#line 33984 "gram.c" break; - case 824: -#line 5833 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } -#line 33498 "gram.c" /* yacc.c:1652 */ + case 824: /* def_list: def_list ',' def_elem */ +#line 5833 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } +#line 33990 "gram.c" break; - case 825: -#line 5837 "gram.y" /* yacc.c:1652 */ - { + case 825: /* def_elem: ColLabel '=' def_arg */ +#line 5837 "gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[-2].str), (Node *) (yyvsp[0].node), (yylsp[-2])); } -#line 33506 "gram.c" /* yacc.c:1652 */ +#line 33998 "gram.c" break; - case 826: -#line 5841 "gram.y" /* yacc.c:1652 */ - { + case 826: /* def_elem: ColLabel */ +#line 5841 "gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[0].str), NULL, (yylsp[0])); } -#line 33514 "gram.c" /* yacc.c:1652 */ +#line 34006 "gram.c" break; - case 827: -#line 5847 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *)(yyvsp[0].typnam); } -#line 33520 "gram.c" /* yacc.c:1652 */ + case 827: /* def_arg: func_type */ +#line 5847 "gram.y" + { (yyval.node) = (Node *)(yyvsp[0].typnam); } +#line 34012 "gram.c" break; - case 828: -#line 5848 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *)makeString(pstrdup((yyvsp[0].keyword))); } -#line 33526 "gram.c" /* yacc.c:1652 */ + case 828: /* def_arg: reserved_keyword */ +#line 5848 "gram.y" + { (yyval.node) = (Node *)makeString(pstrdup((yyvsp[0].keyword))); } +#line 34018 "gram.c" break; - case 829: -#line 5849 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *)(yyvsp[0].list); } -#line 33532 "gram.c" /* yacc.c:1652 */ + case 829: /* def_arg: qual_all_Op */ +#line 5849 "gram.y" + { (yyval.node) = (Node *)(yyvsp[0].list); } +#line 34024 "gram.c" break; - case 830: -#line 5850 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *)(yyvsp[0].value); } -#line 33538 "gram.c" /* yacc.c:1652 */ + case 830: /* def_arg: NumericOnly */ +#line 5850 "gram.y" + { (yyval.node) = (Node *)(yyvsp[0].value); } +#line 34030 "gram.c" break; - case 831: -#line 5851 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *)makeString((yyvsp[0].str)); } -#line 33544 "gram.c" /* yacc.c:1652 */ + case 831: /* def_arg: Sconst */ +#line 5851 "gram.y" + { (yyval.node) = (Node *)makeString((yyvsp[0].str)); } +#line 34036 "gram.c" break; - case 832: -#line 5852 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *)makeString(pstrdup((yyvsp[0].keyword))); } -#line 33550 "gram.c" /* yacc.c:1652 */ + case 832: /* def_arg: NONE */ +#line 5852 "gram.y" + { (yyval.node) = (Node *)makeString(pstrdup((yyvsp[0].keyword))); } +#line 34042 "gram.c" break; - case 833: -#line 5855 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 33556 "gram.c" /* yacc.c:1652 */ + case 833: /* old_aggr_definition: '(' old_aggr_list ')' */ +#line 5855 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 34048 "gram.c" break; - case 834: -#line 5858 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 33562 "gram.c" /* yacc.c:1652 */ + case 834: /* old_aggr_list: old_aggr_elem */ +#line 5858 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } +#line 34054 "gram.c" break; - case 835: -#line 5859 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } -#line 33568 "gram.c" /* yacc.c:1652 */ + case 835: /* old_aggr_list: old_aggr_list ',' old_aggr_elem */ +#line 5859 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } +#line 34060 "gram.c" break; - case 836: -#line 5868 "gram.y" /* yacc.c:1652 */ - { + case 836: /* old_aggr_elem: IDENT '=' def_arg */ +#line 5868 "gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[-2].str), (Node *)(yyvsp[0].node), (yylsp[-2])); } -#line 33576 "gram.c" /* yacc.c:1652 */ +#line 34068 "gram.c" break; - case 837: -#line 5874 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 33582 "gram.c" /* yacc.c:1652 */ + case 837: /* opt_enum_val_list: enum_val_list */ +#line 5874 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 34074 "gram.c" break; - case 838: -#line 5875 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 33588 "gram.c" /* yacc.c:1652 */ + case 838: /* opt_enum_val_list: %empty */ +#line 5875 "gram.y" + { (yyval.list) = NIL; } +#line 34080 "gram.c" break; - case 839: -#line 5879 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } -#line 33594 "gram.c" /* yacc.c:1652 */ + case 839: /* enum_val_list: Sconst */ +#line 5879 "gram.y" + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } +#line 34086 "gram.c" break; - case 840: -#line 5881 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), makeString((yyvsp[0].str))); } -#line 33600 "gram.c" /* yacc.c:1652 */ + case 840: /* enum_val_list: enum_val_list ',' Sconst */ +#line 5881 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), makeString((yyvsp[0].str))); } +#line 34092 "gram.c" break; - case 841: -#line 5892 "gram.y" /* yacc.c:1652 */ - { + case 841: /* AlterEnumStmt: ALTER TYPE_P any_name ADD_P VALUE_P opt_if_not_exists Sconst */ +#line 5892 "gram.y" + { AlterEnumStmt *n = makeNode(AlterEnumStmt); n->typeName = (yyvsp[-4].list); n->oldVal = NULL; @@ -33611,12 +34103,12 @@ yyreduce: n->skipIfNewValExists = (yyvsp[-1].boolean); (yyval.node) = (Node *) n; } -#line 33615 "gram.c" /* yacc.c:1652 */ +#line 34107 "gram.c" break; - case 842: -#line 5903 "gram.y" /* yacc.c:1652 */ - { + case 842: /* AlterEnumStmt: ALTER TYPE_P any_name ADD_P VALUE_P opt_if_not_exists Sconst BEFORE Sconst */ +#line 5903 "gram.y" + { AlterEnumStmt *n = makeNode(AlterEnumStmt); n->typeName = (yyvsp[-6].list); n->oldVal = NULL; @@ -33626,12 +34118,12 @@ yyreduce: n->skipIfNewValExists = (yyvsp[-3].boolean); (yyval.node) = (Node *) n; } -#line 33630 "gram.c" /* yacc.c:1652 */ +#line 34122 "gram.c" break; - case 843: -#line 5914 "gram.y" /* yacc.c:1652 */ - { + case 843: /* AlterEnumStmt: ALTER TYPE_P any_name ADD_P VALUE_P opt_if_not_exists Sconst AFTER Sconst */ +#line 5914 "gram.y" + { AlterEnumStmt *n = makeNode(AlterEnumStmt); n->typeName = (yyvsp[-6].list); n->oldVal = NULL; @@ -33641,12 +34133,12 @@ yyreduce: n->skipIfNewValExists = (yyvsp[-3].boolean); (yyval.node) = (Node *) n; } -#line 33645 "gram.c" /* yacc.c:1652 */ +#line 34137 "gram.c" break; - case 844: -#line 5925 "gram.y" /* yacc.c:1652 */ - { + case 844: /* AlterEnumStmt: ALTER TYPE_P any_name RENAME VALUE_P Sconst TO Sconst */ +#line 5925 "gram.y" + { AlterEnumStmt *n = makeNode(AlterEnumStmt); n->typeName = (yyvsp[-5].list); n->oldVal = (yyvsp[-2].str); @@ -33656,24 +34148,24 @@ yyreduce: n->skipIfNewValExists = false; (yyval.node) = (Node *) n; } -#line 33660 "gram.c" /* yacc.c:1652 */ +#line 34152 "gram.c" break; - case 845: -#line 5937 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 33666 "gram.c" /* yacc.c:1652 */ + case 845: /* opt_if_not_exists: IF_P NOT EXISTS */ +#line 5937 "gram.y" + { (yyval.boolean) = true; } +#line 34158 "gram.c" break; - case 846: -#line 5938 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 33672 "gram.c" /* yacc.c:1652 */ + case 846: /* opt_if_not_exists: %empty */ +#line 5938 "gram.y" + { (yyval.boolean) = false; } +#line 34164 "gram.c" break; - case 847: -#line 5956 "gram.y" /* yacc.c:1652 */ - { + case 847: /* CreateOpClassStmt: CREATE OPERATOR CLASS any_name opt_default FOR TYPE_P Typename USING name opt_opfamily AS opclass_item_list */ +#line 5956 "gram.y" + { CreateOpClassStmt *n = makeNode(CreateOpClassStmt); n->opclassname = (yyvsp[-9].list); n->isDefault = (yyvsp[-8].boolean); @@ -33683,24 +34175,24 @@ yyreduce: n->items = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 33687 "gram.c" /* yacc.c:1652 */ +#line 34179 "gram.c" break; - case 848: -#line 5969 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 33693 "gram.c" /* yacc.c:1652 */ + case 848: /* opclass_item_list: opclass_item */ +#line 5969 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 34185 "gram.c" break; - case 849: -#line 5970 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 33699 "gram.c" /* yacc.c:1652 */ + case 849: /* opclass_item_list: opclass_item_list ',' opclass_item */ +#line 5970 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } +#line 34191 "gram.c" break; - case 850: -#line 5975 "gram.y" /* yacc.c:1652 */ - { + case 850: /* opclass_item: OPERATOR Iconst any_operator opclass_purpose opt_recheck */ +#line 5975 "gram.y" + { CreateOpClassItem *n = makeNode(CreateOpClassItem); ObjectWithArgs *owa = makeNode(ObjectWithArgs); owa->objname = (yyvsp[-2].list); @@ -33711,12 +34203,12 @@ yyreduce: n->order_family = (yyvsp[-1].list); (yyval.node) = (Node *) n; } -#line 33715 "gram.c" /* yacc.c:1652 */ +#line 34207 "gram.c" break; - case 851: -#line 5988 "gram.y" /* yacc.c:1652 */ - { + case 851: /* opclass_item: OPERATOR Iconst operator_with_argtypes opclass_purpose opt_recheck */ +#line 5988 "gram.y" + { CreateOpClassItem *n = makeNode(CreateOpClassItem); n->itemtype = OPCLASS_ITEM_OPERATOR; n->name = (yyvsp[-2].objwithargs); @@ -33724,24 +34216,24 @@ yyreduce: n->order_family = (yyvsp[-1].list); (yyval.node) = (Node *) n; } -#line 33728 "gram.c" /* yacc.c:1652 */ +#line 34220 "gram.c" break; - case 852: -#line 5997 "gram.y" /* yacc.c:1652 */ - { + case 852: /* opclass_item: FUNCTION Iconst function_with_argtypes */ +#line 5997 "gram.y" + { CreateOpClassItem *n = makeNode(CreateOpClassItem); n->itemtype = OPCLASS_ITEM_FUNCTION; n->name = (yyvsp[0].objwithargs); n->number = (yyvsp[-1].ival); (yyval.node) = (Node *) n; } -#line 33740 "gram.c" /* yacc.c:1652 */ +#line 34232 "gram.c" break; - case 853: -#line 6005 "gram.y" /* yacc.c:1652 */ - { + case 853: /* opclass_item: FUNCTION Iconst '(' type_list ')' function_with_argtypes */ +#line 6005 "gram.y" + { CreateOpClassItem *n = makeNode(CreateOpClassItem); n->itemtype = OPCLASS_ITEM_FUNCTION; n->name = (yyvsp[0].objwithargs); @@ -33749,65 +34241,65 @@ yyreduce: n->class_args = (yyvsp[-2].list); (yyval.node) = (Node *) n; } -#line 33753 "gram.c" /* yacc.c:1652 */ +#line 34245 "gram.c" break; - case 854: -#line 6014 "gram.y" /* yacc.c:1652 */ - { + case 854: /* opclass_item: STORAGE Typename */ +#line 6014 "gram.y" + { CreateOpClassItem *n = makeNode(CreateOpClassItem); n->itemtype = OPCLASS_ITEM_STORAGETYPE; n->storedtype = (yyvsp[0].typnam); (yyval.node) = (Node *) n; } -#line 33764 "gram.c" /* yacc.c:1652 */ +#line 34256 "gram.c" break; - case 855: -#line 6022 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 33770 "gram.c" /* yacc.c:1652 */ + case 855: /* opt_default: DEFAULT */ +#line 6022 "gram.y" + { (yyval.boolean) = true; } +#line 34262 "gram.c" break; - case 856: -#line 6023 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 33776 "gram.c" /* yacc.c:1652 */ + case 856: /* opt_default: %empty */ +#line 6023 "gram.y" + { (yyval.boolean) = false; } +#line 34268 "gram.c" break; - case 857: -#line 6026 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 33782 "gram.c" /* yacc.c:1652 */ + case 857: /* opt_opfamily: FAMILY any_name */ +#line 6026 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 34274 "gram.c" break; - case 858: -#line 6027 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 33788 "gram.c" /* yacc.c:1652 */ + case 858: /* opt_opfamily: %empty */ +#line 6027 "gram.y" + { (yyval.list) = NIL; } +#line 34280 "gram.c" break; - case 859: -#line 6030 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 33794 "gram.c" /* yacc.c:1652 */ + case 859: /* opclass_purpose: FOR SEARCH */ +#line 6030 "gram.y" + { (yyval.list) = NIL; } +#line 34286 "gram.c" break; - case 860: -#line 6031 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 33800 "gram.c" /* yacc.c:1652 */ + case 860: /* opclass_purpose: FOR ORDER BY any_name */ +#line 6031 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 34292 "gram.c" break; - case 861: -#line 6032 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 33806 "gram.c" /* yacc.c:1652 */ + case 861: /* opclass_purpose: %empty */ +#line 6032 "gram.y" + { (yyval.list) = NIL; } +#line 34298 "gram.c" break; - case 862: -#line 6036 "gram.y" /* yacc.c:1652 */ - { + case 862: /* opt_recheck: RECHECK */ +#line 6036 "gram.y" + { /* * RECHECK no longer does anything in opclass definitions, * but we still accept it to ease porting of old database @@ -33820,29 +34312,29 @@ yyreduce: parser_errposition((yylsp[0])))); (yyval.boolean) = true; } -#line 33824 "gram.c" /* yacc.c:1652 */ +#line 34316 "gram.c" break; - case 863: -#line 6049 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 33830 "gram.c" /* yacc.c:1652 */ + case 863: /* opt_recheck: %empty */ +#line 6049 "gram.y" + { (yyval.boolean) = false; } +#line 34322 "gram.c" break; - case 864: -#line 6055 "gram.y" /* yacc.c:1652 */ - { + case 864: /* CreateOpFamilyStmt: CREATE OPERATOR FAMILY any_name USING name */ +#line 6055 "gram.y" + { CreateOpFamilyStmt *n = makeNode(CreateOpFamilyStmt); n->opfamilyname = (yyvsp[-2].list); n->amname = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 33841 "gram.c" /* yacc.c:1652 */ +#line 34333 "gram.c" break; - case 865: -#line 6065 "gram.y" /* yacc.c:1652 */ - { + case 865: /* AlterOpFamilyStmt: ALTER OPERATOR FAMILY any_name USING name ADD_P opclass_item_list */ +#line 6065 "gram.y" + { AlterOpFamilyStmt *n = makeNode(AlterOpFamilyStmt); n->opfamilyname = (yyvsp[-4].list); n->amname = (yyvsp[-2].str); @@ -33850,12 +34342,12 @@ yyreduce: n->items = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 33854 "gram.c" /* yacc.c:1652 */ +#line 34346 "gram.c" break; - case 866: -#line 6074 "gram.y" /* yacc.c:1652 */ - { + case 866: /* AlterOpFamilyStmt: ALTER OPERATOR FAMILY any_name USING name DROP opclass_drop_list */ +#line 6074 "gram.y" + { AlterOpFamilyStmt *n = makeNode(AlterOpFamilyStmt); n->opfamilyname = (yyvsp[-4].list); n->amname = (yyvsp[-2].str); @@ -33863,48 +34355,48 @@ yyreduce: n->items = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 33867 "gram.c" /* yacc.c:1652 */ +#line 34359 "gram.c" break; - case 867: -#line 6085 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 33873 "gram.c" /* yacc.c:1652 */ + case 867: /* opclass_drop_list: opclass_drop */ +#line 6085 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 34365 "gram.c" break; - case 868: -#line 6086 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 33879 "gram.c" /* yacc.c:1652 */ + case 868: /* opclass_drop_list: opclass_drop_list ',' opclass_drop */ +#line 6086 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } +#line 34371 "gram.c" break; - case 869: -#line 6091 "gram.y" /* yacc.c:1652 */ - { + case 869: /* opclass_drop: OPERATOR Iconst '(' type_list ')' */ +#line 6091 "gram.y" + { CreateOpClassItem *n = makeNode(CreateOpClassItem); n->itemtype = OPCLASS_ITEM_OPERATOR; n->number = (yyvsp[-3].ival); n->class_args = (yyvsp[-1].list); (yyval.node) = (Node *) n; } -#line 33891 "gram.c" /* yacc.c:1652 */ +#line 34383 "gram.c" break; - case 870: -#line 6099 "gram.y" /* yacc.c:1652 */ - { + case 870: /* opclass_drop: FUNCTION Iconst '(' type_list ')' */ +#line 6099 "gram.y" + { CreateOpClassItem *n = makeNode(CreateOpClassItem); n->itemtype = OPCLASS_ITEM_FUNCTION; n->number = (yyvsp[-3].ival); n->class_args = (yyvsp[-1].list); (yyval.node) = (Node *) n; } -#line 33903 "gram.c" /* yacc.c:1652 */ +#line 34395 "gram.c" break; - case 871: -#line 6111 "gram.y" /* yacc.c:1652 */ - { + case 871: /* DropOpClassStmt: DROP OPERATOR CLASS any_name USING name opt_drop_behavior */ +#line 6111 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->objects = list_make1(lcons(makeString((yyvsp[-1].str)), (yyvsp[-3].list))); n->removeType = OBJECT_OPCLASS; @@ -33913,12 +34405,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *) n; } -#line 33917 "gram.c" /* yacc.c:1652 */ +#line 34409 "gram.c" break; - case 872: -#line 6121 "gram.y" /* yacc.c:1652 */ - { + case 872: /* DropOpClassStmt: DROP OPERATOR CLASS IF_P EXISTS any_name USING name opt_drop_behavior */ +#line 6121 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->objects = list_make1(lcons(makeString((yyvsp[-1].str)), (yyvsp[-3].list))); n->removeType = OBJECT_OPCLASS; @@ -33927,12 +34419,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *) n; } -#line 33931 "gram.c" /* yacc.c:1652 */ +#line 34423 "gram.c" break; - case 873: -#line 6134 "gram.y" /* yacc.c:1652 */ - { + case 873: /* DropOpFamilyStmt: DROP OPERATOR FAMILY any_name USING name opt_drop_behavior */ +#line 6134 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->objects = list_make1(lcons(makeString((yyvsp[-1].str)), (yyvsp[-3].list))); n->removeType = OBJECT_OPFAMILY; @@ -33941,12 +34433,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *) n; } -#line 33945 "gram.c" /* yacc.c:1652 */ +#line 34437 "gram.c" break; - case 874: -#line 6144 "gram.y" /* yacc.c:1652 */ - { + case 874: /* DropOpFamilyStmt: DROP OPERATOR FAMILY IF_P EXISTS any_name USING name opt_drop_behavior */ +#line 6144 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->objects = list_make1(lcons(makeString((yyvsp[-1].str)), (yyvsp[-3].list))); n->removeType = OBJECT_OPFAMILY; @@ -33955,34 +34447,34 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *) n; } -#line 33959 "gram.c" /* yacc.c:1652 */ +#line 34451 "gram.c" break; - case 875: -#line 6166 "gram.y" /* yacc.c:1652 */ - { + case 875: /* DropOwnedStmt: DROP OWNED BY role_list opt_drop_behavior */ +#line 6166 "gram.y" + { DropOwnedStmt *n = makeNode(DropOwnedStmt); n->roles = (yyvsp[-1].list); n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *)n; } -#line 33970 "gram.c" /* yacc.c:1652 */ +#line 34462 "gram.c" break; - case 876: -#line 6176 "gram.y" /* yacc.c:1652 */ - { + case 876: /* ReassignOwnedStmt: REASSIGN OWNED BY role_list TO RoleSpec */ +#line 6176 "gram.y" + { ReassignOwnedStmt *n = makeNode(ReassignOwnedStmt); n->roles = (yyvsp[-2].list); n->newrole = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 33981 "gram.c" /* yacc.c:1652 */ +#line 34473 "gram.c" break; - case 877: -#line 6194 "gram.y" /* yacc.c:1652 */ - { + case 877: /* DropStmt: DROP object_type_any_name IF_P EXISTS any_name_list opt_drop_behavior */ +#line 6194 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = (yyvsp[-4].objtype); n->missing_ok = true; @@ -33991,12 +34483,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *)n; } -#line 33995 "gram.c" /* yacc.c:1652 */ +#line 34487 "gram.c" break; - case 878: -#line 6204 "gram.y" /* yacc.c:1652 */ - { + case 878: /* DropStmt: DROP object_type_any_name any_name_list opt_drop_behavior */ +#line 6204 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = (yyvsp[-2].objtype); n->missing_ok = false; @@ -34005,12 +34497,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *)n; } -#line 34009 "gram.c" /* yacc.c:1652 */ +#line 34501 "gram.c" break; - case 879: -#line 6214 "gram.y" /* yacc.c:1652 */ - { + case 879: /* DropStmt: DROP drop_type_name IF_P EXISTS name_list opt_drop_behavior */ +#line 6214 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = (yyvsp[-4].objtype); n->missing_ok = true; @@ -34019,12 +34511,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *)n; } -#line 34023 "gram.c" /* yacc.c:1652 */ +#line 34515 "gram.c" break; - case 880: -#line 6224 "gram.y" /* yacc.c:1652 */ - { + case 880: /* DropStmt: DROP drop_type_name name_list opt_drop_behavior */ +#line 6224 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = (yyvsp[-2].objtype); n->missing_ok = false; @@ -34033,12 +34525,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *)n; } -#line 34037 "gram.c" /* yacc.c:1652 */ +#line 34529 "gram.c" break; - case 881: -#line 6234 "gram.y" /* yacc.c:1652 */ - { + case 881: /* DropStmt: DROP object_type_name_on_any_name name ON any_name opt_drop_behavior */ +#line 6234 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = (yyvsp[-4].objtype); n->objects = list_make1(lappend((yyvsp[-1].list), makeString((yyvsp[-3].str)))); @@ -34047,12 +34539,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *) n; } -#line 34051 "gram.c" /* yacc.c:1652 */ +#line 34543 "gram.c" break; - case 882: -#line 6244 "gram.y" /* yacc.c:1652 */ - { + case 882: /* DropStmt: DROP object_type_name_on_any_name IF_P EXISTS name ON any_name opt_drop_behavior */ +#line 6244 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = (yyvsp[-6].objtype); n->objects = list_make1(lappend((yyvsp[-1].list), makeString((yyvsp[-3].str)))); @@ -34061,12 +34553,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *) n; } -#line 34065 "gram.c" /* yacc.c:1652 */ +#line 34557 "gram.c" break; - case 883: -#line 6254 "gram.y" /* yacc.c:1652 */ - { + case 883: /* DropStmt: DROP TYPE_P type_name_list opt_drop_behavior */ +#line 6254 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_TYPE; n->missing_ok = false; @@ -34075,12 +34567,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *) n; } -#line 34079 "gram.c" /* yacc.c:1652 */ +#line 34571 "gram.c" break; - case 884: -#line 6264 "gram.y" /* yacc.c:1652 */ - { + case 884: /* DropStmt: DROP TYPE_P IF_P EXISTS type_name_list opt_drop_behavior */ +#line 6264 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_TYPE; n->missing_ok = true; @@ -34089,12 +34581,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *) n; } -#line 34093 "gram.c" /* yacc.c:1652 */ +#line 34585 "gram.c" break; - case 885: -#line 6274 "gram.y" /* yacc.c:1652 */ - { + case 885: /* DropStmt: DROP DOMAIN_P type_name_list opt_drop_behavior */ +#line 6274 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_DOMAIN; n->missing_ok = false; @@ -34103,12 +34595,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *) n; } -#line 34107 "gram.c" /* yacc.c:1652 */ +#line 34599 "gram.c" break; - case 886: -#line 6284 "gram.y" /* yacc.c:1652 */ - { + case 886: /* DropStmt: DROP DOMAIN_P IF_P EXISTS type_name_list opt_drop_behavior */ +#line 6284 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_DOMAIN; n->missing_ok = true; @@ -34117,12 +34609,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *) n; } -#line 34121 "gram.c" /* yacc.c:1652 */ +#line 34613 "gram.c" break; - case 887: -#line 6294 "gram.y" /* yacc.c:1652 */ - { + case 887: /* DropStmt: DROP INDEX CONCURRENTLY any_name_list opt_drop_behavior */ +#line 6294 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_INDEX; n->missing_ok = false; @@ -34131,12 +34623,12 @@ yyreduce: n->concurrent = true; (yyval.node) = (Node *)n; } -#line 34135 "gram.c" /* yacc.c:1652 */ +#line 34627 "gram.c" break; - case 888: -#line 6304 "gram.y" /* yacc.c:1652 */ - { + case 888: /* DropStmt: DROP INDEX CONCURRENTLY IF_P EXISTS any_name_list opt_drop_behavior */ +#line 6304 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_INDEX; n->missing_ok = true; @@ -34145,372 +34637,372 @@ yyreduce: n->concurrent = true; (yyval.node) = (Node *)n; } -#line 34149 "gram.c" /* yacc.c:1652 */ +#line 34641 "gram.c" break; - case 889: -#line 6317 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_TABLE; } -#line 34155 "gram.c" /* yacc.c:1652 */ + case 889: /* object_type_any_name: TABLE */ +#line 6317 "gram.y" + { (yyval.objtype) = OBJECT_TABLE; } +#line 34647 "gram.c" break; - case 890: -#line 6318 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_SEQUENCE; } -#line 34161 "gram.c" /* yacc.c:1652 */ + case 890: /* object_type_any_name: SEQUENCE */ +#line 6318 "gram.y" + { (yyval.objtype) = OBJECT_SEQUENCE; } +#line 34653 "gram.c" break; - case 891: -#line 6319 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_VIEW; } -#line 34167 "gram.c" /* yacc.c:1652 */ + case 891: /* object_type_any_name: VIEW */ +#line 6319 "gram.y" + { (yyval.objtype) = OBJECT_VIEW; } +#line 34659 "gram.c" break; - case 892: -#line 6320 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_MATVIEW; } -#line 34173 "gram.c" /* yacc.c:1652 */ + case 892: /* object_type_any_name: MATERIALIZED VIEW */ +#line 6320 "gram.y" + { (yyval.objtype) = OBJECT_MATVIEW; } +#line 34665 "gram.c" break; - case 893: -#line 6321 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_INDEX; } -#line 34179 "gram.c" /* yacc.c:1652 */ + case 893: /* object_type_any_name: INDEX */ +#line 6321 "gram.y" + { (yyval.objtype) = OBJECT_INDEX; } +#line 34671 "gram.c" break; - case 894: -#line 6322 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_FOREIGN_TABLE; } -#line 34185 "gram.c" /* yacc.c:1652 */ + case 894: /* object_type_any_name: FOREIGN TABLE */ +#line 6322 "gram.y" + { (yyval.objtype) = OBJECT_FOREIGN_TABLE; } +#line 34677 "gram.c" break; - case 895: -#line 6323 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_COLLATION; } -#line 34191 "gram.c" /* yacc.c:1652 */ + case 895: /* object_type_any_name: COLLATION */ +#line 6323 "gram.y" + { (yyval.objtype) = OBJECT_COLLATION; } +#line 34683 "gram.c" break; - case 896: -#line 6324 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_CONVERSION; } -#line 34197 "gram.c" /* yacc.c:1652 */ + case 896: /* object_type_any_name: CONVERSION_P */ +#line 6324 "gram.y" + { (yyval.objtype) = OBJECT_CONVERSION; } +#line 34689 "gram.c" break; - case 897: -#line 6325 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_STATISTIC_EXT; } -#line 34203 "gram.c" /* yacc.c:1652 */ + case 897: /* object_type_any_name: STATISTICS */ +#line 6325 "gram.y" + { (yyval.objtype) = OBJECT_STATISTIC_EXT; } +#line 34695 "gram.c" break; - case 898: -#line 6326 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_TSPARSER; } -#line 34209 "gram.c" /* yacc.c:1652 */ + case 898: /* object_type_any_name: TEXT_P SEARCH PARSER */ +#line 6326 "gram.y" + { (yyval.objtype) = OBJECT_TSPARSER; } +#line 34701 "gram.c" break; - case 899: -#line 6327 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_TSDICTIONARY; } -#line 34215 "gram.c" /* yacc.c:1652 */ + case 899: /* object_type_any_name: TEXT_P SEARCH DICTIONARY */ +#line 6327 "gram.y" + { (yyval.objtype) = OBJECT_TSDICTIONARY; } +#line 34707 "gram.c" break; - case 900: -#line 6328 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_TSTEMPLATE; } -#line 34221 "gram.c" /* yacc.c:1652 */ + case 900: /* object_type_any_name: TEXT_P SEARCH TEMPLATE */ +#line 6328 "gram.y" + { (yyval.objtype) = OBJECT_TSTEMPLATE; } +#line 34713 "gram.c" break; - case 901: -#line 6329 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_TSCONFIGURATION; } -#line 34227 "gram.c" /* yacc.c:1652 */ + case 901: /* object_type_any_name: TEXT_P SEARCH CONFIGURATION */ +#line 6329 "gram.y" + { (yyval.objtype) = OBJECT_TSCONFIGURATION; } +#line 34719 "gram.c" break; - case 902: -#line 6339 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = (yyvsp[0].objtype); } -#line 34233 "gram.c" /* yacc.c:1652 */ + case 902: /* object_type_name: drop_type_name */ +#line 6339 "gram.y" + { (yyval.objtype) = (yyvsp[0].objtype); } +#line 34725 "gram.c" break; - case 903: -#line 6340 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_DATABASE; } -#line 34239 "gram.c" /* yacc.c:1652 */ + case 903: /* object_type_name: DATABASE */ +#line 6340 "gram.y" + { (yyval.objtype) = OBJECT_DATABASE; } +#line 34731 "gram.c" break; - case 904: -#line 6341 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_ROLE; } -#line 34245 "gram.c" /* yacc.c:1652 */ + case 904: /* object_type_name: ROLE */ +#line 6341 "gram.y" + { (yyval.objtype) = OBJECT_ROLE; } +#line 34737 "gram.c" break; - case 905: -#line 6342 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_SUBSCRIPTION; } -#line 34251 "gram.c" /* yacc.c:1652 */ + case 905: /* object_type_name: SUBSCRIPTION */ +#line 6342 "gram.y" + { (yyval.objtype) = OBJECT_SUBSCRIPTION; } +#line 34743 "gram.c" break; - case 906: -#line 6343 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_TABLESPACE; } -#line 34257 "gram.c" /* yacc.c:1652 */ + case 906: /* object_type_name: TABLESPACE */ +#line 6343 "gram.y" + { (yyval.objtype) = OBJECT_TABLESPACE; } +#line 34749 "gram.c" break; - case 907: -#line 6347 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_ACCESS_METHOD; } -#line 34263 "gram.c" /* yacc.c:1652 */ + case 907: /* drop_type_name: ACCESS METHOD */ +#line 6347 "gram.y" + { (yyval.objtype) = OBJECT_ACCESS_METHOD; } +#line 34755 "gram.c" break; - case 908: -#line 6348 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_EVENT_TRIGGER; } -#line 34269 "gram.c" /* yacc.c:1652 */ + case 908: /* drop_type_name: EVENT TRIGGER */ +#line 6348 "gram.y" + { (yyval.objtype) = OBJECT_EVENT_TRIGGER; } +#line 34761 "gram.c" break; - case 909: -#line 6349 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_EXTENSION; } -#line 34275 "gram.c" /* yacc.c:1652 */ + case 909: /* drop_type_name: EXTENSION */ +#line 6349 "gram.y" + { (yyval.objtype) = OBJECT_EXTENSION; } +#line 34767 "gram.c" break; - case 910: -#line 6350 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_FDW; } -#line 34281 "gram.c" /* yacc.c:1652 */ + case 910: /* drop_type_name: FOREIGN DATA_P WRAPPER */ +#line 6350 "gram.y" + { (yyval.objtype) = OBJECT_FDW; } +#line 34773 "gram.c" break; - case 911: -#line 6351 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_LANGUAGE; } -#line 34287 "gram.c" /* yacc.c:1652 */ + case 911: /* drop_type_name: opt_procedural LANGUAGE */ +#line 6351 "gram.y" + { (yyval.objtype) = OBJECT_LANGUAGE; } +#line 34779 "gram.c" break; - case 912: -#line 6352 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_PUBLICATION; } -#line 34293 "gram.c" /* yacc.c:1652 */ + case 912: /* drop_type_name: PUBLICATION */ +#line 6352 "gram.y" + { (yyval.objtype) = OBJECT_PUBLICATION; } +#line 34785 "gram.c" break; - case 913: -#line 6353 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_SCHEMA; } -#line 34299 "gram.c" /* yacc.c:1652 */ + case 913: /* drop_type_name: SCHEMA */ +#line 6353 "gram.y" + { (yyval.objtype) = OBJECT_SCHEMA; } +#line 34791 "gram.c" break; - case 914: -#line 6354 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_FOREIGN_SERVER; } -#line 34305 "gram.c" /* yacc.c:1652 */ + case 914: /* drop_type_name: SERVER */ +#line 6354 "gram.y" + { (yyval.objtype) = OBJECT_FOREIGN_SERVER; } +#line 34797 "gram.c" break; - case 915: -#line 6359 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_POLICY; } -#line 34311 "gram.c" /* yacc.c:1652 */ + case 915: /* object_type_name_on_any_name: POLICY */ +#line 6359 "gram.y" + { (yyval.objtype) = OBJECT_POLICY; } +#line 34803 "gram.c" break; - case 916: -#line 6360 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_RULE; } -#line 34317 "gram.c" /* yacc.c:1652 */ + case 916: /* object_type_name_on_any_name: RULE */ +#line 6360 "gram.y" + { (yyval.objtype) = OBJECT_RULE; } +#line 34809 "gram.c" break; - case 917: -#line 6361 "gram.y" /* yacc.c:1652 */ - { (yyval.objtype) = OBJECT_TRIGGER; } -#line 34323 "gram.c" /* yacc.c:1652 */ + case 917: /* object_type_name_on_any_name: TRIGGER */ +#line 6361 "gram.y" + { (yyval.objtype) = OBJECT_TRIGGER; } +#line 34815 "gram.c" break; - case 918: -#line 6365 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].list)); } -#line 34329 "gram.c" /* yacc.c:1652 */ + case 918: /* any_name_list: any_name */ +#line 6365 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].list)); } +#line 34821 "gram.c" break; - case 919: -#line 6366 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].list)); } -#line 34335 "gram.c" /* yacc.c:1652 */ + case 919: /* any_name_list: any_name_list ',' any_name */ +#line 6366 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].list)); } +#line 34827 "gram.c" break; - case 920: -#line 6369 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } -#line 34341 "gram.c" /* yacc.c:1652 */ + case 920: /* any_name: ColId */ +#line 6369 "gram.y" + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } +#line 34833 "gram.c" break; - case 921: -#line 6370 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lcons(makeString((yyvsp[-1].str)), (yyvsp[0].list)); } -#line 34347 "gram.c" /* yacc.c:1652 */ + case 921: /* any_name: ColId attrs */ +#line 6370 "gram.y" + { (yyval.list) = lcons(makeString((yyvsp[-1].str)), (yyvsp[0].list)); } +#line 34839 "gram.c" break; - case 922: -#line 6374 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } -#line 34353 "gram.c" /* yacc.c:1652 */ + case 922: /* attrs: '.' attr_name */ +#line 6374 "gram.y" + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } +#line 34845 "gram.c" break; - case 923: -#line 6376 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), makeString((yyvsp[0].str))); } -#line 34359 "gram.c" /* yacc.c:1652 */ + case 923: /* attrs: attrs '.' attr_name */ +#line 6376 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), makeString((yyvsp[0].str))); } +#line 34851 "gram.c" break; - case 924: -#line 6380 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].typnam)); } -#line 34365 "gram.c" /* yacc.c:1652 */ + case 924: /* type_name_list: Typename */ +#line 6380 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].typnam)); } +#line 34857 "gram.c" break; - case 925: -#line 6381 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].typnam)); } -#line 34371 "gram.c" /* yacc.c:1652 */ + case 925: /* type_name_list: type_name_list ',' Typename */ +#line 6381 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].typnam)); } +#line 34863 "gram.c" break; - case 926: -#line 6393 "gram.y" /* yacc.c:1652 */ - { + case 926: /* TruncateStmt: TRUNCATE opt_table relation_expr_list opt_restart_seqs opt_drop_behavior */ +#line 6393 "gram.y" + { TruncateStmt *n = makeNode(TruncateStmt); n->relations = (yyvsp[-2].list); n->restart_seqs = (yyvsp[-1].boolean); n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *)n; } -#line 34383 "gram.c" /* yacc.c:1652 */ +#line 34875 "gram.c" break; - case 927: -#line 6403 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 34389 "gram.c" /* yacc.c:1652 */ + case 927: /* opt_restart_seqs: CONTINUE_P IDENTITY_P */ +#line 6403 "gram.y" + { (yyval.boolean) = false; } +#line 34881 "gram.c" break; - case 928: -#line 6404 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 34395 "gram.c" /* yacc.c:1652 */ + case 928: /* opt_restart_seqs: RESTART IDENTITY_P */ +#line 6404 "gram.y" + { (yyval.boolean) = true; } +#line 34887 "gram.c" break; - case 929: -#line 6405 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 34401 "gram.c" /* yacc.c:1652 */ + case 929: /* opt_restart_seqs: %empty */ +#line 6405 "gram.y" + { (yyval.boolean) = false; } +#line 34893 "gram.c" break; - case 930: -#line 6416 "gram.y" /* yacc.c:1652 */ - { + case 930: /* CommentStmt: COMMENT ON object_type_any_name any_name IS comment_text */ +#line 6416 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = (yyvsp[-3].objtype); n->object = (Node *) (yyvsp[-2].list); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34413 "gram.c" /* yacc.c:1652 */ +#line 34905 "gram.c" break; - case 931: -#line 6424 "gram.y" /* yacc.c:1652 */ - { + case 931: /* CommentStmt: COMMENT ON COLUMN any_name IS comment_text */ +#line 6424 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_COLUMN; n->object = (Node *) (yyvsp[-2].list); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34425 "gram.c" /* yacc.c:1652 */ +#line 34917 "gram.c" break; - case 932: -#line 6432 "gram.y" /* yacc.c:1652 */ - { + case 932: /* CommentStmt: COMMENT ON object_type_name name IS comment_text */ +#line 6432 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = (yyvsp[-3].objtype); n->object = (Node *) makeString((yyvsp[-2].str)); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34437 "gram.c" /* yacc.c:1652 */ +#line 34929 "gram.c" break; - case 933: -#line 6440 "gram.y" /* yacc.c:1652 */ - { + case 933: /* CommentStmt: COMMENT ON TYPE_P Typename IS comment_text */ +#line 6440 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_TYPE; n->object = (Node *) (yyvsp[-2].typnam); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34449 "gram.c" /* yacc.c:1652 */ +#line 34941 "gram.c" break; - case 934: -#line 6448 "gram.y" /* yacc.c:1652 */ - { + case 934: /* CommentStmt: COMMENT ON DOMAIN_P Typename IS comment_text */ +#line 6448 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_DOMAIN; n->object = (Node *) (yyvsp[-2].typnam); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34461 "gram.c" /* yacc.c:1652 */ +#line 34953 "gram.c" break; - case 935: -#line 6456 "gram.y" /* yacc.c:1652 */ - { + case 935: /* CommentStmt: COMMENT ON AGGREGATE aggregate_with_argtypes IS comment_text */ +#line 6456 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_AGGREGATE; n->object = (Node *) (yyvsp[-2].objwithargs); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34473 "gram.c" /* yacc.c:1652 */ +#line 34965 "gram.c" break; - case 936: -#line 6464 "gram.y" /* yacc.c:1652 */ - { + case 936: /* CommentStmt: COMMENT ON FUNCTION function_with_argtypes IS comment_text */ +#line 6464 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_FUNCTION; n->object = (Node *) (yyvsp[-2].objwithargs); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34485 "gram.c" /* yacc.c:1652 */ +#line 34977 "gram.c" break; - case 937: -#line 6472 "gram.y" /* yacc.c:1652 */ - { + case 937: /* CommentStmt: COMMENT ON OPERATOR operator_with_argtypes IS comment_text */ +#line 6472 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_OPERATOR; n->object = (Node *) (yyvsp[-2].objwithargs); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34497 "gram.c" /* yacc.c:1652 */ +#line 34989 "gram.c" break; - case 938: -#line 6480 "gram.y" /* yacc.c:1652 */ - { + case 938: /* CommentStmt: COMMENT ON CONSTRAINT name ON any_name IS comment_text */ +#line 6480 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_TABCONSTRAINT; n->object = (Node *) lappend((yyvsp[-2].list), makeString((yyvsp[-4].str))); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34509 "gram.c" /* yacc.c:1652 */ +#line 35001 "gram.c" break; - case 939: -#line 6488 "gram.y" /* yacc.c:1652 */ - { + case 939: /* CommentStmt: COMMENT ON CONSTRAINT name ON DOMAIN_P any_name IS comment_text */ +#line 6488 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_DOMCONSTRAINT; /* @@ -34522,120 +35014,120 @@ yyreduce: n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34526 "gram.c" /* yacc.c:1652 */ +#line 35018 "gram.c" break; - case 940: -#line 6501 "gram.y" /* yacc.c:1652 */ - { + case 940: /* CommentStmt: COMMENT ON object_type_name_on_any_name name ON any_name IS comment_text */ +#line 6501 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = (yyvsp[-5].objtype); n->object = (Node *) lappend((yyvsp[-2].list), makeString((yyvsp[-4].str))); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34538 "gram.c" /* yacc.c:1652 */ +#line 35030 "gram.c" break; - case 941: -#line 6509 "gram.y" /* yacc.c:1652 */ - { + case 941: /* CommentStmt: COMMENT ON PROCEDURE function_with_argtypes IS comment_text */ +#line 6509 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_PROCEDURE; n->object = (Node *) (yyvsp[-2].objwithargs); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34550 "gram.c" /* yacc.c:1652 */ +#line 35042 "gram.c" break; - case 942: -#line 6517 "gram.y" /* yacc.c:1652 */ - { + case 942: /* CommentStmt: COMMENT ON ROUTINE function_with_argtypes IS comment_text */ +#line 6517 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_ROUTINE; n->object = (Node *) (yyvsp[-2].objwithargs); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34562 "gram.c" /* yacc.c:1652 */ +#line 35054 "gram.c" break; - case 943: -#line 6525 "gram.y" /* yacc.c:1652 */ - { + case 943: /* CommentStmt: COMMENT ON TRANSFORM FOR Typename LANGUAGE name IS comment_text */ +#line 6525 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_TRANSFORM; n->object = (Node *) list_make2((yyvsp[-4].typnam), makeString((yyvsp[-2].str))); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34574 "gram.c" /* yacc.c:1652 */ +#line 35066 "gram.c" break; - case 944: -#line 6533 "gram.y" /* yacc.c:1652 */ - { + case 944: /* CommentStmt: COMMENT ON OPERATOR CLASS any_name USING name IS comment_text */ +#line 6533 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_OPCLASS; n->object = (Node *) lcons(makeString((yyvsp[-2].str)), (yyvsp[-4].list)); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34586 "gram.c" /* yacc.c:1652 */ +#line 35078 "gram.c" break; - case 945: -#line 6541 "gram.y" /* yacc.c:1652 */ - { + case 945: /* CommentStmt: COMMENT ON OPERATOR FAMILY any_name USING name IS comment_text */ +#line 6541 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_OPFAMILY; n->object = (Node *) lcons(makeString((yyvsp[-2].str)), (yyvsp[-4].list)); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34598 "gram.c" /* yacc.c:1652 */ +#line 35090 "gram.c" break; - case 946: -#line 6549 "gram.y" /* yacc.c:1652 */ - { + case 946: /* CommentStmt: COMMENT ON LARGE_P OBJECT_P NumericOnly IS comment_text */ +#line 6549 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_LARGEOBJECT; n->object = (Node *) (yyvsp[-2].value); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34610 "gram.c" /* yacc.c:1652 */ +#line 35102 "gram.c" break; - case 947: -#line 6557 "gram.y" /* yacc.c:1652 */ - { + case 947: /* CommentStmt: COMMENT ON CAST '(' Typename AS Typename ')' IS comment_text */ +#line 6557 "gram.y" + { CommentStmt *n = makeNode(CommentStmt); n->objtype = OBJECT_CAST; n->object = (Node *) list_make2((yyvsp[-5].typnam), (yyvsp[-3].typnam)); n->comment = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34622 "gram.c" /* yacc.c:1652 */ +#line 35114 "gram.c" break; - case 948: -#line 6567 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 34628 "gram.c" /* yacc.c:1652 */ + case 948: /* comment_text: Sconst */ +#line 6567 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 35120 "gram.c" break; - case 949: -#line 6568 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 34634 "gram.c" /* yacc.c:1652 */ + case 949: /* comment_text: NULL_P */ +#line 6568 "gram.y" + { (yyval.str) = NULL; } +#line 35126 "gram.c" break; - case 950: -#line 6584 "gram.y" /* yacc.c:1652 */ - { + case 950: /* SecLabelStmt: SECURITY LABEL opt_provider ON object_type_any_name any_name IS security_label */ +#line 6584 "gram.y" + { SecLabelStmt *n = makeNode(SecLabelStmt); n->provider = (yyvsp[-5].str); n->objtype = (yyvsp[-3].objtype); @@ -34643,12 +35135,12 @@ yyreduce: n->label = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34647 "gram.c" /* yacc.c:1652 */ +#line 35139 "gram.c" break; - case 951: -#line 6594 "gram.y" /* yacc.c:1652 */ - { + case 951: /* SecLabelStmt: SECURITY LABEL opt_provider ON COLUMN any_name IS security_label */ +#line 6594 "gram.y" + { SecLabelStmt *n = makeNode(SecLabelStmt); n->provider = (yyvsp[-5].str); n->objtype = OBJECT_COLUMN; @@ -34656,12 +35148,12 @@ yyreduce: n->label = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34660 "gram.c" /* yacc.c:1652 */ +#line 35152 "gram.c" break; - case 952: -#line 6604 "gram.y" /* yacc.c:1652 */ - { + case 952: /* SecLabelStmt: SECURITY LABEL opt_provider ON object_type_name name IS security_label */ +#line 6604 "gram.y" + { SecLabelStmt *n = makeNode(SecLabelStmt); n->provider = (yyvsp[-5].str); n->objtype = (yyvsp[-3].objtype); @@ -34669,12 +35161,12 @@ yyreduce: n->label = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34673 "gram.c" /* yacc.c:1652 */ +#line 35165 "gram.c" break; - case 953: -#line 6614 "gram.y" /* yacc.c:1652 */ - { + case 953: /* SecLabelStmt: SECURITY LABEL opt_provider ON TYPE_P Typename IS security_label */ +#line 6614 "gram.y" + { SecLabelStmt *n = makeNode(SecLabelStmt); n->provider = (yyvsp[-5].str); n->objtype = OBJECT_TYPE; @@ -34682,12 +35174,12 @@ yyreduce: n->label = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34686 "gram.c" /* yacc.c:1652 */ +#line 35178 "gram.c" break; - case 954: -#line 6624 "gram.y" /* yacc.c:1652 */ - { + case 954: /* SecLabelStmt: SECURITY LABEL opt_provider ON DOMAIN_P Typename IS security_label */ +#line 6624 "gram.y" + { SecLabelStmt *n = makeNode(SecLabelStmt); n->provider = (yyvsp[-5].str); n->objtype = OBJECT_DOMAIN; @@ -34695,12 +35187,12 @@ yyreduce: n->label = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34699 "gram.c" /* yacc.c:1652 */ +#line 35191 "gram.c" break; - case 955: -#line 6634 "gram.y" /* yacc.c:1652 */ - { + case 955: /* SecLabelStmt: SECURITY LABEL opt_provider ON AGGREGATE aggregate_with_argtypes IS security_label */ +#line 6634 "gram.y" + { SecLabelStmt *n = makeNode(SecLabelStmt); n->provider = (yyvsp[-5].str); n->objtype = OBJECT_AGGREGATE; @@ -34708,12 +35200,12 @@ yyreduce: n->label = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34712 "gram.c" /* yacc.c:1652 */ +#line 35204 "gram.c" break; - case 956: -#line 6644 "gram.y" /* yacc.c:1652 */ - { + case 956: /* SecLabelStmt: SECURITY LABEL opt_provider ON FUNCTION function_with_argtypes IS security_label */ +#line 6644 "gram.y" + { SecLabelStmt *n = makeNode(SecLabelStmt); n->provider = (yyvsp[-5].str); n->objtype = OBJECT_FUNCTION; @@ -34721,12 +35213,12 @@ yyreduce: n->label = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34725 "gram.c" /* yacc.c:1652 */ +#line 35217 "gram.c" break; - case 957: -#line 6654 "gram.y" /* yacc.c:1652 */ - { + case 957: /* SecLabelStmt: SECURITY LABEL opt_provider ON LARGE_P OBJECT_P NumericOnly IS security_label */ +#line 6654 "gram.y" + { SecLabelStmt *n = makeNode(SecLabelStmt); n->provider = (yyvsp[-6].str); n->objtype = OBJECT_LARGEOBJECT; @@ -34734,12 +35226,12 @@ yyreduce: n->label = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34738 "gram.c" /* yacc.c:1652 */ +#line 35230 "gram.c" break; - case 958: -#line 6664 "gram.y" /* yacc.c:1652 */ - { + case 958: /* SecLabelStmt: SECURITY LABEL opt_provider ON PROCEDURE function_with_argtypes IS security_label */ +#line 6664 "gram.y" + { SecLabelStmt *n = makeNode(SecLabelStmt); n->provider = (yyvsp[-5].str); n->objtype = OBJECT_PROCEDURE; @@ -34747,12 +35239,12 @@ yyreduce: n->label = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34751 "gram.c" /* yacc.c:1652 */ +#line 35243 "gram.c" break; - case 959: -#line 6674 "gram.y" /* yacc.c:1652 */ - { + case 959: /* SecLabelStmt: SECURITY LABEL opt_provider ON ROUTINE function_with_argtypes IS security_label */ +#line 6674 "gram.y" + { SecLabelStmt *n = makeNode(SecLabelStmt); n->provider = (yyvsp[-5].str); n->objtype = OBJECT_ROUTINE; @@ -34760,248 +35252,248 @@ yyreduce: n->label = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 34764 "gram.c" /* yacc.c:1652 */ +#line 35256 "gram.c" break; - case 960: -#line 6684 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 34770 "gram.c" /* yacc.c:1652 */ + case 960: /* opt_provider: FOR NonReservedWord_or_Sconst */ +#line 6684 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 35262 "gram.c" break; - case 961: -#line 6685 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 34776 "gram.c" /* yacc.c:1652 */ + case 961: /* opt_provider: %empty */ +#line 6685 "gram.y" + { (yyval.str) = NULL; } +#line 35268 "gram.c" break; - case 962: -#line 6688 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 34782 "gram.c" /* yacc.c:1652 */ + case 962: /* security_label: Sconst */ +#line 6688 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 35274 "gram.c" break; - case 963: -#line 6689 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 34788 "gram.c" /* yacc.c:1652 */ + case 963: /* security_label: NULL_P */ +#line 6689 "gram.y" + { (yyval.str) = NULL; } +#line 35280 "gram.c" break; - case 964: -#line 6700 "gram.y" /* yacc.c:1652 */ - { + case 964: /* FetchStmt: FETCH fetch_args */ +#line 6700 "gram.y" + { FetchStmt *n = (FetchStmt *) (yyvsp[0].node); n->ismove = false; (yyval.node) = (Node *)n; } -#line 34798 "gram.c" /* yacc.c:1652 */ +#line 35290 "gram.c" break; - case 965: -#line 6706 "gram.y" /* yacc.c:1652 */ - { + case 965: /* FetchStmt: MOVE fetch_args */ +#line 6706 "gram.y" + { FetchStmt *n = (FetchStmt *) (yyvsp[0].node); n->ismove = true; (yyval.node) = (Node *)n; } -#line 34808 "gram.c" /* yacc.c:1652 */ +#line 35300 "gram.c" break; - case 966: -#line 6714 "gram.y" /* yacc.c:1652 */ - { + case 966: /* fetch_args: cursor_name */ +#line 6714 "gram.y" + { FetchStmt *n = makeNode(FetchStmt); n->portalname = (yyvsp[0].str); n->direction = FETCH_FORWARD; n->howMany = 1; (yyval.node) = (Node *)n; } -#line 34820 "gram.c" /* yacc.c:1652 */ +#line 35312 "gram.c" break; - case 967: -#line 6722 "gram.y" /* yacc.c:1652 */ - { + case 967: /* fetch_args: from_in cursor_name */ +#line 6722 "gram.y" + { FetchStmt *n = makeNode(FetchStmt); n->portalname = (yyvsp[0].str); n->direction = FETCH_FORWARD; n->howMany = 1; (yyval.node) = (Node *)n; } -#line 34832 "gram.c" /* yacc.c:1652 */ +#line 35324 "gram.c" break; - case 968: -#line 6730 "gram.y" /* yacc.c:1652 */ - { + case 968: /* fetch_args: NEXT opt_from_in cursor_name */ +#line 6730 "gram.y" + { FetchStmt *n = makeNode(FetchStmt); n->portalname = (yyvsp[0].str); n->direction = FETCH_FORWARD; n->howMany = 1; (yyval.node) = (Node *)n; } -#line 34844 "gram.c" /* yacc.c:1652 */ +#line 35336 "gram.c" break; - case 969: -#line 6738 "gram.y" /* yacc.c:1652 */ - { + case 969: /* fetch_args: PRIOR opt_from_in cursor_name */ +#line 6738 "gram.y" + { FetchStmt *n = makeNode(FetchStmt); n->portalname = (yyvsp[0].str); n->direction = FETCH_BACKWARD; n->howMany = 1; (yyval.node) = (Node *)n; } -#line 34856 "gram.c" /* yacc.c:1652 */ +#line 35348 "gram.c" break; - case 970: -#line 6746 "gram.y" /* yacc.c:1652 */ - { + case 970: /* fetch_args: FIRST_P opt_from_in cursor_name */ +#line 6746 "gram.y" + { FetchStmt *n = makeNode(FetchStmt); n->portalname = (yyvsp[0].str); n->direction = FETCH_ABSOLUTE; n->howMany = 1; (yyval.node) = (Node *)n; } -#line 34868 "gram.c" /* yacc.c:1652 */ +#line 35360 "gram.c" break; - case 971: -#line 6754 "gram.y" /* yacc.c:1652 */ - { + case 971: /* fetch_args: LAST_P opt_from_in cursor_name */ +#line 6754 "gram.y" + { FetchStmt *n = makeNode(FetchStmt); n->portalname = (yyvsp[0].str); n->direction = FETCH_ABSOLUTE; n->howMany = -1; (yyval.node) = (Node *)n; } -#line 34880 "gram.c" /* yacc.c:1652 */ +#line 35372 "gram.c" break; - case 972: -#line 6762 "gram.y" /* yacc.c:1652 */ - { + case 972: /* fetch_args: ABSOLUTE_P SignedIconst opt_from_in cursor_name */ +#line 6762 "gram.y" + { FetchStmt *n = makeNode(FetchStmt); n->portalname = (yyvsp[0].str); n->direction = FETCH_ABSOLUTE; n->howMany = (yyvsp[-2].ival); (yyval.node) = (Node *)n; } -#line 34892 "gram.c" /* yacc.c:1652 */ +#line 35384 "gram.c" break; - case 973: -#line 6770 "gram.y" /* yacc.c:1652 */ - { + case 973: /* fetch_args: RELATIVE_P SignedIconst opt_from_in cursor_name */ +#line 6770 "gram.y" + { FetchStmt *n = makeNode(FetchStmt); n->portalname = (yyvsp[0].str); n->direction = FETCH_RELATIVE; n->howMany = (yyvsp[-2].ival); (yyval.node) = (Node *)n; } -#line 34904 "gram.c" /* yacc.c:1652 */ +#line 35396 "gram.c" break; - case 974: -#line 6778 "gram.y" /* yacc.c:1652 */ - { + case 974: /* fetch_args: SignedIconst opt_from_in cursor_name */ +#line 6778 "gram.y" + { FetchStmt *n = makeNode(FetchStmt); n->portalname = (yyvsp[0].str); n->direction = FETCH_FORWARD; n->howMany = (yyvsp[-2].ival); (yyval.node) = (Node *)n; } -#line 34916 "gram.c" /* yacc.c:1652 */ +#line 35408 "gram.c" break; - case 975: -#line 6786 "gram.y" /* yacc.c:1652 */ - { + case 975: /* fetch_args: ALL opt_from_in cursor_name */ +#line 6786 "gram.y" + { FetchStmt *n = makeNode(FetchStmt); n->portalname = (yyvsp[0].str); n->direction = FETCH_FORWARD; n->howMany = FETCH_ALL; (yyval.node) = (Node *)n; } -#line 34928 "gram.c" /* yacc.c:1652 */ +#line 35420 "gram.c" break; - case 976: -#line 6794 "gram.y" /* yacc.c:1652 */ - { + case 976: /* fetch_args: FORWARD opt_from_in cursor_name */ +#line 6794 "gram.y" + { FetchStmt *n = makeNode(FetchStmt); n->portalname = (yyvsp[0].str); n->direction = FETCH_FORWARD; n->howMany = 1; (yyval.node) = (Node *)n; } -#line 34940 "gram.c" /* yacc.c:1652 */ +#line 35432 "gram.c" break; - case 977: -#line 6802 "gram.y" /* yacc.c:1652 */ - { + case 977: /* fetch_args: FORWARD SignedIconst opt_from_in cursor_name */ +#line 6802 "gram.y" + { FetchStmt *n = makeNode(FetchStmt); n->portalname = (yyvsp[0].str); n->direction = FETCH_FORWARD; n->howMany = (yyvsp[-2].ival); (yyval.node) = (Node *)n; } -#line 34952 "gram.c" /* yacc.c:1652 */ +#line 35444 "gram.c" break; - case 978: -#line 6810 "gram.y" /* yacc.c:1652 */ - { + case 978: /* fetch_args: FORWARD ALL opt_from_in cursor_name */ +#line 6810 "gram.y" + { FetchStmt *n = makeNode(FetchStmt); n->portalname = (yyvsp[0].str); n->direction = FETCH_FORWARD; n->howMany = FETCH_ALL; (yyval.node) = (Node *)n; } -#line 34964 "gram.c" /* yacc.c:1652 */ +#line 35456 "gram.c" break; - case 979: -#line 6818 "gram.y" /* yacc.c:1652 */ - { + case 979: /* fetch_args: BACKWARD opt_from_in cursor_name */ +#line 6818 "gram.y" + { FetchStmt *n = makeNode(FetchStmt); n->portalname = (yyvsp[0].str); n->direction = FETCH_BACKWARD; n->howMany = 1; (yyval.node) = (Node *)n; } -#line 34976 "gram.c" /* yacc.c:1652 */ +#line 35468 "gram.c" break; - case 980: -#line 6826 "gram.y" /* yacc.c:1652 */ - { + case 980: /* fetch_args: BACKWARD SignedIconst opt_from_in cursor_name */ +#line 6826 "gram.y" + { FetchStmt *n = makeNode(FetchStmt); n->portalname = (yyvsp[0].str); n->direction = FETCH_BACKWARD; n->howMany = (yyvsp[-2].ival); (yyval.node) = (Node *)n; } -#line 34988 "gram.c" /* yacc.c:1652 */ +#line 35480 "gram.c" break; - case 981: -#line 6834 "gram.y" /* yacc.c:1652 */ - { + case 981: /* fetch_args: BACKWARD ALL opt_from_in cursor_name */ +#line 6834 "gram.y" + { FetchStmt *n = makeNode(FetchStmt); n->portalname = (yyvsp[0].str); n->direction = FETCH_BACKWARD; n->howMany = FETCH_ALL; (yyval.node) = (Node *)n; } -#line 35000 "gram.c" /* yacc.c:1652 */ +#line 35492 "gram.c" break; - case 986: -#line 6860 "gram.y" /* yacc.c:1652 */ - { + case 986: /* GrantStmt: GRANT privileges ON privilege_target TO grantee_list opt_grant_grant_option opt_granted_by */ +#line 6860 "gram.y" + { GrantStmt *n = makeNode(GrantStmt); n->is_grant = true; n->privileges = (yyvsp[-6].list); @@ -35013,12 +35505,12 @@ yyreduce: n->grantor = (yyvsp[0].rolespec); (yyval.node) = (Node*)n; } -#line 35017 "gram.c" /* yacc.c:1652 */ +#line 35509 "gram.c" break; - case 987: -#line 6877 "gram.y" /* yacc.c:1652 */ - { + case 987: /* RevokeStmt: REVOKE privileges ON privilege_target FROM grantee_list opt_granted_by opt_drop_behavior */ +#line 6877 "gram.y" + { GrantStmt *n = makeNode(GrantStmt); n->is_grant = false; n->grant_option = false; @@ -35031,12 +35523,12 @@ yyreduce: n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *)n; } -#line 35035 "gram.c" /* yacc.c:1652 */ +#line 35527 "gram.c" break; - case 988: -#line 6892 "gram.y" /* yacc.c:1652 */ - { + case 988: /* RevokeStmt: REVOKE GRANT OPTION FOR privileges ON privilege_target FROM grantee_list opt_granted_by opt_drop_behavior */ +#line 6892 "gram.y" + { GrantStmt *n = makeNode(GrantStmt); n->is_grant = false; n->grant_option = true; @@ -35049,384 +35541,384 @@ yyreduce: n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *)n; } -#line 35053 "gram.c" /* yacc.c:1652 */ +#line 35545 "gram.c" break; - case 989: -#line 6918 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 35059 "gram.c" /* yacc.c:1652 */ + case 989: /* privileges: privilege_list */ +#line 6918 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 35551 "gram.c" break; - case 990: -#line 6920 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 35065 "gram.c" /* yacc.c:1652 */ + case 990: /* privileges: ALL */ +#line 6920 "gram.y" + { (yyval.list) = NIL; } +#line 35557 "gram.c" break; - case 991: -#line 6922 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 35071 "gram.c" /* yacc.c:1652 */ + case 991: /* privileges: ALL PRIVILEGES */ +#line 6922 "gram.y" + { (yyval.list) = NIL; } +#line 35563 "gram.c" break; - case 992: -#line 6924 "gram.y" /* yacc.c:1652 */ - { + case 992: /* privileges: ALL '(' columnList ')' */ +#line 6924 "gram.y" + { AccessPriv *n = makeNode(AccessPriv); n->priv_name = NULL; n->cols = (yyvsp[-1].list); (yyval.list) = list_make1(n); } -#line 35082 "gram.c" /* yacc.c:1652 */ +#line 35574 "gram.c" break; - case 993: -#line 6931 "gram.y" /* yacc.c:1652 */ - { + case 993: /* privileges: ALL PRIVILEGES '(' columnList ')' */ +#line 6931 "gram.y" + { AccessPriv *n = makeNode(AccessPriv); n->priv_name = NULL; n->cols = (yyvsp[-1].list); (yyval.list) = list_make1(n); } -#line 35093 "gram.c" /* yacc.c:1652 */ +#line 35585 "gram.c" break; - case 994: -#line 6939 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].accesspriv)); } -#line 35099 "gram.c" /* yacc.c:1652 */ + case 994: /* privilege_list: privilege */ +#line 6939 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].accesspriv)); } +#line 35591 "gram.c" break; - case 995: -#line 6940 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].accesspriv)); } -#line 35105 "gram.c" /* yacc.c:1652 */ + case 995: /* privilege_list: privilege_list ',' privilege */ +#line 6940 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].accesspriv)); } +#line 35597 "gram.c" break; - case 996: -#line 6944 "gram.y" /* yacc.c:1652 */ - { + case 996: /* privilege: SELECT opt_column_list */ +#line 6944 "gram.y" + { AccessPriv *n = makeNode(AccessPriv); n->priv_name = pstrdup((yyvsp[-1].keyword)); n->cols = (yyvsp[0].list); (yyval.accesspriv) = n; } -#line 35116 "gram.c" /* yacc.c:1652 */ +#line 35608 "gram.c" break; - case 997: -#line 6951 "gram.y" /* yacc.c:1652 */ - { + case 997: /* privilege: REFERENCES opt_column_list */ +#line 6951 "gram.y" + { AccessPriv *n = makeNode(AccessPriv); n->priv_name = pstrdup((yyvsp[-1].keyword)); n->cols = (yyvsp[0].list); (yyval.accesspriv) = n; } -#line 35127 "gram.c" /* yacc.c:1652 */ +#line 35619 "gram.c" break; - case 998: -#line 6958 "gram.y" /* yacc.c:1652 */ - { + case 998: /* privilege: CREATE opt_column_list */ +#line 6958 "gram.y" + { AccessPriv *n = makeNode(AccessPriv); n->priv_name = pstrdup((yyvsp[-1].keyword)); n->cols = (yyvsp[0].list); (yyval.accesspriv) = n; } -#line 35138 "gram.c" /* yacc.c:1652 */ +#line 35630 "gram.c" break; - case 999: -#line 6965 "gram.y" /* yacc.c:1652 */ - { + case 999: /* privilege: ColId opt_column_list */ +#line 6965 "gram.y" + { AccessPriv *n = makeNode(AccessPriv); n->priv_name = (yyvsp[-1].str); n->cols = (yyvsp[0].list); (yyval.accesspriv) = n; } -#line 35149 "gram.c" /* yacc.c:1652 */ +#line 35641 "gram.c" break; - case 1000: -#line 6979 "gram.y" /* yacc.c:1652 */ - { + case 1000: /* privilege_target: qualified_name_list */ +#line 6979 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_OBJECT; n->objtype = OBJECT_TABLE; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35161 "gram.c" /* yacc.c:1652 */ +#line 35653 "gram.c" break; - case 1001: -#line 6987 "gram.y" /* yacc.c:1652 */ - { + case 1001: /* privilege_target: TABLE qualified_name_list */ +#line 6987 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_OBJECT; n->objtype = OBJECT_TABLE; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35173 "gram.c" /* yacc.c:1652 */ +#line 35665 "gram.c" break; - case 1002: -#line 6995 "gram.y" /* yacc.c:1652 */ - { + case 1002: /* privilege_target: SEQUENCE qualified_name_list */ +#line 6995 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_OBJECT; n->objtype = OBJECT_SEQUENCE; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35185 "gram.c" /* yacc.c:1652 */ +#line 35677 "gram.c" break; - case 1003: -#line 7003 "gram.y" /* yacc.c:1652 */ - { + case 1003: /* privilege_target: FOREIGN DATA_P WRAPPER name_list */ +#line 7003 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_OBJECT; n->objtype = OBJECT_FDW; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35197 "gram.c" /* yacc.c:1652 */ +#line 35689 "gram.c" break; - case 1004: -#line 7011 "gram.y" /* yacc.c:1652 */ - { + case 1004: /* privilege_target: FOREIGN SERVER name_list */ +#line 7011 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_OBJECT; n->objtype = OBJECT_FOREIGN_SERVER; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35209 "gram.c" /* yacc.c:1652 */ +#line 35701 "gram.c" break; - case 1005: -#line 7019 "gram.y" /* yacc.c:1652 */ - { + case 1005: /* privilege_target: FUNCTION function_with_argtypes_list */ +#line 7019 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_OBJECT; n->objtype = OBJECT_FUNCTION; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35221 "gram.c" /* yacc.c:1652 */ +#line 35713 "gram.c" break; - case 1006: -#line 7027 "gram.y" /* yacc.c:1652 */ - { + case 1006: /* privilege_target: PROCEDURE function_with_argtypes_list */ +#line 7027 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_OBJECT; n->objtype = OBJECT_PROCEDURE; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35233 "gram.c" /* yacc.c:1652 */ +#line 35725 "gram.c" break; - case 1007: -#line 7035 "gram.y" /* yacc.c:1652 */ - { + case 1007: /* privilege_target: ROUTINE function_with_argtypes_list */ +#line 7035 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_OBJECT; n->objtype = OBJECT_ROUTINE; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35245 "gram.c" /* yacc.c:1652 */ +#line 35737 "gram.c" break; - case 1008: -#line 7043 "gram.y" /* yacc.c:1652 */ - { + case 1008: /* privilege_target: DATABASE name_list */ +#line 7043 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_OBJECT; n->objtype = OBJECT_DATABASE; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35257 "gram.c" /* yacc.c:1652 */ +#line 35749 "gram.c" break; - case 1009: -#line 7051 "gram.y" /* yacc.c:1652 */ - { + case 1009: /* privilege_target: DOMAIN_P any_name_list */ +#line 7051 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_OBJECT; n->objtype = OBJECT_DOMAIN; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35269 "gram.c" /* yacc.c:1652 */ +#line 35761 "gram.c" break; - case 1010: -#line 7059 "gram.y" /* yacc.c:1652 */ - { + case 1010: /* privilege_target: LANGUAGE name_list */ +#line 7059 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_OBJECT; n->objtype = OBJECT_LANGUAGE; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35281 "gram.c" /* yacc.c:1652 */ +#line 35773 "gram.c" break; - case 1011: -#line 7067 "gram.y" /* yacc.c:1652 */ - { + case 1011: /* privilege_target: LARGE_P OBJECT_P NumericOnly_list */ +#line 7067 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_OBJECT; n->objtype = OBJECT_LARGEOBJECT; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35293 "gram.c" /* yacc.c:1652 */ +#line 35785 "gram.c" break; - case 1012: -#line 7075 "gram.y" /* yacc.c:1652 */ - { + case 1012: /* privilege_target: SCHEMA name_list */ +#line 7075 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_OBJECT; n->objtype = OBJECT_SCHEMA; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35305 "gram.c" /* yacc.c:1652 */ +#line 35797 "gram.c" break; - case 1013: -#line 7083 "gram.y" /* yacc.c:1652 */ - { + case 1013: /* privilege_target: TABLESPACE name_list */ +#line 7083 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_OBJECT; n->objtype = OBJECT_TABLESPACE; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35317 "gram.c" /* yacc.c:1652 */ +#line 35809 "gram.c" break; - case 1014: -#line 7091 "gram.y" /* yacc.c:1652 */ - { + case 1014: /* privilege_target: TYPE_P any_name_list */ +#line 7091 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_OBJECT; n->objtype = OBJECT_TYPE; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35329 "gram.c" /* yacc.c:1652 */ +#line 35821 "gram.c" break; - case 1015: -#line 7099 "gram.y" /* yacc.c:1652 */ - { + case 1015: /* privilege_target: ALL TABLES IN_P SCHEMA name_list */ +#line 7099 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_ALL_IN_SCHEMA; n->objtype = OBJECT_TABLE; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35341 "gram.c" /* yacc.c:1652 */ +#line 35833 "gram.c" break; - case 1016: -#line 7107 "gram.y" /* yacc.c:1652 */ - { + case 1016: /* privilege_target: ALL SEQUENCES IN_P SCHEMA name_list */ +#line 7107 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_ALL_IN_SCHEMA; n->objtype = OBJECT_SEQUENCE; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35353 "gram.c" /* yacc.c:1652 */ +#line 35845 "gram.c" break; - case 1017: -#line 7115 "gram.y" /* yacc.c:1652 */ - { + case 1017: /* privilege_target: ALL FUNCTIONS IN_P SCHEMA name_list */ +#line 7115 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_ALL_IN_SCHEMA; n->objtype = OBJECT_FUNCTION; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35365 "gram.c" /* yacc.c:1652 */ +#line 35857 "gram.c" break; - case 1018: -#line 7123 "gram.y" /* yacc.c:1652 */ - { + case 1018: /* privilege_target: ALL PROCEDURES IN_P SCHEMA name_list */ +#line 7123 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_ALL_IN_SCHEMA; n->objtype = OBJECT_PROCEDURE; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35377 "gram.c" /* yacc.c:1652 */ +#line 35869 "gram.c" break; - case 1019: -#line 7131 "gram.y" /* yacc.c:1652 */ - { + case 1019: /* privilege_target: ALL ROUTINES IN_P SCHEMA name_list */ +#line 7131 "gram.y" + { PrivTarget *n = (PrivTarget *) palloc(sizeof(PrivTarget)); n->targtype = ACL_TARGET_ALL_IN_SCHEMA; n->objtype = OBJECT_ROUTINE; n->objs = (yyvsp[0].list); (yyval.privtarget) = n; } -#line 35389 "gram.c" /* yacc.c:1652 */ +#line 35881 "gram.c" break; - case 1020: -#line 7142 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].rolespec)); } -#line 35395 "gram.c" /* yacc.c:1652 */ + case 1020: /* grantee_list: grantee */ +#line 7142 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].rolespec)); } +#line 35887 "gram.c" break; - case 1021: -#line 7143 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].rolespec)); } -#line 35401 "gram.c" /* yacc.c:1652 */ + case 1021: /* grantee_list: grantee_list ',' grantee */ +#line 7143 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].rolespec)); } +#line 35893 "gram.c" break; - case 1022: -#line 7147 "gram.y" /* yacc.c:1652 */ - { (yyval.rolespec) = (yyvsp[0].rolespec); } -#line 35407 "gram.c" /* yacc.c:1652 */ + case 1022: /* grantee: RoleSpec */ +#line 7147 "gram.y" + { (yyval.rolespec) = (yyvsp[0].rolespec); } +#line 35899 "gram.c" break; - case 1023: -#line 7148 "gram.y" /* yacc.c:1652 */ - { (yyval.rolespec) = (yyvsp[0].rolespec); } -#line 35413 "gram.c" /* yacc.c:1652 */ + case 1023: /* grantee: GROUP_P RoleSpec */ +#line 7148 "gram.y" + { (yyval.rolespec) = (yyvsp[0].rolespec); } +#line 35905 "gram.c" break; - case 1024: -#line 7153 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 35419 "gram.c" /* yacc.c:1652 */ + case 1024: /* opt_grant_grant_option: WITH GRANT OPTION */ +#line 7153 "gram.y" + { (yyval.boolean) = true; } +#line 35911 "gram.c" break; - case 1025: -#line 7154 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 35425 "gram.c" /* yacc.c:1652 */ + case 1025: /* opt_grant_grant_option: %empty */ +#line 7154 "gram.y" + { (yyval.boolean) = false; } +#line 35917 "gram.c" break; - case 1026: -#line 7165 "gram.y" /* yacc.c:1652 */ - { + case 1026: /* GrantRoleStmt: GRANT privilege_list TO role_list opt_grant_admin_option opt_granted_by */ +#line 7165 "gram.y" + { GrantRoleStmt *n = makeNode(GrantRoleStmt); n->is_grant = true; n->granted_roles = (yyvsp[-4].list); @@ -35435,12 +35927,12 @@ yyreduce: n->grantor = (yyvsp[0].rolespec); (yyval.node) = (Node*)n; } -#line 35439 "gram.c" /* yacc.c:1652 */ +#line 35931 "gram.c" break; - case 1027: -#line 7178 "gram.y" /* yacc.c:1652 */ - { + case 1027: /* RevokeRoleStmt: REVOKE privilege_list FROM role_list opt_granted_by opt_drop_behavior */ +#line 7178 "gram.y" + { GrantRoleStmt *n = makeNode(GrantRoleStmt); n->is_grant = false; n->admin_opt = false; @@ -35449,12 +35941,12 @@ yyreduce: n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node*)n; } -#line 35453 "gram.c" /* yacc.c:1652 */ +#line 35945 "gram.c" break; - case 1028: -#line 7188 "gram.y" /* yacc.c:1652 */ - { + case 1028: /* RevokeRoleStmt: REVOKE ADMIN OPTION FOR privilege_list FROM role_list opt_granted_by opt_drop_behavior */ +#line 7188 "gram.y" + { GrantRoleStmt *n = makeNode(GrantRoleStmt); n->is_grant = false; n->admin_opt = true; @@ -35463,83 +35955,83 @@ yyreduce: n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node*)n; } -#line 35467 "gram.c" /* yacc.c:1652 */ +#line 35959 "gram.c" break; - case 1029: -#line 7199 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 35473 "gram.c" /* yacc.c:1652 */ + case 1029: /* opt_grant_admin_option: WITH ADMIN OPTION */ +#line 7199 "gram.y" + { (yyval.boolean) = true; } +#line 35965 "gram.c" break; - case 1030: -#line 7200 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 35479 "gram.c" /* yacc.c:1652 */ + case 1030: /* opt_grant_admin_option: %empty */ +#line 7200 "gram.y" + { (yyval.boolean) = false; } +#line 35971 "gram.c" break; - case 1031: -#line 7203 "gram.y" /* yacc.c:1652 */ - { (yyval.rolespec) = (yyvsp[0].rolespec); } -#line 35485 "gram.c" /* yacc.c:1652 */ + case 1031: /* opt_granted_by: GRANTED BY RoleSpec */ +#line 7203 "gram.y" + { (yyval.rolespec) = (yyvsp[0].rolespec); } +#line 35977 "gram.c" break; - case 1032: -#line 7204 "gram.y" /* yacc.c:1652 */ - { (yyval.rolespec) = NULL; } -#line 35491 "gram.c" /* yacc.c:1652 */ + case 1032: /* opt_granted_by: %empty */ +#line 7204 "gram.y" + { (yyval.rolespec) = NULL; } +#line 35983 "gram.c" break; - case 1033: -#line 7215 "gram.y" /* yacc.c:1652 */ - { + case 1033: /* AlterDefaultPrivilegesStmt: ALTER DEFAULT PRIVILEGES DefACLOptionList DefACLAction */ +#line 7215 "gram.y" + { AlterDefaultPrivilegesStmt *n = makeNode(AlterDefaultPrivilegesStmt); n->options = (yyvsp[-1].list); n->action = (GrantStmt *) (yyvsp[0].node); (yyval.node) = (Node*)n; } -#line 35502 "gram.c" /* yacc.c:1652 */ +#line 35994 "gram.c" break; - case 1034: -#line 7224 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 35508 "gram.c" /* yacc.c:1652 */ + case 1034: /* DefACLOptionList: DefACLOptionList DefACLOption */ +#line 7224 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 36000 "gram.c" break; - case 1035: -#line 7225 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 35514 "gram.c" /* yacc.c:1652 */ + case 1035: /* DefACLOptionList: %empty */ +#line 7225 "gram.y" + { (yyval.list) = NIL; } +#line 36006 "gram.c" break; - case 1036: -#line 7230 "gram.y" /* yacc.c:1652 */ - { + case 1036: /* DefACLOption: IN_P SCHEMA name_list */ +#line 7230 "gram.y" + { (yyval.defelt) = makeDefElem("schemas", (Node *)(yyvsp[0].list), (yylsp[-2])); } -#line 35522 "gram.c" /* yacc.c:1652 */ +#line 36014 "gram.c" break; - case 1037: -#line 7234 "gram.y" /* yacc.c:1652 */ - { + case 1037: /* DefACLOption: FOR ROLE role_list */ +#line 7234 "gram.y" + { (yyval.defelt) = makeDefElem("roles", (Node *)(yyvsp[0].list), (yylsp[-2])); } -#line 35530 "gram.c" /* yacc.c:1652 */ +#line 36022 "gram.c" break; - case 1038: -#line 7238 "gram.y" /* yacc.c:1652 */ - { + case 1038: /* DefACLOption: FOR USER role_list */ +#line 7238 "gram.y" + { (yyval.defelt) = makeDefElem("roles", (Node *)(yyvsp[0].list), (yylsp[-2])); } -#line 35538 "gram.c" /* yacc.c:1652 */ +#line 36030 "gram.c" break; - case 1039: -#line 7250 "gram.y" /* yacc.c:1652 */ - { + case 1039: /* DefACLAction: GRANT privileges ON defacl_privilege_target TO grantee_list opt_grant_grant_option */ +#line 7250 "gram.y" + { GrantStmt *n = makeNode(GrantStmt); n->is_grant = true; n->privileges = (yyvsp[-5].list); @@ -35550,12 +36042,12 @@ yyreduce: n->grant_option = (yyvsp[0].boolean); (yyval.node) = (Node*)n; } -#line 35554 "gram.c" /* yacc.c:1652 */ +#line 36046 "gram.c" break; - case 1040: -#line 7263 "gram.y" /* yacc.c:1652 */ - { + case 1040: /* DefACLAction: REVOKE privileges ON defacl_privilege_target FROM grantee_list opt_drop_behavior */ +#line 7263 "gram.y" + { GrantStmt *n = makeNode(GrantStmt); n->is_grant = false; n->grant_option = false; @@ -35567,12 +36059,12 @@ yyreduce: n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *)n; } -#line 35571 "gram.c" /* yacc.c:1652 */ +#line 36063 "gram.c" break; - case 1041: -#line 7277 "gram.y" /* yacc.c:1652 */ - { + case 1041: /* DefACLAction: REVOKE GRANT OPTION FOR privileges ON defacl_privilege_target FROM grantee_list opt_drop_behavior */ +#line 7277 "gram.y" + { GrantStmt *n = makeNode(GrantStmt); n->is_grant = false; n->grant_option = true; @@ -35584,48 +36076,48 @@ yyreduce: n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *)n; } -#line 35588 "gram.c" /* yacc.c:1652 */ +#line 36080 "gram.c" break; - case 1042: -#line 7292 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = OBJECT_TABLE; } -#line 35594 "gram.c" /* yacc.c:1652 */ + case 1042: /* defacl_privilege_target: TABLES */ +#line 7292 "gram.y" + { (yyval.ival) = OBJECT_TABLE; } +#line 36086 "gram.c" break; - case 1043: -#line 7293 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = OBJECT_FUNCTION; } -#line 35600 "gram.c" /* yacc.c:1652 */ + case 1043: /* defacl_privilege_target: FUNCTIONS */ +#line 7293 "gram.y" + { (yyval.ival) = OBJECT_FUNCTION; } +#line 36092 "gram.c" break; - case 1044: -#line 7294 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = OBJECT_FUNCTION; } -#line 35606 "gram.c" /* yacc.c:1652 */ + case 1044: /* defacl_privilege_target: ROUTINES */ +#line 7294 "gram.y" + { (yyval.ival) = OBJECT_FUNCTION; } +#line 36098 "gram.c" break; - case 1045: -#line 7295 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = OBJECT_SEQUENCE; } -#line 35612 "gram.c" /* yacc.c:1652 */ + case 1045: /* defacl_privilege_target: SEQUENCES */ +#line 7295 "gram.y" + { (yyval.ival) = OBJECT_SEQUENCE; } +#line 36104 "gram.c" break; - case 1046: -#line 7296 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = OBJECT_TYPE; } -#line 35618 "gram.c" /* yacc.c:1652 */ + case 1046: /* defacl_privilege_target: TYPES_P */ +#line 7296 "gram.y" + { (yyval.ival) = OBJECT_TYPE; } +#line 36110 "gram.c" break; - case 1047: -#line 7297 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = OBJECT_SCHEMA; } -#line 35624 "gram.c" /* yacc.c:1652 */ + case 1047: /* defacl_privilege_target: SCHEMAS */ +#line 7297 "gram.y" + { (yyval.ival) = OBJECT_SCHEMA; } +#line 36116 "gram.c" break; - case 1048: -#line 7312 "gram.y" /* yacc.c:1652 */ - { + case 1048: /* IndexStmt: CREATE opt_unique INDEX opt_concurrently opt_index_name ON relation_expr access_method_clause '(' index_params ')' opt_include opt_reloptions OptTableSpace where_clause */ +#line 7312 "gram.y" + { IndexStmt *n = makeNode(IndexStmt); n->unique = (yyvsp[-13].boolean); n->concurrent = (yyvsp[-11].boolean); @@ -35652,12 +36144,12 @@ yyreduce: n->reset_default_tblspc = false; (yyval.node) = (Node *)n; } -#line 35656 "gram.c" /* yacc.c:1652 */ +#line 36148 "gram.c" break; - case 1049: -#line 7342 "gram.y" /* yacc.c:1652 */ - { + case 1049: /* IndexStmt: CREATE opt_unique INDEX opt_concurrently IF_P NOT EXISTS name ON relation_expr access_method_clause '(' index_params ')' opt_include opt_reloptions OptTableSpace where_clause */ +#line 7342 "gram.y" + { IndexStmt *n = makeNode(IndexStmt); n->unique = (yyvsp[-16].boolean); n->concurrent = (yyvsp[-14].boolean); @@ -35684,72 +36176,72 @@ yyreduce: n->reset_default_tblspc = false; (yyval.node) = (Node *)n; } -#line 35688 "gram.c" /* yacc.c:1652 */ +#line 36180 "gram.c" break; - case 1050: -#line 7372 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 35694 "gram.c" /* yacc.c:1652 */ + case 1050: /* opt_unique: UNIQUE */ +#line 7372 "gram.y" + { (yyval.boolean) = true; } +#line 36186 "gram.c" break; - case 1051: -#line 7373 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 35700 "gram.c" /* yacc.c:1652 */ + case 1051: /* opt_unique: %empty */ +#line 7373 "gram.y" + { (yyval.boolean) = false; } +#line 36192 "gram.c" break; - case 1052: -#line 7377 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 35706 "gram.c" /* yacc.c:1652 */ + case 1052: /* opt_concurrently: CONCURRENTLY */ +#line 7377 "gram.y" + { (yyval.boolean) = true; } +#line 36198 "gram.c" break; - case 1053: -#line 7378 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 35712 "gram.c" /* yacc.c:1652 */ + case 1053: /* opt_concurrently: %empty */ +#line 7378 "gram.y" + { (yyval.boolean) = false; } +#line 36204 "gram.c" break; - case 1054: -#line 7382 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 35718 "gram.c" /* yacc.c:1652 */ + case 1054: /* opt_index_name: name */ +#line 7382 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 36210 "gram.c" break; - case 1055: -#line 7383 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 35724 "gram.c" /* yacc.c:1652 */ + case 1055: /* opt_index_name: %empty */ +#line 7383 "gram.y" + { (yyval.str) = NULL; } +#line 36216 "gram.c" break; - case 1056: -#line 7387 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 35730 "gram.c" /* yacc.c:1652 */ + case 1056: /* access_method_clause: USING name */ +#line 7387 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 36222 "gram.c" break; - case 1057: -#line 7388 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = DEFAULT_INDEX_TYPE; } -#line 35736 "gram.c" /* yacc.c:1652 */ + case 1057: /* access_method_clause: %empty */ +#line 7388 "gram.y" + { (yyval.str) = DEFAULT_INDEX_TYPE; } +#line 36228 "gram.c" break; - case 1058: -#line 7391 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].ielem)); } -#line 35742 "gram.c" /* yacc.c:1652 */ + case 1058: /* index_params: index_elem */ +#line 7391 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].ielem)); } +#line 36234 "gram.c" break; - case 1059: -#line 7392 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].ielem)); } -#line 35748 "gram.c" /* yacc.c:1652 */ + case 1059: /* index_params: index_params ',' index_elem */ +#line 7392 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].ielem)); } +#line 36240 "gram.c" break; - case 1060: -#line 7398 "gram.y" /* yacc.c:1652 */ - { + case 1060: /* index_elem_options: opt_collate opt_class opt_asc_desc opt_nulls_order */ +#line 7398 "gram.y" + { (yyval.ielem) = makeNode(IndexElem); (yyval.ielem)->name = NULL; (yyval.ielem)->expr = NULL; @@ -35760,12 +36252,12 @@ yyreduce: (yyval.ielem)->ordering = (yyvsp[-1].ival); (yyval.ielem)->nulls_ordering = (yyvsp[0].ival); } -#line 35764 "gram.c" /* yacc.c:1652 */ +#line 36256 "gram.c" break; - case 1061: -#line 7410 "gram.y" /* yacc.c:1652 */ - { + case 1061: /* index_elem_options: opt_collate any_name reloptions opt_asc_desc opt_nulls_order */ +#line 7410 "gram.y" + { (yyval.ielem) = makeNode(IndexElem); (yyval.ielem)->name = NULL; (yyval.ielem)->expr = NULL; @@ -35776,123 +36268,123 @@ yyreduce: (yyval.ielem)->ordering = (yyvsp[-1].ival); (yyval.ielem)->nulls_ordering = (yyvsp[0].ival); } -#line 35780 "gram.c" /* yacc.c:1652 */ +#line 36272 "gram.c" break; - case 1062: -#line 7429 "gram.y" /* yacc.c:1652 */ - { + case 1062: /* index_elem: ColId index_elem_options */ +#line 7429 "gram.y" + { (yyval.ielem) = (yyvsp[0].ielem); (yyval.ielem)->name = (yyvsp[-1].str); } -#line 35789 "gram.c" /* yacc.c:1652 */ +#line 36281 "gram.c" break; - case 1063: -#line 7434 "gram.y" /* yacc.c:1652 */ - { + case 1063: /* index_elem: func_expr_windowless index_elem_options */ +#line 7434 "gram.y" + { (yyval.ielem) = (yyvsp[0].ielem); (yyval.ielem)->expr = (yyvsp[-1].node); } -#line 35798 "gram.c" /* yacc.c:1652 */ +#line 36290 "gram.c" break; - case 1064: -#line 7439 "gram.y" /* yacc.c:1652 */ - { + case 1064: /* index_elem: '(' a_expr ')' index_elem_options */ +#line 7439 "gram.y" + { (yyval.ielem) = (yyvsp[0].ielem); (yyval.ielem)->expr = (yyvsp[-2].node); } -#line 35807 "gram.c" /* yacc.c:1652 */ +#line 36299 "gram.c" break; - case 1065: -#line 7445 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 35813 "gram.c" /* yacc.c:1652 */ + case 1065: /* opt_include: INCLUDE '(' index_including_params ')' */ +#line 7445 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 36305 "gram.c" break; - case 1066: -#line 7446 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 35819 "gram.c" /* yacc.c:1652 */ + case 1066: /* opt_include: %empty */ +#line 7446 "gram.y" + { (yyval.list) = NIL; } +#line 36311 "gram.c" break; - case 1067: -#line 7449 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].ielem)); } -#line 35825 "gram.c" /* yacc.c:1652 */ + case 1067: /* index_including_params: index_elem */ +#line 7449 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].ielem)); } +#line 36317 "gram.c" break; - case 1068: -#line 7450 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].ielem)); } -#line 35831 "gram.c" /* yacc.c:1652 */ + case 1068: /* index_including_params: index_including_params ',' index_elem */ +#line 7450 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].ielem)); } +#line 36323 "gram.c" break; - case 1069: -#line 7453 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 35837 "gram.c" /* yacc.c:1652 */ + case 1069: /* opt_collate: COLLATE any_name */ +#line 7453 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 36329 "gram.c" break; - case 1070: -#line 7454 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 35843 "gram.c" /* yacc.c:1652 */ + case 1070: /* opt_collate: %empty */ +#line 7454 "gram.y" + { (yyval.list) = NIL; } +#line 36335 "gram.c" break; - case 1071: -#line 7457 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 35849 "gram.c" /* yacc.c:1652 */ + case 1071: /* opt_class: any_name */ +#line 7457 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 36341 "gram.c" break; - case 1072: -#line 7458 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 35855 "gram.c" /* yacc.c:1652 */ + case 1072: /* opt_class: %empty */ +#line 7458 "gram.y" + { (yyval.list) = NIL; } +#line 36347 "gram.c" break; - case 1073: -#line 7461 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = SORTBY_ASC; } -#line 35861 "gram.c" /* yacc.c:1652 */ + case 1073: /* opt_asc_desc: ASC */ +#line 7461 "gram.y" + { (yyval.ival) = SORTBY_ASC; } +#line 36353 "gram.c" break; - case 1074: -#line 7462 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = SORTBY_DESC; } -#line 35867 "gram.c" /* yacc.c:1652 */ + case 1074: /* opt_asc_desc: DESC */ +#line 7462 "gram.y" + { (yyval.ival) = SORTBY_DESC; } +#line 36359 "gram.c" break; - case 1075: -#line 7463 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = SORTBY_DEFAULT; } -#line 35873 "gram.c" /* yacc.c:1652 */ + case 1075: /* opt_asc_desc: %empty */ +#line 7463 "gram.y" + { (yyval.ival) = SORTBY_DEFAULT; } +#line 36365 "gram.c" break; - case 1076: -#line 7466 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = SORTBY_NULLS_FIRST; } -#line 35879 "gram.c" /* yacc.c:1652 */ + case 1076: /* opt_nulls_order: NULLS_LA FIRST_P */ +#line 7466 "gram.y" + { (yyval.ival) = SORTBY_NULLS_FIRST; } +#line 36371 "gram.c" break; - case 1077: -#line 7467 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = SORTBY_NULLS_LAST; } -#line 35885 "gram.c" /* yacc.c:1652 */ + case 1077: /* opt_nulls_order: NULLS_LA LAST_P */ +#line 7467 "gram.y" + { (yyval.ival) = SORTBY_NULLS_LAST; } +#line 36377 "gram.c" break; - case 1078: -#line 7468 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = SORTBY_NULLS_DEFAULT; } -#line 35891 "gram.c" /* yacc.c:1652 */ + case 1078: /* opt_nulls_order: %empty */ +#line 7468 "gram.y" + { (yyval.ival) = SORTBY_NULLS_DEFAULT; } +#line 36383 "gram.c" break; - case 1079: -#line 7486 "gram.y" /* yacc.c:1652 */ - { + case 1079: /* CreateFunctionStmt: CREATE opt_or_replace FUNCTION func_name func_args_with_defaults RETURNS func_return opt_createfunc_opt_list opt_routine_body */ +#line 7486 "gram.y" + { CreateFunctionStmt *n = makeNode(CreateFunctionStmt); n->is_procedure = false; n->replace = (yyvsp[-7].boolean); @@ -35903,12 +36395,12 @@ yyreduce: n->sql_body = (yyvsp[0].node); (yyval.node) = (Node *)n; } -#line 35907 "gram.c" /* yacc.c:1652 */ +#line 36399 "gram.c" break; - case 1080: -#line 7499 "gram.y" /* yacc.c:1652 */ - { + case 1080: /* CreateFunctionStmt: CREATE opt_or_replace FUNCTION func_name func_args_with_defaults RETURNS TABLE '(' table_func_column_list ')' opt_createfunc_opt_list opt_routine_body */ +#line 7499 "gram.y" + { CreateFunctionStmt *n = makeNode(CreateFunctionStmt); n->is_procedure = false; n->replace = (yyvsp[-10].boolean); @@ -35920,12 +36412,12 @@ yyreduce: n->sql_body = (yyvsp[0].node); (yyval.node) = (Node *)n; } -#line 35924 "gram.c" /* yacc.c:1652 */ +#line 36416 "gram.c" break; - case 1081: -#line 7513 "gram.y" /* yacc.c:1652 */ - { + case 1081: /* CreateFunctionStmt: CREATE opt_or_replace FUNCTION func_name func_args_with_defaults opt_createfunc_opt_list opt_routine_body */ +#line 7513 "gram.y" + { CreateFunctionStmt *n = makeNode(CreateFunctionStmt); n->is_procedure = false; n->replace = (yyvsp[-5].boolean); @@ -35936,12 +36428,12 @@ yyreduce: n->sql_body = (yyvsp[0].node); (yyval.node) = (Node *)n; } -#line 35940 "gram.c" /* yacc.c:1652 */ +#line 36432 "gram.c" break; - case 1082: -#line 7526 "gram.y" /* yacc.c:1652 */ - { + case 1082: /* CreateFunctionStmt: CREATE opt_or_replace PROCEDURE func_name func_args_with_defaults opt_createfunc_opt_list opt_routine_body */ +#line 7526 "gram.y" + { CreateFunctionStmt *n = makeNode(CreateFunctionStmt); n->is_procedure = true; n->replace = (yyvsp[-5].boolean); @@ -35952,130 +36444,130 @@ yyreduce: n->sql_body = (yyvsp[0].node); (yyval.node) = (Node *)n; } -#line 35956 "gram.c" /* yacc.c:1652 */ +#line 36448 "gram.c" break; - case 1083: -#line 7540 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 35962 "gram.c" /* yacc.c:1652 */ + case 1083: /* opt_or_replace: OR REPLACE */ +#line 7540 "gram.y" + { (yyval.boolean) = true; } +#line 36454 "gram.c" break; - case 1084: -#line 7541 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 35968 "gram.c" /* yacc.c:1652 */ + case 1084: /* opt_or_replace: %empty */ +#line 7541 "gram.y" + { (yyval.boolean) = false; } +#line 36460 "gram.c" break; - case 1085: -#line 7544 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 35974 "gram.c" /* yacc.c:1652 */ + case 1085: /* func_args: '(' func_args_list ')' */ +#line 7544 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 36466 "gram.c" break; - case 1086: -#line 7545 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 35980 "gram.c" /* yacc.c:1652 */ + case 1086: /* func_args: '(' ')' */ +#line 7545 "gram.y" + { (yyval.list) = NIL; } +#line 36472 "gram.c" break; - case 1087: -#line 7549 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].fun_param)); } -#line 35986 "gram.c" /* yacc.c:1652 */ + case 1087: /* func_args_list: func_arg */ +#line 7549 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].fun_param)); } +#line 36478 "gram.c" break; - case 1088: -#line 7550 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].fun_param)); } -#line 35992 "gram.c" /* yacc.c:1652 */ + case 1088: /* func_args_list: func_args_list ',' func_arg */ +#line 7550 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].fun_param)); } +#line 36484 "gram.c" break; - case 1089: -#line 7554 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].objwithargs)); } -#line 35998 "gram.c" /* yacc.c:1652 */ + case 1089: /* function_with_argtypes_list: function_with_argtypes */ +#line 7554 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].objwithargs)); } +#line 36490 "gram.c" break; - case 1090: -#line 7556 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].objwithargs)); } -#line 36004 "gram.c" /* yacc.c:1652 */ + case 1090: /* function_with_argtypes_list: function_with_argtypes_list ',' function_with_argtypes */ +#line 7556 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].objwithargs)); } +#line 36496 "gram.c" break; - case 1091: -#line 7561 "gram.y" /* yacc.c:1652 */ - { + case 1091: /* function_with_argtypes: func_name func_args */ +#line 7561 "gram.y" + { ObjectWithArgs *n = makeNode(ObjectWithArgs); n->objname = (yyvsp[-1].list); n->objargs = extractArgTypes((yyvsp[0].list)); n->objfuncargs = (yyvsp[0].list); (yyval.objwithargs) = n; } -#line 36016 "gram.c" /* yacc.c:1652 */ +#line 36508 "gram.c" break; - case 1092: -#line 7574 "gram.y" /* yacc.c:1652 */ - { + case 1092: /* function_with_argtypes: type_func_name_keyword */ +#line 7574 "gram.y" + { ObjectWithArgs *n = makeNode(ObjectWithArgs); n->objname = list_make1(makeString(pstrdup((yyvsp[0].keyword)))); n->args_unspecified = true; (yyval.objwithargs) = n; } -#line 36027 "gram.c" /* yacc.c:1652 */ +#line 36519 "gram.c" break; - case 1093: -#line 7581 "gram.y" /* yacc.c:1652 */ - { + case 1093: /* function_with_argtypes: ColId */ +#line 7581 "gram.y" + { ObjectWithArgs *n = makeNode(ObjectWithArgs); n->objname = list_make1(makeString((yyvsp[0].str))); n->args_unspecified = true; (yyval.objwithargs) = n; } -#line 36038 "gram.c" /* yacc.c:1652 */ +#line 36530 "gram.c" break; - case 1094: -#line 7588 "gram.y" /* yacc.c:1652 */ - { + case 1094: /* function_with_argtypes: ColId indirection */ +#line 7588 "gram.y" + { ObjectWithArgs *n = makeNode(ObjectWithArgs); n->objname = check_func_name(lcons(makeString((yyvsp[-1].str)), (yyvsp[0].list)), yyscanner); n->args_unspecified = true; (yyval.objwithargs) = n; } -#line 36050 "gram.c" /* yacc.c:1652 */ +#line 36542 "gram.c" break; - case 1095: -#line 7602 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 36056 "gram.c" /* yacc.c:1652 */ + case 1095: /* func_args_with_defaults: '(' func_args_with_defaults_list ')' */ +#line 7602 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 36548 "gram.c" break; - case 1096: -#line 7603 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 36062 "gram.c" /* yacc.c:1652 */ + case 1096: /* func_args_with_defaults: '(' ')' */ +#line 7603 "gram.y" + { (yyval.list) = NIL; } +#line 36554 "gram.c" break; - case 1097: -#line 7607 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].fun_param)); } -#line 36068 "gram.c" /* yacc.c:1652 */ + case 1097: /* func_args_with_defaults_list: func_arg_with_default */ +#line 7607 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].fun_param)); } +#line 36560 "gram.c" break; - case 1098: -#line 7609 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].fun_param)); } -#line 36074 "gram.c" /* yacc.c:1652 */ + case 1098: /* func_args_with_defaults_list: func_args_with_defaults_list ',' func_arg_with_default */ +#line 7609 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].fun_param)); } +#line 36566 "gram.c" break; - case 1099: -#line 7624 "gram.y" /* yacc.c:1652 */ - { + case 1099: /* func_arg: arg_class param_name func_type */ +#line 7624 "gram.y" + { FunctionParameter *n = makeNode(FunctionParameter); n->name = (yyvsp[-1].str); n->argType = (yyvsp[0].typnam); @@ -36083,12 +36575,12 @@ yyreduce: n->defexpr = NULL; (yyval.fun_param) = n; } -#line 36087 "gram.c" /* yacc.c:1652 */ +#line 36579 "gram.c" break; - case 1100: -#line 7633 "gram.y" /* yacc.c:1652 */ - { + case 1100: /* func_arg: param_name arg_class func_type */ +#line 7633 "gram.y" + { FunctionParameter *n = makeNode(FunctionParameter); n->name = (yyvsp[-2].str); n->argType = (yyvsp[0].typnam); @@ -36096,12 +36588,12 @@ yyreduce: n->defexpr = NULL; (yyval.fun_param) = n; } -#line 36100 "gram.c" /* yacc.c:1652 */ +#line 36592 "gram.c" break; - case 1101: -#line 7642 "gram.y" /* yacc.c:1652 */ - { + case 1101: /* func_arg: param_name func_type */ +#line 7642 "gram.y" + { FunctionParameter *n = makeNode(FunctionParameter); n->name = (yyvsp[-1].str); n->argType = (yyvsp[0].typnam); @@ -36109,12 +36601,12 @@ yyreduce: n->defexpr = NULL; (yyval.fun_param) = n; } -#line 36113 "gram.c" /* yacc.c:1652 */ +#line 36605 "gram.c" break; - case 1102: -#line 7651 "gram.y" /* yacc.c:1652 */ - { + case 1102: /* func_arg: arg_class func_type */ +#line 7651 "gram.y" + { FunctionParameter *n = makeNode(FunctionParameter); n->name = NULL; n->argType = (yyvsp[0].typnam); @@ -36122,12 +36614,12 @@ yyreduce: n->defexpr = NULL; (yyval.fun_param) = n; } -#line 36126 "gram.c" /* yacc.c:1652 */ +#line 36618 "gram.c" break; - case 1103: -#line 7660 "gram.y" /* yacc.c:1652 */ - { + case 1103: /* func_arg: func_type */ +#line 7660 "gram.y" + { FunctionParameter *n = makeNode(FunctionParameter); n->name = NULL; n->argType = (yyvsp[0].typnam); @@ -36135,107 +36627,107 @@ yyreduce: n->defexpr = NULL; (yyval.fun_param) = n; } -#line 36139 "gram.c" /* yacc.c:1652 */ +#line 36631 "gram.c" break; - case 1104: -#line 7671 "gram.y" /* yacc.c:1652 */ - { (yyval.fun_param_mode) = FUNC_PARAM_IN; } -#line 36145 "gram.c" /* yacc.c:1652 */ + case 1104: /* arg_class: IN_P */ +#line 7671 "gram.y" + { (yyval.fun_param_mode) = FUNC_PARAM_IN; } +#line 36637 "gram.c" break; - case 1105: -#line 7672 "gram.y" /* yacc.c:1652 */ - { (yyval.fun_param_mode) = FUNC_PARAM_OUT; } -#line 36151 "gram.c" /* yacc.c:1652 */ + case 1105: /* arg_class: OUT_P */ +#line 7672 "gram.y" + { (yyval.fun_param_mode) = FUNC_PARAM_OUT; } +#line 36643 "gram.c" break; - case 1106: -#line 7673 "gram.y" /* yacc.c:1652 */ - { (yyval.fun_param_mode) = FUNC_PARAM_INOUT; } -#line 36157 "gram.c" /* yacc.c:1652 */ + case 1106: /* arg_class: INOUT */ +#line 7673 "gram.y" + { (yyval.fun_param_mode) = FUNC_PARAM_INOUT; } +#line 36649 "gram.c" break; - case 1107: -#line 7674 "gram.y" /* yacc.c:1652 */ - { (yyval.fun_param_mode) = FUNC_PARAM_INOUT; } -#line 36163 "gram.c" /* yacc.c:1652 */ + case 1107: /* arg_class: IN_P OUT_P */ +#line 7674 "gram.y" + { (yyval.fun_param_mode) = FUNC_PARAM_INOUT; } +#line 36655 "gram.c" break; - case 1108: -#line 7675 "gram.y" /* yacc.c:1652 */ - { (yyval.fun_param_mode) = FUNC_PARAM_VARIADIC; } -#line 36169 "gram.c" /* yacc.c:1652 */ + case 1108: /* arg_class: VARIADIC */ +#line 7675 "gram.y" + { (yyval.fun_param_mode) = FUNC_PARAM_VARIADIC; } +#line 36661 "gram.c" break; - case 1110: -#line 7686 "gram.y" /* yacc.c:1652 */ - { + case 1110: /* func_return: func_type */ +#line 7686 "gram.y" + { /* We can catch over-specified results here if we want to, * but for now better to silently swallow typmod, etc. * - thomas 2000-03-22 */ (yyval.typnam) = (yyvsp[0].typnam); } -#line 36181 "gram.c" /* yacc.c:1652 */ +#line 36673 "gram.c" break; - case 1111: -#line 7700 "gram.y" /* yacc.c:1652 */ - { (yyval.typnam) = (yyvsp[0].typnam); } -#line 36187 "gram.c" /* yacc.c:1652 */ + case 1111: /* func_type: Typename */ +#line 7700 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); } +#line 36679 "gram.c" break; - case 1112: -#line 7702 "gram.y" /* yacc.c:1652 */ - { + case 1112: /* func_type: type_function_name attrs '%' TYPE_P */ +#line 7702 "gram.y" + { (yyval.typnam) = makeTypeNameFromNameList(lcons(makeString((yyvsp[-3].str)), (yyvsp[-2].list))); (yyval.typnam)->pct_type = true; (yyval.typnam)->location = (yylsp[-3]); } -#line 36197 "gram.c" /* yacc.c:1652 */ +#line 36689 "gram.c" break; - case 1113: -#line 7708 "gram.y" /* yacc.c:1652 */ - { + case 1113: /* func_type: SETOF type_function_name attrs '%' TYPE_P */ +#line 7708 "gram.y" + { (yyval.typnam) = makeTypeNameFromNameList(lcons(makeString((yyvsp[-3].str)), (yyvsp[-2].list))); (yyval.typnam)->pct_type = true; (yyval.typnam)->setof = true; (yyval.typnam)->location = (yylsp[-3]); } -#line 36208 "gram.c" /* yacc.c:1652 */ +#line 36700 "gram.c" break; - case 1114: -#line 7718 "gram.y" /* yacc.c:1652 */ - { + case 1114: /* func_arg_with_default: func_arg */ +#line 7718 "gram.y" + { (yyval.fun_param) = (yyvsp[0].fun_param); } -#line 36216 "gram.c" /* yacc.c:1652 */ +#line 36708 "gram.c" break; - case 1115: -#line 7722 "gram.y" /* yacc.c:1652 */ - { + case 1115: /* func_arg_with_default: func_arg DEFAULT a_expr */ +#line 7722 "gram.y" + { (yyval.fun_param) = (yyvsp[-2].fun_param); (yyval.fun_param)->defexpr = (yyvsp[0].node); } -#line 36225 "gram.c" /* yacc.c:1652 */ +#line 36717 "gram.c" break; - case 1116: -#line 7727 "gram.y" /* yacc.c:1652 */ - { + case 1116: /* func_arg_with_default: func_arg '=' a_expr */ +#line 7727 "gram.y" + { (yyval.fun_param) = (yyvsp[-2].fun_param); (yyval.fun_param)->defexpr = (yyvsp[0].node); } -#line 36234 "gram.c" /* yacc.c:1652 */ +#line 36726 "gram.c" break; - case 1117: -#line 7735 "gram.y" /* yacc.c:1652 */ - { + case 1117: /* aggr_arg: func_arg */ +#line 7735 "gram.y" + { if (!((yyvsp[0].fun_param)->mode == FUNC_PARAM_DEFAULT || (yyvsp[0].fun_param)->mode == FUNC_PARAM_IN || (yyvsp[0].fun_param)->mode == FUNC_PARAM_VARIADIC)) @@ -36245,308 +36737,308 @@ yyreduce: parser_errposition((yylsp[0])))); (yyval.fun_param) = (yyvsp[0].fun_param); } -#line 36249 "gram.c" /* yacc.c:1652 */ +#line 36741 "gram.c" break; - case 1118: -#line 7777 "gram.y" /* yacc.c:1652 */ - { + case 1118: /* aggr_args: '(' '*' ')' */ +#line 7777 "gram.y" + { (yyval.list) = list_make2(NIL, makeInteger(-1)); } -#line 36257 "gram.c" /* yacc.c:1652 */ +#line 36749 "gram.c" break; - case 1119: -#line 7781 "gram.y" /* yacc.c:1652 */ - { + case 1119: /* aggr_args: '(' aggr_args_list ')' */ +#line 7781 "gram.y" + { (yyval.list) = list_make2((yyvsp[-1].list), makeInteger(-1)); } -#line 36265 "gram.c" /* yacc.c:1652 */ +#line 36757 "gram.c" break; - case 1120: -#line 7785 "gram.y" /* yacc.c:1652 */ - { + case 1120: /* aggr_args: '(' ORDER BY aggr_args_list ')' */ +#line 7785 "gram.y" + { (yyval.list) = list_make2((yyvsp[-1].list), makeInteger(0)); } -#line 36273 "gram.c" /* yacc.c:1652 */ +#line 36765 "gram.c" break; - case 1121: -#line 7789 "gram.y" /* yacc.c:1652 */ - { + case 1121: /* aggr_args: '(' aggr_args_list ORDER BY aggr_args_list ')' */ +#line 7789 "gram.y" + { /* this is the only case requiring consistency checking */ (yyval.list) = makeOrderedSetArgs((yyvsp[-4].list), (yyvsp[-1].list), yyscanner); } -#line 36282 "gram.c" /* yacc.c:1652 */ +#line 36774 "gram.c" break; - case 1122: -#line 7796 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].fun_param)); } -#line 36288 "gram.c" /* yacc.c:1652 */ + case 1122: /* aggr_args_list: aggr_arg */ +#line 7796 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].fun_param)); } +#line 36780 "gram.c" break; - case 1123: -#line 7797 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].fun_param)); } -#line 36294 "gram.c" /* yacc.c:1652 */ + case 1123: /* aggr_args_list: aggr_args_list ',' aggr_arg */ +#line 7797 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].fun_param)); } +#line 36786 "gram.c" break; - case 1124: -#line 7802 "gram.y" /* yacc.c:1652 */ - { + case 1124: /* aggregate_with_argtypes: func_name aggr_args */ +#line 7802 "gram.y" + { ObjectWithArgs *n = makeNode(ObjectWithArgs); n->objname = (yyvsp[-1].list); n->objargs = extractAggrArgTypes((yyvsp[0].list)); n->objfuncargs = (List *) linitial((yyvsp[0].list)); (yyval.objwithargs) = n; } -#line 36306 "gram.c" /* yacc.c:1652 */ +#line 36798 "gram.c" break; - case 1125: -#line 7812 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].objwithargs)); } -#line 36312 "gram.c" /* yacc.c:1652 */ + case 1125: /* aggregate_with_argtypes_list: aggregate_with_argtypes */ +#line 7812 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].objwithargs)); } +#line 36804 "gram.c" break; - case 1126: -#line 7814 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].objwithargs)); } -#line 36318 "gram.c" /* yacc.c:1652 */ + case 1126: /* aggregate_with_argtypes_list: aggregate_with_argtypes_list ',' aggregate_with_argtypes */ +#line 7814 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].objwithargs)); } +#line 36810 "gram.c" break; - case 1128: -#line 7819 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 36324 "gram.c" /* yacc.c:1652 */ + case 1128: /* opt_createfunc_opt_list: %empty */ +#line 7819 "gram.y" + { (yyval.list) = NIL; } +#line 36816 "gram.c" break; - case 1129: -#line 7824 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 36330 "gram.c" /* yacc.c:1652 */ + case 1129: /* createfunc_opt_list: createfunc_opt_item */ +#line 7824 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } +#line 36822 "gram.c" break; - case 1130: -#line 7825 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 36336 "gram.c" /* yacc.c:1652 */ + case 1130: /* createfunc_opt_list: createfunc_opt_list createfunc_opt_item */ +#line 7825 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 36828 "gram.c" break; - case 1131: -#line 7833 "gram.y" /* yacc.c:1652 */ - { + case 1131: /* common_func_opt_item: CALLED ON NULL_P INPUT_P */ +#line 7833 "gram.y" + { (yyval.defelt) = makeDefElem("strict", (Node *)makeInteger(false), (yylsp[-3])); } -#line 36344 "gram.c" /* yacc.c:1652 */ +#line 36836 "gram.c" break; - case 1132: -#line 7837 "gram.y" /* yacc.c:1652 */ - { + case 1132: /* common_func_opt_item: RETURNS NULL_P ON NULL_P INPUT_P */ +#line 7837 "gram.y" + { (yyval.defelt) = makeDefElem("strict", (Node *)makeInteger(true), (yylsp[-4])); } -#line 36352 "gram.c" /* yacc.c:1652 */ +#line 36844 "gram.c" break; - case 1133: -#line 7841 "gram.y" /* yacc.c:1652 */ - { + case 1133: /* common_func_opt_item: STRICT_P */ +#line 7841 "gram.y" + { (yyval.defelt) = makeDefElem("strict", (Node *)makeInteger(true), (yylsp[0])); } -#line 36360 "gram.c" /* yacc.c:1652 */ +#line 36852 "gram.c" break; - case 1134: -#line 7845 "gram.y" /* yacc.c:1652 */ - { + case 1134: /* common_func_opt_item: IMMUTABLE */ +#line 7845 "gram.y" + { (yyval.defelt) = makeDefElem("volatility", (Node *)makeString("immutable"), (yylsp[0])); } -#line 36368 "gram.c" /* yacc.c:1652 */ +#line 36860 "gram.c" break; - case 1135: -#line 7849 "gram.y" /* yacc.c:1652 */ - { + case 1135: /* common_func_opt_item: STABLE */ +#line 7849 "gram.y" + { (yyval.defelt) = makeDefElem("volatility", (Node *)makeString("stable"), (yylsp[0])); } -#line 36376 "gram.c" /* yacc.c:1652 */ +#line 36868 "gram.c" break; - case 1136: -#line 7853 "gram.y" /* yacc.c:1652 */ - { + case 1136: /* common_func_opt_item: VOLATILE */ +#line 7853 "gram.y" + { (yyval.defelt) = makeDefElem("volatility", (Node *)makeString("volatile"), (yylsp[0])); } -#line 36384 "gram.c" /* yacc.c:1652 */ +#line 36876 "gram.c" break; - case 1137: -#line 7857 "gram.y" /* yacc.c:1652 */ - { + case 1137: /* common_func_opt_item: EXTERNAL SECURITY DEFINER */ +#line 7857 "gram.y" + { (yyval.defelt) = makeDefElem("security", (Node *)makeInteger(true), (yylsp[-2])); } -#line 36392 "gram.c" /* yacc.c:1652 */ +#line 36884 "gram.c" break; - case 1138: -#line 7861 "gram.y" /* yacc.c:1652 */ - { + case 1138: /* common_func_opt_item: EXTERNAL SECURITY INVOKER */ +#line 7861 "gram.y" + { (yyval.defelt) = makeDefElem("security", (Node *)makeInteger(false), (yylsp[-2])); } -#line 36400 "gram.c" /* yacc.c:1652 */ +#line 36892 "gram.c" break; - case 1139: -#line 7865 "gram.y" /* yacc.c:1652 */ - { + case 1139: /* common_func_opt_item: SECURITY DEFINER */ +#line 7865 "gram.y" + { (yyval.defelt) = makeDefElem("security", (Node *)makeInteger(true), (yylsp[-1])); } -#line 36408 "gram.c" /* yacc.c:1652 */ +#line 36900 "gram.c" break; - case 1140: -#line 7869 "gram.y" /* yacc.c:1652 */ - { + case 1140: /* common_func_opt_item: SECURITY INVOKER */ +#line 7869 "gram.y" + { (yyval.defelt) = makeDefElem("security", (Node *)makeInteger(false), (yylsp[-1])); } -#line 36416 "gram.c" /* yacc.c:1652 */ +#line 36908 "gram.c" break; - case 1141: -#line 7873 "gram.y" /* yacc.c:1652 */ - { + case 1141: /* common_func_opt_item: LEAKPROOF */ +#line 7873 "gram.y" + { (yyval.defelt) = makeDefElem("leakproof", (Node *)makeInteger(true), (yylsp[0])); } -#line 36424 "gram.c" /* yacc.c:1652 */ +#line 36916 "gram.c" break; - case 1142: -#line 7877 "gram.y" /* yacc.c:1652 */ - { + case 1142: /* common_func_opt_item: NOT LEAKPROOF */ +#line 7877 "gram.y" + { (yyval.defelt) = makeDefElem("leakproof", (Node *)makeInteger(false), (yylsp[-1])); } -#line 36432 "gram.c" /* yacc.c:1652 */ +#line 36924 "gram.c" break; - case 1143: -#line 7881 "gram.y" /* yacc.c:1652 */ - { + case 1143: /* common_func_opt_item: COST NumericOnly */ +#line 7881 "gram.y" + { (yyval.defelt) = makeDefElem("cost", (Node *)(yyvsp[0].value), (yylsp[-1])); } -#line 36440 "gram.c" /* yacc.c:1652 */ +#line 36932 "gram.c" break; - case 1144: -#line 7885 "gram.y" /* yacc.c:1652 */ - { + case 1144: /* common_func_opt_item: ROWS NumericOnly */ +#line 7885 "gram.y" + { (yyval.defelt) = makeDefElem("rows", (Node *)(yyvsp[0].value), (yylsp[-1])); } -#line 36448 "gram.c" /* yacc.c:1652 */ +#line 36940 "gram.c" break; - case 1145: -#line 7889 "gram.y" /* yacc.c:1652 */ - { + case 1145: /* common_func_opt_item: SUPPORT any_name */ +#line 7889 "gram.y" + { (yyval.defelt) = makeDefElem("support", (Node *)(yyvsp[0].list), (yylsp[-1])); } -#line 36456 "gram.c" /* yacc.c:1652 */ +#line 36948 "gram.c" break; - case 1146: -#line 7893 "gram.y" /* yacc.c:1652 */ - { + case 1146: /* common_func_opt_item: FunctionSetResetClause */ +#line 7893 "gram.y" + { /* we abuse the normal content of a DefElem here */ (yyval.defelt) = makeDefElem("set", (Node *)(yyvsp[0].vsetstmt), (yylsp[0])); } -#line 36465 "gram.c" /* yacc.c:1652 */ +#line 36957 "gram.c" break; - case 1147: -#line 7898 "gram.y" /* yacc.c:1652 */ - { + case 1147: /* common_func_opt_item: PARALLEL ColId */ +#line 7898 "gram.y" + { (yyval.defelt) = makeDefElem("parallel", (Node *)makeString((yyvsp[0].str)), (yylsp[-1])); } -#line 36473 "gram.c" /* yacc.c:1652 */ +#line 36965 "gram.c" break; - case 1148: -#line 7905 "gram.y" /* yacc.c:1652 */ - { + case 1148: /* createfunc_opt_item: AS func_as */ +#line 7905 "gram.y" + { (yyval.defelt) = makeDefElem("as", (Node *)(yyvsp[0].list), (yylsp[-1])); } -#line 36481 "gram.c" /* yacc.c:1652 */ +#line 36973 "gram.c" break; - case 1149: -#line 7909 "gram.y" /* yacc.c:1652 */ - { + case 1149: /* createfunc_opt_item: LANGUAGE NonReservedWord_or_Sconst */ +#line 7909 "gram.y" + { (yyval.defelt) = makeDefElem("language", (Node *)makeString((yyvsp[0].str)), (yylsp[-1])); } -#line 36489 "gram.c" /* yacc.c:1652 */ +#line 36981 "gram.c" break; - case 1150: -#line 7913 "gram.y" /* yacc.c:1652 */ - { + case 1150: /* createfunc_opt_item: TRANSFORM transform_type_list */ +#line 7913 "gram.y" + { (yyval.defelt) = makeDefElem("transform", (Node *)(yyvsp[0].list), (yylsp[-1])); } -#line 36497 "gram.c" /* yacc.c:1652 */ +#line 36989 "gram.c" break; - case 1151: -#line 7917 "gram.y" /* yacc.c:1652 */ - { + case 1151: /* createfunc_opt_item: WINDOW */ +#line 7917 "gram.y" + { (yyval.defelt) = makeDefElem("window", (Node *)makeInteger(true), (yylsp[0])); } -#line 36505 "gram.c" /* yacc.c:1652 */ +#line 36997 "gram.c" break; - case 1152: -#line 7921 "gram.y" /* yacc.c:1652 */ - { + case 1152: /* createfunc_opt_item: common_func_opt_item */ +#line 7921 "gram.y" + { (yyval.defelt) = (yyvsp[0].defelt); } -#line 36513 "gram.c" /* yacc.c:1652 */ +#line 37005 "gram.c" break; - case 1153: -#line 7926 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } -#line 36519 "gram.c" /* yacc.c:1652 */ + case 1153: /* func_as: Sconst */ +#line 7926 "gram.y" + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } +#line 37011 "gram.c" break; - case 1154: -#line 7928 "gram.y" /* yacc.c:1652 */ - { + case 1154: /* func_as: Sconst ',' Sconst */ +#line 7928 "gram.y" + { (yyval.list) = list_make2(makeString((yyvsp[-2].str)), makeString((yyvsp[0].str))); } -#line 36527 "gram.c" /* yacc.c:1652 */ +#line 37019 "gram.c" break; - case 1155: -#line 7934 "gram.y" /* yacc.c:1652 */ - { + case 1155: /* ReturnStmt: RETURN a_expr */ +#line 7934 "gram.y" + { ReturnStmt *r = makeNode(ReturnStmt); r->returnval = (Node *) (yyvsp[0].node); (yyval.node) = (Node *) r; } -#line 36537 "gram.c" /* yacc.c:1652 */ +#line 37029 "gram.c" break; - case 1156: -#line 7943 "gram.y" /* yacc.c:1652 */ - { + case 1156: /* opt_routine_body: ReturnStmt */ +#line 7943 "gram.y" + { (yyval.node) = (yyvsp[0].node); } -#line 36545 "gram.c" /* yacc.c:1652 */ +#line 37037 "gram.c" break; - case 1157: -#line 7947 "gram.y" /* yacc.c:1652 */ - { + case 1157: /* opt_routine_body: BEGIN_P ATOMIC routine_body_stmt_list END_P */ +#line 7947 "gram.y" + { /* * A compound statement is stored as a single-item list * containing the list of statements as its member. That @@ -36555,64 +37047,64 @@ yyreduce: */ (yyval.node) = (Node *) list_make1((yyvsp[-1].list)); } -#line 36559 "gram.c" /* yacc.c:1652 */ +#line 37051 "gram.c" break; - case 1158: -#line 7957 "gram.y" /* yacc.c:1652 */ - { + case 1158: /* opt_routine_body: %empty */ +#line 7957 "gram.y" + { (yyval.node) = NULL; } -#line 36567 "gram.c" /* yacc.c:1652 */ +#line 37059 "gram.c" break; - case 1159: -#line 7964 "gram.y" /* yacc.c:1652 */ - { + case 1159: /* routine_body_stmt_list: routine_body_stmt_list routine_body_stmt ';' */ +#line 7964 "gram.y" + { /* As in stmtmulti, discard empty statements */ if ((yyvsp[-1].node) != NULL) (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[-1].node)); else (yyval.list) = (yyvsp[-2].list); } -#line 36579 "gram.c" /* yacc.c:1652 */ +#line 37071 "gram.c" break; - case 1160: -#line 7972 "gram.y" /* yacc.c:1652 */ - { + case 1160: /* routine_body_stmt_list: %empty */ +#line 7972 "gram.y" + { (yyval.list) = NIL; } -#line 36587 "gram.c" /* yacc.c:1652 */ +#line 37079 "gram.c" break; - case 1163: -#line 7983 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].typnam)); } -#line 36593 "gram.c" /* yacc.c:1652 */ + case 1163: /* transform_type_list: FOR TYPE_P Typename */ +#line 7983 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].typnam)); } +#line 37085 "gram.c" break; - case 1164: -#line 7984 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-4].list), (yyvsp[0].typnam)); } -#line 36599 "gram.c" /* yacc.c:1652 */ + case 1164: /* transform_type_list: transform_type_list ',' FOR TYPE_P Typename */ +#line 7984 "gram.y" + { (yyval.list) = lappend((yyvsp[-4].list), (yyvsp[0].typnam)); } +#line 37091 "gram.c" break; - case 1165: -#line 7988 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 36605 "gram.c" /* yacc.c:1652 */ + case 1165: /* opt_definition: WITH definition */ +#line 7988 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 37097 "gram.c" break; - case 1166: -#line 7989 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 36611 "gram.c" /* yacc.c:1652 */ + case 1166: /* opt_definition: %empty */ +#line 7989 "gram.y" + { (yyval.list) = NIL; } +#line 37103 "gram.c" break; - case 1167: -#line 7993 "gram.y" /* yacc.c:1652 */ - { + case 1167: /* table_func_column: param_name func_type */ +#line 7993 "gram.y" + { FunctionParameter *n = makeNode(FunctionParameter); n->name = (yyvsp[-1].str); n->argType = (yyvsp[0].typnam); @@ -36620,76 +37112,76 @@ yyreduce: n->defexpr = NULL; (yyval.fun_param) = n; } -#line 36624 "gram.c" /* yacc.c:1652 */ +#line 37116 "gram.c" break; - case 1168: -#line 8005 "gram.y" /* yacc.c:1652 */ - { + case 1168: /* table_func_column_list: table_func_column */ +#line 8005 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].fun_param)); } -#line 36632 "gram.c" /* yacc.c:1652 */ +#line 37124 "gram.c" break; - case 1169: -#line 8009 "gram.y" /* yacc.c:1652 */ - { + case 1169: /* table_func_column_list: table_func_column_list ',' table_func_column */ +#line 8009 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].fun_param)); } -#line 36640 "gram.c" /* yacc.c:1652 */ +#line 37132 "gram.c" break; - case 1170: -#line 8024 "gram.y" /* yacc.c:1652 */ - { + case 1170: /* AlterFunctionStmt: ALTER FUNCTION function_with_argtypes alterfunc_opt_list opt_restrict */ +#line 8024 "gram.y" + { AlterFunctionStmt *n = makeNode(AlterFunctionStmt); n->objtype = OBJECT_FUNCTION; n->func = (yyvsp[-2].objwithargs); n->actions = (yyvsp[-1].list); (yyval.node) = (Node *) n; } -#line 36652 "gram.c" /* yacc.c:1652 */ +#line 37144 "gram.c" break; - case 1171: -#line 8032 "gram.y" /* yacc.c:1652 */ - { + case 1171: /* AlterFunctionStmt: ALTER PROCEDURE function_with_argtypes alterfunc_opt_list opt_restrict */ +#line 8032 "gram.y" + { AlterFunctionStmt *n = makeNode(AlterFunctionStmt); n->objtype = OBJECT_PROCEDURE; n->func = (yyvsp[-2].objwithargs); n->actions = (yyvsp[-1].list); (yyval.node) = (Node *) n; } -#line 36664 "gram.c" /* yacc.c:1652 */ +#line 37156 "gram.c" break; - case 1172: -#line 8040 "gram.y" /* yacc.c:1652 */ - { + case 1172: /* AlterFunctionStmt: ALTER ROUTINE function_with_argtypes alterfunc_opt_list opt_restrict */ +#line 8040 "gram.y" + { AlterFunctionStmt *n = makeNode(AlterFunctionStmt); n->objtype = OBJECT_ROUTINE; n->func = (yyvsp[-2].objwithargs); n->actions = (yyvsp[-1].list); (yyval.node) = (Node *) n; } -#line 36676 "gram.c" /* yacc.c:1652 */ +#line 37168 "gram.c" break; - case 1173: -#line 8051 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 36682 "gram.c" /* yacc.c:1652 */ + case 1173: /* alterfunc_opt_list: common_func_opt_item */ +#line 8051 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } +#line 37174 "gram.c" break; - case 1174: -#line 8052 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 36688 "gram.c" /* yacc.c:1652 */ + case 1174: /* alterfunc_opt_list: alterfunc_opt_list common_func_opt_item */ +#line 8052 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 37180 "gram.c" break; - case 1177: -#line 8076 "gram.y" /* yacc.c:1652 */ - { + case 1177: /* RemoveFuncStmt: DROP FUNCTION function_with_argtypes_list opt_drop_behavior */ +#line 8076 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_FUNCTION; n->objects = (yyvsp[-1].list); @@ -36698,12 +37190,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *)n; } -#line 36702 "gram.c" /* yacc.c:1652 */ +#line 37194 "gram.c" break; - case 1178: -#line 8086 "gram.y" /* yacc.c:1652 */ - { + case 1178: /* RemoveFuncStmt: DROP FUNCTION IF_P EXISTS function_with_argtypes_list opt_drop_behavior */ +#line 8086 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_FUNCTION; n->objects = (yyvsp[-1].list); @@ -36712,12 +37204,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *)n; } -#line 36716 "gram.c" /* yacc.c:1652 */ +#line 37208 "gram.c" break; - case 1179: -#line 8096 "gram.y" /* yacc.c:1652 */ - { + case 1179: /* RemoveFuncStmt: DROP PROCEDURE function_with_argtypes_list opt_drop_behavior */ +#line 8096 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_PROCEDURE; n->objects = (yyvsp[-1].list); @@ -36726,12 +37218,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *)n; } -#line 36730 "gram.c" /* yacc.c:1652 */ +#line 37222 "gram.c" break; - case 1180: -#line 8106 "gram.y" /* yacc.c:1652 */ - { + case 1180: /* RemoveFuncStmt: DROP PROCEDURE IF_P EXISTS function_with_argtypes_list opt_drop_behavior */ +#line 8106 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_PROCEDURE; n->objects = (yyvsp[-1].list); @@ -36740,12 +37232,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *)n; } -#line 36744 "gram.c" /* yacc.c:1652 */ +#line 37236 "gram.c" break; - case 1181: -#line 8116 "gram.y" /* yacc.c:1652 */ - { + case 1181: /* RemoveFuncStmt: DROP ROUTINE function_with_argtypes_list opt_drop_behavior */ +#line 8116 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_ROUTINE; n->objects = (yyvsp[-1].list); @@ -36754,12 +37246,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *)n; } -#line 36758 "gram.c" /* yacc.c:1652 */ +#line 37250 "gram.c" break; - case 1182: -#line 8126 "gram.y" /* yacc.c:1652 */ - { + case 1182: /* RemoveFuncStmt: DROP ROUTINE IF_P EXISTS function_with_argtypes_list opt_drop_behavior */ +#line 8126 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_ROUTINE; n->objects = (yyvsp[-1].list); @@ -36768,12 +37260,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *)n; } -#line 36772 "gram.c" /* yacc.c:1652 */ +#line 37264 "gram.c" break; - case 1183: -#line 8139 "gram.y" /* yacc.c:1652 */ - { + case 1183: /* RemoveAggrStmt: DROP AGGREGATE aggregate_with_argtypes_list opt_drop_behavior */ +#line 8139 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_AGGREGATE; n->objects = (yyvsp[-1].list); @@ -36782,12 +37274,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *)n; } -#line 36786 "gram.c" /* yacc.c:1652 */ +#line 37278 "gram.c" break; - case 1184: -#line 8149 "gram.y" /* yacc.c:1652 */ - { + case 1184: /* RemoveAggrStmt: DROP AGGREGATE IF_P EXISTS aggregate_with_argtypes_list opt_drop_behavior */ +#line 8149 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_AGGREGATE; n->objects = (yyvsp[-1].list); @@ -36796,12 +37288,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *)n; } -#line 36800 "gram.c" /* yacc.c:1652 */ +#line 37292 "gram.c" break; - case 1185: -#line 8162 "gram.y" /* yacc.c:1652 */ - { + case 1185: /* RemoveOperStmt: DROP OPERATOR operator_with_argtypes_list opt_drop_behavior */ +#line 8162 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_OPERATOR; n->objects = (yyvsp[-1].list); @@ -36810,12 +37302,12 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *)n; } -#line 36814 "gram.c" /* yacc.c:1652 */ +#line 37306 "gram.c" break; - case 1186: -#line 8172 "gram.y" /* yacc.c:1652 */ - { + case 1186: /* RemoveOperStmt: DROP OPERATOR IF_P EXISTS operator_with_argtypes_list opt_drop_behavior */ +#line 8172 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_OPERATOR; n->objects = (yyvsp[-1].list); @@ -36824,115 +37316,115 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *)n; } -#line 36828 "gram.c" /* yacc.c:1652 */ +#line 37320 "gram.c" break; - case 1187: -#line 8185 "gram.y" /* yacc.c:1652 */ - { + case 1187: /* oper_argtypes: '(' Typename ')' */ +#line 8185 "gram.y" + { ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("missing argument"), errhint("Use NONE to denote the missing argument of a unary operator."), parser_errposition((yylsp[0])))); } -#line 36840 "gram.c" /* yacc.c:1652 */ +#line 37332 "gram.c" break; - case 1188: -#line 8193 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make2((yyvsp[-3].typnam), (yyvsp[-1].typnam)); } -#line 36846 "gram.c" /* yacc.c:1652 */ + case 1188: /* oper_argtypes: '(' Typename ',' Typename ')' */ +#line 8193 "gram.y" + { (yyval.list) = list_make2((yyvsp[-3].typnam), (yyvsp[-1].typnam)); } +#line 37338 "gram.c" break; - case 1189: -#line 8195 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make2(NULL, (yyvsp[-1].typnam)); } -#line 36852 "gram.c" /* yacc.c:1652 */ + case 1189: /* oper_argtypes: '(' NONE ',' Typename ')' */ +#line 8195 "gram.y" + { (yyval.list) = list_make2(NULL, (yyvsp[-1].typnam)); } +#line 37344 "gram.c" break; - case 1190: -#line 8197 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make2((yyvsp[-3].typnam), NULL); } -#line 36858 "gram.c" /* yacc.c:1652 */ + case 1190: /* oper_argtypes: '(' Typename ',' NONE ')' */ +#line 8197 "gram.y" + { (yyval.list) = list_make2((yyvsp[-3].typnam), NULL); } +#line 37350 "gram.c" break; - case 1191: -#line 8202 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } -#line 36864 "gram.c" /* yacc.c:1652 */ + case 1191: /* any_operator: all_Op */ +#line 8202 "gram.y" + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } +#line 37356 "gram.c" break; - case 1192: -#line 8204 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lcons(makeString((yyvsp[-2].str)), (yyvsp[0].list)); } -#line 36870 "gram.c" /* yacc.c:1652 */ + case 1192: /* any_operator: ColId '.' any_operator */ +#line 8204 "gram.y" + { (yyval.list) = lcons(makeString((yyvsp[-2].str)), (yyvsp[0].list)); } +#line 37362 "gram.c" break; - case 1193: -#line 8208 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].objwithargs)); } -#line 36876 "gram.c" /* yacc.c:1652 */ + case 1193: /* operator_with_argtypes_list: operator_with_argtypes */ +#line 8208 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].objwithargs)); } +#line 37368 "gram.c" break; - case 1194: -#line 8210 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].objwithargs)); } -#line 36882 "gram.c" /* yacc.c:1652 */ + case 1194: /* operator_with_argtypes_list: operator_with_argtypes_list ',' operator_with_argtypes */ +#line 8210 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].objwithargs)); } +#line 37374 "gram.c" break; - case 1195: -#line 8215 "gram.y" /* yacc.c:1652 */ - { + case 1195: /* operator_with_argtypes: any_operator oper_argtypes */ +#line 8215 "gram.y" + { ObjectWithArgs *n = makeNode(ObjectWithArgs); n->objname = (yyvsp[-1].list); n->objargs = (yyvsp[0].list); (yyval.objwithargs) = n; } -#line 36893 "gram.c" /* yacc.c:1652 */ +#line 37385 "gram.c" break; - case 1196: -#line 8233 "gram.y" /* yacc.c:1652 */ - { + case 1196: /* DoStmt: DO dostmt_opt_list */ +#line 8233 "gram.y" + { DoStmt *n = makeNode(DoStmt); n->args = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 36903 "gram.c" /* yacc.c:1652 */ +#line 37395 "gram.c" break; - case 1197: -#line 8241 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 36909 "gram.c" /* yacc.c:1652 */ + case 1197: /* dostmt_opt_list: dostmt_opt_item */ +#line 8241 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } +#line 37401 "gram.c" break; - case 1198: -#line 8242 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 36915 "gram.c" /* yacc.c:1652 */ + case 1198: /* dostmt_opt_list: dostmt_opt_list dostmt_opt_item */ +#line 8242 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 37407 "gram.c" break; - case 1199: -#line 8247 "gram.y" /* yacc.c:1652 */ - { + case 1199: /* dostmt_opt_item: Sconst */ +#line 8247 "gram.y" + { (yyval.defelt) = makeDefElem("as", (Node *)makeString((yyvsp[0].str)), (yylsp[0])); } -#line 36923 "gram.c" /* yacc.c:1652 */ +#line 37415 "gram.c" break; - case 1200: -#line 8251 "gram.y" /* yacc.c:1652 */ - { + case 1200: /* dostmt_opt_item: LANGUAGE NonReservedWord_or_Sconst */ +#line 8251 "gram.y" + { (yyval.defelt) = makeDefElem("language", (Node *)makeString((yyvsp[0].str)), (yylsp[-1])); } -#line 36931 "gram.c" /* yacc.c:1652 */ +#line 37423 "gram.c" break; - case 1201: -#line 8264 "gram.y" /* yacc.c:1652 */ - { + case 1201: /* CreateCastStmt: CREATE CAST '(' Typename AS Typename ')' WITH FUNCTION function_with_argtypes cast_context */ +#line 8264 "gram.y" + { CreateCastStmt *n = makeNode(CreateCastStmt); n->sourcetype = (yyvsp[-7].typnam); n->targettype = (yyvsp[-5].typnam); @@ -36941,12 +37433,12 @@ yyreduce: n->inout = false; (yyval.node) = (Node *)n; } -#line 36945 "gram.c" /* yacc.c:1652 */ +#line 37437 "gram.c" break; - case 1202: -#line 8275 "gram.y" /* yacc.c:1652 */ - { + case 1202: /* CreateCastStmt: CREATE CAST '(' Typename AS Typename ')' WITHOUT FUNCTION cast_context */ +#line 8275 "gram.y" + { CreateCastStmt *n = makeNode(CreateCastStmt); n->sourcetype = (yyvsp[-6].typnam); n->targettype = (yyvsp[-4].typnam); @@ -36955,12 +37447,12 @@ yyreduce: n->inout = false; (yyval.node) = (Node *)n; } -#line 36959 "gram.c" /* yacc.c:1652 */ +#line 37451 "gram.c" break; - case 1203: -#line 8286 "gram.y" /* yacc.c:1652 */ - { + case 1203: /* CreateCastStmt: CREATE CAST '(' Typename AS Typename ')' WITH INOUT cast_context */ +#line 8286 "gram.y" + { CreateCastStmt *n = makeNode(CreateCastStmt); n->sourcetype = (yyvsp[-6].typnam); n->targettype = (yyvsp[-4].typnam); @@ -36969,30 +37461,30 @@ yyreduce: n->inout = true; (yyval.node) = (Node *)n; } -#line 36973 "gram.c" /* yacc.c:1652 */ +#line 37465 "gram.c" break; - case 1204: -#line 8297 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = COERCION_IMPLICIT; } -#line 36979 "gram.c" /* yacc.c:1652 */ + case 1204: /* cast_context: AS IMPLICIT_P */ +#line 8297 "gram.y" + { (yyval.ival) = COERCION_IMPLICIT; } +#line 37471 "gram.c" break; - case 1205: -#line 8298 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = COERCION_ASSIGNMENT; } -#line 36985 "gram.c" /* yacc.c:1652 */ + case 1205: /* cast_context: AS ASSIGNMENT */ +#line 8298 "gram.y" + { (yyval.ival) = COERCION_ASSIGNMENT; } +#line 37477 "gram.c" break; - case 1206: -#line 8299 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = COERCION_EXPLICIT; } -#line 36991 "gram.c" /* yacc.c:1652 */ + case 1206: /* cast_context: %empty */ +#line 8299 "gram.y" + { (yyval.ival) = COERCION_EXPLICIT; } +#line 37483 "gram.c" break; - case 1207: -#line 8304 "gram.y" /* yacc.c:1652 */ - { + case 1207: /* DropCastStmt: DROP CAST opt_if_exists '(' Typename AS Typename ')' opt_drop_behavior */ +#line 8304 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_CAST; n->objects = list_make1(list_make2((yyvsp[-4].typnam), (yyvsp[-2].typnam))); @@ -37001,24 +37493,24 @@ yyreduce: n->concurrent = false; (yyval.node) = (Node *)n; } -#line 37005 "gram.c" /* yacc.c:1652 */ +#line 37497 "gram.c" break; - case 1208: -#line 8315 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 37011 "gram.c" /* yacc.c:1652 */ + case 1208: /* opt_if_exists: IF_P EXISTS */ +#line 8315 "gram.y" + { (yyval.boolean) = true; } +#line 37503 "gram.c" break; - case 1209: -#line 8316 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 37017 "gram.c" /* yacc.c:1652 */ + case 1209: /* opt_if_exists: %empty */ +#line 8316 "gram.y" + { (yyval.boolean) = false; } +#line 37509 "gram.c" break; - case 1210: -#line 8327 "gram.y" /* yacc.c:1652 */ - { + case 1210: /* CreateTransformStmt: CREATE opt_or_replace TRANSFORM FOR Typename LANGUAGE name '(' transform_element_list ')' */ +#line 8327 "gram.y" + { CreateTransformStmt *n = makeNode(CreateTransformStmt); n->replace = (yyvsp[-8].boolean); n->type_name = (yyvsp[-5].typnam); @@ -37027,44 +37519,44 @@ yyreduce: n->tosql = lsecond((yyvsp[-1].list)); (yyval.node) = (Node *)n; } -#line 37031 "gram.c" /* yacc.c:1652 */ +#line 37523 "gram.c" break; - case 1211: -#line 8339 "gram.y" /* yacc.c:1652 */ - { + case 1211: /* transform_element_list: FROM SQL_P WITH FUNCTION function_with_argtypes ',' TO SQL_P WITH FUNCTION function_with_argtypes */ +#line 8339 "gram.y" + { (yyval.list) = list_make2((yyvsp[-6].objwithargs), (yyvsp[0].objwithargs)); } -#line 37039 "gram.c" /* yacc.c:1652 */ +#line 37531 "gram.c" break; - case 1212: -#line 8343 "gram.y" /* yacc.c:1652 */ - { + case 1212: /* transform_element_list: TO SQL_P WITH FUNCTION function_with_argtypes ',' FROM SQL_P WITH FUNCTION function_with_argtypes */ +#line 8343 "gram.y" + { (yyval.list) = list_make2((yyvsp[0].objwithargs), (yyvsp[-6].objwithargs)); } -#line 37047 "gram.c" /* yacc.c:1652 */ +#line 37539 "gram.c" break; - case 1213: -#line 8347 "gram.y" /* yacc.c:1652 */ - { + case 1213: /* transform_element_list: FROM SQL_P WITH FUNCTION function_with_argtypes */ +#line 8347 "gram.y" + { (yyval.list) = list_make2((yyvsp[0].objwithargs), NULL); } -#line 37055 "gram.c" /* yacc.c:1652 */ +#line 37547 "gram.c" break; - case 1214: -#line 8351 "gram.y" /* yacc.c:1652 */ - { + case 1214: /* transform_element_list: TO SQL_P WITH FUNCTION function_with_argtypes */ +#line 8351 "gram.y" + { (yyval.list) = list_make2(NULL, (yyvsp[0].objwithargs)); } -#line 37063 "gram.c" /* yacc.c:1652 */ +#line 37555 "gram.c" break; - case 1215: -#line 8358 "gram.y" /* yacc.c:1652 */ - { + case 1215: /* DropTransformStmt: DROP TRANSFORM opt_if_exists FOR Typename LANGUAGE name opt_drop_behavior */ +#line 8358 "gram.y" + { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_TRANSFORM; n->objects = list_make1(list_make2((yyvsp[-3].typnam), makeString((yyvsp[-1].str)))); @@ -37072,12 +37564,12 @@ yyreduce: n->missing_ok = (yyvsp[-5].boolean); (yyval.node) = (Node *)n; } -#line 37076 "gram.c" /* yacc.c:1652 */ +#line 37568 "gram.c" break; - case 1216: -#line 8378 "gram.y" /* yacc.c:1652 */ - { + case 1216: /* ReindexStmt: REINDEX reindex_target_type opt_concurrently qualified_name */ +#line 8378 "gram.y" + { ReindexStmt *n = makeNode(ReindexStmt); n->kind = (yyvsp[-2].ival); n->relation = (yyvsp[0].range); @@ -37088,12 +37580,12 @@ yyreduce: makeDefElem("concurrently", NULL, (yylsp[-1]))); (yyval.node) = (Node *)n; } -#line 37092 "gram.c" /* yacc.c:1652 */ +#line 37584 "gram.c" break; - case 1217: -#line 8390 "gram.y" /* yacc.c:1652 */ - { + case 1217: /* ReindexStmt: REINDEX reindex_target_multitable opt_concurrently name */ +#line 8390 "gram.y" + { ReindexStmt *n = makeNode(ReindexStmt); n->kind = (yyvsp[-2].ival); n->name = (yyvsp[0].str); @@ -37104,12 +37596,12 @@ yyreduce: makeDefElem("concurrently", NULL, (yylsp[-1]))); (yyval.node) = (Node *)n; } -#line 37108 "gram.c" /* yacc.c:1652 */ +#line 37600 "gram.c" break; - case 1218: -#line 8402 "gram.y" /* yacc.c:1652 */ - { + case 1218: /* ReindexStmt: REINDEX '(' utility_option_list ')' reindex_target_type opt_concurrently qualified_name */ +#line 8402 "gram.y" + { ReindexStmt *n = makeNode(ReindexStmt); n->kind = (yyvsp[-2].ival); n->relation = (yyvsp[0].range); @@ -37120,12 +37612,12 @@ yyreduce: makeDefElem("concurrently", NULL, (yylsp[-1]))); (yyval.node) = (Node *)n; } -#line 37124 "gram.c" /* yacc.c:1652 */ +#line 37616 "gram.c" break; - case 1219: -#line 8414 "gram.y" /* yacc.c:1652 */ - { + case 1219: /* ReindexStmt: REINDEX '(' utility_option_list ')' reindex_target_multitable opt_concurrently name */ +#line 8414 "gram.y" + { ReindexStmt *n = makeNode(ReindexStmt); n->kind = (yyvsp[-2].ival); n->name = (yyvsp[0].str); @@ -37136,42 +37628,42 @@ yyreduce: makeDefElem("concurrently", NULL, (yylsp[-1]))); (yyval.node) = (Node *)n; } -#line 37140 "gram.c" /* yacc.c:1652 */ +#line 37632 "gram.c" break; - case 1220: -#line 8427 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = REINDEX_OBJECT_INDEX; } -#line 37146 "gram.c" /* yacc.c:1652 */ + case 1220: /* reindex_target_type: INDEX */ +#line 8427 "gram.y" + { (yyval.ival) = REINDEX_OBJECT_INDEX; } +#line 37638 "gram.c" break; - case 1221: -#line 8428 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = REINDEX_OBJECT_TABLE; } -#line 37152 "gram.c" /* yacc.c:1652 */ + case 1221: /* reindex_target_type: TABLE */ +#line 8428 "gram.y" + { (yyval.ival) = REINDEX_OBJECT_TABLE; } +#line 37644 "gram.c" break; - case 1222: -#line 8431 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = REINDEX_OBJECT_SCHEMA; } -#line 37158 "gram.c" /* yacc.c:1652 */ + case 1222: /* reindex_target_multitable: SCHEMA */ +#line 8431 "gram.y" + { (yyval.ival) = REINDEX_OBJECT_SCHEMA; } +#line 37650 "gram.c" break; - case 1223: -#line 8432 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = REINDEX_OBJECT_SYSTEM; } -#line 37164 "gram.c" /* yacc.c:1652 */ + case 1223: /* reindex_target_multitable: SYSTEM_P */ +#line 8432 "gram.y" + { (yyval.ival) = REINDEX_OBJECT_SYSTEM; } +#line 37656 "gram.c" break; - case 1224: -#line 8433 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = REINDEX_OBJECT_DATABASE; } -#line 37170 "gram.c" /* yacc.c:1652 */ + case 1224: /* reindex_target_multitable: DATABASE */ +#line 8433 "gram.y" + { (yyval.ival) = REINDEX_OBJECT_DATABASE; } +#line 37662 "gram.c" break; - case 1225: -#line 8444 "gram.y" /* yacc.c:1652 */ - { + case 1225: /* AlterTblSpcStmt: ALTER TABLESPACE name SET reloptions */ +#line 8444 "gram.y" + { AlterTableSpaceOptionsStmt *n = makeNode(AlterTableSpaceOptionsStmt); n->tablespacename = (yyvsp[-2].str); @@ -37179,12 +37671,12 @@ yyreduce: n->isReset = false; (yyval.node) = (Node *)n; } -#line 37183 "gram.c" /* yacc.c:1652 */ +#line 37675 "gram.c" break; - case 1226: -#line 8453 "gram.y" /* yacc.c:1652 */ - { + case 1226: /* AlterTblSpcStmt: ALTER TABLESPACE name RESET reloptions */ +#line 8453 "gram.y" + { AlterTableSpaceOptionsStmt *n = makeNode(AlterTableSpaceOptionsStmt); n->tablespacename = (yyvsp[-2].str); @@ -37192,12 +37684,12 @@ yyreduce: n->isReset = true; (yyval.node) = (Node *)n; } -#line 37196 "gram.c" /* yacc.c:1652 */ +#line 37688 "gram.c" break; - case 1227: -#line 8470 "gram.y" /* yacc.c:1652 */ - { + case 1227: /* RenameStmt: ALTER AGGREGATE aggregate_with_argtypes RENAME TO name */ +#line 8470 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_AGGREGATE; n->object = (Node *) (yyvsp[-3].objwithargs); @@ -37205,12 +37697,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37209 "gram.c" /* yacc.c:1652 */ +#line 37701 "gram.c" break; - case 1228: -#line 8479 "gram.y" /* yacc.c:1652 */ - { + case 1228: /* RenameStmt: ALTER COLLATION any_name RENAME TO name */ +#line 8479 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_COLLATION; n->object = (Node *) (yyvsp[-3].list); @@ -37218,12 +37710,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37222 "gram.c" /* yacc.c:1652 */ +#line 37714 "gram.c" break; - case 1229: -#line 8488 "gram.y" /* yacc.c:1652 */ - { + case 1229: /* RenameStmt: ALTER CONVERSION_P any_name RENAME TO name */ +#line 8488 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_CONVERSION; n->object = (Node *) (yyvsp[-3].list); @@ -37231,12 +37723,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37235 "gram.c" /* yacc.c:1652 */ +#line 37727 "gram.c" break; - case 1230: -#line 8497 "gram.y" /* yacc.c:1652 */ - { + case 1230: /* RenameStmt: ALTER DATABASE name RENAME TO name */ +#line 8497 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_DATABASE; n->subname = (yyvsp[-3].str); @@ -37244,12 +37736,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37248 "gram.c" /* yacc.c:1652 */ +#line 37740 "gram.c" break; - case 1231: -#line 8506 "gram.y" /* yacc.c:1652 */ - { + case 1231: /* RenameStmt: ALTER DOMAIN_P any_name RENAME TO name */ +#line 8506 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_DOMAIN; n->object = (Node *) (yyvsp[-3].list); @@ -37257,12 +37749,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37261 "gram.c" /* yacc.c:1652 */ +#line 37753 "gram.c" break; - case 1232: -#line 8515 "gram.y" /* yacc.c:1652 */ - { + case 1232: /* RenameStmt: ALTER DOMAIN_P any_name RENAME CONSTRAINT name TO name */ +#line 8515 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_DOMCONSTRAINT; n->object = (Node *) (yyvsp[-5].list); @@ -37270,12 +37762,12 @@ yyreduce: n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 37274 "gram.c" /* yacc.c:1652 */ +#line 37766 "gram.c" break; - case 1233: -#line 8524 "gram.y" /* yacc.c:1652 */ - { + case 1233: /* RenameStmt: ALTER FOREIGN DATA_P WRAPPER name RENAME TO name */ +#line 8524 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_FDW; n->object = (Node *) makeString((yyvsp[-3].str)); @@ -37283,12 +37775,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37287 "gram.c" /* yacc.c:1652 */ +#line 37779 "gram.c" break; - case 1234: -#line 8533 "gram.y" /* yacc.c:1652 */ - { + case 1234: /* RenameStmt: ALTER FUNCTION function_with_argtypes RENAME TO name */ +#line 8533 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_FUNCTION; n->object = (Node *) (yyvsp[-3].objwithargs); @@ -37296,12 +37788,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37300 "gram.c" /* yacc.c:1652 */ +#line 37792 "gram.c" break; - case 1235: -#line 8542 "gram.y" /* yacc.c:1652 */ - { + case 1235: /* RenameStmt: ALTER GROUP_P RoleId RENAME TO RoleId */ +#line 8542 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_ROLE; n->subname = (yyvsp[-3].str); @@ -37309,12 +37801,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37313 "gram.c" /* yacc.c:1652 */ +#line 37805 "gram.c" break; - case 1236: -#line 8551 "gram.y" /* yacc.c:1652 */ - { + case 1236: /* RenameStmt: ALTER opt_procedural LANGUAGE name RENAME TO name */ +#line 8551 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_LANGUAGE; n->object = (Node *) makeString((yyvsp[-3].str)); @@ -37322,12 +37814,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37326 "gram.c" /* yacc.c:1652 */ +#line 37818 "gram.c" break; - case 1237: -#line 8560 "gram.y" /* yacc.c:1652 */ - { + case 1237: /* RenameStmt: ALTER OPERATOR CLASS any_name USING name RENAME TO name */ +#line 8560 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_OPCLASS; n->object = (Node *) lcons(makeString((yyvsp[-3].str)), (yyvsp[-5].list)); @@ -37335,12 +37827,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37339 "gram.c" /* yacc.c:1652 */ +#line 37831 "gram.c" break; - case 1238: -#line 8569 "gram.y" /* yacc.c:1652 */ - { + case 1238: /* RenameStmt: ALTER OPERATOR FAMILY any_name USING name RENAME TO name */ +#line 8569 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_OPFAMILY; n->object = (Node *) lcons(makeString((yyvsp[-3].str)), (yyvsp[-5].list)); @@ -37348,12 +37840,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37352 "gram.c" /* yacc.c:1652 */ +#line 37844 "gram.c" break; - case 1239: -#line 8578 "gram.y" /* yacc.c:1652 */ - { + case 1239: /* RenameStmt: ALTER POLICY name ON qualified_name RENAME TO name */ +#line 8578 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_POLICY; n->relation = (yyvsp[-3].range); @@ -37362,12 +37854,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37366 "gram.c" /* yacc.c:1652 */ +#line 37858 "gram.c" break; - case 1240: -#line 8588 "gram.y" /* yacc.c:1652 */ - { + case 1240: /* RenameStmt: ALTER POLICY IF_P EXISTS name ON qualified_name RENAME TO name */ +#line 8588 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_POLICY; n->relation = (yyvsp[-3].range); @@ -37376,12 +37868,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 37380 "gram.c" /* yacc.c:1652 */ +#line 37872 "gram.c" break; - case 1241: -#line 8598 "gram.y" /* yacc.c:1652 */ - { + case 1241: /* RenameStmt: ALTER PROCEDURE function_with_argtypes RENAME TO name */ +#line 8598 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_PROCEDURE; n->object = (Node *) (yyvsp[-3].objwithargs); @@ -37389,12 +37881,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37393 "gram.c" /* yacc.c:1652 */ +#line 37885 "gram.c" break; - case 1242: -#line 8607 "gram.y" /* yacc.c:1652 */ - { + case 1242: /* RenameStmt: ALTER PUBLICATION name RENAME TO name */ +#line 8607 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_PUBLICATION; n->object = (Node *) makeString((yyvsp[-3].str)); @@ -37402,12 +37894,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37406 "gram.c" /* yacc.c:1652 */ +#line 37898 "gram.c" break; - case 1243: -#line 8616 "gram.y" /* yacc.c:1652 */ - { + case 1243: /* RenameStmt: ALTER ROUTINE function_with_argtypes RENAME TO name */ +#line 8616 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_ROUTINE; n->object = (Node *) (yyvsp[-3].objwithargs); @@ -37415,12 +37907,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37419 "gram.c" /* yacc.c:1652 */ +#line 37911 "gram.c" break; - case 1244: -#line 8625 "gram.y" /* yacc.c:1652 */ - { + case 1244: /* RenameStmt: ALTER SCHEMA name RENAME TO name */ +#line 8625 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_SCHEMA; n->subname = (yyvsp[-3].str); @@ -37428,12 +37920,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37432 "gram.c" /* yacc.c:1652 */ +#line 37924 "gram.c" break; - case 1245: -#line 8634 "gram.y" /* yacc.c:1652 */ - { + case 1245: /* RenameStmt: ALTER SERVER name RENAME TO name */ +#line 8634 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_FOREIGN_SERVER; n->object = (Node *) makeString((yyvsp[-3].str)); @@ -37441,12 +37933,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37445 "gram.c" /* yacc.c:1652 */ +#line 37937 "gram.c" break; - case 1246: -#line 8643 "gram.y" /* yacc.c:1652 */ - { + case 1246: /* RenameStmt: ALTER SUBSCRIPTION name RENAME TO name */ +#line 8643 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_SUBSCRIPTION; n->object = (Node *) makeString((yyvsp[-3].str)); @@ -37454,12 +37946,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37458 "gram.c" /* yacc.c:1652 */ +#line 37950 "gram.c" break; - case 1247: -#line 8652 "gram.y" /* yacc.c:1652 */ - { + case 1247: /* RenameStmt: ALTER TABLE relation_expr RENAME TO name */ +#line 8652 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TABLE; n->relation = (yyvsp[-3].range); @@ -37468,12 +37960,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37472 "gram.c" /* yacc.c:1652 */ +#line 37964 "gram.c" break; - case 1248: -#line 8662 "gram.y" /* yacc.c:1652 */ - { + case 1248: /* RenameStmt: ALTER TABLE IF_P EXISTS relation_expr RENAME TO name */ +#line 8662 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TABLE; n->relation = (yyvsp[-3].range); @@ -37482,12 +37974,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 37486 "gram.c" /* yacc.c:1652 */ +#line 37978 "gram.c" break; - case 1249: -#line 8672 "gram.y" /* yacc.c:1652 */ - { + case 1249: /* RenameStmt: ALTER SEQUENCE qualified_name RENAME TO name */ +#line 8672 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_SEQUENCE; n->relation = (yyvsp[-3].range); @@ -37496,12 +37988,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37500 "gram.c" /* yacc.c:1652 */ +#line 37992 "gram.c" break; - case 1250: -#line 8682 "gram.y" /* yacc.c:1652 */ - { + case 1250: /* RenameStmt: ALTER SEQUENCE IF_P EXISTS qualified_name RENAME TO name */ +#line 8682 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_SEQUENCE; n->relation = (yyvsp[-3].range); @@ -37510,12 +38002,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 37514 "gram.c" /* yacc.c:1652 */ +#line 38006 "gram.c" break; - case 1251: -#line 8692 "gram.y" /* yacc.c:1652 */ - { + case 1251: /* RenameStmt: ALTER VIEW qualified_name RENAME TO name */ +#line 8692 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_VIEW; n->relation = (yyvsp[-3].range); @@ -37524,12 +38016,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37528 "gram.c" /* yacc.c:1652 */ +#line 38020 "gram.c" break; - case 1252: -#line 8702 "gram.y" /* yacc.c:1652 */ - { + case 1252: /* RenameStmt: ALTER VIEW IF_P EXISTS qualified_name RENAME TO name */ +#line 8702 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_VIEW; n->relation = (yyvsp[-3].range); @@ -37538,12 +38030,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 37542 "gram.c" /* yacc.c:1652 */ +#line 38034 "gram.c" break; - case 1253: -#line 8712 "gram.y" /* yacc.c:1652 */ - { + case 1253: /* RenameStmt: ALTER MATERIALIZED VIEW qualified_name RENAME TO name */ +#line 8712 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_MATVIEW; n->relation = (yyvsp[-3].range); @@ -37552,12 +38044,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37556 "gram.c" /* yacc.c:1652 */ +#line 38048 "gram.c" break; - case 1254: -#line 8722 "gram.y" /* yacc.c:1652 */ - { + case 1254: /* RenameStmt: ALTER MATERIALIZED VIEW IF_P EXISTS qualified_name RENAME TO name */ +#line 8722 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_MATVIEW; n->relation = (yyvsp[-3].range); @@ -37566,12 +38058,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 37570 "gram.c" /* yacc.c:1652 */ +#line 38062 "gram.c" break; - case 1255: -#line 8732 "gram.y" /* yacc.c:1652 */ - { + case 1255: /* RenameStmt: ALTER INDEX qualified_name RENAME TO name */ +#line 8732 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_INDEX; n->relation = (yyvsp[-3].range); @@ -37580,12 +38072,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37584 "gram.c" /* yacc.c:1652 */ +#line 38076 "gram.c" break; - case 1256: -#line 8742 "gram.y" /* yacc.c:1652 */ - { + case 1256: /* RenameStmt: ALTER INDEX IF_P EXISTS qualified_name RENAME TO name */ +#line 8742 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_INDEX; n->relation = (yyvsp[-3].range); @@ -37594,12 +38086,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 37598 "gram.c" /* yacc.c:1652 */ +#line 38090 "gram.c" break; - case 1257: -#line 8752 "gram.y" /* yacc.c:1652 */ - { + case 1257: /* RenameStmt: ALTER FOREIGN TABLE relation_expr RENAME TO name */ +#line 8752 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_FOREIGN_TABLE; n->relation = (yyvsp[-3].range); @@ -37608,12 +38100,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37612 "gram.c" /* yacc.c:1652 */ +#line 38104 "gram.c" break; - case 1258: -#line 8762 "gram.y" /* yacc.c:1652 */ - { + case 1258: /* RenameStmt: ALTER FOREIGN TABLE IF_P EXISTS relation_expr RENAME TO name */ +#line 8762 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_FOREIGN_TABLE; n->relation = (yyvsp[-3].range); @@ -37622,12 +38114,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 37626 "gram.c" /* yacc.c:1652 */ +#line 38118 "gram.c" break; - case 1259: -#line 8772 "gram.y" /* yacc.c:1652 */ - { + case 1259: /* RenameStmt: ALTER TABLE relation_expr RENAME opt_column name TO name */ +#line 8772 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_COLUMN; n->relationType = OBJECT_TABLE; @@ -37637,12 +38129,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37641 "gram.c" /* yacc.c:1652 */ +#line 38133 "gram.c" break; - case 1260: -#line 8783 "gram.y" /* yacc.c:1652 */ - { + case 1260: /* RenameStmt: ALTER TABLE IF_P EXISTS relation_expr RENAME opt_column name TO name */ +#line 8783 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_COLUMN; n->relationType = OBJECT_TABLE; @@ -37652,12 +38144,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 37656 "gram.c" /* yacc.c:1652 */ +#line 38148 "gram.c" break; - case 1261: -#line 8794 "gram.y" /* yacc.c:1652 */ - { + case 1261: /* RenameStmt: ALTER VIEW qualified_name RENAME opt_column name TO name */ +#line 8794 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_COLUMN; n->relationType = OBJECT_VIEW; @@ -37667,12 +38159,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37671 "gram.c" /* yacc.c:1652 */ +#line 38163 "gram.c" break; - case 1262: -#line 8805 "gram.y" /* yacc.c:1652 */ - { + case 1262: /* RenameStmt: ALTER VIEW IF_P EXISTS qualified_name RENAME opt_column name TO name */ +#line 8805 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_COLUMN; n->relationType = OBJECT_VIEW; @@ -37682,12 +38174,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 37686 "gram.c" /* yacc.c:1652 */ +#line 38178 "gram.c" break; - case 1263: -#line 8816 "gram.y" /* yacc.c:1652 */ - { + case 1263: /* RenameStmt: ALTER MATERIALIZED VIEW qualified_name RENAME opt_column name TO name */ +#line 8816 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_COLUMN; n->relationType = OBJECT_MATVIEW; @@ -37697,12 +38189,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37701 "gram.c" /* yacc.c:1652 */ +#line 38193 "gram.c" break; - case 1264: -#line 8827 "gram.y" /* yacc.c:1652 */ - { + case 1264: /* RenameStmt: ALTER MATERIALIZED VIEW IF_P EXISTS qualified_name RENAME opt_column name TO name */ +#line 8827 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_COLUMN; n->relationType = OBJECT_MATVIEW; @@ -37712,12 +38204,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 37716 "gram.c" /* yacc.c:1652 */ +#line 38208 "gram.c" break; - case 1265: -#line 8838 "gram.y" /* yacc.c:1652 */ - { + case 1265: /* RenameStmt: ALTER TABLE relation_expr RENAME CONSTRAINT name TO name */ +#line 8838 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TABCONSTRAINT; n->relation = (yyvsp[-5].range); @@ -37726,12 +38218,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37730 "gram.c" /* yacc.c:1652 */ +#line 38222 "gram.c" break; - case 1266: -#line 8848 "gram.y" /* yacc.c:1652 */ - { + case 1266: /* RenameStmt: ALTER TABLE IF_P EXISTS relation_expr RENAME CONSTRAINT name TO name */ +#line 8848 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TABCONSTRAINT; n->relation = (yyvsp[-5].range); @@ -37740,12 +38232,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 37744 "gram.c" /* yacc.c:1652 */ +#line 38236 "gram.c" break; - case 1267: -#line 8858 "gram.y" /* yacc.c:1652 */ - { + case 1267: /* RenameStmt: ALTER FOREIGN TABLE relation_expr RENAME opt_column name TO name */ +#line 8858 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_COLUMN; n->relationType = OBJECT_FOREIGN_TABLE; @@ -37755,12 +38247,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37759 "gram.c" /* yacc.c:1652 */ +#line 38251 "gram.c" break; - case 1268: -#line 8869 "gram.y" /* yacc.c:1652 */ - { + case 1268: /* RenameStmt: ALTER FOREIGN TABLE IF_P EXISTS relation_expr RENAME opt_column name TO name */ +#line 8869 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_COLUMN; n->relationType = OBJECT_FOREIGN_TABLE; @@ -37770,12 +38262,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 37774 "gram.c" /* yacc.c:1652 */ +#line 38266 "gram.c" break; - case 1269: -#line 8880 "gram.y" /* yacc.c:1652 */ - { + case 1269: /* RenameStmt: ALTER RULE name ON qualified_name RENAME TO name */ +#line 8880 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_RULE; n->relation = (yyvsp[-3].range); @@ -37784,12 +38276,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37788 "gram.c" /* yacc.c:1652 */ +#line 38280 "gram.c" break; - case 1270: -#line 8890 "gram.y" /* yacc.c:1652 */ - { + case 1270: /* RenameStmt: ALTER TRIGGER name ON qualified_name RENAME TO name */ +#line 8890 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TRIGGER; n->relation = (yyvsp[-3].range); @@ -37798,24 +38290,24 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37802 "gram.c" /* yacc.c:1652 */ +#line 38294 "gram.c" break; - case 1271: -#line 8900 "gram.y" /* yacc.c:1652 */ - { + case 1271: /* RenameStmt: ALTER EVENT TRIGGER name RENAME TO name */ +#line 8900 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_EVENT_TRIGGER; n->object = (Node *) makeString((yyvsp[-3].str)); n->newname = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 37814 "gram.c" /* yacc.c:1652 */ +#line 38306 "gram.c" break; - case 1272: -#line 8908 "gram.y" /* yacc.c:1652 */ - { + case 1272: /* RenameStmt: ALTER ROLE RoleId RENAME TO RoleId */ +#line 8908 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_ROLE; n->subname = (yyvsp[-3].str); @@ -37823,12 +38315,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37827 "gram.c" /* yacc.c:1652 */ +#line 38319 "gram.c" break; - case 1273: -#line 8917 "gram.y" /* yacc.c:1652 */ - { + case 1273: /* RenameStmt: ALTER USER RoleId RENAME TO RoleId */ +#line 8917 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_ROLE; n->subname = (yyvsp[-3].str); @@ -37836,12 +38328,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37840 "gram.c" /* yacc.c:1652 */ +#line 38332 "gram.c" break; - case 1274: -#line 8926 "gram.y" /* yacc.c:1652 */ - { + case 1274: /* RenameStmt: ALTER TABLESPACE name RENAME TO name */ +#line 8926 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TABLESPACE; n->subname = (yyvsp[-3].str); @@ -37849,12 +38341,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37853 "gram.c" /* yacc.c:1652 */ +#line 38345 "gram.c" break; - case 1275: -#line 8935 "gram.y" /* yacc.c:1652 */ - { + case 1275: /* RenameStmt: ALTER STATISTICS any_name RENAME TO name */ +#line 8935 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_STATISTIC_EXT; n->object = (Node *) (yyvsp[-3].list); @@ -37862,12 +38354,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37866 "gram.c" /* yacc.c:1652 */ +#line 38358 "gram.c" break; - case 1276: -#line 8944 "gram.y" /* yacc.c:1652 */ - { + case 1276: /* RenameStmt: ALTER TEXT_P SEARCH PARSER any_name RENAME TO name */ +#line 8944 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TSPARSER; n->object = (Node *) (yyvsp[-3].list); @@ -37875,12 +38367,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37879 "gram.c" /* yacc.c:1652 */ +#line 38371 "gram.c" break; - case 1277: -#line 8953 "gram.y" /* yacc.c:1652 */ - { + case 1277: /* RenameStmt: ALTER TEXT_P SEARCH DICTIONARY any_name RENAME TO name */ +#line 8953 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TSDICTIONARY; n->object = (Node *) (yyvsp[-3].list); @@ -37888,12 +38380,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37892 "gram.c" /* yacc.c:1652 */ +#line 38384 "gram.c" break; - case 1278: -#line 8962 "gram.y" /* yacc.c:1652 */ - { + case 1278: /* RenameStmt: ALTER TEXT_P SEARCH TEMPLATE any_name RENAME TO name */ +#line 8962 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TSTEMPLATE; n->object = (Node *) (yyvsp[-3].list); @@ -37901,12 +38393,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37905 "gram.c" /* yacc.c:1652 */ +#line 38397 "gram.c" break; - case 1279: -#line 8971 "gram.y" /* yacc.c:1652 */ - { + case 1279: /* RenameStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name RENAME TO name */ +#line 8971 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TSCONFIGURATION; n->object = (Node *) (yyvsp[-3].list); @@ -37914,12 +38406,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37918 "gram.c" /* yacc.c:1652 */ +#line 38410 "gram.c" break; - case 1280: -#line 8980 "gram.y" /* yacc.c:1652 */ - { + case 1280: /* RenameStmt: ALTER TYPE_P any_name RENAME TO name */ +#line 8980 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_TYPE; n->object = (Node *) (yyvsp[-3].list); @@ -37927,12 +38419,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37931 "gram.c" /* yacc.c:1652 */ +#line 38423 "gram.c" break; - case 1281: -#line 8989 "gram.y" /* yacc.c:1652 */ - { + case 1281: /* RenameStmt: ALTER TYPE_P any_name RENAME ATTRIBUTE name TO name opt_drop_behavior */ +#line 8989 "gram.y" + { RenameStmt *n = makeNode(RenameStmt); n->renameType = OBJECT_ATTRIBUTE; n->relationType = OBJECT_TYPE; @@ -37943,24 +38435,24 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 37947 "gram.c" /* yacc.c:1652 */ +#line 38439 "gram.c" break; - case 1284: -#line 9006 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = 1; } -#line 37953 "gram.c" /* yacc.c:1652 */ + case 1284: /* opt_set_data: SET DATA_P */ +#line 9006 "gram.y" + { (yyval.ival) = 1; } +#line 38445 "gram.c" break; - case 1285: -#line 9007 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = 0; } -#line 37959 "gram.c" /* yacc.c:1652 */ + case 1285: /* opt_set_data: %empty */ +#line 9007 "gram.y" + { (yyval.ival) = 0; } +#line 38451 "gram.c" break; - case 1286: -#line 9018 "gram.y" /* yacc.c:1652 */ - { + case 1286: /* AlterObjectDependsStmt: ALTER FUNCTION function_with_argtypes opt_no DEPENDS ON EXTENSION name */ +#line 9018 "gram.y" + { AlterObjectDependsStmt *n = makeNode(AlterObjectDependsStmt); n->objectType = OBJECT_FUNCTION; n->object = (Node *) (yyvsp[-5].objwithargs); @@ -37968,12 +38460,12 @@ yyreduce: n->remove = (yyvsp[-4].boolean); (yyval.node) = (Node *)n; } -#line 37972 "gram.c" /* yacc.c:1652 */ +#line 38464 "gram.c" break; - case 1287: -#line 9027 "gram.y" /* yacc.c:1652 */ - { + case 1287: /* AlterObjectDependsStmt: ALTER PROCEDURE function_with_argtypes opt_no DEPENDS ON EXTENSION name */ +#line 9027 "gram.y" + { AlterObjectDependsStmt *n = makeNode(AlterObjectDependsStmt); n->objectType = OBJECT_PROCEDURE; n->object = (Node *) (yyvsp[-5].objwithargs); @@ -37981,12 +38473,12 @@ yyreduce: n->remove = (yyvsp[-4].boolean); (yyval.node) = (Node *)n; } -#line 37985 "gram.c" /* yacc.c:1652 */ +#line 38477 "gram.c" break; - case 1288: -#line 9036 "gram.y" /* yacc.c:1652 */ - { + case 1288: /* AlterObjectDependsStmt: ALTER ROUTINE function_with_argtypes opt_no DEPENDS ON EXTENSION name */ +#line 9036 "gram.y" + { AlterObjectDependsStmt *n = makeNode(AlterObjectDependsStmt); n->objectType = OBJECT_ROUTINE; n->object = (Node *) (yyvsp[-5].objwithargs); @@ -37994,12 +38486,12 @@ yyreduce: n->remove = (yyvsp[-4].boolean); (yyval.node) = (Node *)n; } -#line 37998 "gram.c" /* yacc.c:1652 */ +#line 38490 "gram.c" break; - case 1289: -#line 9045 "gram.y" /* yacc.c:1652 */ - { + case 1289: /* AlterObjectDependsStmt: ALTER TRIGGER name ON qualified_name opt_no DEPENDS ON EXTENSION name */ +#line 9045 "gram.y" + { AlterObjectDependsStmt *n = makeNode(AlterObjectDependsStmt); n->objectType = OBJECT_TRIGGER; n->relation = (yyvsp[-5].range); @@ -38008,12 +38500,12 @@ yyreduce: n->remove = (yyvsp[-4].boolean); (yyval.node) = (Node *)n; } -#line 38012 "gram.c" /* yacc.c:1652 */ +#line 38504 "gram.c" break; - case 1290: -#line 9055 "gram.y" /* yacc.c:1652 */ - { + case 1290: /* AlterObjectDependsStmt: ALTER MATERIALIZED VIEW qualified_name opt_no DEPENDS ON EXTENSION name */ +#line 9055 "gram.y" + { AlterObjectDependsStmt *n = makeNode(AlterObjectDependsStmt); n->objectType = OBJECT_MATVIEW; n->relation = (yyvsp[-5].range); @@ -38021,12 +38513,12 @@ yyreduce: n->remove = (yyvsp[-4].boolean); (yyval.node) = (Node *)n; } -#line 38025 "gram.c" /* yacc.c:1652 */ +#line 38517 "gram.c" break; - case 1291: -#line 9064 "gram.y" /* yacc.c:1652 */ - { + case 1291: /* AlterObjectDependsStmt: ALTER INDEX qualified_name opt_no DEPENDS ON EXTENSION name */ +#line 9064 "gram.y" + { AlterObjectDependsStmt *n = makeNode(AlterObjectDependsStmt); n->objectType = OBJECT_INDEX; n->relation = (yyvsp[-5].range); @@ -38034,24 +38526,24 @@ yyreduce: n->remove = (yyvsp[-4].boolean); (yyval.node) = (Node *)n; } -#line 38038 "gram.c" /* yacc.c:1652 */ +#line 38530 "gram.c" break; - case 1292: -#line 9074 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 38044 "gram.c" /* yacc.c:1652 */ + case 1292: /* opt_no: NO */ +#line 9074 "gram.y" + { (yyval.boolean) = true; } +#line 38536 "gram.c" break; - case 1293: -#line 9075 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 38050 "gram.c" /* yacc.c:1652 */ + case 1293: /* opt_no: %empty */ +#line 9075 "gram.y" + { (yyval.boolean) = false; } +#line 38542 "gram.c" break; - case 1294: -#line 9086 "gram.y" /* yacc.c:1652 */ - { + case 1294: /* AlterObjectSchemaStmt: ALTER AGGREGATE aggregate_with_argtypes SET SCHEMA name */ +#line 9086 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_AGGREGATE; n->object = (Node *) (yyvsp[-3].objwithargs); @@ -38059,12 +38551,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38063 "gram.c" /* yacc.c:1652 */ +#line 38555 "gram.c" break; - case 1295: -#line 9095 "gram.y" /* yacc.c:1652 */ - { + case 1295: /* AlterObjectSchemaStmt: ALTER COLLATION any_name SET SCHEMA name */ +#line 9095 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_COLLATION; n->object = (Node *) (yyvsp[-3].list); @@ -38072,12 +38564,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38076 "gram.c" /* yacc.c:1652 */ +#line 38568 "gram.c" break; - case 1296: -#line 9104 "gram.y" /* yacc.c:1652 */ - { + case 1296: /* AlterObjectSchemaStmt: ALTER CONVERSION_P any_name SET SCHEMA name */ +#line 9104 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_CONVERSION; n->object = (Node *) (yyvsp[-3].list); @@ -38085,12 +38577,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38089 "gram.c" /* yacc.c:1652 */ +#line 38581 "gram.c" break; - case 1297: -#line 9113 "gram.y" /* yacc.c:1652 */ - { + case 1297: /* AlterObjectSchemaStmt: ALTER DOMAIN_P any_name SET SCHEMA name */ +#line 9113 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_DOMAIN; n->object = (Node *) (yyvsp[-3].list); @@ -38098,12 +38590,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38102 "gram.c" /* yacc.c:1652 */ +#line 38594 "gram.c" break; - case 1298: -#line 9122 "gram.y" /* yacc.c:1652 */ - { + case 1298: /* AlterObjectSchemaStmt: ALTER EXTENSION name SET SCHEMA name */ +#line 9122 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_EXTENSION; n->object = (Node *) makeString((yyvsp[-3].str)); @@ -38111,12 +38603,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38115 "gram.c" /* yacc.c:1652 */ +#line 38607 "gram.c" break; - case 1299: -#line 9131 "gram.y" /* yacc.c:1652 */ - { + case 1299: /* AlterObjectSchemaStmt: ALTER FUNCTION function_with_argtypes SET SCHEMA name */ +#line 9131 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_FUNCTION; n->object = (Node *) (yyvsp[-3].objwithargs); @@ -38124,12 +38616,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38128 "gram.c" /* yacc.c:1652 */ +#line 38620 "gram.c" break; - case 1300: -#line 9140 "gram.y" /* yacc.c:1652 */ - { + case 1300: /* AlterObjectSchemaStmt: ALTER OPERATOR operator_with_argtypes SET SCHEMA name */ +#line 9140 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_OPERATOR; n->object = (Node *) (yyvsp[-3].objwithargs); @@ -38137,12 +38629,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38141 "gram.c" /* yacc.c:1652 */ +#line 38633 "gram.c" break; - case 1301: -#line 9149 "gram.y" /* yacc.c:1652 */ - { + case 1301: /* AlterObjectSchemaStmt: ALTER OPERATOR CLASS any_name USING name SET SCHEMA name */ +#line 9149 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_OPCLASS; n->object = (Node *) lcons(makeString((yyvsp[-3].str)), (yyvsp[-5].list)); @@ -38150,12 +38642,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38154 "gram.c" /* yacc.c:1652 */ +#line 38646 "gram.c" break; - case 1302: -#line 9158 "gram.y" /* yacc.c:1652 */ - { + case 1302: /* AlterObjectSchemaStmt: ALTER OPERATOR FAMILY any_name USING name SET SCHEMA name */ +#line 9158 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_OPFAMILY; n->object = (Node *) lcons(makeString((yyvsp[-3].str)), (yyvsp[-5].list)); @@ -38163,12 +38655,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38167 "gram.c" /* yacc.c:1652 */ +#line 38659 "gram.c" break; - case 1303: -#line 9167 "gram.y" /* yacc.c:1652 */ - { + case 1303: /* AlterObjectSchemaStmt: ALTER PROCEDURE function_with_argtypes SET SCHEMA name */ +#line 9167 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_PROCEDURE; n->object = (Node *) (yyvsp[-3].objwithargs); @@ -38176,12 +38668,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38180 "gram.c" /* yacc.c:1652 */ +#line 38672 "gram.c" break; - case 1304: -#line 9176 "gram.y" /* yacc.c:1652 */ - { + case 1304: /* AlterObjectSchemaStmt: ALTER ROUTINE function_with_argtypes SET SCHEMA name */ +#line 9176 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_ROUTINE; n->object = (Node *) (yyvsp[-3].objwithargs); @@ -38189,12 +38681,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38193 "gram.c" /* yacc.c:1652 */ +#line 38685 "gram.c" break; - case 1305: -#line 9185 "gram.y" /* yacc.c:1652 */ - { + case 1305: /* AlterObjectSchemaStmt: ALTER TABLE relation_expr SET SCHEMA name */ +#line 9185 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_TABLE; n->relation = (yyvsp[-3].range); @@ -38202,12 +38694,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38206 "gram.c" /* yacc.c:1652 */ +#line 38698 "gram.c" break; - case 1306: -#line 9194 "gram.y" /* yacc.c:1652 */ - { + case 1306: /* AlterObjectSchemaStmt: ALTER TABLE IF_P EXISTS relation_expr SET SCHEMA name */ +#line 9194 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_TABLE; n->relation = (yyvsp[-3].range); @@ -38215,12 +38707,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 38219 "gram.c" /* yacc.c:1652 */ +#line 38711 "gram.c" break; - case 1307: -#line 9203 "gram.y" /* yacc.c:1652 */ - { + case 1307: /* AlterObjectSchemaStmt: ALTER STATISTICS any_name SET SCHEMA name */ +#line 9203 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_STATISTIC_EXT; n->object = (Node *) (yyvsp[-3].list); @@ -38228,12 +38720,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38232 "gram.c" /* yacc.c:1652 */ +#line 38724 "gram.c" break; - case 1308: -#line 9212 "gram.y" /* yacc.c:1652 */ - { + case 1308: /* AlterObjectSchemaStmt: ALTER TEXT_P SEARCH PARSER any_name SET SCHEMA name */ +#line 9212 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_TSPARSER; n->object = (Node *) (yyvsp[-3].list); @@ -38241,12 +38733,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38245 "gram.c" /* yacc.c:1652 */ +#line 38737 "gram.c" break; - case 1309: -#line 9221 "gram.y" /* yacc.c:1652 */ - { + case 1309: /* AlterObjectSchemaStmt: ALTER TEXT_P SEARCH DICTIONARY any_name SET SCHEMA name */ +#line 9221 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_TSDICTIONARY; n->object = (Node *) (yyvsp[-3].list); @@ -38254,12 +38746,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38258 "gram.c" /* yacc.c:1652 */ +#line 38750 "gram.c" break; - case 1310: -#line 9230 "gram.y" /* yacc.c:1652 */ - { + case 1310: /* AlterObjectSchemaStmt: ALTER TEXT_P SEARCH TEMPLATE any_name SET SCHEMA name */ +#line 9230 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_TSTEMPLATE; n->object = (Node *) (yyvsp[-3].list); @@ -38267,12 +38759,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38271 "gram.c" /* yacc.c:1652 */ +#line 38763 "gram.c" break; - case 1311: -#line 9239 "gram.y" /* yacc.c:1652 */ - { + case 1311: /* AlterObjectSchemaStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name SET SCHEMA name */ +#line 9239 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_TSCONFIGURATION; n->object = (Node *) (yyvsp[-3].list); @@ -38280,12 +38772,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38284 "gram.c" /* yacc.c:1652 */ +#line 38776 "gram.c" break; - case 1312: -#line 9248 "gram.y" /* yacc.c:1652 */ - { + case 1312: /* AlterObjectSchemaStmt: ALTER SEQUENCE qualified_name SET SCHEMA name */ +#line 9248 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_SEQUENCE; n->relation = (yyvsp[-3].range); @@ -38293,12 +38785,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38297 "gram.c" /* yacc.c:1652 */ +#line 38789 "gram.c" break; - case 1313: -#line 9257 "gram.y" /* yacc.c:1652 */ - { + case 1313: /* AlterObjectSchemaStmt: ALTER SEQUENCE IF_P EXISTS qualified_name SET SCHEMA name */ +#line 9257 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_SEQUENCE; n->relation = (yyvsp[-3].range); @@ -38306,12 +38798,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 38310 "gram.c" /* yacc.c:1652 */ +#line 38802 "gram.c" break; - case 1314: -#line 9266 "gram.y" /* yacc.c:1652 */ - { + case 1314: /* AlterObjectSchemaStmt: ALTER VIEW qualified_name SET SCHEMA name */ +#line 9266 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_VIEW; n->relation = (yyvsp[-3].range); @@ -38319,12 +38811,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38323 "gram.c" /* yacc.c:1652 */ +#line 38815 "gram.c" break; - case 1315: -#line 9275 "gram.y" /* yacc.c:1652 */ - { + case 1315: /* AlterObjectSchemaStmt: ALTER VIEW IF_P EXISTS qualified_name SET SCHEMA name */ +#line 9275 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_VIEW; n->relation = (yyvsp[-3].range); @@ -38332,12 +38824,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 38336 "gram.c" /* yacc.c:1652 */ +#line 38828 "gram.c" break; - case 1316: -#line 9284 "gram.y" /* yacc.c:1652 */ - { + case 1316: /* AlterObjectSchemaStmt: ALTER MATERIALIZED VIEW qualified_name SET SCHEMA name */ +#line 9284 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_MATVIEW; n->relation = (yyvsp[-3].range); @@ -38345,12 +38837,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38349 "gram.c" /* yacc.c:1652 */ +#line 38841 "gram.c" break; - case 1317: -#line 9293 "gram.y" /* yacc.c:1652 */ - { + case 1317: /* AlterObjectSchemaStmt: ALTER MATERIALIZED VIEW IF_P EXISTS qualified_name SET SCHEMA name */ +#line 9293 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_MATVIEW; n->relation = (yyvsp[-3].range); @@ -38358,12 +38850,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 38362 "gram.c" /* yacc.c:1652 */ +#line 38854 "gram.c" break; - case 1318: -#line 9302 "gram.y" /* yacc.c:1652 */ - { + case 1318: /* AlterObjectSchemaStmt: ALTER FOREIGN TABLE relation_expr SET SCHEMA name */ +#line 9302 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_FOREIGN_TABLE; n->relation = (yyvsp[-3].range); @@ -38371,12 +38863,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38375 "gram.c" /* yacc.c:1652 */ +#line 38867 "gram.c" break; - case 1319: -#line 9311 "gram.y" /* yacc.c:1652 */ - { + case 1319: /* AlterObjectSchemaStmt: ALTER FOREIGN TABLE IF_P EXISTS relation_expr SET SCHEMA name */ +#line 9311 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_FOREIGN_TABLE; n->relation = (yyvsp[-3].range); @@ -38384,12 +38876,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 38388 "gram.c" /* yacc.c:1652 */ +#line 38880 "gram.c" break; - case 1320: -#line 9320 "gram.y" /* yacc.c:1652 */ - { + case 1320: /* AlterObjectSchemaStmt: ALTER TYPE_P any_name SET SCHEMA name */ +#line 9320 "gram.y" + { AlterObjectSchemaStmt *n = makeNode(AlterObjectSchemaStmt); n->objectType = OBJECT_TYPE; n->object = (Node *) (yyvsp[-3].list); @@ -38397,376 +38889,376 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 38401 "gram.c" /* yacc.c:1652 */ +#line 38893 "gram.c" break; - case 1321: -#line 9338 "gram.y" /* yacc.c:1652 */ - { + case 1321: /* AlterOperatorStmt: ALTER OPERATOR operator_with_argtypes SET '(' operator_def_list ')' */ +#line 9338 "gram.y" + { AlterOperatorStmt *n = makeNode(AlterOperatorStmt); n->opername = (yyvsp[-4].objwithargs); n->options = (yyvsp[-1].list); (yyval.node) = (Node *)n; } -#line 38412 "gram.c" /* yacc.c:1652 */ +#line 38904 "gram.c" break; - case 1322: -#line 9346 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 38418 "gram.c" /* yacc.c:1652 */ + case 1322: /* operator_def_list: operator_def_elem */ +#line 9346 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } +#line 38910 "gram.c" break; - case 1323: -#line 9347 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } -#line 38424 "gram.c" /* yacc.c:1652 */ + case 1323: /* operator_def_list: operator_def_list ',' operator_def_elem */ +#line 9347 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } +#line 38916 "gram.c" break; - case 1324: -#line 9351 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = makeDefElem((yyvsp[-2].str), NULL, (yylsp[-2])); } -#line 38430 "gram.c" /* yacc.c:1652 */ + case 1324: /* operator_def_elem: ColLabel '=' NONE */ +#line 9351 "gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[-2].str), NULL, (yylsp[-2])); } +#line 38922 "gram.c" break; - case 1325: -#line 9353 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = makeDefElem((yyvsp[-2].str), (Node *) (yyvsp[0].node), (yylsp[-2])); } -#line 38436 "gram.c" /* yacc.c:1652 */ + case 1325: /* operator_def_elem: ColLabel '=' operator_def_arg */ +#line 9353 "gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[-2].str), (Node *) (yyvsp[0].node), (yylsp[-2])); } +#line 38928 "gram.c" break; - case 1326: -#line 9358 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *)(yyvsp[0].typnam); } -#line 38442 "gram.c" /* yacc.c:1652 */ + case 1326: /* operator_def_arg: func_type */ +#line 9358 "gram.y" + { (yyval.node) = (Node *)(yyvsp[0].typnam); } +#line 38934 "gram.c" break; - case 1327: -#line 9359 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *)makeString(pstrdup((yyvsp[0].keyword))); } -#line 38448 "gram.c" /* yacc.c:1652 */ + case 1327: /* operator_def_arg: reserved_keyword */ +#line 9359 "gram.y" + { (yyval.node) = (Node *)makeString(pstrdup((yyvsp[0].keyword))); } +#line 38940 "gram.c" break; - case 1328: -#line 9360 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *)(yyvsp[0].list); } -#line 38454 "gram.c" /* yacc.c:1652 */ + case 1328: /* operator_def_arg: qual_all_Op */ +#line 9360 "gram.y" + { (yyval.node) = (Node *)(yyvsp[0].list); } +#line 38946 "gram.c" break; - case 1329: -#line 9361 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *)(yyvsp[0].value); } -#line 38460 "gram.c" /* yacc.c:1652 */ + case 1329: /* operator_def_arg: NumericOnly */ +#line 9361 "gram.y" + { (yyval.node) = (Node *)(yyvsp[0].value); } +#line 38952 "gram.c" break; - case 1330: -#line 9362 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *)makeString((yyvsp[0].str)); } -#line 38466 "gram.c" /* yacc.c:1652 */ + case 1330: /* operator_def_arg: Sconst */ +#line 9362 "gram.y" + { (yyval.node) = (Node *)makeString((yyvsp[0].str)); } +#line 38958 "gram.c" break; - case 1331: -#line 9375 "gram.y" /* yacc.c:1652 */ - { + case 1331: /* AlterTypeStmt: ALTER TYPE_P any_name SET '(' operator_def_list ')' */ +#line 9375 "gram.y" + { AlterTypeStmt *n = makeNode(AlterTypeStmt); n->typeName = (yyvsp[-4].list); n->options = (yyvsp[-1].list); (yyval.node) = (Node *)n; } -#line 38477 "gram.c" /* yacc.c:1652 */ +#line 38969 "gram.c" break; - case 1332: -#line 9390 "gram.y" /* yacc.c:1652 */ - { + case 1332: /* AlterOwnerStmt: ALTER AGGREGATE aggregate_with_argtypes OWNER TO RoleSpec */ +#line 9390 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_AGGREGATE; n->object = (Node *) (yyvsp[-3].objwithargs); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38489 "gram.c" /* yacc.c:1652 */ +#line 38981 "gram.c" break; - case 1333: -#line 9398 "gram.y" /* yacc.c:1652 */ - { + case 1333: /* AlterOwnerStmt: ALTER COLLATION any_name OWNER TO RoleSpec */ +#line 9398 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_COLLATION; n->object = (Node *) (yyvsp[-3].list); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38501 "gram.c" /* yacc.c:1652 */ +#line 38993 "gram.c" break; - case 1334: -#line 9406 "gram.y" /* yacc.c:1652 */ - { + case 1334: /* AlterOwnerStmt: ALTER CONVERSION_P any_name OWNER TO RoleSpec */ +#line 9406 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_CONVERSION; n->object = (Node *) (yyvsp[-3].list); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38513 "gram.c" /* yacc.c:1652 */ +#line 39005 "gram.c" break; - case 1335: -#line 9414 "gram.y" /* yacc.c:1652 */ - { + case 1335: /* AlterOwnerStmt: ALTER DATABASE name OWNER TO RoleSpec */ +#line 9414 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_DATABASE; n->object = (Node *) makeString((yyvsp[-3].str)); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38525 "gram.c" /* yacc.c:1652 */ +#line 39017 "gram.c" break; - case 1336: -#line 9422 "gram.y" /* yacc.c:1652 */ - { + case 1336: /* AlterOwnerStmt: ALTER DOMAIN_P any_name OWNER TO RoleSpec */ +#line 9422 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_DOMAIN; n->object = (Node *) (yyvsp[-3].list); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38537 "gram.c" /* yacc.c:1652 */ +#line 39029 "gram.c" break; - case 1337: -#line 9430 "gram.y" /* yacc.c:1652 */ - { + case 1337: /* AlterOwnerStmt: ALTER FUNCTION function_with_argtypes OWNER TO RoleSpec */ +#line 9430 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_FUNCTION; n->object = (Node *) (yyvsp[-3].objwithargs); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38549 "gram.c" /* yacc.c:1652 */ +#line 39041 "gram.c" break; - case 1338: -#line 9438 "gram.y" /* yacc.c:1652 */ - { + case 1338: /* AlterOwnerStmt: ALTER opt_procedural LANGUAGE name OWNER TO RoleSpec */ +#line 9438 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_LANGUAGE; n->object = (Node *) makeString((yyvsp[-3].str)); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38561 "gram.c" /* yacc.c:1652 */ +#line 39053 "gram.c" break; - case 1339: -#line 9446 "gram.y" /* yacc.c:1652 */ - { + case 1339: /* AlterOwnerStmt: ALTER LARGE_P OBJECT_P NumericOnly OWNER TO RoleSpec */ +#line 9446 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_LARGEOBJECT; n->object = (Node *) (yyvsp[-3].value); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38573 "gram.c" /* yacc.c:1652 */ +#line 39065 "gram.c" break; - case 1340: -#line 9454 "gram.y" /* yacc.c:1652 */ - { + case 1340: /* AlterOwnerStmt: ALTER OPERATOR operator_with_argtypes OWNER TO RoleSpec */ +#line 9454 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_OPERATOR; n->object = (Node *) (yyvsp[-3].objwithargs); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38585 "gram.c" /* yacc.c:1652 */ +#line 39077 "gram.c" break; - case 1341: -#line 9462 "gram.y" /* yacc.c:1652 */ - { + case 1341: /* AlterOwnerStmt: ALTER OPERATOR CLASS any_name USING name OWNER TO RoleSpec */ +#line 9462 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_OPCLASS; n->object = (Node *) lcons(makeString((yyvsp[-3].str)), (yyvsp[-5].list)); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38597 "gram.c" /* yacc.c:1652 */ +#line 39089 "gram.c" break; - case 1342: -#line 9470 "gram.y" /* yacc.c:1652 */ - { + case 1342: /* AlterOwnerStmt: ALTER OPERATOR FAMILY any_name USING name OWNER TO RoleSpec */ +#line 9470 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_OPFAMILY; n->object = (Node *) lcons(makeString((yyvsp[-3].str)), (yyvsp[-5].list)); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38609 "gram.c" /* yacc.c:1652 */ +#line 39101 "gram.c" break; - case 1343: -#line 9478 "gram.y" /* yacc.c:1652 */ - { + case 1343: /* AlterOwnerStmt: ALTER PROCEDURE function_with_argtypes OWNER TO RoleSpec */ +#line 9478 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_PROCEDURE; n->object = (Node *) (yyvsp[-3].objwithargs); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38621 "gram.c" /* yacc.c:1652 */ +#line 39113 "gram.c" break; - case 1344: -#line 9486 "gram.y" /* yacc.c:1652 */ - { + case 1344: /* AlterOwnerStmt: ALTER ROUTINE function_with_argtypes OWNER TO RoleSpec */ +#line 9486 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_ROUTINE; n->object = (Node *) (yyvsp[-3].objwithargs); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38633 "gram.c" /* yacc.c:1652 */ +#line 39125 "gram.c" break; - case 1345: -#line 9494 "gram.y" /* yacc.c:1652 */ - { + case 1345: /* AlterOwnerStmt: ALTER SCHEMA name OWNER TO RoleSpec */ +#line 9494 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_SCHEMA; n->object = (Node *) makeString((yyvsp[-3].str)); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38645 "gram.c" /* yacc.c:1652 */ +#line 39137 "gram.c" break; - case 1346: -#line 9502 "gram.y" /* yacc.c:1652 */ - { + case 1346: /* AlterOwnerStmt: ALTER TYPE_P any_name OWNER TO RoleSpec */ +#line 9502 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_TYPE; n->object = (Node *) (yyvsp[-3].list); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38657 "gram.c" /* yacc.c:1652 */ +#line 39149 "gram.c" break; - case 1347: -#line 9510 "gram.y" /* yacc.c:1652 */ - { + case 1347: /* AlterOwnerStmt: ALTER TABLESPACE name OWNER TO RoleSpec */ +#line 9510 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_TABLESPACE; n->object = (Node *) makeString((yyvsp[-3].str)); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38669 "gram.c" /* yacc.c:1652 */ +#line 39161 "gram.c" break; - case 1348: -#line 9518 "gram.y" /* yacc.c:1652 */ - { + case 1348: /* AlterOwnerStmt: ALTER STATISTICS any_name OWNER TO RoleSpec */ +#line 9518 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_STATISTIC_EXT; n->object = (Node *) (yyvsp[-3].list); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38681 "gram.c" /* yacc.c:1652 */ +#line 39173 "gram.c" break; - case 1349: -#line 9526 "gram.y" /* yacc.c:1652 */ - { + case 1349: /* AlterOwnerStmt: ALTER TEXT_P SEARCH DICTIONARY any_name OWNER TO RoleSpec */ +#line 9526 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_TSDICTIONARY; n->object = (Node *) (yyvsp[-3].list); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38693 "gram.c" /* yacc.c:1652 */ +#line 39185 "gram.c" break; - case 1350: -#line 9534 "gram.y" /* yacc.c:1652 */ - { + case 1350: /* AlterOwnerStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name OWNER TO RoleSpec */ +#line 9534 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_TSCONFIGURATION; n->object = (Node *) (yyvsp[-3].list); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38705 "gram.c" /* yacc.c:1652 */ +#line 39197 "gram.c" break; - case 1351: -#line 9542 "gram.y" /* yacc.c:1652 */ - { + case 1351: /* AlterOwnerStmt: ALTER FOREIGN DATA_P WRAPPER name OWNER TO RoleSpec */ +#line 9542 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_FDW; n->object = (Node *) makeString((yyvsp[-3].str)); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38717 "gram.c" /* yacc.c:1652 */ +#line 39209 "gram.c" break; - case 1352: -#line 9550 "gram.y" /* yacc.c:1652 */ - { + case 1352: /* AlterOwnerStmt: ALTER SERVER name OWNER TO RoleSpec */ +#line 9550 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_FOREIGN_SERVER; n->object = (Node *) makeString((yyvsp[-3].str)); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38729 "gram.c" /* yacc.c:1652 */ +#line 39221 "gram.c" break; - case 1353: -#line 9558 "gram.y" /* yacc.c:1652 */ - { + case 1353: /* AlterOwnerStmt: ALTER EVENT TRIGGER name OWNER TO RoleSpec */ +#line 9558 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_EVENT_TRIGGER; n->object = (Node *) makeString((yyvsp[-3].str)); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38741 "gram.c" /* yacc.c:1652 */ +#line 39233 "gram.c" break; - case 1354: -#line 9566 "gram.y" /* yacc.c:1652 */ - { + case 1354: /* AlterOwnerStmt: ALTER PUBLICATION name OWNER TO RoleSpec */ +#line 9566 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_PUBLICATION; n->object = (Node *) makeString((yyvsp[-3].str)); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38753 "gram.c" /* yacc.c:1652 */ +#line 39245 "gram.c" break; - case 1355: -#line 9574 "gram.y" /* yacc.c:1652 */ - { + case 1355: /* AlterOwnerStmt: ALTER SUBSCRIPTION name OWNER TO RoleSpec */ +#line 9574 "gram.y" + { AlterOwnerStmt *n = makeNode(AlterOwnerStmt); n->objectType = OBJECT_SUBSCRIPTION; n->object = (Node *) makeString((yyvsp[-3].str)); n->newowner = (yyvsp[0].rolespec); (yyval.node) = (Node *)n; } -#line 38765 "gram.c" /* yacc.c:1652 */ +#line 39257 "gram.c" break; - case 1356: -#line 9592 "gram.y" /* yacc.c:1652 */ - { + case 1356: /* CreatePublicationStmt: CREATE PUBLICATION name opt_publication_for_tables opt_definition */ +#line 9592 "gram.y" + { CreatePublicationStmt *n = makeNode(CreatePublicationStmt); n->pubname = (yyvsp[-2].str); n->options = (yyvsp[0].list); @@ -38781,87 +39273,87 @@ yyreduce: } (yyval.node) = (Node *)n; } -#line 38785 "gram.c" /* yacc.c:1652 */ +#line 39277 "gram.c" break; - case 1357: -#line 9610 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 38791 "gram.c" /* yacc.c:1652 */ + case 1357: /* opt_publication_for_tables: publication_for_tables */ +#line 9610 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 39283 "gram.c" break; - case 1358: -#line 9611 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 38797 "gram.c" /* yacc.c:1652 */ + case 1358: /* opt_publication_for_tables: %empty */ +#line 9611 "gram.y" + { (yyval.node) = NULL; } +#line 39289 "gram.c" break; - case 1359: -#line 9616 "gram.y" /* yacc.c:1652 */ - { + case 1359: /* publication_for_tables: FOR TABLE relation_expr_list */ +#line 9616 "gram.y" + { (yyval.node) = (Node *) (yyvsp[0].list); } -#line 38805 "gram.c" /* yacc.c:1652 */ +#line 39297 "gram.c" break; - case 1360: -#line 9620 "gram.y" /* yacc.c:1652 */ - { + case 1360: /* publication_for_tables: FOR ALL TABLES */ +#line 9620 "gram.y" + { (yyval.node) = (Node *) makeInteger(true); } -#line 38813 "gram.c" /* yacc.c:1652 */ +#line 39305 "gram.c" break; - case 1361: -#line 9640 "gram.y" /* yacc.c:1652 */ - { + case 1361: /* AlterPublicationStmt: ALTER PUBLICATION name SET definition */ +#line 9640 "gram.y" + { AlterPublicationStmt *n = makeNode(AlterPublicationStmt); n->pubname = (yyvsp[-2].str); n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 38824 "gram.c" /* yacc.c:1652 */ +#line 39316 "gram.c" break; - case 1362: -#line 9647 "gram.y" /* yacc.c:1652 */ - { + case 1362: /* AlterPublicationStmt: ALTER PUBLICATION name ADD_P TABLE relation_expr_list */ +#line 9647 "gram.y" + { AlterPublicationStmt *n = makeNode(AlterPublicationStmt); n->pubname = (yyvsp[-3].str); n->tables = (yyvsp[0].list); n->tableAction = DEFELEM_ADD; (yyval.node) = (Node *)n; } -#line 38836 "gram.c" /* yacc.c:1652 */ +#line 39328 "gram.c" break; - case 1363: -#line 9655 "gram.y" /* yacc.c:1652 */ - { + case 1363: /* AlterPublicationStmt: ALTER PUBLICATION name SET TABLE relation_expr_list */ +#line 9655 "gram.y" + { AlterPublicationStmt *n = makeNode(AlterPublicationStmt); n->pubname = (yyvsp[-3].str); n->tables = (yyvsp[0].list); n->tableAction = DEFELEM_SET; (yyval.node) = (Node *)n; } -#line 38848 "gram.c" /* yacc.c:1652 */ +#line 39340 "gram.c" break; - case 1364: -#line 9663 "gram.y" /* yacc.c:1652 */ - { + case 1364: /* AlterPublicationStmt: ALTER PUBLICATION name DROP TABLE relation_expr_list */ +#line 9663 "gram.y" + { AlterPublicationStmt *n = makeNode(AlterPublicationStmt); n->pubname = (yyvsp[-3].str); n->tables = (yyvsp[0].list); n->tableAction = DEFELEM_DROP; (yyval.node) = (Node *)n; } -#line 38860 "gram.c" /* yacc.c:1652 */ +#line 39352 "gram.c" break; - case 1365: -#line 9680 "gram.y" /* yacc.c:1652 */ - { + case 1365: /* CreateSubscriptionStmt: CREATE SUBSCRIPTION name CONNECTION Sconst PUBLICATION name_list opt_definition */ +#line 9680 "gram.y" + { CreateSubscriptionStmt *n = makeNode(CreateSubscriptionStmt); n->subname = (yyvsp[-5].str); @@ -38870,12 +39362,12 @@ yyreduce: n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 38874 "gram.c" /* yacc.c:1652 */ +#line 39366 "gram.c" break; - case 1366: -#line 9699 "gram.y" /* yacc.c:1652 */ - { + case 1366: /* AlterSubscriptionStmt: ALTER SUBSCRIPTION name SET definition */ +#line 9699 "gram.y" + { AlterSubscriptionStmt *n = makeNode(AlterSubscriptionStmt); n->kind = ALTER_SUBSCRIPTION_OPTIONS; @@ -38883,12 +39375,12 @@ yyreduce: n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 38887 "gram.c" /* yacc.c:1652 */ +#line 39379 "gram.c" break; - case 1367: -#line 9708 "gram.y" /* yacc.c:1652 */ - { + case 1367: /* AlterSubscriptionStmt: ALTER SUBSCRIPTION name CONNECTION Sconst */ +#line 9708 "gram.y" + { AlterSubscriptionStmt *n = makeNode(AlterSubscriptionStmt); n->kind = ALTER_SUBSCRIPTION_CONNECTION; @@ -38896,12 +39388,12 @@ yyreduce: n->conninfo = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 38900 "gram.c" /* yacc.c:1652 */ +#line 39392 "gram.c" break; - case 1368: -#line 9717 "gram.y" /* yacc.c:1652 */ - { + case 1368: /* AlterSubscriptionStmt: ALTER SUBSCRIPTION name REFRESH PUBLICATION opt_definition */ +#line 9717 "gram.y" + { AlterSubscriptionStmt *n = makeNode(AlterSubscriptionStmt); n->kind = ALTER_SUBSCRIPTION_REFRESH; @@ -38909,12 +39401,12 @@ yyreduce: n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 38913 "gram.c" /* yacc.c:1652 */ +#line 39405 "gram.c" break; - case 1369: -#line 9726 "gram.y" /* yacc.c:1652 */ - { + case 1369: /* AlterSubscriptionStmt: ALTER SUBSCRIPTION name ADD_P PUBLICATION name_list opt_definition */ +#line 9726 "gram.y" + { AlterSubscriptionStmt *n = makeNode(AlterSubscriptionStmt); n->kind = ALTER_SUBSCRIPTION_ADD_PUBLICATION; @@ -38923,12 +39415,12 @@ yyreduce: n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 38927 "gram.c" /* yacc.c:1652 */ +#line 39419 "gram.c" break; - case 1370: -#line 9736 "gram.y" /* yacc.c:1652 */ - { + case 1370: /* AlterSubscriptionStmt: ALTER SUBSCRIPTION name DROP PUBLICATION name_list opt_definition */ +#line 9736 "gram.y" + { AlterSubscriptionStmt *n = makeNode(AlterSubscriptionStmt); n->kind = ALTER_SUBSCRIPTION_DROP_PUBLICATION; @@ -38937,12 +39429,12 @@ yyreduce: n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 38941 "gram.c" /* yacc.c:1652 */ +#line 39433 "gram.c" break; - case 1371: -#line 9746 "gram.y" /* yacc.c:1652 */ - { + case 1371: /* AlterSubscriptionStmt: ALTER SUBSCRIPTION name SET PUBLICATION name_list opt_definition */ +#line 9746 "gram.y" + { AlterSubscriptionStmt *n = makeNode(AlterSubscriptionStmt); n->kind = ALTER_SUBSCRIPTION_SET_PUBLICATION; @@ -38951,12 +39443,12 @@ yyreduce: n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 38955 "gram.c" /* yacc.c:1652 */ +#line 39447 "gram.c" break; - case 1372: -#line 9756 "gram.y" /* yacc.c:1652 */ - { + case 1372: /* AlterSubscriptionStmt: ALTER SUBSCRIPTION name ENABLE_P */ +#line 9756 "gram.y" + { AlterSubscriptionStmt *n = makeNode(AlterSubscriptionStmt); n->kind = ALTER_SUBSCRIPTION_ENABLED; @@ -38965,12 +39457,12 @@ yyreduce: (Node *)makeInteger(true), (yylsp[-3]))); (yyval.node) = (Node *)n; } -#line 38969 "gram.c" /* yacc.c:1652 */ +#line 39461 "gram.c" break; - case 1373: -#line 9766 "gram.y" /* yacc.c:1652 */ - { + case 1373: /* AlterSubscriptionStmt: ALTER SUBSCRIPTION name DISABLE_P */ +#line 9766 "gram.y" + { AlterSubscriptionStmt *n = makeNode(AlterSubscriptionStmt); n->kind = ALTER_SUBSCRIPTION_ENABLED; @@ -38979,36 +39471,36 @@ yyreduce: (Node *)makeInteger(false), (yylsp[-3]))); (yyval.node) = (Node *)n; } -#line 38983 "gram.c" /* yacc.c:1652 */ +#line 39475 "gram.c" break; - case 1374: -#line 9784 "gram.y" /* yacc.c:1652 */ - { + case 1374: /* DropSubscriptionStmt: DROP SUBSCRIPTION name opt_drop_behavior */ +#line 9784 "gram.y" + { DropSubscriptionStmt *n = makeNode(DropSubscriptionStmt); n->subname = (yyvsp[-1].str); n->missing_ok = false; n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *) n; } -#line 38995 "gram.c" /* yacc.c:1652 */ +#line 39487 "gram.c" break; - case 1375: -#line 9792 "gram.y" /* yacc.c:1652 */ - { + case 1375: /* DropSubscriptionStmt: DROP SUBSCRIPTION IF_P EXISTS name opt_drop_behavior */ +#line 9792 "gram.y" + { DropSubscriptionStmt *n = makeNode(DropSubscriptionStmt); n->subname = (yyvsp[-1].str); n->missing_ok = true; n->behavior = (yyvsp[0].dbehavior); (yyval.node) = (Node *) n; } -#line 39007 "gram.c" /* yacc.c:1652 */ +#line 39499 "gram.c" break; - case 1376: -#line 9810 "gram.y" /* yacc.c:1652 */ - { + case 1376: /* RuleStmt: CREATE opt_or_replace RULE name AS ON event TO qualified_name where_clause DO opt_instead RuleActionList */ +#line 9810 "gram.y" + { RuleStmt *n = makeNode(RuleStmt); n->replace = (yyvsp[-11].boolean); n->relation = (yyvsp[-4].range); @@ -39019,392 +39511,392 @@ yyreduce: n->actions = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 39023 "gram.c" /* yacc.c:1652 */ +#line 39515 "gram.c" break; - case 1377: -#line 9824 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 39029 "gram.c" /* yacc.c:1652 */ + case 1377: /* RuleActionList: NOTHING */ +#line 9824 "gram.y" + { (yyval.list) = NIL; } +#line 39521 "gram.c" break; - case 1378: -#line 9825 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 39035 "gram.c" /* yacc.c:1652 */ + case 1378: /* RuleActionList: RuleActionStmt */ +#line 9825 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 39527 "gram.c" break; - case 1379: -#line 9826 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 39041 "gram.c" /* yacc.c:1652 */ + case 1379: /* RuleActionList: '(' RuleActionMulti ')' */ +#line 9826 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 39533 "gram.c" break; - case 1380: -#line 9832 "gram.y" /* yacc.c:1652 */ - { if ((yyvsp[0].node) != NULL) + case 1380: /* RuleActionMulti: RuleActionMulti ';' RuleActionStmtOrEmpty */ +#line 9832 "gram.y" + { if ((yyvsp[0].node) != NULL) (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); else (yyval.list) = (yyvsp[-2].list); } -#line 39051 "gram.c" /* yacc.c:1652 */ +#line 39543 "gram.c" break; - case 1381: -#line 9838 "gram.y" /* yacc.c:1652 */ - { if ((yyvsp[0].node) != NULL) + case 1381: /* RuleActionMulti: RuleActionStmtOrEmpty */ +#line 9838 "gram.y" + { if ((yyvsp[0].node) != NULL) (yyval.list) = list_make1((yyvsp[0].node)); else (yyval.list) = NIL; } -#line 39061 "gram.c" /* yacc.c:1652 */ +#line 39553 "gram.c" break; - case 1387: -#line 9854 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 39067 "gram.c" /* yacc.c:1652 */ + case 1387: /* RuleActionStmtOrEmpty: RuleActionStmt */ +#line 9854 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 39559 "gram.c" break; - case 1388: -#line 9855 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 39073 "gram.c" /* yacc.c:1652 */ + case 1388: /* RuleActionStmtOrEmpty: %empty */ +#line 9855 "gram.y" + { (yyval.node) = NULL; } +#line 39565 "gram.c" break; - case 1389: -#line 9858 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CMD_SELECT; } -#line 39079 "gram.c" /* yacc.c:1652 */ + case 1389: /* event: SELECT */ +#line 9858 "gram.y" + { (yyval.ival) = CMD_SELECT; } +#line 39571 "gram.c" break; - case 1390: -#line 9859 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CMD_UPDATE; } -#line 39085 "gram.c" /* yacc.c:1652 */ + case 1390: /* event: UPDATE */ +#line 9859 "gram.y" + { (yyval.ival) = CMD_UPDATE; } +#line 39577 "gram.c" break; - case 1391: -#line 9860 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CMD_DELETE; } -#line 39091 "gram.c" /* yacc.c:1652 */ + case 1391: /* event: DELETE_P */ +#line 9860 "gram.y" + { (yyval.ival) = CMD_DELETE; } +#line 39583 "gram.c" break; - case 1392: -#line 9861 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CMD_INSERT; } -#line 39097 "gram.c" /* yacc.c:1652 */ + case 1392: /* event: INSERT */ +#line 9861 "gram.y" + { (yyval.ival) = CMD_INSERT; } +#line 39589 "gram.c" break; - case 1393: -#line 9865 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 39103 "gram.c" /* yacc.c:1652 */ + case 1393: /* opt_instead: INSTEAD */ +#line 9865 "gram.y" + { (yyval.boolean) = true; } +#line 39595 "gram.c" break; - case 1394: -#line 9866 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 39109 "gram.c" /* yacc.c:1652 */ + case 1394: /* opt_instead: ALSO */ +#line 9866 "gram.y" + { (yyval.boolean) = false; } +#line 39601 "gram.c" break; - case 1395: -#line 9867 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 39115 "gram.c" /* yacc.c:1652 */ + case 1395: /* opt_instead: %empty */ +#line 9867 "gram.y" + { (yyval.boolean) = false; } +#line 39607 "gram.c" break; - case 1396: -#line 9880 "gram.y" /* yacc.c:1652 */ - { + case 1396: /* NotifyStmt: NOTIFY ColId notify_payload */ +#line 9880 "gram.y" + { NotifyStmt *n = makeNode(NotifyStmt); n->conditionname = (yyvsp[-1].str); n->payload = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 39126 "gram.c" /* yacc.c:1652 */ +#line 39618 "gram.c" break; - case 1397: -#line 9889 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 39132 "gram.c" /* yacc.c:1652 */ + case 1397: /* notify_payload: ',' Sconst */ +#line 9889 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 39624 "gram.c" break; - case 1398: -#line 9890 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 39138 "gram.c" /* yacc.c:1652 */ + case 1398: /* notify_payload: %empty */ +#line 9890 "gram.y" + { (yyval.str) = NULL; } +#line 39630 "gram.c" break; - case 1399: -#line 9894 "gram.y" /* yacc.c:1652 */ - { + case 1399: /* ListenStmt: LISTEN ColId */ +#line 9894 "gram.y" + { ListenStmt *n = makeNode(ListenStmt); n->conditionname = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 39148 "gram.c" /* yacc.c:1652 */ +#line 39640 "gram.c" break; - case 1400: -#line 9903 "gram.y" /* yacc.c:1652 */ - { + case 1400: /* UnlistenStmt: UNLISTEN ColId */ +#line 9903 "gram.y" + { UnlistenStmt *n = makeNode(UnlistenStmt); n->conditionname = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 39158 "gram.c" /* yacc.c:1652 */ +#line 39650 "gram.c" break; - case 1401: -#line 9909 "gram.y" /* yacc.c:1652 */ - { + case 1401: /* UnlistenStmt: UNLISTEN '*' */ +#line 9909 "gram.y" + { UnlistenStmt *n = makeNode(UnlistenStmt); n->conditionname = NULL; (yyval.node) = (Node *)n; } -#line 39168 "gram.c" /* yacc.c:1652 */ +#line 39660 "gram.c" break; - case 1402: -#line 9928 "gram.y" /* yacc.c:1652 */ - { + case 1402: /* TransactionStmt: ABORT_P opt_transaction opt_transaction_chain */ +#line 9928 "gram.y" + { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_ROLLBACK; n->options = NIL; n->chain = (yyvsp[0].boolean); (yyval.node) = (Node *)n; } -#line 39180 "gram.c" /* yacc.c:1652 */ +#line 39672 "gram.c" break; - case 1403: -#line 9936 "gram.y" /* yacc.c:1652 */ - { + case 1403: /* TransactionStmt: START TRANSACTION transaction_mode_list_or_empty */ +#line 9936 "gram.y" + { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_START; n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 39191 "gram.c" /* yacc.c:1652 */ +#line 39683 "gram.c" break; - case 1404: -#line 9943 "gram.y" /* yacc.c:1652 */ - { + case 1404: /* TransactionStmt: COMMIT opt_transaction opt_transaction_chain */ +#line 9943 "gram.y" + { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_COMMIT; n->options = NIL; n->chain = (yyvsp[0].boolean); (yyval.node) = (Node *)n; } -#line 39203 "gram.c" /* yacc.c:1652 */ +#line 39695 "gram.c" break; - case 1405: -#line 9951 "gram.y" /* yacc.c:1652 */ - { + case 1405: /* TransactionStmt: ROLLBACK opt_transaction opt_transaction_chain */ +#line 9951 "gram.y" + { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_ROLLBACK; n->options = NIL; n->chain = (yyvsp[0].boolean); (yyval.node) = (Node *)n; } -#line 39215 "gram.c" /* yacc.c:1652 */ +#line 39707 "gram.c" break; - case 1406: -#line 9959 "gram.y" /* yacc.c:1652 */ - { + case 1406: /* TransactionStmt: SAVEPOINT ColId */ +#line 9959 "gram.y" + { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_SAVEPOINT; n->savepoint_name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 39226 "gram.c" /* yacc.c:1652 */ +#line 39718 "gram.c" break; - case 1407: -#line 9966 "gram.y" /* yacc.c:1652 */ - { + case 1407: /* TransactionStmt: RELEASE SAVEPOINT ColId */ +#line 9966 "gram.y" + { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_RELEASE; n->savepoint_name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 39237 "gram.c" /* yacc.c:1652 */ +#line 39729 "gram.c" break; - case 1408: -#line 9973 "gram.y" /* yacc.c:1652 */ - { + case 1408: /* TransactionStmt: RELEASE ColId */ +#line 9973 "gram.y" + { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_RELEASE; n->savepoint_name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 39248 "gram.c" /* yacc.c:1652 */ +#line 39740 "gram.c" break; - case 1409: -#line 9980 "gram.y" /* yacc.c:1652 */ - { + case 1409: /* TransactionStmt: ROLLBACK opt_transaction TO SAVEPOINT ColId */ +#line 9980 "gram.y" + { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_ROLLBACK_TO; n->savepoint_name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 39259 "gram.c" /* yacc.c:1652 */ +#line 39751 "gram.c" break; - case 1410: -#line 9987 "gram.y" /* yacc.c:1652 */ - { + case 1410: /* TransactionStmt: ROLLBACK opt_transaction TO ColId */ +#line 9987 "gram.y" + { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_ROLLBACK_TO; n->savepoint_name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 39270 "gram.c" /* yacc.c:1652 */ +#line 39762 "gram.c" break; - case 1411: -#line 9994 "gram.y" /* yacc.c:1652 */ - { + case 1411: /* TransactionStmt: PREPARE TRANSACTION Sconst */ +#line 9994 "gram.y" + { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_PREPARE; n->gid = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 39281 "gram.c" /* yacc.c:1652 */ +#line 39773 "gram.c" break; - case 1412: -#line 10001 "gram.y" /* yacc.c:1652 */ - { + case 1412: /* TransactionStmt: COMMIT PREPARED Sconst */ +#line 10001 "gram.y" + { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_COMMIT_PREPARED; n->gid = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 39292 "gram.c" /* yacc.c:1652 */ +#line 39784 "gram.c" break; - case 1413: -#line 10008 "gram.y" /* yacc.c:1652 */ - { + case 1413: /* TransactionStmt: ROLLBACK PREPARED Sconst */ +#line 10008 "gram.y" + { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_ROLLBACK_PREPARED; n->gid = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 39303 "gram.c" /* yacc.c:1652 */ +#line 39795 "gram.c" break; - case 1414: -#line 10018 "gram.y" /* yacc.c:1652 */ - { + case 1414: /* TransactionStmtLegacy: BEGIN_P opt_transaction transaction_mode_list_or_empty */ +#line 10018 "gram.y" + { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_BEGIN; n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 39314 "gram.c" /* yacc.c:1652 */ +#line 39806 "gram.c" break; - case 1415: -#line 10025 "gram.y" /* yacc.c:1652 */ - { + case 1415: /* TransactionStmtLegacy: END_P opt_transaction opt_transaction_chain */ +#line 10025 "gram.y" + { TransactionStmt *n = makeNode(TransactionStmt); n->kind = TRANS_STMT_COMMIT; n->options = NIL; n->chain = (yyvsp[0].boolean); (yyval.node) = (Node *)n; } -#line 39326 "gram.c" /* yacc.c:1652 */ +#line 39818 "gram.c" break; - case 1419: -#line 10041 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = makeDefElem("transaction_isolation", + case 1419: /* transaction_mode_item: ISOLATION LEVEL iso_level */ +#line 10041 "gram.y" + { (yyval.defelt) = makeDefElem("transaction_isolation", makeStringConst((yyvsp[0].str), (yylsp[0])), (yylsp[-2])); } -#line 39333 "gram.c" /* yacc.c:1652 */ +#line 39825 "gram.c" break; - case 1420: -#line 10044 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = makeDefElem("transaction_read_only", + case 1420: /* transaction_mode_item: READ ONLY */ +#line 10044 "gram.y" + { (yyval.defelt) = makeDefElem("transaction_read_only", makeIntConst(true, (yylsp[-1])), (yylsp[-1])); } -#line 39340 "gram.c" /* yacc.c:1652 */ +#line 39832 "gram.c" break; - case 1421: -#line 10047 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = makeDefElem("transaction_read_only", + case 1421: /* transaction_mode_item: READ WRITE */ +#line 10047 "gram.y" + { (yyval.defelt) = makeDefElem("transaction_read_only", makeIntConst(false, (yylsp[-1])), (yylsp[-1])); } -#line 39347 "gram.c" /* yacc.c:1652 */ +#line 39839 "gram.c" break; - case 1422: -#line 10050 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = makeDefElem("transaction_deferrable", + case 1422: /* transaction_mode_item: DEFERRABLE */ +#line 10050 "gram.y" + { (yyval.defelt) = makeDefElem("transaction_deferrable", makeIntConst(true, (yylsp[0])), (yylsp[0])); } -#line 39354 "gram.c" /* yacc.c:1652 */ +#line 39846 "gram.c" break; - case 1423: -#line 10053 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = makeDefElem("transaction_deferrable", + case 1423: /* transaction_mode_item: NOT DEFERRABLE */ +#line 10053 "gram.y" + { (yyval.defelt) = makeDefElem("transaction_deferrable", makeIntConst(false, (yylsp[-1])), (yylsp[-1])); } -#line 39361 "gram.c" /* yacc.c:1652 */ +#line 39853 "gram.c" break; - case 1424: -#line 10060 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 39367 "gram.c" /* yacc.c:1652 */ + case 1424: /* transaction_mode_list: transaction_mode_item */ +#line 10060 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } +#line 39859 "gram.c" break; - case 1425: -#line 10062 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } -#line 39373 "gram.c" /* yacc.c:1652 */ + case 1425: /* transaction_mode_list: transaction_mode_list ',' transaction_mode_item */ +#line 10062 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } +#line 39865 "gram.c" break; - case 1426: -#line 10064 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 39379 "gram.c" /* yacc.c:1652 */ + case 1426: /* transaction_mode_list: transaction_mode_list transaction_mode_item */ +#line 10064 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 39871 "gram.c" break; - case 1428: -#line 10070 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 39385 "gram.c" /* yacc.c:1652 */ + case 1428: /* transaction_mode_list_or_empty: %empty */ +#line 10070 "gram.y" + { (yyval.list) = NIL; } +#line 39877 "gram.c" break; - case 1429: -#line 10074 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 39391 "gram.c" /* yacc.c:1652 */ + case 1429: /* opt_transaction_chain: AND CHAIN */ +#line 10074 "gram.y" + { (yyval.boolean) = true; } +#line 39883 "gram.c" break; - case 1430: -#line 10075 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 39397 "gram.c" /* yacc.c:1652 */ + case 1430: /* opt_transaction_chain: AND NO CHAIN */ +#line 10075 "gram.y" + { (yyval.boolean) = false; } +#line 39889 "gram.c" break; - case 1431: -#line 10076 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 39403 "gram.c" /* yacc.c:1652 */ + case 1431: /* opt_transaction_chain: %empty */ +#line 10076 "gram.y" + { (yyval.boolean) = false; } +#line 39895 "gram.c" break; - case 1432: -#line 10090 "gram.y" /* yacc.c:1652 */ - { + case 1432: /* ViewStmt: CREATE OptTemp VIEW qualified_name opt_column_list opt_reloptions AS SelectStmt opt_check_option */ +#line 10090 "gram.y" + { ViewStmt *n = makeNode(ViewStmt); n->view = (yyvsp[-5].range); n->view->relpersistence = (yyvsp[-7].ival); @@ -39415,12 +39907,12 @@ yyreduce: n->withCheckOption = (yyvsp[0].ival); (yyval.node) = (Node *) n; } -#line 39419 "gram.c" /* yacc.c:1652 */ +#line 39911 "gram.c" break; - case 1433: -#line 10103 "gram.y" /* yacc.c:1652 */ - { + case 1433: /* ViewStmt: CREATE OR REPLACE OptTemp VIEW qualified_name opt_column_list opt_reloptions AS SelectStmt opt_check_option */ +#line 10103 "gram.y" + { ViewStmt *n = makeNode(ViewStmt); n->view = (yyvsp[-5].range); n->view->relpersistence = (yyvsp[-7].ival); @@ -39431,12 +39923,12 @@ yyreduce: n->withCheckOption = (yyvsp[0].ival); (yyval.node) = (Node *) n; } -#line 39435 "gram.c" /* yacc.c:1652 */ +#line 39927 "gram.c" break; - case 1434: -#line 10116 "gram.y" /* yacc.c:1652 */ - { + case 1434: /* ViewStmt: CREATE OptTemp RECURSIVE VIEW qualified_name '(' columnList ')' opt_reloptions AS SelectStmt opt_check_option */ +#line 10116 "gram.y" + { ViewStmt *n = makeNode(ViewStmt); n->view = (yyvsp[-7].range); n->view->relpersistence = (yyvsp[-10].ival); @@ -39452,12 +39944,12 @@ yyreduce: parser_errposition((yylsp[0])))); (yyval.node) = (Node *) n; } -#line 39456 "gram.c" /* yacc.c:1652 */ +#line 39948 "gram.c" break; - case 1435: -#line 10134 "gram.y" /* yacc.c:1652 */ - { + case 1435: /* ViewStmt: CREATE OR REPLACE OptTemp RECURSIVE VIEW qualified_name '(' columnList ')' opt_reloptions AS SelectStmt opt_check_option */ +#line 10134 "gram.y" + { ViewStmt *n = makeNode(ViewStmt); n->view = (yyvsp[-7].range); n->view->relpersistence = (yyvsp[-10].ival); @@ -39473,294 +39965,294 @@ yyreduce: parser_errposition((yylsp[0])))); (yyval.node) = (Node *) n; } -#line 39477 "gram.c" /* yacc.c:1652 */ +#line 39969 "gram.c" break; - case 1436: -#line 10153 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CASCADED_CHECK_OPTION; } -#line 39483 "gram.c" /* yacc.c:1652 */ + case 1436: /* opt_check_option: WITH CHECK OPTION */ +#line 10153 "gram.y" + { (yyval.ival) = CASCADED_CHECK_OPTION; } +#line 39975 "gram.c" break; - case 1437: -#line 10154 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CASCADED_CHECK_OPTION; } -#line 39489 "gram.c" /* yacc.c:1652 */ + case 1437: /* opt_check_option: WITH CASCADED CHECK OPTION */ +#line 10154 "gram.y" + { (yyval.ival) = CASCADED_CHECK_OPTION; } +#line 39981 "gram.c" break; - case 1438: -#line 10155 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = LOCAL_CHECK_OPTION; } -#line 39495 "gram.c" /* yacc.c:1652 */ + case 1438: /* opt_check_option: WITH LOCAL CHECK OPTION */ +#line 10155 "gram.y" + { (yyval.ival) = LOCAL_CHECK_OPTION; } +#line 39987 "gram.c" break; - case 1439: -#line 10156 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = NO_CHECK_OPTION; } -#line 39501 "gram.c" /* yacc.c:1652 */ + case 1439: /* opt_check_option: %empty */ +#line 10156 "gram.y" + { (yyval.ival) = NO_CHECK_OPTION; } +#line 39993 "gram.c" break; - case 1440: -#line 10167 "gram.y" /* yacc.c:1652 */ - { + case 1440: /* LoadStmt: LOAD file_name */ +#line 10167 "gram.y" + { LoadStmt *n = makeNode(LoadStmt); n->filename = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 39511 "gram.c" /* yacc.c:1652 */ +#line 40003 "gram.c" break; - case 1441: -#line 10183 "gram.y" /* yacc.c:1652 */ - { + case 1441: /* CreatedbStmt: CREATE DATABASE name opt_with createdb_opt_list */ +#line 10183 "gram.y" + { CreatedbStmt *n = makeNode(CreatedbStmt); n->dbname = (yyvsp[-2].str); n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 39522 "gram.c" /* yacc.c:1652 */ +#line 40014 "gram.c" break; - case 1442: -#line 10192 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 39528 "gram.c" /* yacc.c:1652 */ + case 1442: /* createdb_opt_list: createdb_opt_items */ +#line 10192 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 40020 "gram.c" break; - case 1443: -#line 10193 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 39534 "gram.c" /* yacc.c:1652 */ + case 1443: /* createdb_opt_list: %empty */ +#line 10193 "gram.y" + { (yyval.list) = NIL; } +#line 40026 "gram.c" break; - case 1444: -#line 10197 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 39540 "gram.c" /* yacc.c:1652 */ + case 1444: /* createdb_opt_items: createdb_opt_item */ +#line 10197 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } +#line 40032 "gram.c" break; - case 1445: -#line 10198 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 39546 "gram.c" /* yacc.c:1652 */ + case 1445: /* createdb_opt_items: createdb_opt_items createdb_opt_item */ +#line 10198 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 40038 "gram.c" break; - case 1446: -#line 10203 "gram.y" /* yacc.c:1652 */ - { + case 1446: /* createdb_opt_item: createdb_opt_name opt_equal SignedIconst */ +#line 10203 "gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[-2].str), (Node *)makeInteger((yyvsp[0].ival)), (yylsp[-2])); } -#line 39554 "gram.c" /* yacc.c:1652 */ +#line 40046 "gram.c" break; - case 1447: -#line 10207 "gram.y" /* yacc.c:1652 */ - { + case 1447: /* createdb_opt_item: createdb_opt_name opt_equal opt_boolean_or_string */ +#line 10207 "gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[-2].str), (Node *)makeString((yyvsp[0].str)), (yylsp[-2])); } -#line 39562 "gram.c" /* yacc.c:1652 */ +#line 40054 "gram.c" break; - case 1448: -#line 10211 "gram.y" /* yacc.c:1652 */ - { + case 1448: /* createdb_opt_item: createdb_opt_name opt_equal DEFAULT */ +#line 10211 "gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[-2].str), NULL, (yylsp[-2])); } -#line 39570 "gram.c" /* yacc.c:1652 */ +#line 40062 "gram.c" break; - case 1449: -#line 10228 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 39576 "gram.c" /* yacc.c:1652 */ + case 1449: /* createdb_opt_name: IDENT */ +#line 10228 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 40068 "gram.c" break; - case 1450: -#line 10229 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup("connection_limit"); } -#line 39582 "gram.c" /* yacc.c:1652 */ + case 1450: /* createdb_opt_name: CONNECTION LIMIT */ +#line 10229 "gram.y" + { (yyval.str) = pstrdup("connection_limit"); } +#line 40074 "gram.c" break; - case 1451: -#line 10230 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 39588 "gram.c" /* yacc.c:1652 */ + case 1451: /* createdb_opt_name: ENCODING */ +#line 10230 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 40080 "gram.c" break; - case 1452: -#line 10231 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 39594 "gram.c" /* yacc.c:1652 */ + case 1452: /* createdb_opt_name: LOCATION */ +#line 10231 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 40086 "gram.c" break; - case 1453: -#line 10232 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 39600 "gram.c" /* yacc.c:1652 */ + case 1453: /* createdb_opt_name: OWNER */ +#line 10232 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 40092 "gram.c" break; - case 1454: -#line 10233 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 39606 "gram.c" /* yacc.c:1652 */ + case 1454: /* createdb_opt_name: TABLESPACE */ +#line 10233 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 40098 "gram.c" break; - case 1455: -#line 10234 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 39612 "gram.c" /* yacc.c:1652 */ + case 1455: /* createdb_opt_name: TEMPLATE */ +#line 10234 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 40104 "gram.c" break; - case 1458: -#line 10254 "gram.y" /* yacc.c:1652 */ - { + case 1458: /* AlterDatabaseStmt: ALTER DATABASE name WITH createdb_opt_list */ +#line 10254 "gram.y" + { AlterDatabaseStmt *n = makeNode(AlterDatabaseStmt); n->dbname = (yyvsp[-2].str); n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 39623 "gram.c" /* yacc.c:1652 */ +#line 40115 "gram.c" break; - case 1459: -#line 10261 "gram.y" /* yacc.c:1652 */ - { + case 1459: /* AlterDatabaseStmt: ALTER DATABASE name createdb_opt_list */ +#line 10261 "gram.y" + { AlterDatabaseStmt *n = makeNode(AlterDatabaseStmt); n->dbname = (yyvsp[-1].str); n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 39634 "gram.c" /* yacc.c:1652 */ +#line 40126 "gram.c" break; - case 1460: -#line 10268 "gram.y" /* yacc.c:1652 */ - { + case 1460: /* AlterDatabaseStmt: ALTER DATABASE name SET TABLESPACE name */ +#line 10268 "gram.y" + { AlterDatabaseStmt *n = makeNode(AlterDatabaseStmt); n->dbname = (yyvsp[-3].str); n->options = list_make1(makeDefElem("tablespace", (Node *)makeString((yyvsp[0].str)), (yylsp[0]))); (yyval.node) = (Node *)n; } -#line 39646 "gram.c" /* yacc.c:1652 */ +#line 40138 "gram.c" break; - case 1461: -#line 10279 "gram.y" /* yacc.c:1652 */ - { + case 1461: /* AlterDatabaseSetStmt: ALTER DATABASE name SetResetClause */ +#line 10279 "gram.y" + { AlterDatabaseSetStmt *n = makeNode(AlterDatabaseSetStmt); n->dbname = (yyvsp[-1].str); n->setstmt = (yyvsp[0].vsetstmt); (yyval.node) = (Node *)n; } -#line 39657 "gram.c" /* yacc.c:1652 */ +#line 40149 "gram.c" break; - case 1462: -#line 10296 "gram.y" /* yacc.c:1652 */ - { + case 1462: /* DropdbStmt: DROP DATABASE name */ +#line 10296 "gram.y" + { DropdbStmt *n = makeNode(DropdbStmt); n->dbname = (yyvsp[0].str); n->missing_ok = false; n->options = NULL; (yyval.node) = (Node *)n; } -#line 39669 "gram.c" /* yacc.c:1652 */ +#line 40161 "gram.c" break; - case 1463: -#line 10304 "gram.y" /* yacc.c:1652 */ - { + case 1463: /* DropdbStmt: DROP DATABASE IF_P EXISTS name */ +#line 10304 "gram.y" + { DropdbStmt *n = makeNode(DropdbStmt); n->dbname = (yyvsp[0].str); n->missing_ok = true; n->options = NULL; (yyval.node) = (Node *)n; } -#line 39681 "gram.c" /* yacc.c:1652 */ +#line 40173 "gram.c" break; - case 1464: -#line 10312 "gram.y" /* yacc.c:1652 */ - { + case 1464: /* DropdbStmt: DROP DATABASE name opt_with '(' drop_option_list ')' */ +#line 10312 "gram.y" + { DropdbStmt *n = makeNode(DropdbStmt); n->dbname = (yyvsp[-4].str); n->missing_ok = false; n->options = (yyvsp[-1].list); (yyval.node) = (Node *)n; } -#line 39693 "gram.c" /* yacc.c:1652 */ +#line 40185 "gram.c" break; - case 1465: -#line 10320 "gram.y" /* yacc.c:1652 */ - { + case 1465: /* DropdbStmt: DROP DATABASE IF_P EXISTS name opt_with '(' drop_option_list ')' */ +#line 10320 "gram.y" + { DropdbStmt *n = makeNode(DropdbStmt); n->dbname = (yyvsp[-4].str); n->missing_ok = true; n->options = (yyvsp[-1].list); (yyval.node) = (Node *)n; } -#line 39705 "gram.c" /* yacc.c:1652 */ +#line 40197 "gram.c" break; - case 1466: -#line 10331 "gram.y" /* yacc.c:1652 */ - { + case 1466: /* drop_option_list: drop_option */ +#line 10331 "gram.y" + { (yyval.list) = list_make1((Node *) (yyvsp[0].defelt)); } -#line 39713 "gram.c" /* yacc.c:1652 */ +#line 40205 "gram.c" break; - case 1467: -#line 10335 "gram.y" /* yacc.c:1652 */ - { + case 1467: /* drop_option_list: drop_option_list ',' drop_option */ +#line 10335 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (Node *) (yyvsp[0].defelt)); } -#line 39721 "gram.c" /* yacc.c:1652 */ +#line 40213 "gram.c" break; - case 1468: -#line 10346 "gram.y" /* yacc.c:1652 */ - { + case 1468: /* drop_option: FORCE */ +#line 10346 "gram.y" + { (yyval.defelt) = makeDefElem("force", NULL, (yylsp[0])); } -#line 39729 "gram.c" /* yacc.c:1652 */ +#line 40221 "gram.c" break; - case 1469: -#line 10358 "gram.y" /* yacc.c:1652 */ - { + case 1469: /* AlterCollationStmt: ALTER COLLATION any_name REFRESH VERSION_P */ +#line 10358 "gram.y" + { AlterCollationStmt *n = makeNode(AlterCollationStmt); n->collname = (yyvsp[-2].list); (yyval.node) = (Node *)n; } -#line 39739 "gram.c" /* yacc.c:1652 */ +#line 40231 "gram.c" break; - case 1470: -#line 10375 "gram.y" /* yacc.c:1652 */ - { + case 1470: /* AlterSystemStmt: ALTER SYSTEM_P SET generic_set */ +#line 10375 "gram.y" + { AlterSystemStmt *n = makeNode(AlterSystemStmt); n->setstmt = (yyvsp[0].vsetstmt); (yyval.node) = (Node *)n; } -#line 39749 "gram.c" /* yacc.c:1652 */ +#line 40241 "gram.c" break; - case 1471: -#line 10381 "gram.y" /* yacc.c:1652 */ - { + case 1471: /* AlterSystemStmt: ALTER SYSTEM_P RESET generic_reset */ +#line 10381 "gram.y" + { AlterSystemStmt *n = makeNode(AlterSystemStmt); n->setstmt = (yyvsp[0].vsetstmt); (yyval.node) = (Node *)n; } -#line 39759 "gram.c" /* yacc.c:1652 */ +#line 40251 "gram.c" break; - case 1472: -#line 10397 "gram.y" /* yacc.c:1652 */ - { + case 1472: /* CreateDomainStmt: CREATE DOMAIN_P any_name opt_as Typename ColQualList */ +#line 10397 "gram.y" + { CreateDomainStmt *n = makeNode(CreateDomainStmt); n->domainname = (yyvsp[-3].list); n->typeName = (yyvsp[-1].typnam); @@ -39768,58 +40260,58 @@ yyreduce: yyscanner); (yyval.node) = (Node *)n; } -#line 39772 "gram.c" /* yacc.c:1652 */ +#line 40264 "gram.c" break; - case 1473: -#line 10410 "gram.y" /* yacc.c:1652 */ - { + case 1473: /* AlterDomainStmt: ALTER DOMAIN_P any_name alter_column_default */ +#line 10410 "gram.y" + { AlterDomainStmt *n = makeNode(AlterDomainStmt); n->subtype = 'T'; n->typeName = (yyvsp[-1].list); n->def = (yyvsp[0].node); (yyval.node) = (Node *)n; } -#line 39784 "gram.c" /* yacc.c:1652 */ +#line 40276 "gram.c" break; - case 1474: -#line 10419 "gram.y" /* yacc.c:1652 */ - { + case 1474: /* AlterDomainStmt: ALTER DOMAIN_P any_name DROP NOT NULL_P */ +#line 10419 "gram.y" + { AlterDomainStmt *n = makeNode(AlterDomainStmt); n->subtype = 'N'; n->typeName = (yyvsp[-3].list); (yyval.node) = (Node *)n; } -#line 39795 "gram.c" /* yacc.c:1652 */ +#line 40287 "gram.c" break; - case 1475: -#line 10427 "gram.y" /* yacc.c:1652 */ - { + case 1475: /* AlterDomainStmt: ALTER DOMAIN_P any_name SET NOT NULL_P */ +#line 10427 "gram.y" + { AlterDomainStmt *n = makeNode(AlterDomainStmt); n->subtype = 'O'; n->typeName = (yyvsp[-3].list); (yyval.node) = (Node *)n; } -#line 39806 "gram.c" /* yacc.c:1652 */ +#line 40298 "gram.c" break; - case 1476: -#line 10435 "gram.y" /* yacc.c:1652 */ - { + case 1476: /* AlterDomainStmt: ALTER DOMAIN_P any_name ADD_P TableConstraint */ +#line 10435 "gram.y" + { AlterDomainStmt *n = makeNode(AlterDomainStmt); n->subtype = 'C'; n->typeName = (yyvsp[-2].list); n->def = (yyvsp[0].node); (yyval.node) = (Node *)n; } -#line 39818 "gram.c" /* yacc.c:1652 */ +#line 40310 "gram.c" break; - case 1477: -#line 10444 "gram.y" /* yacc.c:1652 */ - { + case 1477: /* AlterDomainStmt: ALTER DOMAIN_P any_name DROP CONSTRAINT name opt_drop_behavior */ +#line 10444 "gram.y" + { AlterDomainStmt *n = makeNode(AlterDomainStmt); n->subtype = 'X'; n->typeName = (yyvsp[-4].list); @@ -39828,12 +40320,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node *)n; } -#line 39832 "gram.c" /* yacc.c:1652 */ +#line 40324 "gram.c" break; - case 1478: -#line 10455 "gram.y" /* yacc.c:1652 */ - { + case 1478: /* AlterDomainStmt: ALTER DOMAIN_P any_name DROP CONSTRAINT IF_P EXISTS name opt_drop_behavior */ +#line 10455 "gram.y" + { AlterDomainStmt *n = makeNode(AlterDomainStmt); n->subtype = 'X'; n->typeName = (yyvsp[-6].list); @@ -39842,35 +40334,35 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node *)n; } -#line 39846 "gram.c" /* yacc.c:1652 */ +#line 40338 "gram.c" break; - case 1479: -#line 10466 "gram.y" /* yacc.c:1652 */ - { + case 1479: /* AlterDomainStmt: ALTER DOMAIN_P any_name VALIDATE CONSTRAINT name */ +#line 10466 "gram.y" + { AlterDomainStmt *n = makeNode(AlterDomainStmt); n->subtype = 'V'; n->typeName = (yyvsp[-3].list); n->name = (yyvsp[0].str); (yyval.node) = (Node *)n; } -#line 39858 "gram.c" /* yacc.c:1652 */ +#line 40350 "gram.c" break; - case 1482: -#line 10488 "gram.y" /* yacc.c:1652 */ - { + case 1482: /* AlterTSDictionaryStmt: ALTER TEXT_P SEARCH DICTIONARY any_name definition */ +#line 10488 "gram.y" + { AlterTSDictionaryStmt *n = makeNode(AlterTSDictionaryStmt); n->dictname = (yyvsp[-1].list); n->options = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 39869 "gram.c" /* yacc.c:1652 */ +#line 40361 "gram.c" break; - case 1483: -#line 10498 "gram.y" /* yacc.c:1652 */ - { + case 1483: /* AlterTSConfigurationStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name ADD_P MAPPING FOR name_list any_with any_name_list */ +#line 10498 "gram.y" + { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); n->kind = ALTER_TSCONFIG_ADD_MAPPING; n->cfgname = (yyvsp[-6].list); @@ -39880,12 +40372,12 @@ yyreduce: n->replace = false; (yyval.node) = (Node*)n; } -#line 39884 "gram.c" /* yacc.c:1652 */ +#line 40376 "gram.c" break; - case 1484: -#line 10509 "gram.y" /* yacc.c:1652 */ - { + case 1484: /* AlterTSConfigurationStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name ALTER MAPPING FOR name_list any_with any_name_list */ +#line 10509 "gram.y" + { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); n->kind = ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN; n->cfgname = (yyvsp[-6].list); @@ -39895,12 +40387,12 @@ yyreduce: n->replace = false; (yyval.node) = (Node*)n; } -#line 39899 "gram.c" /* yacc.c:1652 */ +#line 40391 "gram.c" break; - case 1485: -#line 10520 "gram.y" /* yacc.c:1652 */ - { + case 1485: /* AlterTSConfigurationStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name ALTER MAPPING REPLACE any_name any_with any_name */ +#line 10520 "gram.y" + { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); n->kind = ALTER_TSCONFIG_REPLACE_DICT; n->cfgname = (yyvsp[-6].list); @@ -39910,12 +40402,12 @@ yyreduce: n->replace = true; (yyval.node) = (Node*)n; } -#line 39914 "gram.c" /* yacc.c:1652 */ +#line 40406 "gram.c" break; - case 1486: -#line 10531 "gram.y" /* yacc.c:1652 */ - { + case 1486: /* AlterTSConfigurationStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name ALTER MAPPING FOR name_list REPLACE any_name any_with any_name */ +#line 10531 "gram.y" + { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); n->kind = ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN; n->cfgname = (yyvsp[-8].list); @@ -39925,12 +40417,12 @@ yyreduce: n->replace = true; (yyval.node) = (Node*)n; } -#line 39929 "gram.c" /* yacc.c:1652 */ +#line 40421 "gram.c" break; - case 1487: -#line 10542 "gram.y" /* yacc.c:1652 */ - { + case 1487: /* AlterTSConfigurationStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name DROP MAPPING FOR name_list */ +#line 10542 "gram.y" + { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); n->kind = ALTER_TSCONFIG_DROP_MAPPING; n->cfgname = (yyvsp[-4].list); @@ -39938,12 +40430,12 @@ yyreduce: n->missing_ok = false; (yyval.node) = (Node*)n; } -#line 39942 "gram.c" /* yacc.c:1652 */ +#line 40434 "gram.c" break; - case 1488: -#line 10551 "gram.y" /* yacc.c:1652 */ - { + case 1488: /* AlterTSConfigurationStmt: ALTER TEXT_P SEARCH CONFIGURATION any_name DROP MAPPING IF_P EXISTS FOR name_list */ +#line 10551 "gram.y" + { AlterTSConfigurationStmt *n = makeNode(AlterTSConfigurationStmt); n->kind = ALTER_TSCONFIG_DROP_MAPPING; n->cfgname = (yyvsp[-6].list); @@ -39951,12 +40443,12 @@ yyreduce: n->missing_ok = true; (yyval.node) = (Node*)n; } -#line 39955 "gram.c" /* yacc.c:1652 */ +#line 40447 "gram.c" break; - case 1491: -#line 10579 "gram.y" /* yacc.c:1652 */ - { + case 1491: /* CreateConversionStmt: CREATE opt_default CONVERSION_P any_name FOR Sconst TO Sconst FROM any_name */ +#line 10579 "gram.y" + { CreateConversionStmt *n = makeNode(CreateConversionStmt); n->conversion_name = (yyvsp[-6].list); n->for_encoding_name = (yyvsp[-4].str); @@ -39965,12 +40457,12 @@ yyreduce: n->def = (yyvsp[-8].boolean); (yyval.node) = (Node *)n; } -#line 39969 "gram.c" /* yacc.c:1652 */ +#line 40461 "gram.c" break; - case 1492: -#line 10602 "gram.y" /* yacc.c:1652 */ - { + case 1492: /* ClusterStmt: CLUSTER opt_verbose qualified_name cluster_index_specification */ +#line 10602 "gram.y" + { ClusterStmt *n = makeNode(ClusterStmt); n->relation = (yyvsp[-1].range); n->indexname = (yyvsp[0].str); @@ -39979,24 +40471,24 @@ yyreduce: n->params = lappend(n->params, makeDefElem("verbose", NULL, (yylsp[-2]))); (yyval.node) = (Node*)n; } -#line 39983 "gram.c" /* yacc.c:1652 */ +#line 40475 "gram.c" break; - case 1493: -#line 10613 "gram.y" /* yacc.c:1652 */ - { + case 1493: /* ClusterStmt: CLUSTER '(' utility_option_list ')' qualified_name cluster_index_specification */ +#line 10613 "gram.y" + { ClusterStmt *n = makeNode(ClusterStmt); n->relation = (yyvsp[-1].range); n->indexname = (yyvsp[0].str); n->params = (yyvsp[-3].list); (yyval.node) = (Node*)n; } -#line 39995 "gram.c" /* yacc.c:1652 */ +#line 40487 "gram.c" break; - case 1494: -#line 10621 "gram.y" /* yacc.c:1652 */ - { + case 1494: /* ClusterStmt: CLUSTER opt_verbose */ +#line 10621 "gram.y" + { ClusterStmt *n = makeNode(ClusterStmt); n->relation = NULL; n->indexname = NULL; @@ -40005,12 +40497,12 @@ yyreduce: n->params = lappend(n->params, makeDefElem("verbose", NULL, (yylsp[0]))); (yyval.node) = (Node*)n; } -#line 40009 "gram.c" /* yacc.c:1652 */ +#line 40501 "gram.c" break; - case 1495: -#line 10632 "gram.y" /* yacc.c:1652 */ - { + case 1495: /* ClusterStmt: CLUSTER opt_verbose name ON qualified_name */ +#line 10632 "gram.y" + { ClusterStmt *n = makeNode(ClusterStmt); n->relation = (yyvsp[0].range); n->indexname = (yyvsp[-2].str); @@ -40019,24 +40511,24 @@ yyreduce: n->params = lappend(n->params, makeDefElem("verbose", NULL, (yylsp[-3]))); (yyval.node) = (Node*)n; } -#line 40023 "gram.c" /* yacc.c:1652 */ +#line 40515 "gram.c" break; - case 1496: -#line 10644 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 40029 "gram.c" /* yacc.c:1652 */ + case 1496: /* cluster_index_specification: USING name */ +#line 10644 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 40521 "gram.c" break; - case 1497: -#line 10645 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 40035 "gram.c" /* yacc.c:1652 */ + case 1497: /* cluster_index_specification: %empty */ +#line 10645 "gram.y" + { (yyval.str) = NULL; } +#line 40527 "gram.c" break; - case 1498: -#line 10658 "gram.y" /* yacc.c:1652 */ - { + case 1498: /* VacuumStmt: VACUUM opt_full opt_freeze opt_verbose opt_analyze opt_vacuum_relation_list */ +#line 10658 "gram.y" + { VacuumStmt *n = makeNode(VacuumStmt); n->options = NIL; if ((yyvsp[-4].boolean)) @@ -40055,24 +40547,24 @@ yyreduce: n->is_vacuumcmd = true; (yyval.node) = (Node *)n; } -#line 40059 "gram.c" /* yacc.c:1652 */ +#line 40551 "gram.c" break; - case 1499: -#line 10678 "gram.y" /* yacc.c:1652 */ - { + case 1499: /* VacuumStmt: VACUUM '(' utility_option_list ')' opt_vacuum_relation_list */ +#line 10678 "gram.y" + { VacuumStmt *n = makeNode(VacuumStmt); n->options = (yyvsp[-2].list); n->rels = (yyvsp[0].list); n->is_vacuumcmd = true; (yyval.node) = (Node *) n; } -#line 40071 "gram.c" /* yacc.c:1652 */ +#line 40563 "gram.c" break; - case 1500: -#line 10688 "gram.y" /* yacc.c:1652 */ - { + case 1500: /* AnalyzeStmt: analyze_keyword opt_verbose opt_vacuum_relation_list */ +#line 10688 "gram.y" + { VacuumStmt *n = makeNode(VacuumStmt); n->options = NIL; if ((yyvsp[-1].boolean)) @@ -40082,181 +40574,181 @@ yyreduce: n->is_vacuumcmd = false; (yyval.node) = (Node *)n; } -#line 40086 "gram.c" /* yacc.c:1652 */ +#line 40578 "gram.c" break; - case 1501: -#line 10699 "gram.y" /* yacc.c:1652 */ - { + case 1501: /* AnalyzeStmt: analyze_keyword '(' utility_option_list ')' opt_vacuum_relation_list */ +#line 10699 "gram.y" + { VacuumStmt *n = makeNode(VacuumStmt); n->options = (yyvsp[-2].list); n->rels = (yyvsp[0].list); n->is_vacuumcmd = false; (yyval.node) = (Node *) n; } -#line 40098 "gram.c" /* yacc.c:1652 */ +#line 40590 "gram.c" break; - case 1502: -#line 10710 "gram.y" /* yacc.c:1652 */ - { + case 1502: /* utility_option_list: utility_option_elem */ +#line 10710 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 40106 "gram.c" /* yacc.c:1652 */ +#line 40598 "gram.c" break; - case 1503: -#line 10714 "gram.y" /* yacc.c:1652 */ - { + case 1503: /* utility_option_list: utility_option_list ',' utility_option_elem */ +#line 10714 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } -#line 40114 "gram.c" /* yacc.c:1652 */ +#line 40606 "gram.c" break; - case 1506: -#line 10726 "gram.y" /* yacc.c:1652 */ - { + case 1506: /* utility_option_elem: utility_option_name utility_option_arg */ +#line 10726 "gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[-1].str), (yyvsp[0].node), (yylsp[-1])); } -#line 40122 "gram.c" /* yacc.c:1652 */ +#line 40614 "gram.c" break; - case 1507: -#line 10732 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 40128 "gram.c" /* yacc.c:1652 */ + case 1507: /* utility_option_name: NonReservedWord */ +#line 10732 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 40620 "gram.c" break; - case 1508: -#line 10733 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "analyze"; } -#line 40134 "gram.c" /* yacc.c:1652 */ + case 1508: /* utility_option_name: analyze_keyword */ +#line 10733 "gram.y" + { (yyval.str) = "analyze"; } +#line 40626 "gram.c" break; - case 1509: -#line 10737 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeString((yyvsp[0].str)); } -#line 40140 "gram.c" /* yacc.c:1652 */ + case 1509: /* utility_option_arg: opt_boolean_or_string */ +#line 10737 "gram.y" + { (yyval.node) = (Node *) makeString((yyvsp[0].str)); } +#line 40632 "gram.c" break; - case 1510: -#line 10738 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) (yyvsp[0].value); } -#line 40146 "gram.c" /* yacc.c:1652 */ + case 1510: /* utility_option_arg: NumericOnly */ +#line 10738 "gram.y" + { (yyval.node) = (Node *) (yyvsp[0].value); } +#line 40638 "gram.c" break; - case 1511: -#line 10739 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 40152 "gram.c" /* yacc.c:1652 */ + case 1511: /* utility_option_arg: %empty */ +#line 10739 "gram.y" + { (yyval.node) = NULL; } +#line 40644 "gram.c" break; - case 1512: -#line 10743 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 40158 "gram.c" /* yacc.c:1652 */ + case 1512: /* opt_analyze: analyze_keyword */ +#line 10743 "gram.y" + { (yyval.boolean) = true; } +#line 40650 "gram.c" break; - case 1513: -#line 10744 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 40164 "gram.c" /* yacc.c:1652 */ + case 1513: /* opt_analyze: %empty */ +#line 10744 "gram.y" + { (yyval.boolean) = false; } +#line 40656 "gram.c" break; - case 1514: -#line 10748 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 40170 "gram.c" /* yacc.c:1652 */ + case 1514: /* opt_verbose: VERBOSE */ +#line 10748 "gram.y" + { (yyval.boolean) = true; } +#line 40662 "gram.c" break; - case 1515: -#line 10749 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 40176 "gram.c" /* yacc.c:1652 */ + case 1515: /* opt_verbose: %empty */ +#line 10749 "gram.y" + { (yyval.boolean) = false; } +#line 40668 "gram.c" break; - case 1516: -#line 10752 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 40182 "gram.c" /* yacc.c:1652 */ + case 1516: /* opt_full: FULL */ +#line 10752 "gram.y" + { (yyval.boolean) = true; } +#line 40674 "gram.c" break; - case 1517: -#line 10753 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 40188 "gram.c" /* yacc.c:1652 */ + case 1517: /* opt_full: %empty */ +#line 10753 "gram.y" + { (yyval.boolean) = false; } +#line 40680 "gram.c" break; - case 1518: -#line 10756 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 40194 "gram.c" /* yacc.c:1652 */ + case 1518: /* opt_freeze: FREEZE */ +#line 10756 "gram.y" + { (yyval.boolean) = true; } +#line 40686 "gram.c" break; - case 1519: -#line 10757 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 40200 "gram.c" /* yacc.c:1652 */ + case 1519: /* opt_freeze: %empty */ +#line 10757 "gram.y" + { (yyval.boolean) = false; } +#line 40692 "gram.c" break; - case 1520: -#line 10761 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 40206 "gram.c" /* yacc.c:1652 */ + case 1520: /* opt_name_list: '(' name_list ')' */ +#line 10761 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 40698 "gram.c" break; - case 1521: -#line 10762 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 40212 "gram.c" /* yacc.c:1652 */ + case 1521: /* opt_name_list: %empty */ +#line 10762 "gram.y" + { (yyval.list) = NIL; } +#line 40704 "gram.c" break; - case 1522: -#line 10767 "gram.y" /* yacc.c:1652 */ - { + case 1522: /* vacuum_relation: qualified_name opt_name_list */ +#line 10767 "gram.y" + { (yyval.node) = (Node *) makeVacuumRelation((yyvsp[-1].range), InvalidOid, (yyvsp[0].list)); } -#line 40220 "gram.c" /* yacc.c:1652 */ +#line 40712 "gram.c" break; - case 1523: -#line 10774 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 40226 "gram.c" /* yacc.c:1652 */ + case 1523: /* vacuum_relation_list: vacuum_relation */ +#line 10774 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 40718 "gram.c" break; - case 1524: -#line 10776 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 40232 "gram.c" /* yacc.c:1652 */ + case 1524: /* vacuum_relation_list: vacuum_relation_list ',' vacuum_relation */ +#line 10776 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } +#line 40724 "gram.c" break; - case 1525: -#line 10780 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 40238 "gram.c" /* yacc.c:1652 */ + case 1525: /* opt_vacuum_relation_list: vacuum_relation_list */ +#line 10780 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 40730 "gram.c" break; - case 1526: -#line 10781 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 40244 "gram.c" /* yacc.c:1652 */ + case 1526: /* opt_vacuum_relation_list: %empty */ +#line 10781 "gram.y" + { (yyval.list) = NIL; } +#line 40736 "gram.c" break; - case 1527: -#line 10795 "gram.y" /* yacc.c:1652 */ - { + case 1527: /* ExplainStmt: EXPLAIN ExplainableStmt */ +#line 10795 "gram.y" + { ExplainStmt *n = makeNode(ExplainStmt); n->query = (yyvsp[0].node); n->options = NIL; (yyval.node) = (Node *) n; } -#line 40255 "gram.c" /* yacc.c:1652 */ +#line 40747 "gram.c" break; - case 1528: -#line 10802 "gram.y" /* yacc.c:1652 */ - { + case 1528: /* ExplainStmt: EXPLAIN analyze_keyword opt_verbose ExplainableStmt */ +#line 10802 "gram.y" + { ExplainStmt *n = makeNode(ExplainStmt); n->query = (yyvsp[0].node); n->options = list_make1(makeDefElem("analyze", NULL, (yylsp[-2]))); @@ -40265,69 +40757,69 @@ yyreduce: makeDefElem("verbose", NULL, (yylsp[-1]))); (yyval.node) = (Node *) n; } -#line 40269 "gram.c" /* yacc.c:1652 */ +#line 40761 "gram.c" break; - case 1529: -#line 10812 "gram.y" /* yacc.c:1652 */ - { + case 1529: /* ExplainStmt: EXPLAIN VERBOSE ExplainableStmt */ +#line 10812 "gram.y" + { ExplainStmt *n = makeNode(ExplainStmt); n->query = (yyvsp[0].node); n->options = list_make1(makeDefElem("verbose", NULL, (yylsp[-1]))); (yyval.node) = (Node *) n; } -#line 40280 "gram.c" /* yacc.c:1652 */ +#line 40772 "gram.c" break; - case 1530: -#line 10819 "gram.y" /* yacc.c:1652 */ - { + case 1530: /* ExplainStmt: EXPLAIN '(' utility_option_list ')' ExplainableStmt */ +#line 10819 "gram.y" + { ExplainStmt *n = makeNode(ExplainStmt); n->query = (yyvsp[0].node); n->options = (yyvsp[-2].list); (yyval.node) = (Node *) n; } -#line 40291 "gram.c" /* yacc.c:1652 */ +#line 40783 "gram.c" break; - case 1540: -#line 10847 "gram.y" /* yacc.c:1652 */ - { + case 1540: /* PrepareStmt: PREPARE name prep_type_clause AS PreparableStmt */ +#line 10847 "gram.y" + { PrepareStmt *n = makeNode(PrepareStmt); n->name = (yyvsp[-3].str); n->argtypes = (yyvsp[-2].list); n->query = (yyvsp[0].node); (yyval.node) = (Node *) n; } -#line 40303 "gram.c" /* yacc.c:1652 */ +#line 40795 "gram.c" break; - case 1541: -#line 10856 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 40309 "gram.c" /* yacc.c:1652 */ + case 1541: /* prep_type_clause: '(' type_list ')' */ +#line 10856 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 40801 "gram.c" break; - case 1542: -#line 10857 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 40315 "gram.c" /* yacc.c:1652 */ + case 1542: /* prep_type_clause: %empty */ +#line 10857 "gram.y" + { (yyval.list) = NIL; } +#line 40807 "gram.c" break; - case 1547: -#line 10875 "gram.y" /* yacc.c:1652 */ - { + case 1547: /* ExecuteStmt: EXECUTE name execute_param_clause */ +#line 10875 "gram.y" + { ExecuteStmt *n = makeNode(ExecuteStmt); n->name = (yyvsp[-1].str); n->params = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 40326 "gram.c" /* yacc.c:1652 */ +#line 40818 "gram.c" break; - case 1548: -#line 10883 "gram.y" /* yacc.c:1652 */ - { + case 1548: /* ExecuteStmt: CREATE OptTemp TABLE create_as_target AS EXECUTE name execute_param_clause opt_with_data */ +#line 10883 "gram.y" + { CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt); ExecuteStmt *n = makeNode(ExecuteStmt); n->name = (yyvsp[-2].str); @@ -40342,12 +40834,12 @@ yyreduce: (yyvsp[-5].into)->skipData = !((yyvsp[0].boolean)); (yyval.node) = (Node *) ctas; } -#line 40346 "gram.c" /* yacc.c:1652 */ +#line 40838 "gram.c" break; - case 1549: -#line 10900 "gram.y" /* yacc.c:1652 */ - { + case 1549: /* ExecuteStmt: CREATE OptTemp TABLE IF_P NOT EXISTS create_as_target AS EXECUTE name execute_param_clause opt_with_data */ +#line 10900 "gram.y" + { CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt); ExecuteStmt *n = makeNode(ExecuteStmt); n->name = (yyvsp[-2].str); @@ -40362,181 +40854,181 @@ yyreduce: (yyvsp[-5].into)->skipData = !((yyvsp[0].boolean)); (yyval.node) = (Node *) ctas; } -#line 40366 "gram.c" /* yacc.c:1652 */ +#line 40858 "gram.c" break; - case 1550: -#line 10917 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 40372 "gram.c" /* yacc.c:1652 */ + case 1550: /* execute_param_clause: '(' expr_list ')' */ +#line 10917 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 40864 "gram.c" break; - case 1551: -#line 10918 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 40378 "gram.c" /* yacc.c:1652 */ + case 1551: /* execute_param_clause: %empty */ +#line 10918 "gram.y" + { (yyval.list) = NIL; } +#line 40870 "gram.c" break; - case 1552: -#line 10929 "gram.y" /* yacc.c:1652 */ - { + case 1552: /* DeallocateStmt: DEALLOCATE name */ +#line 10929 "gram.y" + { DeallocateStmt *n = makeNode(DeallocateStmt); n->name = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 40388 "gram.c" /* yacc.c:1652 */ +#line 40880 "gram.c" break; - case 1553: -#line 10935 "gram.y" /* yacc.c:1652 */ - { + case 1553: /* DeallocateStmt: DEALLOCATE PREPARE name */ +#line 10935 "gram.y" + { DeallocateStmt *n = makeNode(DeallocateStmt); n->name = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 40398 "gram.c" /* yacc.c:1652 */ +#line 40890 "gram.c" break; - case 1554: -#line 10941 "gram.y" /* yacc.c:1652 */ - { + case 1554: /* DeallocateStmt: DEALLOCATE ALL */ +#line 10941 "gram.y" + { DeallocateStmt *n = makeNode(DeallocateStmt); n->name = NULL; (yyval.node) = (Node *) n; } -#line 40408 "gram.c" /* yacc.c:1652 */ +#line 40900 "gram.c" break; - case 1555: -#line 10947 "gram.y" /* yacc.c:1652 */ - { + case 1555: /* DeallocateStmt: DEALLOCATE PREPARE ALL */ +#line 10947 "gram.y" + { DeallocateStmt *n = makeNode(DeallocateStmt); n->name = NULL; (yyval.node) = (Node *) n; } -#line 40418 "gram.c" /* yacc.c:1652 */ +#line 40910 "gram.c" break; - case 1556: -#line 10964 "gram.y" /* yacc.c:1652 */ - { + case 1556: /* InsertStmt: opt_with_clause INSERT INTO insert_target insert_rest opt_on_conflict returning_clause */ +#line 10964 "gram.y" + { (yyvsp[-2].istmt)->relation = (yyvsp[-3].range); (yyvsp[-2].istmt)->onConflictClause = (yyvsp[-1].onconflict); (yyvsp[-2].istmt)->returningList = (yyvsp[0].list); (yyvsp[-2].istmt)->withClause = (yyvsp[-6].with); (yyval.node) = (Node *) (yyvsp[-2].istmt); } -#line 40430 "gram.c" /* yacc.c:1652 */ +#line 40922 "gram.c" break; - case 1557: -#line 10981 "gram.y" /* yacc.c:1652 */ - { + case 1557: /* insert_target: qualified_name */ +#line 10981 "gram.y" + { (yyval.range) = (yyvsp[0].range); } -#line 40438 "gram.c" /* yacc.c:1652 */ +#line 40930 "gram.c" break; - case 1558: -#line 10985 "gram.y" /* yacc.c:1652 */ - { + case 1558: /* insert_target: qualified_name AS ColId */ +#line 10985 "gram.y" + { (yyvsp[-2].range)->alias = makeAlias((yyvsp[0].str), NIL); (yyval.range) = (yyvsp[-2].range); } -#line 40447 "gram.c" /* yacc.c:1652 */ +#line 40939 "gram.c" break; - case 1559: -#line 10993 "gram.y" /* yacc.c:1652 */ - { + case 1559: /* insert_rest: SelectStmt */ +#line 10993 "gram.y" + { (yyval.istmt) = makeNode(InsertStmt); (yyval.istmt)->cols = NIL; (yyval.istmt)->selectStmt = (yyvsp[0].node); } -#line 40457 "gram.c" /* yacc.c:1652 */ +#line 40949 "gram.c" break; - case 1560: -#line 10999 "gram.y" /* yacc.c:1652 */ - { + case 1560: /* insert_rest: OVERRIDING override_kind VALUE_P SelectStmt */ +#line 10999 "gram.y" + { (yyval.istmt) = makeNode(InsertStmt); (yyval.istmt)->cols = NIL; (yyval.istmt)->override = (yyvsp[-2].ival); (yyval.istmt)->selectStmt = (yyvsp[0].node); } -#line 40468 "gram.c" /* yacc.c:1652 */ +#line 40960 "gram.c" break; - case 1561: -#line 11006 "gram.y" /* yacc.c:1652 */ - { + case 1561: /* insert_rest: '(' insert_column_list ')' SelectStmt */ +#line 11006 "gram.y" + { (yyval.istmt) = makeNode(InsertStmt); (yyval.istmt)->cols = (yyvsp[-2].list); (yyval.istmt)->selectStmt = (yyvsp[0].node); } -#line 40478 "gram.c" /* yacc.c:1652 */ +#line 40970 "gram.c" break; - case 1562: -#line 11012 "gram.y" /* yacc.c:1652 */ - { + case 1562: /* insert_rest: '(' insert_column_list ')' OVERRIDING override_kind VALUE_P SelectStmt */ +#line 11012 "gram.y" + { (yyval.istmt) = makeNode(InsertStmt); (yyval.istmt)->cols = (yyvsp[-5].list); (yyval.istmt)->override = (yyvsp[-2].ival); (yyval.istmt)->selectStmt = (yyvsp[0].node); } -#line 40489 "gram.c" /* yacc.c:1652 */ +#line 40981 "gram.c" break; - case 1563: -#line 11019 "gram.y" /* yacc.c:1652 */ - { + case 1563: /* insert_rest: DEFAULT VALUES */ +#line 11019 "gram.y" + { (yyval.istmt) = makeNode(InsertStmt); (yyval.istmt)->cols = NIL; (yyval.istmt)->selectStmt = NULL; } -#line 40499 "gram.c" /* yacc.c:1652 */ +#line 40991 "gram.c" break; - case 1564: -#line 11027 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = OVERRIDING_USER_VALUE; } -#line 40505 "gram.c" /* yacc.c:1652 */ + case 1564: /* override_kind: USER */ +#line 11027 "gram.y" + { (yyval.ival) = OVERRIDING_USER_VALUE; } +#line 40997 "gram.c" break; - case 1565: -#line 11028 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = OVERRIDING_SYSTEM_VALUE; } -#line 40511 "gram.c" /* yacc.c:1652 */ + case 1565: /* override_kind: SYSTEM_P */ +#line 11028 "gram.y" + { (yyval.ival) = OVERRIDING_SYSTEM_VALUE; } +#line 41003 "gram.c" break; - case 1566: -#line 11033 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].target)); } -#line 40517 "gram.c" /* yacc.c:1652 */ + case 1566: /* insert_column_list: insert_column_item */ +#line 11033 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].target)); } +#line 41009 "gram.c" break; - case 1567: -#line 11035 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].target)); } -#line 40523 "gram.c" /* yacc.c:1652 */ + case 1567: /* insert_column_list: insert_column_list ',' insert_column_item */ +#line 11035 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].target)); } +#line 41015 "gram.c" break; - case 1568: -#line 11040 "gram.y" /* yacc.c:1652 */ - { + case 1568: /* insert_column_item: ColId opt_indirection */ +#line 11040 "gram.y" + { (yyval.target) = makeNode(ResTarget); (yyval.target)->name = (yyvsp[-1].str); (yyval.target)->indirection = check_indirection((yyvsp[0].list), yyscanner); (yyval.target)->val = NULL; (yyval.target)->location = (yylsp[-1]); } -#line 40535 "gram.c" /* yacc.c:1652 */ +#line 41027 "gram.c" break; - case 1569: -#line 11051 "gram.y" /* yacc.c:1652 */ - { + case 1569: /* opt_on_conflict: ON CONFLICT opt_conf_expr DO UPDATE SET set_clause_list where_clause */ +#line 11051 "gram.y" + { (yyval.onconflict) = makeNode(OnConflictClause); (yyval.onconflict)->action = ONCONFLICT_UPDATE; (yyval.onconflict)->infer = (yyvsp[-5].infer); @@ -40544,12 +41036,12 @@ yyreduce: (yyval.onconflict)->whereClause = (yyvsp[0].node); (yyval.onconflict)->location = (yylsp[-7]); } -#line 40548 "gram.c" /* yacc.c:1652 */ +#line 41040 "gram.c" break; - case 1570: -#line 11061 "gram.y" /* yacc.c:1652 */ - { + case 1570: /* opt_on_conflict: ON CONFLICT opt_conf_expr DO NOTHING */ +#line 11061 "gram.y" + { (yyval.onconflict) = makeNode(OnConflictClause); (yyval.onconflict)->action = ONCONFLICT_NOTHING; (yyval.onconflict)->infer = (yyvsp[-2].infer); @@ -40557,64 +41049,64 @@ yyreduce: (yyval.onconflict)->whereClause = NULL; (yyval.onconflict)->location = (yylsp[-4]); } -#line 40561 "gram.c" /* yacc.c:1652 */ +#line 41053 "gram.c" break; - case 1571: -#line 11070 "gram.y" /* yacc.c:1652 */ - { + case 1571: /* opt_on_conflict: %empty */ +#line 11070 "gram.y" + { (yyval.onconflict) = NULL; } -#line 40569 "gram.c" /* yacc.c:1652 */ +#line 41061 "gram.c" break; - case 1572: -#line 11077 "gram.y" /* yacc.c:1652 */ - { + case 1572: /* opt_conf_expr: '(' index_params ')' where_clause */ +#line 11077 "gram.y" + { (yyval.infer) = makeNode(InferClause); (yyval.infer)->indexElems = (yyvsp[-2].list); (yyval.infer)->whereClause = (yyvsp[0].node); (yyval.infer)->conname = NULL; (yyval.infer)->location = (yylsp[-3]); } -#line 40581 "gram.c" /* yacc.c:1652 */ +#line 41073 "gram.c" break; - case 1573: -#line 11086 "gram.y" /* yacc.c:1652 */ - { + case 1573: /* opt_conf_expr: ON CONSTRAINT name */ +#line 11086 "gram.y" + { (yyval.infer) = makeNode(InferClause); (yyval.infer)->indexElems = NIL; (yyval.infer)->whereClause = NULL; (yyval.infer)->conname = (yyvsp[0].str); (yyval.infer)->location = (yylsp[-2]); } -#line 40593 "gram.c" /* yacc.c:1652 */ +#line 41085 "gram.c" break; - case 1574: -#line 11094 "gram.y" /* yacc.c:1652 */ - { + case 1574: /* opt_conf_expr: %empty */ +#line 11094 "gram.y" + { (yyval.infer) = NULL; } -#line 40601 "gram.c" /* yacc.c:1652 */ +#line 41093 "gram.c" break; - case 1575: -#line 11100 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 40607 "gram.c" /* yacc.c:1652 */ + case 1575: /* returning_clause: RETURNING target_list */ +#line 11100 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 41099 "gram.c" break; - case 1576: -#line 11101 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 40613 "gram.c" /* yacc.c:1652 */ + case 1576: /* returning_clause: %empty */ +#line 11101 "gram.y" + { (yyval.list) = NIL; } +#line 41105 "gram.c" break; - case 1577: -#line 11114 "gram.y" /* yacc.c:1652 */ - { + case 1577: /* DeleteStmt: opt_with_clause DELETE_P FROM relation_expr_opt_alias using_clause where_or_current_clause returning_clause */ +#line 11114 "gram.y" + { DeleteStmt *n = makeNode(DeleteStmt); n->relation = (yyvsp[-3].range); n->usingClause = (yyvsp[-2].list); @@ -40623,24 +41115,24 @@ yyreduce: n->withClause = (yyvsp[-6].with); (yyval.node) = (Node *)n; } -#line 40627 "gram.c" /* yacc.c:1652 */ +#line 41119 "gram.c" break; - case 1578: -#line 11126 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 40633 "gram.c" /* yacc.c:1652 */ + case 1578: /* using_clause: USING from_list */ +#line 11126 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 41125 "gram.c" break; - case 1579: -#line 11127 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 40639 "gram.c" /* yacc.c:1652 */ + case 1579: /* using_clause: %empty */ +#line 11127 "gram.y" + { (yyval.list) = NIL; } +#line 41131 "gram.c" break; - case 1580: -#line 11139 "gram.y" /* yacc.c:1652 */ - { + case 1580: /* LockStmt: LOCK_P opt_table relation_expr_list opt_lock opt_nowait */ +#line 11139 "gram.y" + { LockStmt *n = makeNode(LockStmt); n->relations = (yyvsp[-2].list); @@ -40648,102 +41140,102 @@ yyreduce: n->nowait = (yyvsp[0].boolean); (yyval.node) = (Node *)n; } -#line 40652 "gram.c" /* yacc.c:1652 */ +#line 41144 "gram.c" break; - case 1581: -#line 11149 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = (yyvsp[-1].ival); } -#line 40658 "gram.c" /* yacc.c:1652 */ + case 1581: /* opt_lock: IN_P lock_type MODE */ +#line 11149 "gram.y" + { (yyval.ival) = (yyvsp[-1].ival); } +#line 41150 "gram.c" break; - case 1582: -#line 11150 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = AccessExclusiveLock; } -#line 40664 "gram.c" /* yacc.c:1652 */ + case 1582: /* opt_lock: %empty */ +#line 11150 "gram.y" + { (yyval.ival) = AccessExclusiveLock; } +#line 41156 "gram.c" break; - case 1583: -#line 11153 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = AccessShareLock; } -#line 40670 "gram.c" /* yacc.c:1652 */ + case 1583: /* lock_type: ACCESS SHARE */ +#line 11153 "gram.y" + { (yyval.ival) = AccessShareLock; } +#line 41162 "gram.c" break; - case 1584: -#line 11154 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = RowShareLock; } -#line 40676 "gram.c" /* yacc.c:1652 */ + case 1584: /* lock_type: ROW SHARE */ +#line 11154 "gram.y" + { (yyval.ival) = RowShareLock; } +#line 41168 "gram.c" break; - case 1585: -#line 11155 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = RowExclusiveLock; } -#line 40682 "gram.c" /* yacc.c:1652 */ + case 1585: /* lock_type: ROW EXCLUSIVE */ +#line 11155 "gram.y" + { (yyval.ival) = RowExclusiveLock; } +#line 41174 "gram.c" break; - case 1586: -#line 11156 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = ShareUpdateExclusiveLock; } -#line 40688 "gram.c" /* yacc.c:1652 */ + case 1586: /* lock_type: SHARE UPDATE EXCLUSIVE */ +#line 11156 "gram.y" + { (yyval.ival) = ShareUpdateExclusiveLock; } +#line 41180 "gram.c" break; - case 1587: -#line 11157 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = ShareLock; } -#line 40694 "gram.c" /* yacc.c:1652 */ + case 1587: /* lock_type: SHARE */ +#line 11157 "gram.y" + { (yyval.ival) = ShareLock; } +#line 41186 "gram.c" break; - case 1588: -#line 11158 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = ShareRowExclusiveLock; } -#line 40700 "gram.c" /* yacc.c:1652 */ + case 1588: /* lock_type: SHARE ROW EXCLUSIVE */ +#line 11158 "gram.y" + { (yyval.ival) = ShareRowExclusiveLock; } +#line 41192 "gram.c" break; - case 1589: -#line 11159 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = ExclusiveLock; } -#line 40706 "gram.c" /* yacc.c:1652 */ + case 1589: /* lock_type: EXCLUSIVE */ +#line 11159 "gram.y" + { (yyval.ival) = ExclusiveLock; } +#line 41198 "gram.c" break; - case 1590: -#line 11160 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = AccessExclusiveLock; } -#line 40712 "gram.c" /* yacc.c:1652 */ + case 1590: /* lock_type: ACCESS EXCLUSIVE */ +#line 11160 "gram.y" + { (yyval.ival) = AccessExclusiveLock; } +#line 41204 "gram.c" break; - case 1591: -#line 11163 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 40718 "gram.c" /* yacc.c:1652 */ + case 1591: /* opt_nowait: NOWAIT */ +#line 11163 "gram.y" + { (yyval.boolean) = true; } +#line 41210 "gram.c" break; - case 1592: -#line 11164 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 40724 "gram.c" /* yacc.c:1652 */ + case 1592: /* opt_nowait: %empty */ +#line 11164 "gram.y" + { (yyval.boolean) = false; } +#line 41216 "gram.c" break; - case 1593: -#line 11168 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = LockWaitError; } -#line 40730 "gram.c" /* yacc.c:1652 */ + case 1593: /* opt_nowait_or_skip: NOWAIT */ +#line 11168 "gram.y" + { (yyval.ival) = LockWaitError; } +#line 41222 "gram.c" break; - case 1594: -#line 11169 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = LockWaitSkip; } -#line 40736 "gram.c" /* yacc.c:1652 */ + case 1594: /* opt_nowait_or_skip: SKIP LOCKED */ +#line 11169 "gram.y" + { (yyval.ival) = LockWaitSkip; } +#line 41228 "gram.c" break; - case 1595: -#line 11170 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = LockWaitBlock; } -#line 40742 "gram.c" /* yacc.c:1652 */ + case 1595: /* opt_nowait_or_skip: %empty */ +#line 11170 "gram.y" + { (yyval.ival) = LockWaitBlock; } +#line 41234 "gram.c" break; - case 1596: -#line 11186 "gram.y" /* yacc.c:1652 */ - { + case 1596: /* UpdateStmt: opt_with_clause UPDATE relation_expr_opt_alias SET set_clause_list from_clause where_or_current_clause returning_clause */ +#line 11186 "gram.y" + { UpdateStmt *n = makeNode(UpdateStmt); n->relation = (yyvsp[-5].range); n->targetList = (yyvsp[-3].list); @@ -40753,33 +41245,33 @@ yyreduce: n->withClause = (yyvsp[-7].with); (yyval.node) = (Node *)n; } -#line 40757 "gram.c" /* yacc.c:1652 */ +#line 41249 "gram.c" break; - case 1597: -#line 11199 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 40763 "gram.c" /* yacc.c:1652 */ + case 1597: /* set_clause_list: set_clause */ +#line 11199 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 41255 "gram.c" break; - case 1598: -#line 11200 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_concat((yyvsp[-2].list),(yyvsp[0].list)); } -#line 40769 "gram.c" /* yacc.c:1652 */ + case 1598: /* set_clause_list: set_clause_list ',' set_clause */ +#line 11200 "gram.y" + { (yyval.list) = list_concat((yyvsp[-2].list),(yyvsp[0].list)); } +#line 41261 "gram.c" break; - case 1599: -#line 11205 "gram.y" /* yacc.c:1652 */ - { + case 1599: /* set_clause: set_target '=' a_expr */ +#line 11205 "gram.y" + { (yyvsp[-2].target)->val = (Node *) (yyvsp[0].node); (yyval.list) = list_make1((yyvsp[-2].target)); } -#line 40778 "gram.c" /* yacc.c:1652 */ +#line 41270 "gram.c" break; - case 1600: -#line 11210 "gram.y" /* yacc.c:1652 */ - { + case 1600: /* set_clause: '(' set_target_list ')' '=' a_expr */ +#line 11210 "gram.y" + { int ncolumns = list_length((yyvsp[-3].list)); int i = 1; ListCell *col_cell; @@ -40799,36 +41291,36 @@ yyreduce: (yyval.list) = (yyvsp[-3].list); } -#line 40803 "gram.c" /* yacc.c:1652 */ +#line 41295 "gram.c" break; - case 1601: -#line 11234 "gram.y" /* yacc.c:1652 */ - { + case 1601: /* set_target: ColId opt_indirection */ +#line 11234 "gram.y" + { (yyval.target) = makeNode(ResTarget); (yyval.target)->name = (yyvsp[-1].str); (yyval.target)->indirection = check_indirection((yyvsp[0].list), yyscanner); (yyval.target)->val = NULL; /* upper production sets this */ (yyval.target)->location = (yylsp[-1]); } -#line 40815 "gram.c" /* yacc.c:1652 */ +#line 41307 "gram.c" break; - case 1602: -#line 11244 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].target)); } -#line 40821 "gram.c" /* yacc.c:1652 */ + case 1602: /* set_target_list: set_target */ +#line 11244 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].target)); } +#line 41313 "gram.c" break; - case 1603: -#line 11245 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list),(yyvsp[0].target)); } -#line 40827 "gram.c" /* yacc.c:1652 */ + case 1603: /* set_target_list: set_target_list ',' set_target */ +#line 11245 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list),(yyvsp[0].target)); } +#line 41319 "gram.c" break; - case 1604: -#line 11256 "gram.y" /* yacc.c:1652 */ - { + case 1604: /* DeclareCursorStmt: DECLARE cursor_name cursor_options CURSOR opt_hold FOR SelectStmt */ +#line 11256 "gram.y" + { DeclareCursorStmt *n = makeNode(DeclareCursorStmt); n->portalname = (yyvsp[-5].str); /* currently we always set FAST_PLAN option */ @@ -40836,185 +41328,185 @@ yyreduce: n->query = (yyvsp[0].node); (yyval.node) = (Node *)n; } -#line 40840 "gram.c" /* yacc.c:1652 */ +#line 41332 "gram.c" break; - case 1605: -#line 11266 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 40846 "gram.c" /* yacc.c:1652 */ + case 1605: /* cursor_name: name */ +#line 11266 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 41338 "gram.c" break; - case 1606: -#line 11269 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = 0; } -#line 40852 "gram.c" /* yacc.c:1652 */ + case 1606: /* cursor_options: %empty */ +#line 11269 "gram.y" + { (yyval.ival) = 0; } +#line 41344 "gram.c" break; - case 1607: -#line 11270 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = (yyvsp[-2].ival) | CURSOR_OPT_NO_SCROLL; } -#line 40858 "gram.c" /* yacc.c:1652 */ + case 1607: /* cursor_options: cursor_options NO SCROLL */ +#line 11270 "gram.y" + { (yyval.ival) = (yyvsp[-2].ival) | CURSOR_OPT_NO_SCROLL; } +#line 41350 "gram.c" break; - case 1608: -#line 11271 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = (yyvsp[-1].ival) | CURSOR_OPT_SCROLL; } -#line 40864 "gram.c" /* yacc.c:1652 */ + case 1608: /* cursor_options: cursor_options SCROLL */ +#line 11271 "gram.y" + { (yyval.ival) = (yyvsp[-1].ival) | CURSOR_OPT_SCROLL; } +#line 41356 "gram.c" break; - case 1609: -#line 11272 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = (yyvsp[-1].ival) | CURSOR_OPT_BINARY; } -#line 40870 "gram.c" /* yacc.c:1652 */ + case 1609: /* cursor_options: cursor_options BINARY */ +#line 11272 "gram.y" + { (yyval.ival) = (yyvsp[-1].ival) | CURSOR_OPT_BINARY; } +#line 41362 "gram.c" break; - case 1610: -#line 11273 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = (yyvsp[-1].ival) | CURSOR_OPT_ASENSITIVE; } -#line 40876 "gram.c" /* yacc.c:1652 */ + case 1610: /* cursor_options: cursor_options ASENSITIVE */ +#line 11273 "gram.y" + { (yyval.ival) = (yyvsp[-1].ival) | CURSOR_OPT_ASENSITIVE; } +#line 41368 "gram.c" break; - case 1611: -#line 11274 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = (yyvsp[-1].ival) | CURSOR_OPT_INSENSITIVE; } -#line 40882 "gram.c" /* yacc.c:1652 */ + case 1611: /* cursor_options: cursor_options INSENSITIVE */ +#line 11274 "gram.y" + { (yyval.ival) = (yyvsp[-1].ival) | CURSOR_OPT_INSENSITIVE; } +#line 41374 "gram.c" break; - case 1612: -#line 11277 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = 0; } -#line 40888 "gram.c" /* yacc.c:1652 */ + case 1612: /* opt_hold: %empty */ +#line 11277 "gram.y" + { (yyval.ival) = 0; } +#line 41380 "gram.c" break; - case 1613: -#line 11278 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CURSOR_OPT_HOLD; } -#line 40894 "gram.c" /* yacc.c:1652 */ + case 1613: /* opt_hold: WITH HOLD */ +#line 11278 "gram.y" + { (yyval.ival) = CURSOR_OPT_HOLD; } +#line 41386 "gram.c" break; - case 1614: -#line 11279 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = 0; } -#line 40900 "gram.c" /* yacc.c:1652 */ + case 1614: /* opt_hold: WITHOUT HOLD */ +#line 11279 "gram.y" + { (yyval.ival) = 0; } +#line 41392 "gram.c" break; - case 1617: -#line 11332 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[-1].node); } -#line 40906 "gram.c" /* yacc.c:1652 */ + case 1617: /* select_with_parens: '(' select_no_parens ')' */ +#line 11332 "gram.y" + { (yyval.node) = (yyvsp[-1].node); } +#line 41398 "gram.c" break; - case 1618: -#line 11333 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[-1].node); } -#line 40912 "gram.c" /* yacc.c:1652 */ + case 1618: /* select_with_parens: '(' select_with_parens ')' */ +#line 11333 "gram.y" + { (yyval.node) = (yyvsp[-1].node); } +#line 41404 "gram.c" break; - case 1619: -#line 11348 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 40918 "gram.c" /* yacc.c:1652 */ + case 1619: /* select_no_parens: simple_select */ +#line 11348 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 41410 "gram.c" break; - case 1620: -#line 11350 "gram.y" /* yacc.c:1652 */ - { + case 1620: /* select_no_parens: select_clause sort_clause */ +#line 11350 "gram.y" + { insertSelectOptions((SelectStmt *) (yyvsp[-1].node), (yyvsp[0].list), NIL, NULL, NULL, yyscanner); (yyval.node) = (yyvsp[-1].node); } -#line 40929 "gram.c" /* yacc.c:1652 */ +#line 41421 "gram.c" break; - case 1621: -#line 11357 "gram.y" /* yacc.c:1652 */ - { + case 1621: /* select_no_parens: select_clause opt_sort_clause for_locking_clause opt_select_limit */ +#line 11357 "gram.y" + { insertSelectOptions((SelectStmt *) (yyvsp[-3].node), (yyvsp[-2].list), (yyvsp[-1].list), (yyvsp[0].selectlimit), NULL, yyscanner); (yyval.node) = (yyvsp[-3].node); } -#line 40941 "gram.c" /* yacc.c:1652 */ +#line 41433 "gram.c" break; - case 1622: -#line 11365 "gram.y" /* yacc.c:1652 */ - { + case 1622: /* select_no_parens: select_clause opt_sort_clause select_limit opt_for_locking_clause */ +#line 11365 "gram.y" + { insertSelectOptions((SelectStmt *) (yyvsp[-3].node), (yyvsp[-2].list), (yyvsp[0].list), (yyvsp[-1].selectlimit), NULL, yyscanner); (yyval.node) = (yyvsp[-3].node); } -#line 40953 "gram.c" /* yacc.c:1652 */ +#line 41445 "gram.c" break; - case 1623: -#line 11373 "gram.y" /* yacc.c:1652 */ - { + case 1623: /* select_no_parens: with_clause select_clause */ +#line 11373 "gram.y" + { insertSelectOptions((SelectStmt *) (yyvsp[0].node), NULL, NIL, NULL, (yyvsp[-1].with), yyscanner); (yyval.node) = (yyvsp[0].node); } -#line 40965 "gram.c" /* yacc.c:1652 */ +#line 41457 "gram.c" break; - case 1624: -#line 11381 "gram.y" /* yacc.c:1652 */ - { + case 1624: /* select_no_parens: with_clause select_clause sort_clause */ +#line 11381 "gram.y" + { insertSelectOptions((SelectStmt *) (yyvsp[-1].node), (yyvsp[0].list), NIL, NULL, (yyvsp[-2].with), yyscanner); (yyval.node) = (yyvsp[-1].node); } -#line 40977 "gram.c" /* yacc.c:1652 */ +#line 41469 "gram.c" break; - case 1625: -#line 11389 "gram.y" /* yacc.c:1652 */ - { + case 1625: /* select_no_parens: with_clause select_clause opt_sort_clause for_locking_clause opt_select_limit */ +#line 11389 "gram.y" + { insertSelectOptions((SelectStmt *) (yyvsp[-3].node), (yyvsp[-2].list), (yyvsp[-1].list), (yyvsp[0].selectlimit), (yyvsp[-4].with), yyscanner); (yyval.node) = (yyvsp[-3].node); } -#line 40989 "gram.c" /* yacc.c:1652 */ +#line 41481 "gram.c" break; - case 1626: -#line 11397 "gram.y" /* yacc.c:1652 */ - { + case 1626: /* select_no_parens: with_clause select_clause opt_sort_clause select_limit opt_for_locking_clause */ +#line 11397 "gram.y" + { insertSelectOptions((SelectStmt *) (yyvsp[-3].node), (yyvsp[-2].list), (yyvsp[0].list), (yyvsp[-1].selectlimit), (yyvsp[-4].with), yyscanner); (yyval.node) = (yyvsp[-3].node); } -#line 41001 "gram.c" /* yacc.c:1652 */ +#line 41493 "gram.c" break; - case 1627: -#line 11407 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 41007 "gram.c" /* yacc.c:1652 */ + case 1627: /* select_clause: simple_select */ +#line 11407 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 41499 "gram.c" break; - case 1628: -#line 11408 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 41013 "gram.c" /* yacc.c:1652 */ + case 1628: /* select_clause: select_with_parens */ +#line 11408 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 41505 "gram.c" break; - case 1629: -#line 11443 "gram.y" /* yacc.c:1652 */ - { + case 1629: /* simple_select: SELECT opt_all_clause opt_target_list into_clause from_clause where_clause group_clause having_clause window_clause */ +#line 11443 "gram.y" + { SelectStmt *n = makeNode(SelectStmt); n->targetList = (yyvsp[-6].list); n->intoClause = (yyvsp[-5].into); @@ -41026,12 +41518,12 @@ yyreduce: n->windowClause = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 41030 "gram.c" /* yacc.c:1652 */ +#line 41522 "gram.c" break; - case 1630: -#line 11458 "gram.y" /* yacc.c:1652 */ - { + case 1630: /* simple_select: SELECT distinct_clause target_list into_clause from_clause where_clause group_clause having_clause window_clause */ +#line 11458 "gram.y" + { SelectStmt *n = makeNode(SelectStmt); n->distinctClause = (yyvsp[-7].list); n->targetList = (yyvsp[-6].list); @@ -41044,18 +41536,18 @@ yyreduce: n->windowClause = (yyvsp[0].list); (yyval.node) = (Node *)n; } -#line 41048 "gram.c" /* yacc.c:1652 */ +#line 41540 "gram.c" break; - case 1631: -#line 11471 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 41054 "gram.c" /* yacc.c:1652 */ + case 1631: /* simple_select: values_clause */ +#line 11471 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 41546 "gram.c" break; - case 1632: -#line 11473 "gram.y" /* yacc.c:1652 */ - { + case 1632: /* simple_select: TABLE relation_expr */ +#line 11473 "gram.y" + { /* same as SELECT * FROM relation_expr */ ColumnRef *cr = makeNode(ColumnRef); ResTarget *rt = makeNode(ResTarget); @@ -41073,81 +41565,81 @@ yyreduce: n->fromClause = list_make1((yyvsp[0].range)); (yyval.node) = (Node *)n; } -#line 41077 "gram.c" /* yacc.c:1652 */ +#line 41569 "gram.c" break; - case 1633: -#line 11492 "gram.y" /* yacc.c:1652 */ - { + case 1633: /* simple_select: select_clause UNION set_quantifier select_clause */ +#line 11492 "gram.y" + { (yyval.node) = makeSetOp(SETOP_UNION, (yyvsp[-1].setquantifier) == SET_QUANTIFIER_ALL, (yyvsp[-3].node), (yyvsp[0].node)); } -#line 41085 "gram.c" /* yacc.c:1652 */ +#line 41577 "gram.c" break; - case 1634: -#line 11496 "gram.y" /* yacc.c:1652 */ - { + case 1634: /* simple_select: select_clause INTERSECT set_quantifier select_clause */ +#line 11496 "gram.y" + { (yyval.node) = makeSetOp(SETOP_INTERSECT, (yyvsp[-1].setquantifier) == SET_QUANTIFIER_ALL, (yyvsp[-3].node), (yyvsp[0].node)); } -#line 41093 "gram.c" /* yacc.c:1652 */ +#line 41585 "gram.c" break; - case 1635: -#line 11500 "gram.y" /* yacc.c:1652 */ - { + case 1635: /* simple_select: select_clause EXCEPT set_quantifier select_clause */ +#line 11500 "gram.y" + { (yyval.node) = makeSetOp(SETOP_EXCEPT, (yyvsp[-1].setquantifier) == SET_QUANTIFIER_ALL, (yyvsp[-3].node), (yyvsp[0].node)); } -#line 41101 "gram.c" /* yacc.c:1652 */ +#line 41593 "gram.c" break; - case 1636: -#line 11515 "gram.y" /* yacc.c:1652 */ - { + case 1636: /* with_clause: WITH cte_list */ +#line 11515 "gram.y" + { (yyval.with) = makeNode(WithClause); (yyval.with)->ctes = (yyvsp[0].list); (yyval.with)->recursive = false; (yyval.with)->location = (yylsp[-1]); } -#line 41112 "gram.c" /* yacc.c:1652 */ +#line 41604 "gram.c" break; - case 1637: -#line 11522 "gram.y" /* yacc.c:1652 */ - { + case 1637: /* with_clause: WITH_LA cte_list */ +#line 11522 "gram.y" + { (yyval.with) = makeNode(WithClause); (yyval.with)->ctes = (yyvsp[0].list); (yyval.with)->recursive = false; (yyval.with)->location = (yylsp[-1]); } -#line 41123 "gram.c" /* yacc.c:1652 */ +#line 41615 "gram.c" break; - case 1638: -#line 11529 "gram.y" /* yacc.c:1652 */ - { + case 1638: /* with_clause: WITH RECURSIVE cte_list */ +#line 11529 "gram.y" + { (yyval.with) = makeNode(WithClause); (yyval.with)->ctes = (yyvsp[0].list); (yyval.with)->recursive = true; (yyval.with)->location = (yylsp[-2]); } -#line 41134 "gram.c" /* yacc.c:1652 */ +#line 41626 "gram.c" break; - case 1639: -#line 11538 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 41140 "gram.c" /* yacc.c:1652 */ + case 1639: /* cte_list: common_table_expr */ +#line 11538 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 41632 "gram.c" break; - case 1640: -#line 11539 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 41146 "gram.c" /* yacc.c:1652 */ + case 1640: /* cte_list: cte_list ',' common_table_expr */ +#line 11539 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } +#line 41638 "gram.c" break; - case 1641: -#line 11543 "gram.y" /* yacc.c:1652 */ - { + case 1641: /* common_table_expr: name opt_name_list AS opt_materialized '(' PreparableStmt ')' opt_search_clause opt_cycle_clause */ +#line 11543 "gram.y" + { CommonTableExpr *n = makeNode(CommonTableExpr); n->ctename = (yyvsp[-8].str); n->aliascolnames = (yyvsp[-7].list); @@ -41158,30 +41650,30 @@ yyreduce: n->location = (yylsp[-8]); (yyval.node) = (Node *) n; } -#line 41162 "gram.c" /* yacc.c:1652 */ +#line 41654 "gram.c" break; - case 1642: -#line 11557 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CTEMaterializeAlways; } -#line 41168 "gram.c" /* yacc.c:1652 */ + case 1642: /* opt_materialized: MATERIALIZED */ +#line 11557 "gram.y" + { (yyval.ival) = CTEMaterializeAlways; } +#line 41660 "gram.c" break; - case 1643: -#line 11558 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CTEMaterializeNever; } -#line 41174 "gram.c" /* yacc.c:1652 */ + case 1643: /* opt_materialized: NOT MATERIALIZED */ +#line 11558 "gram.y" + { (yyval.ival) = CTEMaterializeNever; } +#line 41666 "gram.c" break; - case 1644: -#line 11559 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = CTEMaterializeDefault; } -#line 41180 "gram.c" /* yacc.c:1652 */ + case 1644: /* opt_materialized: %empty */ +#line 11559 "gram.y" + { (yyval.ival) = CTEMaterializeDefault; } +#line 41672 "gram.c" break; - case 1645: -#line 11564 "gram.y" /* yacc.c:1652 */ - { + case 1645: /* opt_search_clause: SEARCH DEPTH FIRST_P BY columnList SET ColId */ +#line 11564 "gram.y" + { CTESearchClause *n = makeNode(CTESearchClause); n->search_col_list = (yyvsp[-2].list); n->search_breadth_first = false; @@ -41189,12 +41681,12 @@ yyreduce: n->location = (yylsp[-6]); (yyval.node) = (Node *) n; } -#line 41193 "gram.c" /* yacc.c:1652 */ +#line 41685 "gram.c" break; - case 1646: -#line 11573 "gram.y" /* yacc.c:1652 */ - { + case 1646: /* opt_search_clause: SEARCH BREADTH FIRST_P BY columnList SET ColId */ +#line 11573 "gram.y" + { CTESearchClause *n = makeNode(CTESearchClause); n->search_col_list = (yyvsp[-2].list); n->search_breadth_first = true; @@ -41202,20 +41694,20 @@ yyreduce: n->location = (yylsp[-6]); (yyval.node) = (Node *) n; } -#line 41206 "gram.c" /* yacc.c:1652 */ +#line 41698 "gram.c" break; - case 1647: -#line 11582 "gram.y" /* yacc.c:1652 */ - { + case 1647: /* opt_search_clause: %empty */ +#line 11582 "gram.y" + { (yyval.node) = NULL; } -#line 41214 "gram.c" /* yacc.c:1652 */ +#line 41706 "gram.c" break; - case 1648: -#line 11589 "gram.y" /* yacc.c:1652 */ - { + case 1648: /* opt_cycle_clause: CYCLE columnList SET ColId TO AexprConst DEFAULT AexprConst USING ColId */ +#line 11589 "gram.y" + { CTECycleClause *n = makeNode(CTECycleClause); n->cycle_col_list = (yyvsp[-8].list); n->cycle_mark_column = (yyvsp[-6].str); @@ -41225,12 +41717,12 @@ yyreduce: n->location = (yylsp[-9]); (yyval.node) = (Node *) n; } -#line 41229 "gram.c" /* yacc.c:1652 */ +#line 41721 "gram.c" break; - case 1649: -#line 11600 "gram.y" /* yacc.c:1652 */ - { + case 1649: /* opt_cycle_clause: CYCLE columnList SET ColId USING ColId */ +#line 11600 "gram.y" + { CTECycleClause *n = makeNode(CTECycleClause); n->cycle_col_list = (yyvsp[-4].list); n->cycle_mark_column = (yyvsp[-2].str); @@ -41240,32 +41732,32 @@ yyreduce: n->location = (yylsp[-5]); (yyval.node) = (Node *) n; } -#line 41244 "gram.c" /* yacc.c:1652 */ +#line 41736 "gram.c" break; - case 1650: -#line 11611 "gram.y" /* yacc.c:1652 */ - { + case 1650: /* opt_cycle_clause: %empty */ +#line 11611 "gram.y" + { (yyval.node) = NULL; } -#line 41252 "gram.c" /* yacc.c:1652 */ +#line 41744 "gram.c" break; - case 1651: -#line 11617 "gram.y" /* yacc.c:1652 */ - { (yyval.with) = (yyvsp[0].with); } -#line 41258 "gram.c" /* yacc.c:1652 */ + case 1651: /* opt_with_clause: with_clause */ +#line 11617 "gram.y" + { (yyval.with) = (yyvsp[0].with); } +#line 41750 "gram.c" break; - case 1652: -#line 11618 "gram.y" /* yacc.c:1652 */ - { (yyval.with) = NULL; } -#line 41264 "gram.c" /* yacc.c:1652 */ + case 1652: /* opt_with_clause: %empty */ +#line 11618 "gram.y" + { (yyval.with) = NULL; } +#line 41756 "gram.c" break; - case 1653: -#line 11623 "gram.y" /* yacc.c:1652 */ - { + case 1653: /* into_clause: INTO OptTempTableName */ +#line 11623 "gram.y" + { (yyval.into) = makeNode(IntoClause); (yyval.into)->rel = (yyvsp[0].range); (yyval.into)->colNames = NIL; @@ -41275,177 +41767,177 @@ yyreduce: (yyval.into)->viewQuery = NULL; (yyval.into)->skipData = false; } -#line 41279 "gram.c" /* yacc.c:1652 */ +#line 41771 "gram.c" break; - case 1654: -#line 11634 "gram.y" /* yacc.c:1652 */ - { (yyval.into) = NULL; } -#line 41285 "gram.c" /* yacc.c:1652 */ + case 1654: /* into_clause: %empty */ +#line 11634 "gram.y" + { (yyval.into) = NULL; } +#line 41777 "gram.c" break; - case 1655: -#line 11643 "gram.y" /* yacc.c:1652 */ - { + case 1655: /* OptTempTableName: TEMPORARY opt_table qualified_name */ +#line 11643 "gram.y" + { (yyval.range) = (yyvsp[0].range); (yyval.range)->relpersistence = RELPERSISTENCE_TEMP; } -#line 41294 "gram.c" /* yacc.c:1652 */ +#line 41786 "gram.c" break; - case 1656: -#line 11648 "gram.y" /* yacc.c:1652 */ - { + case 1656: /* OptTempTableName: TEMP opt_table qualified_name */ +#line 11648 "gram.y" + { (yyval.range) = (yyvsp[0].range); (yyval.range)->relpersistence = RELPERSISTENCE_TEMP; } -#line 41303 "gram.c" /* yacc.c:1652 */ +#line 41795 "gram.c" break; - case 1657: -#line 11653 "gram.y" /* yacc.c:1652 */ - { + case 1657: /* OptTempTableName: LOCAL TEMPORARY opt_table qualified_name */ +#line 11653 "gram.y" + { (yyval.range) = (yyvsp[0].range); (yyval.range)->relpersistence = RELPERSISTENCE_TEMP; } -#line 41312 "gram.c" /* yacc.c:1652 */ +#line 41804 "gram.c" break; - case 1658: -#line 11658 "gram.y" /* yacc.c:1652 */ - { + case 1658: /* OptTempTableName: LOCAL TEMP opt_table qualified_name */ +#line 11658 "gram.y" + { (yyval.range) = (yyvsp[0].range); (yyval.range)->relpersistence = RELPERSISTENCE_TEMP; } -#line 41321 "gram.c" /* yacc.c:1652 */ +#line 41813 "gram.c" break; - case 1659: -#line 11663 "gram.y" /* yacc.c:1652 */ - { + case 1659: /* OptTempTableName: GLOBAL TEMPORARY opt_table qualified_name */ +#line 11663 "gram.y" + { ereport(WARNING, (errmsg("GLOBAL is deprecated in temporary table creation"), parser_errposition((yylsp[-3])))); (yyval.range) = (yyvsp[0].range); (yyval.range)->relpersistence = RELPERSISTENCE_TEMP; } -#line 41333 "gram.c" /* yacc.c:1652 */ +#line 41825 "gram.c" break; - case 1660: -#line 11671 "gram.y" /* yacc.c:1652 */ - { + case 1660: /* OptTempTableName: GLOBAL TEMP opt_table qualified_name */ +#line 11671 "gram.y" + { ereport(WARNING, (errmsg("GLOBAL is deprecated in temporary table creation"), parser_errposition((yylsp[-3])))); (yyval.range) = (yyvsp[0].range); (yyval.range)->relpersistence = RELPERSISTENCE_TEMP; } -#line 41345 "gram.c" /* yacc.c:1652 */ +#line 41837 "gram.c" break; - case 1661: -#line 11679 "gram.y" /* yacc.c:1652 */ - { + case 1661: /* OptTempTableName: UNLOGGED opt_table qualified_name */ +#line 11679 "gram.y" + { (yyval.range) = (yyvsp[0].range); (yyval.range)->relpersistence = RELPERSISTENCE_UNLOGGED; } -#line 41354 "gram.c" /* yacc.c:1652 */ +#line 41846 "gram.c" break; - case 1662: -#line 11684 "gram.y" /* yacc.c:1652 */ - { + case 1662: /* OptTempTableName: TABLE qualified_name */ +#line 11684 "gram.y" + { (yyval.range) = (yyvsp[0].range); (yyval.range)->relpersistence = RELPERSISTENCE_PERMANENT; } -#line 41363 "gram.c" /* yacc.c:1652 */ +#line 41855 "gram.c" break; - case 1663: -#line 11689 "gram.y" /* yacc.c:1652 */ - { + case 1663: /* OptTempTableName: qualified_name */ +#line 11689 "gram.y" + { (yyval.range) = (yyvsp[0].range); (yyval.range)->relpersistence = RELPERSISTENCE_PERMANENT; } -#line 41372 "gram.c" /* yacc.c:1652 */ +#line 41864 "gram.c" break; - case 1666: -#line 11700 "gram.y" /* yacc.c:1652 */ - { (yyval.setquantifier) = SET_QUANTIFIER_ALL; } -#line 41378 "gram.c" /* yacc.c:1652 */ + case 1666: /* set_quantifier: ALL */ +#line 11700 "gram.y" + { (yyval.setquantifier) = SET_QUANTIFIER_ALL; } +#line 41870 "gram.c" break; - case 1667: -#line 11701 "gram.y" /* yacc.c:1652 */ - { (yyval.setquantifier) = SET_QUANTIFIER_DISTINCT; } -#line 41384 "gram.c" /* yacc.c:1652 */ + case 1667: /* set_quantifier: DISTINCT */ +#line 11701 "gram.y" + { (yyval.setquantifier) = SET_QUANTIFIER_DISTINCT; } +#line 41876 "gram.c" break; - case 1668: -#line 11702 "gram.y" /* yacc.c:1652 */ - { (yyval.setquantifier) = SET_QUANTIFIER_DEFAULT; } -#line 41390 "gram.c" /* yacc.c:1652 */ + case 1668: /* set_quantifier: %empty */ +#line 11702 "gram.y" + { (yyval.setquantifier) = SET_QUANTIFIER_DEFAULT; } +#line 41882 "gram.c" break; - case 1669: -#line 11709 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(NIL); } -#line 41396 "gram.c" /* yacc.c:1652 */ + case 1669: /* distinct_clause: DISTINCT */ +#line 11709 "gram.y" + { (yyval.list) = list_make1(NIL); } +#line 41888 "gram.c" break; - case 1670: -#line 11710 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 41402 "gram.c" /* yacc.c:1652 */ + case 1670: /* distinct_clause: DISTINCT ON '(' expr_list ')' */ +#line 11710 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 41894 "gram.c" break; - case 1673: -#line 11719 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 41408 "gram.c" /* yacc.c:1652 */ + case 1673: /* opt_distinct_clause: distinct_clause */ +#line 11719 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 41900 "gram.c" break; - case 1674: -#line 11720 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 41414 "gram.c" /* yacc.c:1652 */ + case 1674: /* opt_distinct_clause: opt_all_clause */ +#line 11720 "gram.y" + { (yyval.list) = NIL; } +#line 41906 "gram.c" break; - case 1675: -#line 11724 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 41420 "gram.c" /* yacc.c:1652 */ + case 1675: /* opt_sort_clause: sort_clause */ +#line 11724 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 41912 "gram.c" break; - case 1676: -#line 11725 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 41426 "gram.c" /* yacc.c:1652 */ + case 1676: /* opt_sort_clause: %empty */ +#line 11725 "gram.y" + { (yyval.list) = NIL; } +#line 41918 "gram.c" break; - case 1677: -#line 11729 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 41432 "gram.c" /* yacc.c:1652 */ + case 1677: /* sort_clause: ORDER BY sortby_list */ +#line 11729 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 41924 "gram.c" break; - case 1678: -#line 11733 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].sortby)); } -#line 41438 "gram.c" /* yacc.c:1652 */ + case 1678: /* sortby_list: sortby */ +#line 11733 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].sortby)); } +#line 41930 "gram.c" break; - case 1679: -#line 11734 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].sortby)); } -#line 41444 "gram.c" /* yacc.c:1652 */ + case 1679: /* sortby_list: sortby_list ',' sortby */ +#line 11734 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].sortby)); } +#line 41936 "gram.c" break; - case 1680: -#line 11738 "gram.y" /* yacc.c:1652 */ - { + case 1680: /* sortby: a_expr USING qual_all_Op opt_nulls_order */ +#line 11738 "gram.y" + { (yyval.sortby) = makeNode(SortBy); (yyval.sortby)->node = (yyvsp[-3].node); (yyval.sortby)->sortby_dir = SORTBY_USING; @@ -41453,12 +41945,12 @@ yyreduce: (yyval.sortby)->useOp = (yyvsp[-1].list); (yyval.sortby)->location = (yylsp[-1]); } -#line 41457 "gram.c" /* yacc.c:1652 */ +#line 41949 "gram.c" break; - case 1681: -#line 11747 "gram.y" /* yacc.c:1652 */ - { + case 1681: /* sortby: a_expr opt_asc_desc opt_nulls_order */ +#line 11747 "gram.y" + { (yyval.sortby) = makeNode(SortBy); (yyval.sortby)->node = (yyvsp[-2].node); (yyval.sortby)->sortby_dir = (yyvsp[-1].ival); @@ -41466,74 +41958,74 @@ yyreduce: (yyval.sortby)->useOp = NIL; (yyval.sortby)->location = -1; /* no operator */ } -#line 41470 "gram.c" /* yacc.c:1652 */ +#line 41962 "gram.c" break; - case 1682: -#line 11760 "gram.y" /* yacc.c:1652 */ - { + case 1682: /* select_limit: limit_clause offset_clause */ +#line 11760 "gram.y" + { (yyval.selectlimit) = (yyvsp[-1].selectlimit); ((yyval.selectlimit))->limitOffset = (yyvsp[0].node); } -#line 41479 "gram.c" /* yacc.c:1652 */ +#line 41971 "gram.c" break; - case 1683: -#line 11765 "gram.y" /* yacc.c:1652 */ - { + case 1683: /* select_limit: offset_clause limit_clause */ +#line 11765 "gram.y" + { (yyval.selectlimit) = (yyvsp[0].selectlimit); ((yyval.selectlimit))->limitOffset = (yyvsp[-1].node); } -#line 41488 "gram.c" /* yacc.c:1652 */ +#line 41980 "gram.c" break; - case 1684: -#line 11770 "gram.y" /* yacc.c:1652 */ - { + case 1684: /* select_limit: limit_clause */ +#line 11770 "gram.y" + { (yyval.selectlimit) = (yyvsp[0].selectlimit); } -#line 41496 "gram.c" /* yacc.c:1652 */ +#line 41988 "gram.c" break; - case 1685: -#line 11774 "gram.y" /* yacc.c:1652 */ - { + case 1685: /* select_limit: offset_clause */ +#line 11774 "gram.y" + { SelectLimit *n = (SelectLimit *) palloc(sizeof(SelectLimit)); n->limitOffset = (yyvsp[0].node); n->limitCount = NULL; n->limitOption = LIMIT_OPTION_COUNT; (yyval.selectlimit) = n; } -#line 41508 "gram.c" /* yacc.c:1652 */ +#line 42000 "gram.c" break; - case 1686: -#line 11784 "gram.y" /* yacc.c:1652 */ - { (yyval.selectlimit) = (yyvsp[0].selectlimit); } -#line 41514 "gram.c" /* yacc.c:1652 */ + case 1686: /* opt_select_limit: select_limit */ +#line 11784 "gram.y" + { (yyval.selectlimit) = (yyvsp[0].selectlimit); } +#line 42006 "gram.c" break; - case 1687: -#line 11785 "gram.y" /* yacc.c:1652 */ - { (yyval.selectlimit) = NULL; } -#line 41520 "gram.c" /* yacc.c:1652 */ + case 1687: /* opt_select_limit: %empty */ +#line 11785 "gram.y" + { (yyval.selectlimit) = NULL; } +#line 42012 "gram.c" break; - case 1688: -#line 11790 "gram.y" /* yacc.c:1652 */ - { + case 1688: /* limit_clause: LIMIT select_limit_value */ +#line 11790 "gram.y" + { SelectLimit *n = (SelectLimit *) palloc(sizeof(SelectLimit)); n->limitOffset = NULL; n->limitCount = (yyvsp[0].node); n->limitOption = LIMIT_OPTION_COUNT; (yyval.selectlimit) = n; } -#line 41532 "gram.c" /* yacc.c:1652 */ +#line 42024 "gram.c" break; - case 1689: -#line 11798 "gram.y" /* yacc.c:1652 */ - { + case 1689: /* limit_clause: LIMIT select_limit_value ',' select_offset_value */ +#line 11798 "gram.y" + { /* Disabled because it was too confusing, bjm 2002-02-18 */ ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), @@ -41541,448 +42033,448 @@ yyreduce: errhint("Use separate LIMIT and OFFSET clauses."), parser_errposition((yylsp[-3])))); } -#line 41545 "gram.c" /* yacc.c:1652 */ +#line 42037 "gram.c" break; - case 1690: -#line 11814 "gram.y" /* yacc.c:1652 */ - { + case 1690: /* limit_clause: FETCH first_or_next select_fetch_first_value row_or_rows ONLY */ +#line 11814 "gram.y" + { SelectLimit *n = (SelectLimit *) palloc(sizeof(SelectLimit)); n->limitOffset = NULL; n->limitCount = (yyvsp[-2].node); n->limitOption = LIMIT_OPTION_COUNT; (yyval.selectlimit) = n; } -#line 41557 "gram.c" /* yacc.c:1652 */ +#line 42049 "gram.c" break; - case 1691: -#line 11822 "gram.y" /* yacc.c:1652 */ - { + case 1691: /* limit_clause: FETCH first_or_next select_fetch_first_value row_or_rows WITH TIES */ +#line 11822 "gram.y" + { SelectLimit *n = (SelectLimit *) palloc(sizeof(SelectLimit)); n->limitOffset = NULL; n->limitCount = (yyvsp[-3].node); n->limitOption = LIMIT_OPTION_WITH_TIES; (yyval.selectlimit) = n; } -#line 41569 "gram.c" /* yacc.c:1652 */ +#line 42061 "gram.c" break; - case 1692: -#line 11830 "gram.y" /* yacc.c:1652 */ - { + case 1692: /* limit_clause: FETCH first_or_next row_or_rows ONLY */ +#line 11830 "gram.y" + { SelectLimit *n = (SelectLimit *) palloc(sizeof(SelectLimit)); n->limitOffset = NULL; n->limitCount = makeIntConst(1, -1); n->limitOption = LIMIT_OPTION_COUNT; (yyval.selectlimit) = n; } -#line 41581 "gram.c" /* yacc.c:1652 */ +#line 42073 "gram.c" break; - case 1693: -#line 11838 "gram.y" /* yacc.c:1652 */ - { + case 1693: /* limit_clause: FETCH first_or_next row_or_rows WITH TIES */ +#line 11838 "gram.y" + { SelectLimit *n = (SelectLimit *) palloc(sizeof(SelectLimit)); n->limitOffset = NULL; n->limitCount = makeIntConst(1, -1); n->limitOption = LIMIT_OPTION_WITH_TIES; (yyval.selectlimit) = n; } -#line 41593 "gram.c" /* yacc.c:1652 */ +#line 42085 "gram.c" break; - case 1694: -#line 11849 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 41599 "gram.c" /* yacc.c:1652 */ + case 1694: /* offset_clause: OFFSET select_offset_value */ +#line 11849 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 42091 "gram.c" break; - case 1695: -#line 11852 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[-1].node); } -#line 41605 "gram.c" /* yacc.c:1652 */ + case 1695: /* offset_clause: OFFSET select_fetch_first_value row_or_rows */ +#line 11852 "gram.y" + { (yyval.node) = (yyvsp[-1].node); } +#line 42097 "gram.c" break; - case 1696: -#line 11856 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 41611 "gram.c" /* yacc.c:1652 */ + case 1696: /* select_limit_value: a_expr */ +#line 11856 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 42103 "gram.c" break; - case 1697: -#line 11858 "gram.y" /* yacc.c:1652 */ - { + case 1697: /* select_limit_value: ALL */ +#line 11858 "gram.y" + { /* LIMIT ALL is represented as a NULL constant */ (yyval.node) = makeNullAConst((yylsp[0])); } -#line 41620 "gram.c" /* yacc.c:1652 */ +#line 42112 "gram.c" break; - case 1698: -#line 11865 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 41626 "gram.c" /* yacc.c:1652 */ + case 1698: /* select_offset_value: a_expr */ +#line 11865 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 42118 "gram.c" break; - case 1699: -#line 11885 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 41632 "gram.c" /* yacc.c:1652 */ + case 1699: /* select_fetch_first_value: c_expr */ +#line 11885 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 42124 "gram.c" break; - case 1700: -#line 11887 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", NULL, (yyvsp[0].node), (yylsp[-1])); } -#line 41638 "gram.c" /* yacc.c:1652 */ + case 1700: /* select_fetch_first_value: '+' I_or_F_const */ +#line 11887 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", NULL, (yyvsp[0].node), (yylsp[-1])); } +#line 42130 "gram.c" break; - case 1701: -#line 11889 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = doNegate((yyvsp[0].node), (yylsp[-1])); } -#line 41644 "gram.c" /* yacc.c:1652 */ + case 1701: /* select_fetch_first_value: '-' I_or_F_const */ +#line 11889 "gram.y" + { (yyval.node) = doNegate((yyvsp[0].node), (yylsp[-1])); } +#line 42136 "gram.c" break; - case 1702: -#line 11893 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeIntConst((yyvsp[0].ival),(yylsp[0])); } -#line 41650 "gram.c" /* yacc.c:1652 */ + case 1702: /* I_or_F_const: Iconst */ +#line 11893 "gram.y" + { (yyval.node) = makeIntConst((yyvsp[0].ival),(yylsp[0])); } +#line 42142 "gram.c" break; - case 1703: -#line 11894 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeFloatConst((yyvsp[0].str),(yylsp[0])); } -#line 41656 "gram.c" /* yacc.c:1652 */ + case 1703: /* I_or_F_const: FCONST */ +#line 11894 "gram.y" + { (yyval.node) = makeFloatConst((yyvsp[0].str),(yylsp[0])); } +#line 42148 "gram.c" break; - case 1704: -#line 11898 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = 0; } -#line 41662 "gram.c" /* yacc.c:1652 */ + case 1704: /* row_or_rows: ROW */ +#line 11898 "gram.y" + { (yyval.ival) = 0; } +#line 42154 "gram.c" break; - case 1705: -#line 11899 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = 0; } -#line 41668 "gram.c" /* yacc.c:1652 */ + case 1705: /* row_or_rows: ROWS */ +#line 11899 "gram.y" + { (yyval.ival) = 0; } +#line 42160 "gram.c" break; - case 1706: -#line 11902 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = 0; } -#line 41674 "gram.c" /* yacc.c:1652 */ + case 1706: /* first_or_next: FIRST_P */ +#line 11902 "gram.y" + { (yyval.ival) = 0; } +#line 42166 "gram.c" break; - case 1707: -#line 11903 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = 0; } -#line 41680 "gram.c" /* yacc.c:1652 */ + case 1707: /* first_or_next: NEXT */ +#line 11903 "gram.y" + { (yyval.ival) = 0; } +#line 42172 "gram.c" break; - case 1708: -#line 11929 "gram.y" /* yacc.c:1652 */ - { + case 1708: /* group_clause: GROUP_P BY set_quantifier group_by_list */ +#line 11929 "gram.y" + { GroupClause *n = (GroupClause *) palloc(sizeof(GroupClause)); n->distinct = (yyvsp[-1].setquantifier) == SET_QUANTIFIER_DISTINCT; n->list = (yyvsp[0].list); (yyval.groupclause) = n; } -#line 41691 "gram.c" /* yacc.c:1652 */ +#line 42183 "gram.c" break; - case 1709: -#line 11936 "gram.y" /* yacc.c:1652 */ - { + case 1709: /* group_clause: %empty */ +#line 11936 "gram.y" + { GroupClause *n = (GroupClause *) palloc(sizeof(GroupClause)); n->distinct = false; n->list = NIL; (yyval.groupclause) = n; } -#line 41702 "gram.c" /* yacc.c:1652 */ +#line 42194 "gram.c" break; - case 1710: -#line 11945 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 41708 "gram.c" /* yacc.c:1652 */ + case 1710: /* group_by_list: group_by_item */ +#line 11945 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 42200 "gram.c" break; - case 1711: -#line 11946 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list),(yyvsp[0].node)); } -#line 41714 "gram.c" /* yacc.c:1652 */ + case 1711: /* group_by_list: group_by_list ',' group_by_item */ +#line 11946 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list),(yyvsp[0].node)); } +#line 42206 "gram.c" break; - case 1712: -#line 11950 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 41720 "gram.c" /* yacc.c:1652 */ + case 1712: /* group_by_item: a_expr */ +#line 11950 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 42212 "gram.c" break; - case 1713: -#line 11951 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 41726 "gram.c" /* yacc.c:1652 */ + case 1713: /* group_by_item: empty_grouping_set */ +#line 11951 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 42218 "gram.c" break; - case 1714: -#line 11952 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 41732 "gram.c" /* yacc.c:1652 */ + case 1714: /* group_by_item: cube_clause */ +#line 11952 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 42224 "gram.c" break; - case 1715: -#line 11953 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 41738 "gram.c" /* yacc.c:1652 */ + case 1715: /* group_by_item: rollup_clause */ +#line 11953 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 42230 "gram.c" break; - case 1716: -#line 11954 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 41744 "gram.c" /* yacc.c:1652 */ + case 1716: /* group_by_item: grouping_sets_clause */ +#line 11954 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 42236 "gram.c" break; - case 1717: -#line 11959 "gram.y" /* yacc.c:1652 */ - { + case 1717: /* empty_grouping_set: '(' ')' */ +#line 11959 "gram.y" + { (yyval.node) = (Node *) makeGroupingSet(GROUPING_SET_EMPTY, NIL, (yylsp[-1])); } -#line 41752 "gram.c" /* yacc.c:1652 */ +#line 42244 "gram.c" break; - case 1718: -#line 11972 "gram.y" /* yacc.c:1652 */ - { + case 1718: /* rollup_clause: ROLLUP '(' expr_list ')' */ +#line 11972 "gram.y" + { (yyval.node) = (Node *) makeGroupingSet(GROUPING_SET_ROLLUP, (yyvsp[-1].list), (yylsp[-3])); } -#line 41760 "gram.c" /* yacc.c:1652 */ +#line 42252 "gram.c" break; - case 1719: -#line 11979 "gram.y" /* yacc.c:1652 */ - { + case 1719: /* cube_clause: CUBE '(' expr_list ')' */ +#line 11979 "gram.y" + { (yyval.node) = (Node *) makeGroupingSet(GROUPING_SET_CUBE, (yyvsp[-1].list), (yylsp[-3])); } -#line 41768 "gram.c" /* yacc.c:1652 */ +#line 42260 "gram.c" break; - case 1720: -#line 11986 "gram.y" /* yacc.c:1652 */ - { + case 1720: /* grouping_sets_clause: GROUPING SETS '(' group_by_list ')' */ +#line 11986 "gram.y" + { (yyval.node) = (Node *) makeGroupingSet(GROUPING_SET_SETS, (yyvsp[-1].list), (yylsp[-4])); } -#line 41776 "gram.c" /* yacc.c:1652 */ +#line 42268 "gram.c" break; - case 1721: -#line 11992 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 41782 "gram.c" /* yacc.c:1652 */ + case 1721: /* having_clause: HAVING a_expr */ +#line 11992 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 42274 "gram.c" break; - case 1722: -#line 11993 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 41788 "gram.c" /* yacc.c:1652 */ + case 1722: /* having_clause: %empty */ +#line 11993 "gram.y" + { (yyval.node) = NULL; } +#line 42280 "gram.c" break; - case 1723: -#line 11997 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 41794 "gram.c" /* yacc.c:1652 */ + case 1723: /* for_locking_clause: for_locking_items */ +#line 11997 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 42286 "gram.c" break; - case 1724: -#line 11998 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 41800 "gram.c" /* yacc.c:1652 */ + case 1724: /* for_locking_clause: FOR READ ONLY */ +#line 11998 "gram.y" + { (yyval.list) = NIL; } +#line 42292 "gram.c" break; - case 1725: -#line 12002 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 41806 "gram.c" /* yacc.c:1652 */ + case 1725: /* opt_for_locking_clause: for_locking_clause */ +#line 12002 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 42298 "gram.c" break; - case 1726: -#line 12003 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 41812 "gram.c" /* yacc.c:1652 */ + case 1726: /* opt_for_locking_clause: %empty */ +#line 12003 "gram.y" + { (yyval.list) = NIL; } +#line 42304 "gram.c" break; - case 1727: -#line 12007 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 41818 "gram.c" /* yacc.c:1652 */ + case 1727: /* for_locking_items: for_locking_item */ +#line 12007 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 42310 "gram.c" break; - case 1728: -#line 12008 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } -#line 41824 "gram.c" /* yacc.c:1652 */ + case 1728: /* for_locking_items: for_locking_items for_locking_item */ +#line 12008 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } +#line 42316 "gram.c" break; - case 1729: -#line 12013 "gram.y" /* yacc.c:1652 */ - { + case 1729: /* for_locking_item: for_locking_strength locked_rels_list opt_nowait_or_skip */ +#line 12013 "gram.y" + { LockingClause *n = makeNode(LockingClause); n->lockedRels = (yyvsp[-1].list); n->strength = (yyvsp[-2].ival); n->waitPolicy = (yyvsp[0].ival); (yyval.node) = (Node *) n; } -#line 41836 "gram.c" /* yacc.c:1652 */ +#line 42328 "gram.c" break; - case 1730: -#line 12023 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = LCS_FORUPDATE; } -#line 41842 "gram.c" /* yacc.c:1652 */ + case 1730: /* for_locking_strength: FOR UPDATE */ +#line 12023 "gram.y" + { (yyval.ival) = LCS_FORUPDATE; } +#line 42334 "gram.c" break; - case 1731: -#line 12024 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = LCS_FORNOKEYUPDATE; } -#line 41848 "gram.c" /* yacc.c:1652 */ + case 1731: /* for_locking_strength: FOR NO KEY UPDATE */ +#line 12024 "gram.y" + { (yyval.ival) = LCS_FORNOKEYUPDATE; } +#line 42340 "gram.c" break; - case 1732: -#line 12025 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = LCS_FORSHARE; } -#line 41854 "gram.c" /* yacc.c:1652 */ + case 1732: /* for_locking_strength: FOR SHARE */ +#line 12025 "gram.y" + { (yyval.ival) = LCS_FORSHARE; } +#line 42346 "gram.c" break; - case 1733: -#line 12026 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = LCS_FORKEYSHARE; } -#line 41860 "gram.c" /* yacc.c:1652 */ + case 1733: /* for_locking_strength: FOR KEY SHARE */ +#line 12026 "gram.y" + { (yyval.ival) = LCS_FORKEYSHARE; } +#line 42352 "gram.c" break; - case 1734: -#line 12030 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 41866 "gram.c" /* yacc.c:1652 */ + case 1734: /* locked_rels_list: OF qualified_name_list */ +#line 12030 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 42358 "gram.c" break; - case 1735: -#line 12031 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 41872 "gram.c" /* yacc.c:1652 */ + case 1735: /* locked_rels_list: %empty */ +#line 12031 "gram.y" + { (yyval.list) = NIL; } +#line 42364 "gram.c" break; - case 1736: -#line 12042 "gram.y" /* yacc.c:1652 */ - { + case 1736: /* values_clause: VALUES '(' expr_list ')' */ +#line 12042 "gram.y" + { SelectStmt *n = makeNode(SelectStmt); n->valuesLists = list_make1((yyvsp[-1].list)); (yyval.node) = (Node *) n; } -#line 41882 "gram.c" /* yacc.c:1652 */ +#line 42374 "gram.c" break; - case 1737: -#line 12048 "gram.y" /* yacc.c:1652 */ - { + case 1737: /* values_clause: values_clause ',' '(' expr_list ')' */ +#line 12048 "gram.y" + { SelectStmt *n = (SelectStmt *) (yyvsp[-4].node); n->valuesLists = lappend(n->valuesLists, (yyvsp[-1].list)); (yyval.node) = (Node *) n; } -#line 41892 "gram.c" /* yacc.c:1652 */ +#line 42384 "gram.c" break; - case 1738: -#line 12065 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 41898 "gram.c" /* yacc.c:1652 */ + case 1738: /* from_clause: FROM from_list */ +#line 12065 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 42390 "gram.c" break; - case 1739: -#line 12066 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 41904 "gram.c" /* yacc.c:1652 */ + case 1739: /* from_clause: %empty */ +#line 12066 "gram.y" + { (yyval.list) = NIL; } +#line 42396 "gram.c" break; - case 1740: -#line 12070 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 41910 "gram.c" /* yacc.c:1652 */ + case 1740: /* from_list: table_ref */ +#line 12070 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 42402 "gram.c" break; - case 1741: -#line 12071 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 41916 "gram.c" /* yacc.c:1652 */ + case 1741: /* from_list: from_list ',' table_ref */ +#line 12071 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } +#line 42408 "gram.c" break; - case 1742: -#line 12078 "gram.y" /* yacc.c:1652 */ - { + case 1742: /* table_ref: relation_expr opt_alias_clause */ +#line 12078 "gram.y" + { (yyvsp[-1].range)->alias = (yyvsp[0].alias); (yyval.node) = (Node *) (yyvsp[-1].range); } -#line 41925 "gram.c" /* yacc.c:1652 */ +#line 42417 "gram.c" break; - case 1743: -#line 12083 "gram.y" /* yacc.c:1652 */ - { + case 1743: /* table_ref: relation_expr opt_alias_clause tablesample_clause */ +#line 12083 "gram.y" + { RangeTableSample *n = (RangeTableSample *) (yyvsp[0].node); (yyvsp[-2].range)->alias = (yyvsp[-1].alias); /* relation_expr goes inside the RangeTableSample node */ n->relation = (Node *) (yyvsp[-2].range); (yyval.node) = (Node *) n; } -#line 41937 "gram.c" /* yacc.c:1652 */ +#line 42429 "gram.c" break; - case 1744: -#line 12091 "gram.y" /* yacc.c:1652 */ - { + case 1744: /* table_ref: func_table func_alias_clause */ +#line 12091 "gram.y" + { RangeFunction *n = (RangeFunction *) (yyvsp[-1].node); n->alias = linitial((yyvsp[0].list)); n->coldeflist = lsecond((yyvsp[0].list)); (yyval.node) = (Node *) n; } -#line 41948 "gram.c" /* yacc.c:1652 */ +#line 42440 "gram.c" break; - case 1745: -#line 12098 "gram.y" /* yacc.c:1652 */ - { + case 1745: /* table_ref: LATERAL_P func_table func_alias_clause */ +#line 12098 "gram.y" + { RangeFunction *n = (RangeFunction *) (yyvsp[-1].node); n->lateral = true; n->alias = linitial((yyvsp[0].list)); n->coldeflist = lsecond((yyvsp[0].list)); (yyval.node) = (Node *) n; } -#line 41960 "gram.c" /* yacc.c:1652 */ +#line 42452 "gram.c" break; - case 1746: -#line 12106 "gram.y" /* yacc.c:1652 */ - { + case 1746: /* table_ref: xmltable opt_alias_clause */ +#line 12106 "gram.y" + { RangeTableFunc *n = (RangeTableFunc *) (yyvsp[-1].node); n->alias = (yyvsp[0].alias); (yyval.node) = (Node *) n; } -#line 41970 "gram.c" /* yacc.c:1652 */ +#line 42462 "gram.c" break; - case 1747: -#line 12112 "gram.y" /* yacc.c:1652 */ - { + case 1747: /* table_ref: LATERAL_P xmltable opt_alias_clause */ +#line 12112 "gram.y" + { RangeTableFunc *n = (RangeTableFunc *) (yyvsp[-1].node); n->lateral = true; n->alias = (yyvsp[0].alias); (yyval.node) = (Node *) n; } -#line 41981 "gram.c" /* yacc.c:1652 */ +#line 42473 "gram.c" break; - case 1748: -#line 12119 "gram.y" /* yacc.c:1652 */ - { + case 1748: /* table_ref: select_with_parens opt_alias_clause */ +#line 12119 "gram.y" + { RangeSubselect *n = makeNode(RangeSubselect); n->lateral = false; n->subquery = (yyvsp[-1].node); @@ -42016,12 +42508,12 @@ yyreduce: } (yyval.node) = (Node *) n; } -#line 42020 "gram.c" /* yacc.c:1652 */ +#line 42512 "gram.c" break; - case 1749: -#line 12154 "gram.y" /* yacc.c:1652 */ - { + case 1749: /* table_ref: LATERAL_P select_with_parens opt_alias_clause */ +#line 12154 "gram.y" + { RangeSubselect *n = makeNode(RangeSubselect); n->lateral = true; n->subquery = (yyvsp[-1].node); @@ -42045,37 +42537,37 @@ yyreduce: } (yyval.node) = (Node *) n; } -#line 42049 "gram.c" /* yacc.c:1652 */ +#line 42541 "gram.c" break; - case 1750: -#line 12179 "gram.y" /* yacc.c:1652 */ - { + case 1750: /* table_ref: joined_table */ +#line 12179 "gram.y" + { (yyval.node) = (Node *) (yyvsp[0].jexpr); } -#line 42057 "gram.c" /* yacc.c:1652 */ +#line 42549 "gram.c" break; - case 1751: -#line 12183 "gram.y" /* yacc.c:1652 */ - { + case 1751: /* table_ref: '(' joined_table ')' alias_clause */ +#line 12183 "gram.y" + { (yyvsp[-2].jexpr)->alias = (yyvsp[0].alias); (yyval.node) = (Node *) (yyvsp[-2].jexpr); } -#line 42066 "gram.c" /* yacc.c:1652 */ +#line 42558 "gram.c" break; - case 1752: -#line 12209 "gram.y" /* yacc.c:1652 */ - { + case 1752: /* joined_table: '(' joined_table ')' */ +#line 12209 "gram.y" + { (yyval.jexpr) = (yyvsp[-1].jexpr); } -#line 42074 "gram.c" /* yacc.c:1652 */ +#line 42566 "gram.c" break; - case 1753: -#line 12213 "gram.y" /* yacc.c:1652 */ - { + case 1753: /* joined_table: table_ref CROSS JOIN table_ref */ +#line 12213 "gram.y" + { /* CROSS JOIN is same as unqualified inner join */ JoinExpr *n = makeNode(JoinExpr); n->jointype = JOIN_INNER; @@ -42087,12 +42579,12 @@ yyreduce: n->quals = NULL; (yyval.jexpr) = n; } -#line 42091 "gram.c" /* yacc.c:1652 */ +#line 42583 "gram.c" break; - case 1754: -#line 12226 "gram.y" /* yacc.c:1652 */ - { + case 1754: /* joined_table: table_ref join_type JOIN table_ref join_qual */ +#line 12226 "gram.y" + { JoinExpr *n = makeNode(JoinExpr); n->jointype = (yyvsp[-3].jtype); n->isNatural = false; @@ -42111,12 +42603,12 @@ yyreduce: } (yyval.jexpr) = n; } -#line 42115 "gram.c" /* yacc.c:1652 */ +#line 42607 "gram.c" break; - case 1755: -#line 12246 "gram.y" /* yacc.c:1652 */ - { + case 1755: /* joined_table: table_ref JOIN table_ref join_qual */ +#line 12246 "gram.y" + { /* letting join_type reduce to empty doesn't work */ JoinExpr *n = makeNode(JoinExpr); n->jointype = JOIN_INNER; @@ -42136,12 +42628,12 @@ yyreduce: } (yyval.jexpr) = n; } -#line 42140 "gram.c" /* yacc.c:1652 */ +#line 42632 "gram.c" break; - case 1756: -#line 12267 "gram.y" /* yacc.c:1652 */ - { + case 1756: /* joined_table: table_ref NATURAL join_type JOIN table_ref */ +#line 12267 "gram.y" + { JoinExpr *n = makeNode(JoinExpr); n->jointype = (yyvsp[-2].jtype); n->isNatural = true; @@ -42152,12 +42644,12 @@ yyreduce: n->quals = NULL; /* fill later */ (yyval.jexpr) = n; } -#line 42156 "gram.c" /* yacc.c:1652 */ +#line 42648 "gram.c" break; - case 1757: -#line 12279 "gram.y" /* yacc.c:1652 */ - { + case 1757: /* joined_table: table_ref NATURAL JOIN table_ref */ +#line 12279 "gram.y" + { /* letting join_type reduce to empty doesn't work */ JoinExpr *n = makeNode(JoinExpr); n->jointype = JOIN_INNER; @@ -42169,248 +42661,248 @@ yyreduce: n->quals = NULL; /* fill later */ (yyval.jexpr) = n; } -#line 42173 "gram.c" /* yacc.c:1652 */ +#line 42665 "gram.c" break; - case 1758: -#line 12295 "gram.y" /* yacc.c:1652 */ - { + case 1758: /* alias_clause: AS ColId '(' name_list ')' */ +#line 12295 "gram.y" + { (yyval.alias) = makeNode(Alias); (yyval.alias)->aliasname = (yyvsp[-3].str); (yyval.alias)->colnames = (yyvsp[-1].list); } -#line 42183 "gram.c" /* yacc.c:1652 */ +#line 42675 "gram.c" break; - case 1759: -#line 12301 "gram.y" /* yacc.c:1652 */ - { + case 1759: /* alias_clause: AS ColId */ +#line 12301 "gram.y" + { (yyval.alias) = makeNode(Alias); (yyval.alias)->aliasname = (yyvsp[0].str); } -#line 42192 "gram.c" /* yacc.c:1652 */ +#line 42684 "gram.c" break; - case 1760: -#line 12306 "gram.y" /* yacc.c:1652 */ - { + case 1760: /* alias_clause: ColId '(' name_list ')' */ +#line 12306 "gram.y" + { (yyval.alias) = makeNode(Alias); (yyval.alias)->aliasname = (yyvsp[-3].str); (yyval.alias)->colnames = (yyvsp[-1].list); } -#line 42202 "gram.c" /* yacc.c:1652 */ +#line 42694 "gram.c" break; - case 1761: -#line 12312 "gram.y" /* yacc.c:1652 */ - { + case 1761: /* alias_clause: ColId */ +#line 12312 "gram.y" + { (yyval.alias) = makeNode(Alias); (yyval.alias)->aliasname = (yyvsp[0].str); } -#line 42211 "gram.c" /* yacc.c:1652 */ +#line 42703 "gram.c" break; - case 1762: -#line 12318 "gram.y" /* yacc.c:1652 */ - { (yyval.alias) = (yyvsp[0].alias); } -#line 42217 "gram.c" /* yacc.c:1652 */ + case 1762: /* opt_alias_clause: alias_clause */ +#line 12318 "gram.y" + { (yyval.alias) = (yyvsp[0].alias); } +#line 42709 "gram.c" break; - case 1763: -#line 12319 "gram.y" /* yacc.c:1652 */ - { (yyval.alias) = NULL; } -#line 42223 "gram.c" /* yacc.c:1652 */ + case 1763: /* opt_alias_clause: %empty */ +#line 12319 "gram.y" + { (yyval.alias) = NULL; } +#line 42715 "gram.c" break; - case 1764: -#line 12330 "gram.y" /* yacc.c:1652 */ - { + case 1764: /* opt_alias_clause_for_join_using: AS ColId */ +#line 12330 "gram.y" + { (yyval.alias) = makeNode(Alias); (yyval.alias)->aliasname = (yyvsp[0].str); /* the column name list will be inserted later */ } -#line 42233 "gram.c" /* yacc.c:1652 */ +#line 42725 "gram.c" break; - case 1765: -#line 12335 "gram.y" /* yacc.c:1652 */ - { (yyval.alias) = NULL; } -#line 42239 "gram.c" /* yacc.c:1652 */ + case 1765: /* opt_alias_clause_for_join_using: %empty */ +#line 12335 "gram.y" + { (yyval.alias) = NULL; } +#line 42731 "gram.c" break; - case 1766: -#line 12344 "gram.y" /* yacc.c:1652 */ - { + case 1766: /* func_alias_clause: alias_clause */ +#line 12344 "gram.y" + { (yyval.list) = list_make2((yyvsp[0].alias), NIL); } -#line 42247 "gram.c" /* yacc.c:1652 */ +#line 42739 "gram.c" break; - case 1767: -#line 12348 "gram.y" /* yacc.c:1652 */ - { + case 1767: /* func_alias_clause: AS '(' TableFuncElementList ')' */ +#line 12348 "gram.y" + { (yyval.list) = list_make2(NULL, (yyvsp[-1].list)); } -#line 42255 "gram.c" /* yacc.c:1652 */ +#line 42747 "gram.c" break; - case 1768: -#line 12352 "gram.y" /* yacc.c:1652 */ - { + case 1768: /* func_alias_clause: AS ColId '(' TableFuncElementList ')' */ +#line 12352 "gram.y" + { Alias *a = makeNode(Alias); a->aliasname = (yyvsp[-3].str); (yyval.list) = list_make2(a, (yyvsp[-1].list)); } -#line 42265 "gram.c" /* yacc.c:1652 */ +#line 42757 "gram.c" break; - case 1769: -#line 12358 "gram.y" /* yacc.c:1652 */ - { + case 1769: /* func_alias_clause: ColId '(' TableFuncElementList ')' */ +#line 12358 "gram.y" + { Alias *a = makeNode(Alias); a->aliasname = (yyvsp[-3].str); (yyval.list) = list_make2(a, (yyvsp[-1].list)); } -#line 42275 "gram.c" /* yacc.c:1652 */ +#line 42767 "gram.c" break; - case 1770: -#line 12364 "gram.y" /* yacc.c:1652 */ - { + case 1770: /* func_alias_clause: %empty */ +#line 12364 "gram.y" + { (yyval.list) = list_make2(NULL, NIL); } -#line 42283 "gram.c" /* yacc.c:1652 */ +#line 42775 "gram.c" break; - case 1771: -#line 12369 "gram.y" /* yacc.c:1652 */ - { (yyval.jtype) = JOIN_FULL; } -#line 42289 "gram.c" /* yacc.c:1652 */ + case 1771: /* join_type: FULL opt_outer */ +#line 12369 "gram.y" + { (yyval.jtype) = JOIN_FULL; } +#line 42781 "gram.c" break; - case 1772: -#line 12370 "gram.y" /* yacc.c:1652 */ - { (yyval.jtype) = JOIN_LEFT; } -#line 42295 "gram.c" /* yacc.c:1652 */ + case 1772: /* join_type: LEFT opt_outer */ +#line 12370 "gram.y" + { (yyval.jtype) = JOIN_LEFT; } +#line 42787 "gram.c" break; - case 1773: -#line 12371 "gram.y" /* yacc.c:1652 */ - { (yyval.jtype) = JOIN_RIGHT; } -#line 42301 "gram.c" /* yacc.c:1652 */ + case 1773: /* join_type: RIGHT opt_outer */ +#line 12371 "gram.y" + { (yyval.jtype) = JOIN_RIGHT; } +#line 42793 "gram.c" break; - case 1774: -#line 12372 "gram.y" /* yacc.c:1652 */ - { (yyval.jtype) = JOIN_INNER; } -#line 42307 "gram.c" /* yacc.c:1652 */ + case 1774: /* join_type: INNER_P */ +#line 12372 "gram.y" + { (yyval.jtype) = JOIN_INNER; } +#line 42799 "gram.c" break; - case 1777: -#line 12393 "gram.y" /* yacc.c:1652 */ - { + case 1777: /* join_qual: USING '(' name_list ')' opt_alias_clause_for_join_using */ +#line 12393 "gram.y" + { (yyval.node) = (Node *) list_make2((yyvsp[-2].list), (yyvsp[0].alias)); } -#line 42315 "gram.c" /* yacc.c:1652 */ +#line 42807 "gram.c" break; - case 1778: -#line 12397 "gram.y" /* yacc.c:1652 */ - { + case 1778: /* join_qual: ON a_expr */ +#line 12397 "gram.y" + { (yyval.node) = (yyvsp[0].node); } -#line 42323 "gram.c" /* yacc.c:1652 */ +#line 42815 "gram.c" break; - case 1779: -#line 12405 "gram.y" /* yacc.c:1652 */ - { + case 1779: /* relation_expr: qualified_name */ +#line 12405 "gram.y" + { /* inheritance query, implicitly */ (yyval.range) = (yyvsp[0].range); (yyval.range)->inh = true; (yyval.range)->alias = NULL; } -#line 42334 "gram.c" /* yacc.c:1652 */ +#line 42826 "gram.c" break; - case 1780: -#line 12412 "gram.y" /* yacc.c:1652 */ - { + case 1780: /* relation_expr: qualified_name '*' */ +#line 12412 "gram.y" + { /* inheritance query, explicitly */ (yyval.range) = (yyvsp[-1].range); (yyval.range)->inh = true; (yyval.range)->alias = NULL; } -#line 42345 "gram.c" /* yacc.c:1652 */ +#line 42837 "gram.c" break; - case 1781: -#line 12419 "gram.y" /* yacc.c:1652 */ - { + case 1781: /* relation_expr: ONLY qualified_name */ +#line 12419 "gram.y" + { /* no inheritance */ (yyval.range) = (yyvsp[0].range); (yyval.range)->inh = false; (yyval.range)->alias = NULL; } -#line 42356 "gram.c" /* yacc.c:1652 */ +#line 42848 "gram.c" break; - case 1782: -#line 12426 "gram.y" /* yacc.c:1652 */ - { + case 1782: /* relation_expr: ONLY '(' qualified_name ')' */ +#line 12426 "gram.y" + { /* no inheritance, SQL99-style syntax */ (yyval.range) = (yyvsp[-1].range); (yyval.range)->inh = false; (yyval.range)->alias = NULL; } -#line 42367 "gram.c" /* yacc.c:1652 */ +#line 42859 "gram.c" break; - case 1783: -#line 12436 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].range)); } -#line 42373 "gram.c" /* yacc.c:1652 */ + case 1783: /* relation_expr_list: relation_expr */ +#line 12436 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].range)); } +#line 42865 "gram.c" break; - case 1784: -#line 12437 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].range)); } -#line 42379 "gram.c" /* yacc.c:1652 */ + case 1784: /* relation_expr_list: relation_expr_list ',' relation_expr */ +#line 12437 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].range)); } +#line 42871 "gram.c" break; - case 1785: -#line 12451 "gram.y" /* yacc.c:1652 */ - { + case 1785: /* relation_expr_opt_alias: relation_expr */ +#line 12451 "gram.y" + { (yyval.range) = (yyvsp[0].range); } -#line 42387 "gram.c" /* yacc.c:1652 */ +#line 42879 "gram.c" break; - case 1786: -#line 12455 "gram.y" /* yacc.c:1652 */ - { + case 1786: /* relation_expr_opt_alias: relation_expr ColId */ +#line 12455 "gram.y" + { Alias *alias = makeNode(Alias); alias->aliasname = (yyvsp[0].str); (yyvsp[-1].range)->alias = alias; (yyval.range) = (yyvsp[-1].range); } -#line 42398 "gram.c" /* yacc.c:1652 */ +#line 42890 "gram.c" break; - case 1787: -#line 12462 "gram.y" /* yacc.c:1652 */ - { + case 1787: /* relation_expr_opt_alias: relation_expr AS ColId */ +#line 12462 "gram.y" + { Alias *alias = makeNode(Alias); alias->aliasname = (yyvsp[0].str); (yyvsp[-2].range)->alias = alias; (yyval.range) = (yyvsp[-2].range); } -#line 42409 "gram.c" /* yacc.c:1652 */ +#line 42901 "gram.c" break; - case 1788: -#line 12475 "gram.y" /* yacc.c:1652 */ - { + case 1788: /* tablesample_clause: TABLESAMPLE func_name '(' expr_list ')' opt_repeatable_clause */ +#line 12475 "gram.y" + { RangeTableSample *n = makeNode(RangeTableSample); /* n->relation will be filled in later */ n->method = (yyvsp[-4].list); @@ -42419,24 +42911,24 @@ yyreduce: n->location = (yylsp[-4]); (yyval.node) = (Node *) n; } -#line 42423 "gram.c" /* yacc.c:1652 */ +#line 42915 "gram.c" break; - case 1789: -#line 12487 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) (yyvsp[-1].node); } -#line 42429 "gram.c" /* yacc.c:1652 */ + case 1789: /* opt_repeatable_clause: REPEATABLE '(' a_expr ')' */ +#line 12487 "gram.y" + { (yyval.node) = (Node *) (yyvsp[-1].node); } +#line 42921 "gram.c" break; - case 1790: -#line 12488 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 42435 "gram.c" /* yacc.c:1652 */ + case 1790: /* opt_repeatable_clause: %empty */ +#line 12488 "gram.y" + { (yyval.node) = NULL; } +#line 42927 "gram.c" break; - case 1791: -#line 12504 "gram.y" /* yacc.c:1652 */ - { + case 1791: /* func_table: func_expr_windowless opt_ordinality */ +#line 12504 "gram.y" + { RangeFunction *n = makeNode(RangeFunction); n->lateral = false; n->ordinality = (yyvsp[0].boolean); @@ -42445,12 +42937,12 @@ yyreduce: /* alias and coldeflist are set by table_ref production */ (yyval.node) = (Node *) n; } -#line 42449 "gram.c" /* yacc.c:1652 */ +#line 42941 "gram.c" break; - case 1792: -#line 12514 "gram.y" /* yacc.c:1652 */ - { + case 1792: /* func_table: ROWS FROM '(' rowsfrom_list ')' opt_ordinality */ +#line 12514 "gram.y" + { RangeFunction *n = makeNode(RangeFunction); n->lateral = false; n->ordinality = (yyvsp[0].boolean); @@ -42459,118 +42951,118 @@ yyreduce: /* alias and coldeflist are set by table_ref production */ (yyval.node) = (Node *) n; } -#line 42463 "gram.c" /* yacc.c:1652 */ +#line 42955 "gram.c" break; - case 1793: -#line 12526 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make2((yyvsp[-1].node), (yyvsp[0].list)); } -#line 42469 "gram.c" /* yacc.c:1652 */ + case 1793: /* rowsfrom_item: func_expr_windowless opt_col_def_list */ +#line 12526 "gram.y" + { (yyval.list) = list_make2((yyvsp[-1].node), (yyvsp[0].list)); } +#line 42961 "gram.c" break; - case 1794: -#line 12530 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].list)); } -#line 42475 "gram.c" /* yacc.c:1652 */ + case 1794: /* rowsfrom_list: rowsfrom_item */ +#line 12530 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].list)); } +#line 42967 "gram.c" break; - case 1795: -#line 12531 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].list)); } -#line 42481 "gram.c" /* yacc.c:1652 */ + case 1795: /* rowsfrom_list: rowsfrom_list ',' rowsfrom_item */ +#line 12531 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].list)); } +#line 42973 "gram.c" break; - case 1796: -#line 12534 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 42487 "gram.c" /* yacc.c:1652 */ + case 1796: /* opt_col_def_list: AS '(' TableFuncElementList ')' */ +#line 12534 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 42979 "gram.c" break; - case 1797: -#line 12535 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 42493 "gram.c" /* yacc.c:1652 */ + case 1797: /* opt_col_def_list: %empty */ +#line 12535 "gram.y" + { (yyval.list) = NIL; } +#line 42985 "gram.c" break; - case 1798: -#line 12538 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 42499 "gram.c" /* yacc.c:1652 */ + case 1798: /* opt_ordinality: WITH_LA ORDINALITY */ +#line 12538 "gram.y" + { (yyval.boolean) = true; } +#line 42991 "gram.c" break; - case 1799: -#line 12539 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 42505 "gram.c" /* yacc.c:1652 */ + case 1799: /* opt_ordinality: %empty */ +#line 12539 "gram.y" + { (yyval.boolean) = false; } +#line 42997 "gram.c" break; - case 1800: -#line 12544 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 42511 "gram.c" /* yacc.c:1652 */ + case 1800: /* where_clause: WHERE a_expr */ +#line 12544 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 43003 "gram.c" break; - case 1801: -#line 12545 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 42517 "gram.c" /* yacc.c:1652 */ + case 1801: /* where_clause: %empty */ +#line 12545 "gram.y" + { (yyval.node) = NULL; } +#line 43009 "gram.c" break; - case 1802: -#line 12550 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 42523 "gram.c" /* yacc.c:1652 */ + case 1802: /* where_or_current_clause: WHERE a_expr */ +#line 12550 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 43015 "gram.c" break; - case 1803: -#line 12552 "gram.y" /* yacc.c:1652 */ - { + case 1803: /* where_or_current_clause: WHERE CURRENT_P OF cursor_name */ +#line 12552 "gram.y" + { CurrentOfExpr *n = makeNode(CurrentOfExpr); /* cvarno is filled in by parse analysis */ n->cursor_name = (yyvsp[0].str); n->cursor_param = 0; (yyval.node) = (Node *) n; } -#line 42535 "gram.c" /* yacc.c:1652 */ +#line 43027 "gram.c" break; - case 1804: -#line 12559 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 42541 "gram.c" /* yacc.c:1652 */ + case 1804: /* where_or_current_clause: %empty */ +#line 12559 "gram.y" + { (yyval.node) = NULL; } +#line 43033 "gram.c" break; - case 1805: -#line 12564 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 42547 "gram.c" /* yacc.c:1652 */ + case 1805: /* OptTableFuncElementList: TableFuncElementList */ +#line 12564 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 43039 "gram.c" break; - case 1806: -#line 12565 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 42553 "gram.c" /* yacc.c:1652 */ + case 1806: /* OptTableFuncElementList: %empty */ +#line 12565 "gram.y" + { (yyval.list) = NIL; } +#line 43045 "gram.c" break; - case 1807: -#line 12570 "gram.y" /* yacc.c:1652 */ - { + case 1807: /* TableFuncElementList: TableFuncElement */ +#line 12570 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 42561 "gram.c" /* yacc.c:1652 */ +#line 43053 "gram.c" break; - case 1808: -#line 12574 "gram.y" /* yacc.c:1652 */ - { + case 1808: /* TableFuncElementList: TableFuncElementList ',' TableFuncElement */ +#line 12574 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 42569 "gram.c" /* yacc.c:1652 */ +#line 43061 "gram.c" break; - case 1809: -#line 12580 "gram.y" /* yacc.c:1652 */ - { + case 1809: /* TableFuncElement: ColId Typename opt_collate_clause */ +#line 12580 "gram.y" + { ColumnDef *n = makeNode(ColumnDef); n->colname = (yyvsp[-2].str); n->typeName = (yyvsp[-1].typnam); @@ -42587,12 +43079,12 @@ yyreduce: n->location = (yylsp[-2]); (yyval.node) = (Node *)n; } -#line 42591 "gram.c" /* yacc.c:1652 */ +#line 43083 "gram.c" break; - case 1810: -#line 12604 "gram.y" /* yacc.c:1652 */ - { + case 1810: /* xmltable: XMLTABLE '(' c_expr xmlexists_argument COLUMNS xmltable_column_list ')' */ +#line 12604 "gram.y" + { RangeTableFunc *n = makeNode(RangeTableFunc); n->rowexpr = (yyvsp[-4].node); n->docexpr = (yyvsp[-3].node); @@ -42601,12 +43093,12 @@ yyreduce: n->location = (yylsp[-6]); (yyval.node) = (Node *)n; } -#line 42605 "gram.c" /* yacc.c:1652 */ +#line 43097 "gram.c" break; - case 1811: -#line 12615 "gram.y" /* yacc.c:1652 */ - { + case 1811: /* xmltable: XMLTABLE '(' XMLNAMESPACES '(' xml_namespace_list ')' ',' c_expr xmlexists_argument COLUMNS xmltable_column_list ')' */ +#line 12615 "gram.y" + { RangeTableFunc *n = makeNode(RangeTableFunc); n->rowexpr = (yyvsp[-4].node); n->docexpr = (yyvsp[-3].node); @@ -42615,24 +43107,24 @@ yyreduce: n->location = (yylsp[-11]); (yyval.node) = (Node *)n; } -#line 42619 "gram.c" /* yacc.c:1652 */ +#line 43111 "gram.c" break; - case 1812: -#line 12626 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 42625 "gram.c" /* yacc.c:1652 */ + case 1812: /* xmltable_column_list: xmltable_column_el */ +#line 12626 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 43117 "gram.c" break; - case 1813: -#line 12627 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 42631 "gram.c" /* yacc.c:1652 */ + case 1813: /* xmltable_column_list: xmltable_column_list ',' xmltable_column_el */ +#line 12627 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } +#line 43123 "gram.c" break; - case 1814: -#line 12632 "gram.y" /* yacc.c:1652 */ - { + case 1814: /* xmltable_column_el: ColId Typename */ +#line 12632 "gram.y" + { RangeTableFuncCol *fc = makeNode(RangeTableFuncCol); fc->colname = (yyvsp[-1].str); @@ -42645,12 +43137,12 @@ yyreduce: (yyval.node) = (Node *) fc; } -#line 42649 "gram.c" /* yacc.c:1652 */ +#line 43141 "gram.c" break; - case 1815: -#line 12646 "gram.y" /* yacc.c:1652 */ - { + case 1815: /* xmltable_column_el: ColId Typename xmltable_column_option_list */ +#line 12646 "gram.y" + { RangeTableFuncCol *fc = makeNode(RangeTableFuncCol); ListCell *option; bool nullability_seen = false; @@ -42706,12 +43198,12 @@ yyreduce: } (yyval.node) = (Node *) fc; } -#line 42710 "gram.c" /* yacc.c:1652 */ +#line 43202 "gram.c" break; - case 1816: -#line 12703 "gram.y" /* yacc.c:1652 */ - { + case 1816: /* xmltable_column_el: ColId FOR ORDINALITY */ +#line 12703 "gram.y" + { RangeTableFuncCol *fc = makeNode(RangeTableFuncCol); fc->colname = (yyvsp[-2].str); @@ -42721,366 +43213,366 @@ yyreduce: (yyval.node) = (Node *) fc; } -#line 42725 "gram.c" /* yacc.c:1652 */ +#line 43217 "gram.c" break; - case 1817: -#line 12717 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 42731 "gram.c" /* yacc.c:1652 */ + case 1817: /* xmltable_column_option_list: xmltable_column_option_el */ +#line 12717 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } +#line 43223 "gram.c" break; - case 1818: -#line 12719 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 42737 "gram.c" /* yacc.c:1652 */ + case 1818: /* xmltable_column_option_list: xmltable_column_option_list xmltable_column_option_el */ +#line 12719 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 43229 "gram.c" break; - case 1819: -#line 12724 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = makeDefElem((yyvsp[-1].str), (yyvsp[0].node), (yylsp[-1])); } -#line 42743 "gram.c" /* yacc.c:1652 */ + case 1819: /* xmltable_column_option_el: IDENT b_expr */ +#line 12724 "gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[-1].str), (yyvsp[0].node), (yylsp[-1])); } +#line 43235 "gram.c" break; - case 1820: -#line 12726 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = makeDefElem("default", (yyvsp[0].node), (yylsp[-1])); } -#line 42749 "gram.c" /* yacc.c:1652 */ + case 1820: /* xmltable_column_option_el: DEFAULT b_expr */ +#line 12726 "gram.y" + { (yyval.defelt) = makeDefElem("default", (yyvsp[0].node), (yylsp[-1])); } +#line 43241 "gram.c" break; - case 1821: -#line 12728 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = makeDefElem("is_not_null", (Node *) makeInteger(true), (yylsp[-1])); } -#line 42755 "gram.c" /* yacc.c:1652 */ + case 1821: /* xmltable_column_option_el: NOT NULL_P */ +#line 12728 "gram.y" + { (yyval.defelt) = makeDefElem("is_not_null", (Node *) makeInteger(true), (yylsp[-1])); } +#line 43247 "gram.c" break; - case 1822: -#line 12730 "gram.y" /* yacc.c:1652 */ - { (yyval.defelt) = makeDefElem("is_not_null", (Node *) makeInteger(false), (yylsp[0])); } -#line 42761 "gram.c" /* yacc.c:1652 */ + case 1822: /* xmltable_column_option_el: NULL_P */ +#line 12730 "gram.y" + { (yyval.defelt) = makeDefElem("is_not_null", (Node *) makeInteger(false), (yylsp[0])); } +#line 43253 "gram.c" break; - case 1823: -#line 12735 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].target)); } -#line 42767 "gram.c" /* yacc.c:1652 */ + case 1823: /* xml_namespace_list: xml_namespace_el */ +#line 12735 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].target)); } +#line 43259 "gram.c" break; - case 1824: -#line 12737 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].target)); } -#line 42773 "gram.c" /* yacc.c:1652 */ + case 1824: /* xml_namespace_list: xml_namespace_list ',' xml_namespace_el */ +#line 12737 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].target)); } +#line 43265 "gram.c" break; - case 1825: -#line 12742 "gram.y" /* yacc.c:1652 */ - { + case 1825: /* xml_namespace_el: b_expr AS ColLabel */ +#line 12742 "gram.y" + { (yyval.target) = makeNode(ResTarget); (yyval.target)->name = (yyvsp[0].str); (yyval.target)->indirection = NIL; (yyval.target)->val = (yyvsp[-2].node); (yyval.target)->location = (yylsp[-2]); } -#line 42785 "gram.c" /* yacc.c:1652 */ +#line 43277 "gram.c" break; - case 1826: -#line 12750 "gram.y" /* yacc.c:1652 */ - { + case 1826: /* xml_namespace_el: DEFAULT b_expr */ +#line 12750 "gram.y" + { (yyval.target) = makeNode(ResTarget); (yyval.target)->name = NULL; (yyval.target)->indirection = NIL; (yyval.target)->val = (yyvsp[0].node); (yyval.target)->location = (yylsp[-1]); } -#line 42797 "gram.c" /* yacc.c:1652 */ +#line 43289 "gram.c" break; - case 1827: -#line 12770 "gram.y" /* yacc.c:1652 */ - { + case 1827: /* Typename: SimpleTypename opt_array_bounds */ +#line 12770 "gram.y" + { (yyval.typnam) = (yyvsp[-1].typnam); (yyval.typnam)->arrayBounds = (yyvsp[0].list); } -#line 42806 "gram.c" /* yacc.c:1652 */ +#line 43298 "gram.c" break; - case 1828: -#line 12775 "gram.y" /* yacc.c:1652 */ - { + case 1828: /* Typename: SETOF SimpleTypename opt_array_bounds */ +#line 12775 "gram.y" + { (yyval.typnam) = (yyvsp[-1].typnam); (yyval.typnam)->arrayBounds = (yyvsp[0].list); (yyval.typnam)->setof = true; } -#line 42816 "gram.c" /* yacc.c:1652 */ +#line 43308 "gram.c" break; - case 1829: -#line 12782 "gram.y" /* yacc.c:1652 */ - { + case 1829: /* Typename: SimpleTypename ARRAY '[' Iconst ']' */ +#line 12782 "gram.y" + { (yyval.typnam) = (yyvsp[-4].typnam); (yyval.typnam)->arrayBounds = list_make1(makeInteger((yyvsp[-1].ival))); } -#line 42825 "gram.c" /* yacc.c:1652 */ +#line 43317 "gram.c" break; - case 1830: -#line 12787 "gram.y" /* yacc.c:1652 */ - { + case 1830: /* Typename: SETOF SimpleTypename ARRAY '[' Iconst ']' */ +#line 12787 "gram.y" + { (yyval.typnam) = (yyvsp[-4].typnam); (yyval.typnam)->arrayBounds = list_make1(makeInteger((yyvsp[-1].ival))); (yyval.typnam)->setof = true; } -#line 42835 "gram.c" /* yacc.c:1652 */ +#line 43327 "gram.c" break; - case 1831: -#line 12793 "gram.y" /* yacc.c:1652 */ - { + case 1831: /* Typename: SimpleTypename ARRAY */ +#line 12793 "gram.y" + { (yyval.typnam) = (yyvsp[-1].typnam); (yyval.typnam)->arrayBounds = list_make1(makeInteger(-1)); } -#line 42844 "gram.c" /* yacc.c:1652 */ +#line 43336 "gram.c" break; - case 1832: -#line 12798 "gram.y" /* yacc.c:1652 */ - { + case 1832: /* Typename: SETOF SimpleTypename ARRAY */ +#line 12798 "gram.y" + { (yyval.typnam) = (yyvsp[-1].typnam); (yyval.typnam)->arrayBounds = list_make1(makeInteger(-1)); (yyval.typnam)->setof = true; } -#line 42854 "gram.c" /* yacc.c:1652 */ +#line 43346 "gram.c" break; - case 1833: -#line 12807 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), makeInteger(-1)); } -#line 42860 "gram.c" /* yacc.c:1652 */ + case 1833: /* opt_array_bounds: opt_array_bounds '[' ']' */ +#line 12807 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), makeInteger(-1)); } +#line 43352 "gram.c" break; - case 1834: -#line 12809 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-3].list), makeInteger((yyvsp[-1].ival))); } -#line 42866 "gram.c" /* yacc.c:1652 */ + case 1834: /* opt_array_bounds: opt_array_bounds '[' Iconst ']' */ +#line 12809 "gram.y" + { (yyval.list) = lappend((yyvsp[-3].list), makeInteger((yyvsp[-1].ival))); } +#line 43358 "gram.c" break; - case 1835: -#line 12811 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 42872 "gram.c" /* yacc.c:1652 */ + case 1835: /* opt_array_bounds: %empty */ +#line 12811 "gram.y" + { (yyval.list) = NIL; } +#line 43364 "gram.c" break; - case 1836: -#line 12815 "gram.y" /* yacc.c:1652 */ - { (yyval.typnam) = (yyvsp[0].typnam); } -#line 42878 "gram.c" /* yacc.c:1652 */ + case 1836: /* SimpleTypename: GenericType */ +#line 12815 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); } +#line 43370 "gram.c" break; - case 1837: -#line 12816 "gram.y" /* yacc.c:1652 */ - { (yyval.typnam) = (yyvsp[0].typnam); } -#line 42884 "gram.c" /* yacc.c:1652 */ + case 1837: /* SimpleTypename: Numeric */ +#line 12816 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); } +#line 43376 "gram.c" break; - case 1838: -#line 12817 "gram.y" /* yacc.c:1652 */ - { (yyval.typnam) = (yyvsp[0].typnam); } -#line 42890 "gram.c" /* yacc.c:1652 */ + case 1838: /* SimpleTypename: Bit */ +#line 12817 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); } +#line 43382 "gram.c" break; - case 1839: -#line 12818 "gram.y" /* yacc.c:1652 */ - { (yyval.typnam) = (yyvsp[0].typnam); } -#line 42896 "gram.c" /* yacc.c:1652 */ + case 1839: /* SimpleTypename: Character */ +#line 12818 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); } +#line 43388 "gram.c" break; - case 1840: -#line 12819 "gram.y" /* yacc.c:1652 */ - { (yyval.typnam) = (yyvsp[0].typnam); } -#line 42902 "gram.c" /* yacc.c:1652 */ + case 1840: /* SimpleTypename: ConstDatetime */ +#line 12819 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); } +#line 43394 "gram.c" break; - case 1841: -#line 12821 "gram.y" /* yacc.c:1652 */ - { + case 1841: /* SimpleTypename: ConstInterval opt_interval */ +#line 12821 "gram.y" + { (yyval.typnam) = (yyvsp[-1].typnam); (yyval.typnam)->typmods = (yyvsp[0].list); } -#line 42911 "gram.c" /* yacc.c:1652 */ +#line 43403 "gram.c" break; - case 1842: -#line 12826 "gram.y" /* yacc.c:1652 */ - { + case 1842: /* SimpleTypename: ConstInterval '(' Iconst ')' */ +#line 12826 "gram.y" + { (yyval.typnam) = (yyvsp[-3].typnam); (yyval.typnam)->typmods = list_make2(makeIntConst(INTERVAL_FULL_RANGE, -1), makeIntConst((yyvsp[-1].ival), (yylsp[-1]))); } -#line 42921 "gram.c" /* yacc.c:1652 */ +#line 43413 "gram.c" break; - case 1843: -#line 12845 "gram.y" /* yacc.c:1652 */ - { (yyval.typnam) = (yyvsp[0].typnam); } -#line 42927 "gram.c" /* yacc.c:1652 */ + case 1843: /* ConstTypename: Numeric */ +#line 12845 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); } +#line 43419 "gram.c" break; - case 1844: -#line 12846 "gram.y" /* yacc.c:1652 */ - { (yyval.typnam) = (yyvsp[0].typnam); } -#line 42933 "gram.c" /* yacc.c:1652 */ + case 1844: /* ConstTypename: ConstBit */ +#line 12846 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); } +#line 43425 "gram.c" break; - case 1845: -#line 12847 "gram.y" /* yacc.c:1652 */ - { (yyval.typnam) = (yyvsp[0].typnam); } -#line 42939 "gram.c" /* yacc.c:1652 */ + case 1845: /* ConstTypename: ConstCharacter */ +#line 12847 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); } +#line 43431 "gram.c" break; - case 1846: -#line 12848 "gram.y" /* yacc.c:1652 */ - { (yyval.typnam) = (yyvsp[0].typnam); } -#line 42945 "gram.c" /* yacc.c:1652 */ + case 1846: /* ConstTypename: ConstDatetime */ +#line 12848 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); } +#line 43437 "gram.c" break; - case 1847: -#line 12860 "gram.y" /* yacc.c:1652 */ - { + case 1847: /* GenericType: type_function_name opt_type_modifiers */ +#line 12860 "gram.y" + { (yyval.typnam) = makeTypeName((yyvsp[-1].str)); (yyval.typnam)->typmods = (yyvsp[0].list); (yyval.typnam)->location = (yylsp[-1]); } -#line 42955 "gram.c" /* yacc.c:1652 */ +#line 43447 "gram.c" break; - case 1848: -#line 12866 "gram.y" /* yacc.c:1652 */ - { + case 1848: /* GenericType: type_function_name attrs opt_type_modifiers */ +#line 12866 "gram.y" + { (yyval.typnam) = makeTypeNameFromNameList(lcons(makeString((yyvsp[-2].str)), (yyvsp[-1].list))); (yyval.typnam)->typmods = (yyvsp[0].list); (yyval.typnam)->location = (yylsp[-2]); } -#line 42965 "gram.c" /* yacc.c:1652 */ +#line 43457 "gram.c" break; - case 1849: -#line 12873 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 42971 "gram.c" /* yacc.c:1652 */ + case 1849: /* opt_type_modifiers: '(' expr_list ')' */ +#line 12873 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 43463 "gram.c" break; - case 1850: -#line 12874 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 42977 "gram.c" /* yacc.c:1652 */ + case 1850: /* opt_type_modifiers: %empty */ +#line 12874 "gram.y" + { (yyval.list) = NIL; } +#line 43469 "gram.c" break; - case 1851: -#line 12881 "gram.y" /* yacc.c:1652 */ - { + case 1851: /* Numeric: INT_P */ +#line 12881 "gram.y" + { (yyval.typnam) = SystemTypeName("int4"); (yyval.typnam)->location = (yylsp[0]); } -#line 42986 "gram.c" /* yacc.c:1652 */ +#line 43478 "gram.c" break; - case 1852: -#line 12886 "gram.y" /* yacc.c:1652 */ - { + case 1852: /* Numeric: INTEGER */ +#line 12886 "gram.y" + { (yyval.typnam) = SystemTypeName("int4"); (yyval.typnam)->location = (yylsp[0]); } -#line 42995 "gram.c" /* yacc.c:1652 */ +#line 43487 "gram.c" break; - case 1853: -#line 12891 "gram.y" /* yacc.c:1652 */ - { + case 1853: /* Numeric: SMALLINT */ +#line 12891 "gram.y" + { (yyval.typnam) = SystemTypeName("int2"); (yyval.typnam)->location = (yylsp[0]); } -#line 43004 "gram.c" /* yacc.c:1652 */ +#line 43496 "gram.c" break; - case 1854: -#line 12896 "gram.y" /* yacc.c:1652 */ - { + case 1854: /* Numeric: BIGINT */ +#line 12896 "gram.y" + { (yyval.typnam) = SystemTypeName("int8"); (yyval.typnam)->location = (yylsp[0]); } -#line 43013 "gram.c" /* yacc.c:1652 */ +#line 43505 "gram.c" break; - case 1855: -#line 12901 "gram.y" /* yacc.c:1652 */ - { + case 1855: /* Numeric: REAL */ +#line 12901 "gram.y" + { (yyval.typnam) = SystemTypeName("float4"); (yyval.typnam)->location = (yylsp[0]); } -#line 43022 "gram.c" /* yacc.c:1652 */ +#line 43514 "gram.c" break; - case 1856: -#line 12906 "gram.y" /* yacc.c:1652 */ - { + case 1856: /* Numeric: FLOAT_P opt_float */ +#line 12906 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); (yyval.typnam)->location = (yylsp[-1]); } -#line 43031 "gram.c" /* yacc.c:1652 */ +#line 43523 "gram.c" break; - case 1857: -#line 12911 "gram.y" /* yacc.c:1652 */ - { + case 1857: /* Numeric: DOUBLE_P PRECISION */ +#line 12911 "gram.y" + { (yyval.typnam) = SystemTypeName("float8"); (yyval.typnam)->location = (yylsp[-1]); } -#line 43040 "gram.c" /* yacc.c:1652 */ +#line 43532 "gram.c" break; - case 1858: -#line 12916 "gram.y" /* yacc.c:1652 */ - { + case 1858: /* Numeric: DECIMAL_P opt_type_modifiers */ +#line 12916 "gram.y" + { (yyval.typnam) = SystemTypeName("numeric"); (yyval.typnam)->typmods = (yyvsp[0].list); (yyval.typnam)->location = (yylsp[-1]); } -#line 43050 "gram.c" /* yacc.c:1652 */ +#line 43542 "gram.c" break; - case 1859: -#line 12922 "gram.y" /* yacc.c:1652 */ - { + case 1859: /* Numeric: DEC opt_type_modifiers */ +#line 12922 "gram.y" + { (yyval.typnam) = SystemTypeName("numeric"); (yyval.typnam)->typmods = (yyvsp[0].list); (yyval.typnam)->location = (yylsp[-1]); } -#line 43060 "gram.c" /* yacc.c:1652 */ +#line 43552 "gram.c" break; - case 1860: -#line 12928 "gram.y" /* yacc.c:1652 */ - { + case 1860: /* Numeric: NUMERIC opt_type_modifiers */ +#line 12928 "gram.y" + { (yyval.typnam) = SystemTypeName("numeric"); (yyval.typnam)->typmods = (yyvsp[0].list); (yyval.typnam)->location = (yylsp[-1]); } -#line 43070 "gram.c" /* yacc.c:1652 */ +#line 43562 "gram.c" break; - case 1861: -#line 12934 "gram.y" /* yacc.c:1652 */ - { + case 1861: /* Numeric: BOOLEAN_P */ +#line 12934 "gram.y" + { (yyval.typnam) = SystemTypeName("bool"); (yyval.typnam)->location = (yylsp[0]); } -#line 43079 "gram.c" /* yacc.c:1652 */ +#line 43571 "gram.c" break; - case 1862: -#line 12941 "gram.y" /* yacc.c:1652 */ - { + case 1862: /* opt_float: '(' Iconst ')' */ +#line 12941 "gram.y" + { /* * Check FLOAT() precision limits assuming IEEE floating * types - thomas 1997-09-18 @@ -43100,53 +43592,53 @@ yyreduce: errmsg("precision for type float must be less than 54 bits"), parser_errposition((yylsp[-1])))); } -#line 43104 "gram.c" /* yacc.c:1652 */ +#line 43596 "gram.c" break; - case 1863: -#line 12962 "gram.y" /* yacc.c:1652 */ - { + case 1863: /* opt_float: %empty */ +#line 12962 "gram.y" + { (yyval.typnam) = SystemTypeName("float8"); } -#line 43112 "gram.c" /* yacc.c:1652 */ +#line 43604 "gram.c" break; - case 1864: -#line 12972 "gram.y" /* yacc.c:1652 */ - { + case 1864: /* Bit: BitWithLength */ +#line 12972 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); } -#line 43120 "gram.c" /* yacc.c:1652 */ +#line 43612 "gram.c" break; - case 1865: -#line 12976 "gram.y" /* yacc.c:1652 */ - { + case 1865: /* Bit: BitWithoutLength */ +#line 12976 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); } -#line 43128 "gram.c" /* yacc.c:1652 */ +#line 43620 "gram.c" break; - case 1866: -#line 12984 "gram.y" /* yacc.c:1652 */ - { + case 1866: /* ConstBit: BitWithLength */ +#line 12984 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); } -#line 43136 "gram.c" /* yacc.c:1652 */ +#line 43628 "gram.c" break; - case 1867: -#line 12988 "gram.y" /* yacc.c:1652 */ - { + case 1867: /* ConstBit: BitWithoutLength */ +#line 12988 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); (yyval.typnam)->typmods = NIL; } -#line 43145 "gram.c" /* yacc.c:1652 */ +#line 43637 "gram.c" break; - case 1868: -#line 12996 "gram.y" /* yacc.c:1652 */ - { + case 1868: /* BitWithLength: BIT opt_varying '(' expr_list ')' */ +#line 12996 "gram.y" + { char *typname; typname = (yyvsp[-3].boolean) ? "varbit" : "bit"; @@ -43154,12 +43646,12 @@ yyreduce: (yyval.typnam)->typmods = (yyvsp[-1].list); (yyval.typnam)->location = (yylsp[-4]); } -#line 43158 "gram.c" /* yacc.c:1652 */ +#line 43650 "gram.c" break; - case 1869: -#line 13008 "gram.y" /* yacc.c:1652 */ - { + case 1869: /* BitWithoutLength: BIT opt_varying */ +#line 13008 "gram.y" + { /* bit defaults to bit(1), varbit to no limit */ if ((yyvsp[0].boolean)) { @@ -43172,36 +43664,36 @@ yyreduce: } (yyval.typnam)->location = (yylsp[-1]); } -#line 43176 "gram.c" /* yacc.c:1652 */ +#line 43668 "gram.c" break; - case 1870: -#line 13029 "gram.y" /* yacc.c:1652 */ - { + case 1870: /* Character: CharacterWithLength */ +#line 13029 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); } -#line 43184 "gram.c" /* yacc.c:1652 */ +#line 43676 "gram.c" break; - case 1871: -#line 13033 "gram.y" /* yacc.c:1652 */ - { + case 1871: /* Character: CharacterWithoutLength */ +#line 13033 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); } -#line 43192 "gram.c" /* yacc.c:1652 */ +#line 43684 "gram.c" break; - case 1872: -#line 13039 "gram.y" /* yacc.c:1652 */ - { + case 1872: /* ConstCharacter: CharacterWithLength */ +#line 13039 "gram.y" + { (yyval.typnam) = (yyvsp[0].typnam); } -#line 43200 "gram.c" /* yacc.c:1652 */ +#line 43692 "gram.c" break; - case 1873: -#line 13043 "gram.y" /* yacc.c:1652 */ - { + case 1873: /* ConstCharacter: CharacterWithoutLength */ +#line 13043 "gram.y" + { /* Length was not specified so allow to be unrestricted. * This handles problems with fixed-length (bpchar) strings * which in column definitions must default to a length @@ -43211,82 +43703,82 @@ yyreduce: (yyval.typnam) = (yyvsp[0].typnam); (yyval.typnam)->typmods = NIL; } -#line 43215 "gram.c" /* yacc.c:1652 */ +#line 43707 "gram.c" break; - case 1874: -#line 13056 "gram.y" /* yacc.c:1652 */ - { + case 1874: /* CharacterWithLength: character '(' Iconst ')' */ +#line 13056 "gram.y" + { (yyval.typnam) = SystemTypeName((yyvsp[-3].str)); (yyval.typnam)->typmods = list_make1(makeIntConst((yyvsp[-1].ival), (yylsp[-1]))); (yyval.typnam)->location = (yylsp[-3]); } -#line 43225 "gram.c" /* yacc.c:1652 */ +#line 43717 "gram.c" break; - case 1875: -#line 13064 "gram.y" /* yacc.c:1652 */ - { + case 1875: /* CharacterWithoutLength: character */ +#line 13064 "gram.y" + { (yyval.typnam) = SystemTypeName((yyvsp[0].str)); /* char defaults to char(1), varchar to no limit */ if (strcmp((yyvsp[0].str), "bpchar") == 0) (yyval.typnam)->typmods = list_make1(makeIntConst(1, -1)); (yyval.typnam)->location = (yylsp[0]); } -#line 43237 "gram.c" /* yacc.c:1652 */ +#line 43729 "gram.c" break; - case 1876: -#line 13074 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].boolean) ? "varchar": "bpchar"; } -#line 43243 "gram.c" /* yacc.c:1652 */ + case 1876: /* character: CHARACTER opt_varying */ +#line 13074 "gram.y" + { (yyval.str) = (yyvsp[0].boolean) ? "varchar": "bpchar"; } +#line 43735 "gram.c" break; - case 1877: -#line 13076 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].boolean) ? "varchar": "bpchar"; } -#line 43249 "gram.c" /* yacc.c:1652 */ + case 1877: /* character: CHAR_P opt_varying */ +#line 13076 "gram.y" + { (yyval.str) = (yyvsp[0].boolean) ? "varchar": "bpchar"; } +#line 43741 "gram.c" break; - case 1878: -#line 13078 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "varchar"; } -#line 43255 "gram.c" /* yacc.c:1652 */ + case 1878: /* character: VARCHAR */ +#line 13078 "gram.y" + { (yyval.str) = "varchar"; } +#line 43747 "gram.c" break; - case 1879: -#line 13080 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].boolean) ? "varchar": "bpchar"; } -#line 43261 "gram.c" /* yacc.c:1652 */ + case 1879: /* character: NATIONAL CHARACTER opt_varying */ +#line 13080 "gram.y" + { (yyval.str) = (yyvsp[0].boolean) ? "varchar": "bpchar"; } +#line 43753 "gram.c" break; - case 1880: -#line 13082 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].boolean) ? "varchar": "bpchar"; } -#line 43267 "gram.c" /* yacc.c:1652 */ + case 1880: /* character: NATIONAL CHAR_P opt_varying */ +#line 13082 "gram.y" + { (yyval.str) = (yyvsp[0].boolean) ? "varchar": "bpchar"; } +#line 43759 "gram.c" break; - case 1881: -#line 13084 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].boolean) ? "varchar": "bpchar"; } -#line 43273 "gram.c" /* yacc.c:1652 */ + case 1881: /* character: NCHAR opt_varying */ +#line 13084 "gram.y" + { (yyval.str) = (yyvsp[0].boolean) ? "varchar": "bpchar"; } +#line 43765 "gram.c" break; - case 1882: -#line 13088 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 43279 "gram.c" /* yacc.c:1652 */ + case 1882: /* opt_varying: VARYING */ +#line 13088 "gram.y" + { (yyval.boolean) = true; } +#line 43771 "gram.c" break; - case 1883: -#line 13089 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 43285 "gram.c" /* yacc.c:1652 */ + case 1883: /* opt_varying: %empty */ +#line 13089 "gram.y" + { (yyval.boolean) = false; } +#line 43777 "gram.c" break; - case 1884: -#line 13097 "gram.y" /* yacc.c:1652 */ - { + case 1884: /* ConstDatetime: TIMESTAMP '(' Iconst ')' opt_timezone */ +#line 13097 "gram.y" + { if ((yyvsp[0].boolean)) (yyval.typnam) = SystemTypeName("timestamptz"); else @@ -43294,24 +43786,24 @@ yyreduce: (yyval.typnam)->typmods = list_make1(makeIntConst((yyvsp[-2].ival), (yylsp[-2]))); (yyval.typnam)->location = (yylsp[-4]); } -#line 43298 "gram.c" /* yacc.c:1652 */ +#line 43790 "gram.c" break; - case 1885: -#line 13106 "gram.y" /* yacc.c:1652 */ - { + case 1885: /* ConstDatetime: TIMESTAMP opt_timezone */ +#line 13106 "gram.y" + { if ((yyvsp[0].boolean)) (yyval.typnam) = SystemTypeName("timestamptz"); else (yyval.typnam) = SystemTypeName("timestamp"); (yyval.typnam)->location = (yylsp[-1]); } -#line 43310 "gram.c" /* yacc.c:1652 */ +#line 43802 "gram.c" break; - case 1886: -#line 13114 "gram.y" /* yacc.c:1652 */ - { + case 1886: /* ConstDatetime: TIME '(' Iconst ')' opt_timezone */ +#line 13114 "gram.y" + { if ((yyvsp[0].boolean)) (yyval.typnam) = SystemTypeName("timetz"); else @@ -43319,344 +43811,344 @@ yyreduce: (yyval.typnam)->typmods = list_make1(makeIntConst((yyvsp[-2].ival), (yylsp[-2]))); (yyval.typnam)->location = (yylsp[-4]); } -#line 43323 "gram.c" /* yacc.c:1652 */ +#line 43815 "gram.c" break; - case 1887: -#line 13123 "gram.y" /* yacc.c:1652 */ - { + case 1887: /* ConstDatetime: TIME opt_timezone */ +#line 13123 "gram.y" + { if ((yyvsp[0].boolean)) (yyval.typnam) = SystemTypeName("timetz"); else (yyval.typnam) = SystemTypeName("time"); (yyval.typnam)->location = (yylsp[-1]); } -#line 43335 "gram.c" /* yacc.c:1652 */ +#line 43827 "gram.c" break; - case 1888: -#line 13134 "gram.y" /* yacc.c:1652 */ - { + case 1888: /* ConstInterval: INTERVAL */ +#line 13134 "gram.y" + { (yyval.typnam) = SystemTypeName("interval"); (yyval.typnam)->location = (yylsp[0]); } -#line 43344 "gram.c" /* yacc.c:1652 */ +#line 43836 "gram.c" break; - case 1889: -#line 13141 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 43350 "gram.c" /* yacc.c:1652 */ + case 1889: /* opt_timezone: WITH_LA TIME ZONE */ +#line 13141 "gram.y" + { (yyval.boolean) = true; } +#line 43842 "gram.c" break; - case 1890: -#line 13142 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 43356 "gram.c" /* yacc.c:1652 */ + case 1890: /* opt_timezone: WITHOUT TIME ZONE */ +#line 13142 "gram.y" + { (yyval.boolean) = false; } +#line 43848 "gram.c" break; - case 1891: -#line 13143 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 43362 "gram.c" /* yacc.c:1652 */ + case 1891: /* opt_timezone: %empty */ +#line 13143 "gram.y" + { (yyval.boolean) = false; } +#line 43854 "gram.c" break; - case 1892: -#line 13148 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(YEAR), (yylsp[0]))); } -#line 43368 "gram.c" /* yacc.c:1652 */ + case 1892: /* opt_interval: YEAR_P */ +#line 13148 "gram.y" + { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(YEAR), (yylsp[0]))); } +#line 43860 "gram.c" break; - case 1893: -#line 13150 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(MONTH), (yylsp[0]))); } -#line 43374 "gram.c" /* yacc.c:1652 */ + case 1893: /* opt_interval: MONTH_P */ +#line 13150 "gram.y" + { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(MONTH), (yylsp[0]))); } +#line 43866 "gram.c" break; - case 1894: -#line 13152 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(DAY), (yylsp[0]))); } -#line 43380 "gram.c" /* yacc.c:1652 */ + case 1894: /* opt_interval: DAY_P */ +#line 13152 "gram.y" + { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(DAY), (yylsp[0]))); } +#line 43872 "gram.c" break; - case 1895: -#line 13154 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(HOUR), (yylsp[0]))); } -#line 43386 "gram.c" /* yacc.c:1652 */ + case 1895: /* opt_interval: HOUR_P */ +#line 13154 "gram.y" + { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(HOUR), (yylsp[0]))); } +#line 43878 "gram.c" break; - case 1896: -#line 13156 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(MINUTE), (yylsp[0]))); } -#line 43392 "gram.c" /* yacc.c:1652 */ + case 1896: /* opt_interval: MINUTE_P */ +#line 13156 "gram.y" + { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(MINUTE), (yylsp[0]))); } +#line 43884 "gram.c" break; - case 1897: -#line 13158 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 43398 "gram.c" /* yacc.c:1652 */ + case 1897: /* opt_interval: interval_second */ +#line 13158 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 43890 "gram.c" break; - case 1898: -#line 13160 "gram.y" /* yacc.c:1652 */ - { + case 1898: /* opt_interval: YEAR_P TO MONTH_P */ +#line 13160 "gram.y" + { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(YEAR) | INTERVAL_MASK(MONTH), (yylsp[-2]))); } -#line 43407 "gram.c" /* yacc.c:1652 */ +#line 43899 "gram.c" break; - case 1899: -#line 13165 "gram.y" /* yacc.c:1652 */ - { + case 1899: /* opt_interval: DAY_P TO HOUR_P */ +#line 13165 "gram.y" + { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(DAY) | INTERVAL_MASK(HOUR), (yylsp[-2]))); } -#line 43416 "gram.c" /* yacc.c:1652 */ +#line 43908 "gram.c" break; - case 1900: -#line 13170 "gram.y" /* yacc.c:1652 */ - { + case 1900: /* opt_interval: DAY_P TO MINUTE_P */ +#line 13170 "gram.y" + { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(DAY) | INTERVAL_MASK(HOUR) | INTERVAL_MASK(MINUTE), (yylsp[-2]))); } -#line 43426 "gram.c" /* yacc.c:1652 */ +#line 43918 "gram.c" break; - case 1901: -#line 13176 "gram.y" /* yacc.c:1652 */ - { + case 1901: /* opt_interval: DAY_P TO interval_second */ +#line 13176 "gram.y" + { (yyval.list) = (yyvsp[0].list); linitial((yyval.list)) = makeIntConst(INTERVAL_MASK(DAY) | INTERVAL_MASK(HOUR) | INTERVAL_MASK(MINUTE) | INTERVAL_MASK(SECOND), (yylsp[-2])); } -#line 43438 "gram.c" /* yacc.c:1652 */ +#line 43930 "gram.c" break; - case 1902: -#line 13184 "gram.y" /* yacc.c:1652 */ - { + case 1902: /* opt_interval: HOUR_P TO MINUTE_P */ +#line 13184 "gram.y" + { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(HOUR) | INTERVAL_MASK(MINUTE), (yylsp[-2]))); } -#line 43447 "gram.c" /* yacc.c:1652 */ +#line 43939 "gram.c" break; - case 1903: -#line 13189 "gram.y" /* yacc.c:1652 */ - { + case 1903: /* opt_interval: HOUR_P TO interval_second */ +#line 13189 "gram.y" + { (yyval.list) = (yyvsp[0].list); linitial((yyval.list)) = makeIntConst(INTERVAL_MASK(HOUR) | INTERVAL_MASK(MINUTE) | INTERVAL_MASK(SECOND), (yylsp[-2])); } -#line 43458 "gram.c" /* yacc.c:1652 */ +#line 43950 "gram.c" break; - case 1904: -#line 13196 "gram.y" /* yacc.c:1652 */ - { + case 1904: /* opt_interval: MINUTE_P TO interval_second */ +#line 13196 "gram.y" + { (yyval.list) = (yyvsp[0].list); linitial((yyval.list)) = makeIntConst(INTERVAL_MASK(MINUTE) | INTERVAL_MASK(SECOND), (yylsp[-2])); } -#line 43468 "gram.c" /* yacc.c:1652 */ +#line 43960 "gram.c" break; - case 1905: -#line 13202 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 43474 "gram.c" /* yacc.c:1652 */ + case 1905: /* opt_interval: %empty */ +#line 13202 "gram.y" + { (yyval.list) = NIL; } +#line 43966 "gram.c" break; - case 1906: -#line 13207 "gram.y" /* yacc.c:1652 */ - { + case 1906: /* interval_second: SECOND_P */ +#line 13207 "gram.y" + { (yyval.list) = list_make1(makeIntConst(INTERVAL_MASK(SECOND), (yylsp[0]))); } -#line 43482 "gram.c" /* yacc.c:1652 */ +#line 43974 "gram.c" break; - case 1907: -#line 13211 "gram.y" /* yacc.c:1652 */ - { + case 1907: /* interval_second: SECOND_P '(' Iconst ')' */ +#line 13211 "gram.y" + { (yyval.list) = list_make2(makeIntConst(INTERVAL_MASK(SECOND), (yylsp[-3])), makeIntConst((yyvsp[-1].ival), (yylsp[-1]))); } -#line 43491 "gram.c" /* yacc.c:1652 */ +#line 43983 "gram.c" break; - case 1908: -#line 13246 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 43497 "gram.c" /* yacc.c:1652 */ + case 1908: /* a_expr: c_expr */ +#line 13246 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 43989 "gram.c" break; - case 1909: -#line 13248 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeTypeCast((yyvsp[-2].node), (yyvsp[0].typnam), (yylsp[-1])); } -#line 43503 "gram.c" /* yacc.c:1652 */ + case 1909: /* a_expr: a_expr TYPECAST Typename */ +#line 13248 "gram.y" + { (yyval.node) = makeTypeCast((yyvsp[-2].node), (yyvsp[0].typnam), (yylsp[-1])); } +#line 43995 "gram.c" break; - case 1910: -#line 13250 "gram.y" /* yacc.c:1652 */ - { + case 1910: /* a_expr: a_expr COLLATE any_name */ +#line 13250 "gram.y" + { CollateClause *n = makeNode(CollateClause); n->arg = (yyvsp[-2].node); n->collname = (yyvsp[0].list); n->location = (yylsp[-1]); (yyval.node) = (Node *) n; } -#line 43515 "gram.c" /* yacc.c:1652 */ +#line 44007 "gram.c" break; - case 1911: -#line 13258 "gram.y" /* yacc.c:1652 */ - { + case 1911: /* a_expr: a_expr AT TIME ZONE a_expr */ +#line 13258 "gram.y" + { (yyval.node) = (Node *) makeFuncCall(SystemFuncName("timezone"), list_make2((yyvsp[0].node), (yyvsp[-4].node)), COERCE_SQL_SYNTAX, (yylsp[-3])); } -#line 43526 "gram.c" /* yacc.c:1652 */ +#line 44018 "gram.c" break; - case 1912: -#line 13274 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", NULL, (yyvsp[0].node), (yylsp[-1])); } -#line 43532 "gram.c" /* yacc.c:1652 */ + case 1912: /* a_expr: '+' a_expr */ +#line 13274 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", NULL, (yyvsp[0].node), (yylsp[-1])); } +#line 44024 "gram.c" break; - case 1913: -#line 13276 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = doNegate((yyvsp[0].node), (yylsp[-1])); } -#line 43538 "gram.c" /* yacc.c:1652 */ + case 1913: /* a_expr: '-' a_expr */ +#line 13276 "gram.y" + { (yyval.node) = doNegate((yyvsp[0].node), (yylsp[-1])); } +#line 44030 "gram.c" break; - case 1914: -#line 13278 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43544 "gram.c" /* yacc.c:1652 */ + case 1914: /* a_expr: a_expr '+' a_expr */ +#line 13278 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44036 "gram.c" break; - case 1915: -#line 13280 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "-", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43550 "gram.c" /* yacc.c:1652 */ + case 1915: /* a_expr: a_expr '-' a_expr */ +#line 13280 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "-", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44042 "gram.c" break; - case 1916: -#line 13282 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "*", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43556 "gram.c" /* yacc.c:1652 */ + case 1916: /* a_expr: a_expr '*' a_expr */ +#line 13282 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "*", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44048 "gram.c" break; - case 1917: -#line 13284 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "/", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43562 "gram.c" /* yacc.c:1652 */ + case 1917: /* a_expr: a_expr '/' a_expr */ +#line 13284 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "/", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44054 "gram.c" break; - case 1918: -#line 13286 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "%", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43568 "gram.c" /* yacc.c:1652 */ + case 1918: /* a_expr: a_expr '%' a_expr */ +#line 13286 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "%", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44060 "gram.c" break; - case 1919: -#line 13288 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "^", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43574 "gram.c" /* yacc.c:1652 */ + case 1919: /* a_expr: a_expr '^' a_expr */ +#line 13288 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "^", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44066 "gram.c" break; - case 1920: -#line 13290 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43580 "gram.c" /* yacc.c:1652 */ + case 1920: /* a_expr: a_expr '<' a_expr */ +#line 13290 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44072 "gram.c" break; - case 1921: -#line 13292 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, ">", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43586 "gram.c" /* yacc.c:1652 */ + case 1921: /* a_expr: a_expr '>' a_expr */ +#line 13292 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, ">", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44078 "gram.c" break; - case 1922: -#line 13294 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "=", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43592 "gram.c" /* yacc.c:1652 */ + case 1922: /* a_expr: a_expr '=' a_expr */ +#line 13294 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "=", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44084 "gram.c" break; - case 1923: -#line 13296 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<=", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43598 "gram.c" /* yacc.c:1652 */ + case 1923: /* a_expr: a_expr LESS_EQUALS a_expr */ +#line 13296 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<=", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44090 "gram.c" break; - case 1924: -#line 13298 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, ">=", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43604 "gram.c" /* yacc.c:1652 */ + case 1924: /* a_expr: a_expr GREATER_EQUALS a_expr */ +#line 13298 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, ">=", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44096 "gram.c" break; - case 1925: -#line 13300 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<>", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43610 "gram.c" /* yacc.c:1652 */ + case 1925: /* a_expr: a_expr NOT_EQUALS a_expr */ +#line 13300 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<>", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44102 "gram.c" break; - case 1926: -#line 13303 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[-1].list), (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43616 "gram.c" /* yacc.c:1652 */ + case 1926: /* a_expr: a_expr qual_Op a_expr */ +#line 13303 "gram.y" + { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[-1].list), (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44108 "gram.c" break; - case 1927: -#line 13305 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[-1].list), NULL, (yyvsp[0].node), (yylsp[-1])); } -#line 43622 "gram.c" /* yacc.c:1652 */ + case 1927: /* a_expr: qual_Op a_expr */ +#line 13305 "gram.y" + { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[-1].list), NULL, (yyvsp[0].node), (yylsp[-1])); } +#line 44114 "gram.c" break; - case 1928: -#line 13308 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeAndExpr((yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43628 "gram.c" /* yacc.c:1652 */ + case 1928: /* a_expr: a_expr AND a_expr */ +#line 13308 "gram.y" + { (yyval.node) = makeAndExpr((yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44120 "gram.c" break; - case 1929: -#line 13310 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeOrExpr((yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43634 "gram.c" /* yacc.c:1652 */ + case 1929: /* a_expr: a_expr OR a_expr */ +#line 13310 "gram.y" + { (yyval.node) = makeOrExpr((yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44126 "gram.c" break; - case 1930: -#line 13312 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeNotExpr((yyvsp[0].node), (yylsp[-1])); } -#line 43640 "gram.c" /* yacc.c:1652 */ + case 1930: /* a_expr: NOT a_expr */ +#line 13312 "gram.y" + { (yyval.node) = makeNotExpr((yyvsp[0].node), (yylsp[-1])); } +#line 44132 "gram.c" break; - case 1931: -#line 13314 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeNotExpr((yyvsp[0].node), (yylsp[-1])); } -#line 43646 "gram.c" /* yacc.c:1652 */ + case 1931: /* a_expr: NOT_LA a_expr */ +#line 13314 "gram.y" + { (yyval.node) = makeNotExpr((yyvsp[0].node), (yylsp[-1])); } +#line 44138 "gram.c" break; - case 1932: -#line 13317 "gram.y" /* yacc.c:1652 */ - { + case 1932: /* a_expr: a_expr LIKE a_expr */ +#line 13317 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_LIKE, "~~", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43655 "gram.c" /* yacc.c:1652 */ +#line 44147 "gram.c" break; - case 1933: -#line 13322 "gram.y" /* yacc.c:1652 */ - { + case 1933: /* a_expr: a_expr LIKE a_expr ESCAPE a_expr */ +#line 13322 "gram.y" + { FuncCall *n = makeFuncCall(SystemFuncName("like_escape"), list_make2((yyvsp[-2].node), (yyvsp[0].node)), COERCE_EXPLICIT_CALL, @@ -43664,21 +44156,21 @@ yyreduce: (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_LIKE, "~~", (yyvsp[-4].node), (Node *) n, (yylsp[-3])); } -#line 43668 "gram.c" /* yacc.c:1652 */ +#line 44160 "gram.c" break; - case 1934: -#line 13331 "gram.y" /* yacc.c:1652 */ - { + case 1934: /* a_expr: a_expr NOT_LA LIKE a_expr */ +#line 13331 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_LIKE, "!~~", (yyvsp[-3].node), (yyvsp[0].node), (yylsp[-2])); } -#line 43677 "gram.c" /* yacc.c:1652 */ +#line 44169 "gram.c" break; - case 1935: -#line 13336 "gram.y" /* yacc.c:1652 */ - { + case 1935: /* a_expr: a_expr NOT_LA LIKE a_expr ESCAPE a_expr */ +#line 13336 "gram.y" + { FuncCall *n = makeFuncCall(SystemFuncName("like_escape"), list_make2((yyvsp[-2].node), (yyvsp[0].node)), COERCE_EXPLICIT_CALL, @@ -43686,21 +44178,21 @@ yyreduce: (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_LIKE, "!~~", (yyvsp[-5].node), (Node *) n, (yylsp[-4])); } -#line 43690 "gram.c" /* yacc.c:1652 */ +#line 44182 "gram.c" break; - case 1936: -#line 13345 "gram.y" /* yacc.c:1652 */ - { + case 1936: /* a_expr: a_expr ILIKE a_expr */ +#line 13345 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_ILIKE, "~~*", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 43699 "gram.c" /* yacc.c:1652 */ +#line 44191 "gram.c" break; - case 1937: -#line 13350 "gram.y" /* yacc.c:1652 */ - { + case 1937: /* a_expr: a_expr ILIKE a_expr ESCAPE a_expr */ +#line 13350 "gram.y" + { FuncCall *n = makeFuncCall(SystemFuncName("like_escape"), list_make2((yyvsp[-2].node), (yyvsp[0].node)), COERCE_EXPLICIT_CALL, @@ -43708,21 +44200,21 @@ yyreduce: (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_ILIKE, "~~*", (yyvsp[-4].node), (Node *) n, (yylsp[-3])); } -#line 43712 "gram.c" /* yacc.c:1652 */ +#line 44204 "gram.c" break; - case 1938: -#line 13359 "gram.y" /* yacc.c:1652 */ - { + case 1938: /* a_expr: a_expr NOT_LA ILIKE a_expr */ +#line 13359 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_ILIKE, "!~~*", (yyvsp[-3].node), (yyvsp[0].node), (yylsp[-2])); } -#line 43721 "gram.c" /* yacc.c:1652 */ +#line 44213 "gram.c" break; - case 1939: -#line 13364 "gram.y" /* yacc.c:1652 */ - { + case 1939: /* a_expr: a_expr NOT_LA ILIKE a_expr ESCAPE a_expr */ +#line 13364 "gram.y" + { FuncCall *n = makeFuncCall(SystemFuncName("like_escape"), list_make2((yyvsp[-2].node), (yyvsp[0].node)), COERCE_EXPLICIT_CALL, @@ -43730,12 +44222,12 @@ yyreduce: (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_ILIKE, "!~~*", (yyvsp[-5].node), (Node *) n, (yylsp[-4])); } -#line 43734 "gram.c" /* yacc.c:1652 */ +#line 44226 "gram.c" break; - case 1940: -#line 13374 "gram.y" /* yacc.c:1652 */ - { + case 1940: /* a_expr: a_expr SIMILAR TO a_expr */ +#line 13374 "gram.y" + { FuncCall *n = makeFuncCall(SystemFuncName("similar_to_escape"), list_make1((yyvsp[0].node)), COERCE_EXPLICIT_CALL, @@ -43743,12 +44235,12 @@ yyreduce: (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_SIMILAR, "~", (yyvsp[-3].node), (Node *) n, (yylsp[-2])); } -#line 43747 "gram.c" /* yacc.c:1652 */ +#line 44239 "gram.c" break; - case 1941: -#line 13383 "gram.y" /* yacc.c:1652 */ - { + case 1941: /* a_expr: a_expr SIMILAR TO a_expr ESCAPE a_expr */ +#line 13383 "gram.y" + { FuncCall *n = makeFuncCall(SystemFuncName("similar_to_escape"), list_make2((yyvsp[-2].node), (yyvsp[0].node)), COERCE_EXPLICIT_CALL, @@ -43756,12 +44248,12 @@ yyreduce: (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_SIMILAR, "~", (yyvsp[-5].node), (Node *) n, (yylsp[-4])); } -#line 43760 "gram.c" /* yacc.c:1652 */ +#line 44252 "gram.c" break; - case 1942: -#line 13392 "gram.y" /* yacc.c:1652 */ - { + case 1942: /* a_expr: a_expr NOT_LA SIMILAR TO a_expr */ +#line 13392 "gram.y" + { FuncCall *n = makeFuncCall(SystemFuncName("similar_to_escape"), list_make1((yyvsp[0].node)), COERCE_EXPLICIT_CALL, @@ -43769,12 +44261,12 @@ yyreduce: (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_SIMILAR, "!~", (yyvsp[-4].node), (Node *) n, (yylsp[-3])); } -#line 43773 "gram.c" /* yacc.c:1652 */ +#line 44265 "gram.c" break; - case 1943: -#line 13401 "gram.y" /* yacc.c:1652 */ - { + case 1943: /* a_expr: a_expr NOT_LA SIMILAR TO a_expr ESCAPE a_expr */ +#line 13401 "gram.y" + { FuncCall *n = makeFuncCall(SystemFuncName("similar_to_escape"), list_make2((yyvsp[-2].node), (yyvsp[0].node)), COERCE_EXPLICIT_CALL, @@ -43782,60 +44274,60 @@ yyreduce: (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_SIMILAR, "!~", (yyvsp[-6].node), (Node *) n, (yylsp[-5])); } -#line 43786 "gram.c" /* yacc.c:1652 */ +#line 44278 "gram.c" break; - case 1944: -#line 13420 "gram.y" /* yacc.c:1652 */ - { + case 1944: /* a_expr: a_expr IS NULL_P */ +#line 13420 "gram.y" + { NullTest *n = makeNode(NullTest); n->arg = (Expr *) (yyvsp[-2].node); n->nulltesttype = IS_NULL; n->location = (yylsp[-1]); (yyval.node) = (Node *)n; } -#line 43798 "gram.c" /* yacc.c:1652 */ +#line 44290 "gram.c" break; - case 1945: -#line 13428 "gram.y" /* yacc.c:1652 */ - { + case 1945: /* a_expr: a_expr ISNULL */ +#line 13428 "gram.y" + { NullTest *n = makeNode(NullTest); n->arg = (Expr *) (yyvsp[-1].node); n->nulltesttype = IS_NULL; n->location = (yylsp[0]); (yyval.node) = (Node *)n; } -#line 43810 "gram.c" /* yacc.c:1652 */ +#line 44302 "gram.c" break; - case 1946: -#line 13436 "gram.y" /* yacc.c:1652 */ - { + case 1946: /* a_expr: a_expr IS NOT NULL_P */ +#line 13436 "gram.y" + { NullTest *n = makeNode(NullTest); n->arg = (Expr *) (yyvsp[-3].node); n->nulltesttype = IS_NOT_NULL; n->location = (yylsp[-2]); (yyval.node) = (Node *)n; } -#line 43822 "gram.c" /* yacc.c:1652 */ +#line 44314 "gram.c" break; - case 1947: -#line 13444 "gram.y" /* yacc.c:1652 */ - { + case 1947: /* a_expr: a_expr NOTNULL */ +#line 13444 "gram.y" + { NullTest *n = makeNode(NullTest); n->arg = (Expr *) (yyvsp[-1].node); n->nulltesttype = IS_NOT_NULL; n->location = (yylsp[0]); (yyval.node) = (Node *)n; } -#line 43834 "gram.c" /* yacc.c:1652 */ +#line 44326 "gram.c" break; - case 1948: -#line 13452 "gram.y" /* yacc.c:1652 */ - { + case 1948: /* a_expr: row OVERLAPS row */ +#line 13452 "gram.y" + { if (list_length((yyvsp[-2].list)) != 2) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), @@ -43851,148 +44343,148 @@ yyreduce: COERCE_SQL_SYNTAX, (yylsp[-1])); } -#line 43855 "gram.c" /* yacc.c:1652 */ +#line 44347 "gram.c" break; - case 1949: -#line 13469 "gram.y" /* yacc.c:1652 */ - { + case 1949: /* a_expr: a_expr IS TRUE_P */ +#line 13469 "gram.y" + { BooleanTest *b = makeNode(BooleanTest); b->arg = (Expr *) (yyvsp[-2].node); b->booltesttype = IS_TRUE; b->location = (yylsp[-1]); (yyval.node) = (Node *)b; } -#line 43867 "gram.c" /* yacc.c:1652 */ +#line 44359 "gram.c" break; - case 1950: -#line 13477 "gram.y" /* yacc.c:1652 */ - { + case 1950: /* a_expr: a_expr IS NOT TRUE_P */ +#line 13477 "gram.y" + { BooleanTest *b = makeNode(BooleanTest); b->arg = (Expr *) (yyvsp[-3].node); b->booltesttype = IS_NOT_TRUE; b->location = (yylsp[-2]); (yyval.node) = (Node *)b; } -#line 43879 "gram.c" /* yacc.c:1652 */ +#line 44371 "gram.c" break; - case 1951: -#line 13485 "gram.y" /* yacc.c:1652 */ - { + case 1951: /* a_expr: a_expr IS FALSE_P */ +#line 13485 "gram.y" + { BooleanTest *b = makeNode(BooleanTest); b->arg = (Expr *) (yyvsp[-2].node); b->booltesttype = IS_FALSE; b->location = (yylsp[-1]); (yyval.node) = (Node *)b; } -#line 43891 "gram.c" /* yacc.c:1652 */ +#line 44383 "gram.c" break; - case 1952: -#line 13493 "gram.y" /* yacc.c:1652 */ - { + case 1952: /* a_expr: a_expr IS NOT FALSE_P */ +#line 13493 "gram.y" + { BooleanTest *b = makeNode(BooleanTest); b->arg = (Expr *) (yyvsp[-3].node); b->booltesttype = IS_NOT_FALSE; b->location = (yylsp[-2]); (yyval.node) = (Node *)b; } -#line 43903 "gram.c" /* yacc.c:1652 */ +#line 44395 "gram.c" break; - case 1953: -#line 13501 "gram.y" /* yacc.c:1652 */ - { + case 1953: /* a_expr: a_expr IS UNKNOWN */ +#line 13501 "gram.y" + { BooleanTest *b = makeNode(BooleanTest); b->arg = (Expr *) (yyvsp[-2].node); b->booltesttype = IS_UNKNOWN; b->location = (yylsp[-1]); (yyval.node) = (Node *)b; } -#line 43915 "gram.c" /* yacc.c:1652 */ +#line 44407 "gram.c" break; - case 1954: -#line 13509 "gram.y" /* yacc.c:1652 */ - { + case 1954: /* a_expr: a_expr IS NOT UNKNOWN */ +#line 13509 "gram.y" + { BooleanTest *b = makeNode(BooleanTest); b->arg = (Expr *) (yyvsp[-3].node); b->booltesttype = IS_NOT_UNKNOWN; b->location = (yylsp[-2]); (yyval.node) = (Node *)b; } -#line 43927 "gram.c" /* yacc.c:1652 */ +#line 44419 "gram.c" break; - case 1955: -#line 13517 "gram.y" /* yacc.c:1652 */ - { + case 1955: /* a_expr: a_expr IS DISTINCT FROM a_expr */ +#line 13517 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_DISTINCT, "=", (yyvsp[-4].node), (yyvsp[0].node), (yylsp[-3])); } -#line 43935 "gram.c" /* yacc.c:1652 */ +#line 44427 "gram.c" break; - case 1956: -#line 13521 "gram.y" /* yacc.c:1652 */ - { + case 1956: /* a_expr: a_expr IS NOT DISTINCT FROM a_expr */ +#line 13521 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_NOT_DISTINCT, "=", (yyvsp[-5].node), (yyvsp[0].node), (yylsp[-4])); } -#line 43943 "gram.c" /* yacc.c:1652 */ +#line 44435 "gram.c" break; - case 1957: -#line 13525 "gram.y" /* yacc.c:1652 */ - { + case 1957: /* a_expr: a_expr BETWEEN opt_asymmetric b_expr AND a_expr */ +#line 13525 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_BETWEEN, "BETWEEN", (yyvsp[-5].node), (Node *) list_make2((yyvsp[-2].node), (yyvsp[0].node)), (yylsp[-4])); } -#line 43955 "gram.c" /* yacc.c:1652 */ +#line 44447 "gram.c" break; - case 1958: -#line 13533 "gram.y" /* yacc.c:1652 */ - { + case 1958: /* a_expr: a_expr NOT_LA BETWEEN opt_asymmetric b_expr AND a_expr */ +#line 13533 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_NOT_BETWEEN, "NOT BETWEEN", (yyvsp[-6].node), (Node *) list_make2((yyvsp[-2].node), (yyvsp[0].node)), (yylsp[-5])); } -#line 43967 "gram.c" /* yacc.c:1652 */ +#line 44459 "gram.c" break; - case 1959: -#line 13541 "gram.y" /* yacc.c:1652 */ - { + case 1959: /* a_expr: a_expr BETWEEN SYMMETRIC b_expr AND a_expr */ +#line 13541 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_BETWEEN_SYM, "BETWEEN SYMMETRIC", (yyvsp[-5].node), (Node *) list_make2((yyvsp[-2].node), (yyvsp[0].node)), (yylsp[-4])); } -#line 43979 "gram.c" /* yacc.c:1652 */ +#line 44471 "gram.c" break; - case 1960: -#line 13549 "gram.y" /* yacc.c:1652 */ - { + case 1960: /* a_expr: a_expr NOT_LA BETWEEN SYMMETRIC b_expr AND a_expr */ +#line 13549 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_NOT_BETWEEN_SYM, "NOT BETWEEN SYMMETRIC", (yyvsp[-6].node), (Node *) list_make2((yyvsp[-2].node), (yyvsp[0].node)), (yylsp[-5])); } -#line 43991 "gram.c" /* yacc.c:1652 */ +#line 44483 "gram.c" break; - case 1961: -#line 13557 "gram.y" /* yacc.c:1652 */ - { + case 1961: /* a_expr: a_expr IN_P in_expr */ +#line 13557 "gram.y" + { /* in_expr returns a SubLink or a list of a_exprs */ if (IsA((yyvsp[0].node), SubLink)) { @@ -44011,12 +44503,12 @@ yyreduce: (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_IN, "=", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } } -#line 44015 "gram.c" /* yacc.c:1652 */ +#line 44507 "gram.c" break; - case 1962: -#line 13577 "gram.y" /* yacc.c:1652 */ - { + case 1962: /* a_expr: a_expr NOT_LA IN_P in_expr */ +#line 13577 "gram.y" + { /* in_expr returns a SubLink or a list of a_exprs */ if (IsA((yyvsp[0].node), SubLink)) { @@ -44037,12 +44529,12 @@ yyreduce: (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_IN, "<>", (yyvsp[-3].node), (yyvsp[0].node), (yylsp[-2])); } } -#line 44041 "gram.c" /* yacc.c:1652 */ +#line 44533 "gram.c" break; - case 1963: -#line 13599 "gram.y" /* yacc.c:1652 */ - { + case 1963: /* a_expr: a_expr subquery_Op sub_type select_with_parens */ +#line 13599 "gram.y" + { SubLink *n = makeNode(SubLink); n->subLinkType = (yyvsp[-1].ival); n->subLinkId = 0; @@ -44052,23 +44544,23 @@ yyreduce: n->location = (yylsp[-2]); (yyval.node) = (Node *)n; } -#line 44056 "gram.c" /* yacc.c:1652 */ +#line 44548 "gram.c" break; - case 1964: -#line 13610 "gram.y" /* yacc.c:1652 */ - { + case 1964: /* a_expr: a_expr subquery_Op sub_type '(' a_expr ')' */ +#line 13610 "gram.y" + { if ((yyvsp[-3].ival) == ANY_SUBLINK) (yyval.node) = (Node *) makeA_Expr(AEXPR_OP_ANY, (yyvsp[-4].list), (yyvsp[-5].node), (yyvsp[-1].node), (yylsp[-4])); else (yyval.node) = (Node *) makeA_Expr(AEXPR_OP_ALL, (yyvsp[-4].list), (yyvsp[-5].node), (yyvsp[-1].node), (yylsp[-4])); } -#line 44067 "gram.c" /* yacc.c:1652 */ +#line 44559 "gram.c" break; - case 1965: -#line 13617 "gram.y" /* yacc.c:1652 */ - { + case 1965: /* a_expr: UNIQUE select_with_parens */ +#line 13617 "gram.y" + { /* Not sure how to get rid of the parentheses * but there are lots of shift/reduce errors without them. * @@ -44083,77 +44575,77 @@ yyreduce: errmsg("UNIQUE predicate is not yet implemented"), parser_errposition((yylsp[-1])))); } -#line 44087 "gram.c" /* yacc.c:1652 */ +#line 44579 "gram.c" break; - case 1966: -#line 13633 "gram.y" /* yacc.c:1652 */ - { + case 1966: /* a_expr: a_expr IS DOCUMENT_P */ +#line 13633 "gram.y" + { (yyval.node) = makeXmlExpr(IS_DOCUMENT, NULL, NIL, list_make1((yyvsp[-2].node)), (yylsp[-1])); } -#line 44096 "gram.c" /* yacc.c:1652 */ +#line 44588 "gram.c" break; - case 1967: -#line 13638 "gram.y" /* yacc.c:1652 */ - { + case 1967: /* a_expr: a_expr IS NOT DOCUMENT_P */ +#line 13638 "gram.y" + { (yyval.node) = makeNotExpr(makeXmlExpr(IS_DOCUMENT, NULL, NIL, list_make1((yyvsp[-3].node)), (yylsp[-2])), (yylsp[-2])); } -#line 44106 "gram.c" /* yacc.c:1652 */ +#line 44598 "gram.c" break; - case 1968: -#line 13644 "gram.y" /* yacc.c:1652 */ - { + case 1968: /* a_expr: a_expr IS NORMALIZED */ +#line 13644 "gram.y" + { (yyval.node) = (Node *) makeFuncCall(SystemFuncName("is_normalized"), list_make1((yyvsp[-2].node)), COERCE_SQL_SYNTAX, (yylsp[-1])); } -#line 44117 "gram.c" /* yacc.c:1652 */ +#line 44609 "gram.c" break; - case 1969: -#line 13651 "gram.y" /* yacc.c:1652 */ - { + case 1969: /* a_expr: a_expr IS unicode_normal_form NORMALIZED */ +#line 13651 "gram.y" + { (yyval.node) = (Node *) makeFuncCall(SystemFuncName("is_normalized"), list_make2((yyvsp[-3].node), makeStringConst((yyvsp[-1].str), (yylsp[-1]))), COERCE_SQL_SYNTAX, (yylsp[-2])); } -#line 44128 "gram.c" /* yacc.c:1652 */ +#line 44620 "gram.c" break; - case 1970: -#line 13658 "gram.y" /* yacc.c:1652 */ - { + case 1970: /* a_expr: a_expr IS NOT NORMALIZED */ +#line 13658 "gram.y" + { (yyval.node) = makeNotExpr((Node *) makeFuncCall(SystemFuncName("is_normalized"), list_make1((yyvsp[-3].node)), COERCE_SQL_SYNTAX, (yylsp[-2])), (yylsp[-2])); } -#line 44140 "gram.c" /* yacc.c:1652 */ +#line 44632 "gram.c" break; - case 1971: -#line 13666 "gram.y" /* yacc.c:1652 */ - { + case 1971: /* a_expr: a_expr IS NOT unicode_normal_form NORMALIZED */ +#line 13666 "gram.y" + { (yyval.node) = makeNotExpr((Node *) makeFuncCall(SystemFuncName("is_normalized"), list_make2((yyvsp[-4].node), makeStringConst((yyvsp[-1].str), (yylsp[-1]))), COERCE_SQL_SYNTAX, (yylsp[-3])), (yylsp[-3])); } -#line 44152 "gram.c" /* yacc.c:1652 */ +#line 44644 "gram.c" break; - case 1972: -#line 13674 "gram.y" /* yacc.c:1652 */ - { + case 1972: /* a_expr: DEFAULT */ +#line 13674 "gram.y" + { /* * The SQL spec only allows DEFAULT in "contextually typed * expressions", but for us, it's easier to allow it in @@ -44166,167 +44658,167 @@ yyreduce: n->location = (yylsp[0]); (yyval.node) = (Node *)n; } -#line 44170 "gram.c" /* yacc.c:1652 */ +#line 44662 "gram.c" break; - case 1973: -#line 13699 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 44176 "gram.c" /* yacc.c:1652 */ + case 1973: /* b_expr: c_expr */ +#line 13699 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 44668 "gram.c" break; - case 1974: -#line 13701 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeTypeCast((yyvsp[-2].node), (yyvsp[0].typnam), (yylsp[-1])); } -#line 44182 "gram.c" /* yacc.c:1652 */ + case 1974: /* b_expr: b_expr TYPECAST Typename */ +#line 13701 "gram.y" + { (yyval.node) = makeTypeCast((yyvsp[-2].node), (yyvsp[0].typnam), (yylsp[-1])); } +#line 44674 "gram.c" break; - case 1975: -#line 13703 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", NULL, (yyvsp[0].node), (yylsp[-1])); } -#line 44188 "gram.c" /* yacc.c:1652 */ + case 1975: /* b_expr: '+' b_expr */ +#line 13703 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", NULL, (yyvsp[0].node), (yylsp[-1])); } +#line 44680 "gram.c" break; - case 1976: -#line 13705 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = doNegate((yyvsp[0].node), (yylsp[-1])); } -#line 44194 "gram.c" /* yacc.c:1652 */ + case 1976: /* b_expr: '-' b_expr */ +#line 13705 "gram.y" + { (yyval.node) = doNegate((yyvsp[0].node), (yylsp[-1])); } +#line 44686 "gram.c" break; - case 1977: -#line 13707 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 44200 "gram.c" /* yacc.c:1652 */ + case 1977: /* b_expr: b_expr '+' b_expr */ +#line 13707 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "+", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44692 "gram.c" break; - case 1978: -#line 13709 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "-", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 44206 "gram.c" /* yacc.c:1652 */ + case 1978: /* b_expr: b_expr '-' b_expr */ +#line 13709 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "-", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44698 "gram.c" break; - case 1979: -#line 13711 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "*", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 44212 "gram.c" /* yacc.c:1652 */ + case 1979: /* b_expr: b_expr '*' b_expr */ +#line 13711 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "*", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44704 "gram.c" break; - case 1980: -#line 13713 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "/", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 44218 "gram.c" /* yacc.c:1652 */ + case 1980: /* b_expr: b_expr '/' b_expr */ +#line 13713 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "/", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44710 "gram.c" break; - case 1981: -#line 13715 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "%", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 44224 "gram.c" /* yacc.c:1652 */ + case 1981: /* b_expr: b_expr '%' b_expr */ +#line 13715 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "%", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44716 "gram.c" break; - case 1982: -#line 13717 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "^", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 44230 "gram.c" /* yacc.c:1652 */ + case 1982: /* b_expr: b_expr '^' b_expr */ +#line 13717 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "^", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44722 "gram.c" break; - case 1983: -#line 13719 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 44236 "gram.c" /* yacc.c:1652 */ + case 1983: /* b_expr: b_expr '<' b_expr */ +#line 13719 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44728 "gram.c" break; - case 1984: -#line 13721 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, ">", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 44242 "gram.c" /* yacc.c:1652 */ + case 1984: /* b_expr: b_expr '>' b_expr */ +#line 13721 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, ">", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44734 "gram.c" break; - case 1985: -#line 13723 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "=", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 44248 "gram.c" /* yacc.c:1652 */ + case 1985: /* b_expr: b_expr '=' b_expr */ +#line 13723 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "=", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44740 "gram.c" break; - case 1986: -#line 13725 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<=", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 44254 "gram.c" /* yacc.c:1652 */ + case 1986: /* b_expr: b_expr LESS_EQUALS b_expr */ +#line 13725 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<=", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44746 "gram.c" break; - case 1987: -#line 13727 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, ">=", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 44260 "gram.c" /* yacc.c:1652 */ + case 1987: /* b_expr: b_expr GREATER_EQUALS b_expr */ +#line 13727 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, ">=", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44752 "gram.c" break; - case 1988: -#line 13729 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<>", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 44266 "gram.c" /* yacc.c:1652 */ + case 1988: /* b_expr: b_expr NOT_EQUALS b_expr */ +#line 13729 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_OP, "<>", (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44758 "gram.c" break; - case 1989: -#line 13731 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[-1].list), (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } -#line 44272 "gram.c" /* yacc.c:1652 */ + case 1989: /* b_expr: b_expr qual_Op b_expr */ +#line 13731 "gram.y" + { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[-1].list), (yyvsp[-2].node), (yyvsp[0].node), (yylsp[-1])); } +#line 44764 "gram.c" break; - case 1990: -#line 13733 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[-1].list), NULL, (yyvsp[0].node), (yylsp[-1])); } -#line 44278 "gram.c" /* yacc.c:1652 */ + case 1990: /* b_expr: qual_Op b_expr */ +#line 13733 "gram.y" + { (yyval.node) = (Node *) makeA_Expr(AEXPR_OP, (yyvsp[-1].list), NULL, (yyvsp[0].node), (yylsp[-1])); } +#line 44770 "gram.c" break; - case 1991: -#line 13735 "gram.y" /* yacc.c:1652 */ - { + case 1991: /* b_expr: b_expr IS DISTINCT FROM b_expr */ +#line 13735 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_DISTINCT, "=", (yyvsp[-4].node), (yyvsp[0].node), (yylsp[-3])); } -#line 44286 "gram.c" /* yacc.c:1652 */ +#line 44778 "gram.c" break; - case 1992: -#line 13739 "gram.y" /* yacc.c:1652 */ - { + case 1992: /* b_expr: b_expr IS NOT DISTINCT FROM b_expr */ +#line 13739 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_NOT_DISTINCT, "=", (yyvsp[-5].node), (yyvsp[0].node), (yylsp[-4])); } -#line 44294 "gram.c" /* yacc.c:1652 */ +#line 44786 "gram.c" break; - case 1993: -#line 13743 "gram.y" /* yacc.c:1652 */ - { + case 1993: /* b_expr: b_expr IS DOCUMENT_P */ +#line 13743 "gram.y" + { (yyval.node) = makeXmlExpr(IS_DOCUMENT, NULL, NIL, list_make1((yyvsp[-2].node)), (yylsp[-1])); } -#line 44303 "gram.c" /* yacc.c:1652 */ +#line 44795 "gram.c" break; - case 1994: -#line 13748 "gram.y" /* yacc.c:1652 */ - { + case 1994: /* b_expr: b_expr IS NOT DOCUMENT_P */ +#line 13748 "gram.y" + { (yyval.node) = makeNotExpr(makeXmlExpr(IS_DOCUMENT, NULL, NIL, list_make1((yyvsp[-3].node)), (yylsp[-2])), (yylsp[-2])); } -#line 44313 "gram.c" /* yacc.c:1652 */ +#line 44805 "gram.c" break; - case 1995: -#line 13763 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 44319 "gram.c" /* yacc.c:1652 */ + case 1995: /* c_expr: columnref */ +#line 13763 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 44811 "gram.c" break; - case 1996: -#line 13764 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 44325 "gram.c" /* yacc.c:1652 */ + case 1996: /* c_expr: AexprConst */ +#line 13764 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 44817 "gram.c" break; - case 1997: -#line 13766 "gram.y" /* yacc.c:1652 */ - { + case 1997: /* c_expr: PARAM opt_indirection */ +#line 13766 "gram.y" + { ParamRef *p = makeNode(ParamRef); p->number = (yyvsp[-1].ival); p->location = (yylsp[-1]); @@ -44340,12 +44832,12 @@ yyreduce: else (yyval.node) = (Node *) p; } -#line 44344 "gram.c" /* yacc.c:1652 */ +#line 44836 "gram.c" break; - case 1998: -#line 13781 "gram.y" /* yacc.c:1652 */ - { + case 1998: /* c_expr: '(' a_expr ')' opt_indirection */ +#line 13781 "gram.y" + { if ((yyvsp[0].list)) { A_Indirection *n = makeNode(A_Indirection); @@ -44356,24 +44848,24 @@ yyreduce: else (yyval.node) = (yyvsp[-2].node); } -#line 44360 "gram.c" /* yacc.c:1652 */ +#line 44852 "gram.c" break; - case 1999: -#line 13793 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 44366 "gram.c" /* yacc.c:1652 */ + case 1999: /* c_expr: case_expr */ +#line 13793 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 44858 "gram.c" break; - case 2000: -#line 13795 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 44372 "gram.c" /* yacc.c:1652 */ + case 2000: /* c_expr: func_expr */ +#line 13795 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 44864 "gram.c" break; - case 2001: -#line 13797 "gram.y" /* yacc.c:1652 */ - { + case 2001: /* c_expr: select_with_parens */ +#line 13797 "gram.y" + { SubLink *n = makeNode(SubLink); n->subLinkType = EXPR_SUBLINK; n->subLinkId = 0; @@ -44383,12 +44875,12 @@ yyreduce: n->location = (yylsp[0]); (yyval.node) = (Node *)n; } -#line 44387 "gram.c" /* yacc.c:1652 */ +#line 44879 "gram.c" break; - case 2002: -#line 13808 "gram.y" /* yacc.c:1652 */ - { + case 2002: /* c_expr: select_with_parens indirection */ +#line 13808 "gram.y" + { /* * Because the select_with_parens nonterminal is designed * to "eat" as many levels of parens as possible, the @@ -44411,12 +44903,12 @@ yyreduce: a->indirection = check_indirection((yyvsp[0].list), yyscanner); (yyval.node) = (Node *)a; } -#line 44415 "gram.c" /* yacc.c:1652 */ +#line 44907 "gram.c" break; - case 2003: -#line 13832 "gram.y" /* yacc.c:1652 */ - { + case 2003: /* c_expr: EXISTS select_with_parens */ +#line 13832 "gram.y" + { SubLink *n = makeNode(SubLink); n->subLinkType = EXISTS_SUBLINK; n->subLinkId = 0; @@ -44426,12 +44918,12 @@ yyreduce: n->location = (yylsp[-1]); (yyval.node) = (Node *)n; } -#line 44430 "gram.c" /* yacc.c:1652 */ +#line 44922 "gram.c" break; - case 2004: -#line 13843 "gram.y" /* yacc.c:1652 */ - { + case 2004: /* c_expr: ARRAY select_with_parens */ +#line 13843 "gram.y" + { SubLink *n = makeNode(SubLink); n->subLinkType = ARRAY_SUBLINK; n->subLinkId = 0; @@ -44441,23 +44933,23 @@ yyreduce: n->location = (yylsp[-1]); (yyval.node) = (Node *)n; } -#line 44445 "gram.c" /* yacc.c:1652 */ +#line 44937 "gram.c" break; - case 2005: -#line 13854 "gram.y" /* yacc.c:1652 */ - { + case 2005: /* c_expr: ARRAY array_expr */ +#line 13854 "gram.y" + { A_ArrayExpr *n = castNode(A_ArrayExpr, (yyvsp[0].node)); /* point outermost A_ArrayExpr to the ARRAY keyword */ n->location = (yylsp[-1]); (yyval.node) = (Node *)n; } -#line 44456 "gram.c" /* yacc.c:1652 */ +#line 44948 "gram.c" break; - case 2006: -#line 13861 "gram.y" /* yacc.c:1652 */ - { + case 2006: /* c_expr: explicit_row */ +#line 13861 "gram.y" + { RowExpr *r = makeNode(RowExpr); r->args = (yyvsp[0].list); r->row_typeid = InvalidOid; /* not analyzed yet */ @@ -44466,12 +44958,12 @@ yyreduce: r->location = (yylsp[0]); (yyval.node) = (Node *)r; } -#line 44470 "gram.c" /* yacc.c:1652 */ +#line 44962 "gram.c" break; - case 2007: -#line 13871 "gram.y" /* yacc.c:1652 */ - { + case 2007: /* c_expr: implicit_row */ +#line 13871 "gram.y" + { RowExpr *r = makeNode(RowExpr); r->args = (yyvsp[0].list); r->row_typeid = InvalidOid; /* not analyzed yet */ @@ -44480,45 +44972,45 @@ yyreduce: r->location = (yylsp[0]); (yyval.node) = (Node *)r; } -#line 44484 "gram.c" /* yacc.c:1652 */ +#line 44976 "gram.c" break; - case 2008: -#line 13881 "gram.y" /* yacc.c:1652 */ - { + case 2008: /* c_expr: GROUPING '(' expr_list ')' */ +#line 13881 "gram.y" + { GroupingFunc *g = makeNode(GroupingFunc); g->args = (yyvsp[-1].list); g->location = (yylsp[-3]); (yyval.node) = (Node *)g; } -#line 44495 "gram.c" /* yacc.c:1652 */ +#line 44987 "gram.c" break; - case 2009: -#line 13890 "gram.y" /* yacc.c:1652 */ - { + case 2009: /* func_application: func_name '(' ')' */ +#line 13890 "gram.y" + { (yyval.node) = (Node *) makeFuncCall((yyvsp[-2].list), NIL, COERCE_EXPLICIT_CALL, (yylsp[-2])); } -#line 44505 "gram.c" /* yacc.c:1652 */ +#line 44997 "gram.c" break; - case 2010: -#line 13896 "gram.y" /* yacc.c:1652 */ - { + case 2010: /* func_application: func_name '(' func_arg_list opt_sort_clause ')' */ +#line 13896 "gram.y" + { FuncCall *n = makeFuncCall((yyvsp[-4].list), (yyvsp[-2].list), COERCE_EXPLICIT_CALL, (yylsp[-4])); n->agg_order = (yyvsp[-1].list); (yyval.node) = (Node *)n; } -#line 44517 "gram.c" /* yacc.c:1652 */ +#line 45009 "gram.c" break; - case 2011: -#line 13904 "gram.y" /* yacc.c:1652 */ - { + case 2011: /* func_application: func_name '(' VARIADIC func_arg_expr opt_sort_clause ')' */ +#line 13904 "gram.y" + { FuncCall *n = makeFuncCall((yyvsp[-5].list), list_make1((yyvsp[-2].node)), COERCE_EXPLICIT_CALL, (yylsp[-5])); @@ -44526,12 +45018,12 @@ yyreduce: n->agg_order = (yyvsp[-1].list); (yyval.node) = (Node *)n; } -#line 44530 "gram.c" /* yacc.c:1652 */ +#line 45022 "gram.c" break; - case 2012: -#line 13913 "gram.y" /* yacc.c:1652 */ - { + case 2012: /* func_application: func_name '(' func_arg_list ',' VARIADIC func_arg_expr opt_sort_clause ')' */ +#line 13913 "gram.y" + { FuncCall *n = makeFuncCall((yyvsp[-7].list), lappend((yyvsp[-5].list), (yyvsp[-2].node)), COERCE_EXPLICIT_CALL, (yylsp[-7])); @@ -44539,12 +45031,12 @@ yyreduce: n->agg_order = (yyvsp[-1].list); (yyval.node) = (Node *)n; } -#line 44543 "gram.c" /* yacc.c:1652 */ +#line 45035 "gram.c" break; - case 2013: -#line 13922 "gram.y" /* yacc.c:1652 */ - { + case 2013: /* func_application: func_name '(' ALL func_arg_list opt_sort_clause ')' */ +#line 13922 "gram.y" + { FuncCall *n = makeFuncCall((yyvsp[-5].list), (yyvsp[-2].list), COERCE_EXPLICIT_CALL, (yylsp[-5])); @@ -44555,12 +45047,12 @@ yyreduce: */ (yyval.node) = (Node *)n; } -#line 44559 "gram.c" /* yacc.c:1652 */ +#line 45051 "gram.c" break; - case 2014: -#line 13934 "gram.y" /* yacc.c:1652 */ - { + case 2014: /* func_application: func_name '(' DISTINCT func_arg_list opt_sort_clause ')' */ +#line 13934 "gram.y" + { FuncCall *n = makeFuncCall((yyvsp[-5].list), (yyvsp[-2].list), COERCE_EXPLICIT_CALL, (yylsp[-5])); @@ -44568,12 +45060,12 @@ yyreduce: n->agg_distinct = true; (yyval.node) = (Node *)n; } -#line 44572 "gram.c" /* yacc.c:1652 */ +#line 45064 "gram.c" break; - case 2015: -#line 13943 "gram.y" /* yacc.c:1652 */ - { + case 2015: /* func_application: func_name '(' '*' ')' */ +#line 13943 "gram.y" + { /* * We consider AGGREGATE(*) to invoke a parameterless * aggregate. This does the right thing for COUNT(*), @@ -44590,12 +45082,12 @@ yyreduce: n->agg_star = true; (yyval.node) = (Node *)n; } -#line 44594 "gram.c" /* yacc.c:1652 */ +#line 45086 "gram.c" break; - case 2016: -#line 13973 "gram.y" /* yacc.c:1652 */ - { + case 2016: /* func_expr: func_application within_group_clause filter_clause over_clause */ +#line 13973 "gram.y" + { FuncCall *n = (FuncCall *) (yyvsp[-3].node); /* * The order clause for WITHIN GROUP and the one for @@ -44629,211 +45121,211 @@ yyreduce: n->over = (yyvsp[0].windef); (yyval.node) = (Node *) n; } -#line 44633 "gram.c" /* yacc.c:1652 */ +#line 45125 "gram.c" break; - case 2017: -#line 14008 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 44639 "gram.c" /* yacc.c:1652 */ + case 2017: /* func_expr: func_expr_common_subexpr */ +#line 14008 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 45131 "gram.c" break; - case 2018: -#line 14018 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 44645 "gram.c" /* yacc.c:1652 */ + case 2018: /* func_expr_windowless: func_application */ +#line 14018 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 45137 "gram.c" break; - case 2019: -#line 14019 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 44651 "gram.c" /* yacc.c:1652 */ + case 2019: /* func_expr_windowless: func_expr_common_subexpr */ +#line 14019 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 45143 "gram.c" break; - case 2020: -#line 14027 "gram.y" /* yacc.c:1652 */ - { + case 2020: /* func_expr_common_subexpr: COLLATION FOR '(' a_expr ')' */ +#line 14027 "gram.y" + { (yyval.node) = (Node *) makeFuncCall(SystemFuncName("pg_collation_for"), list_make1((yyvsp[-1].node)), COERCE_SQL_SYNTAX, (yylsp[-4])); } -#line 44662 "gram.c" /* yacc.c:1652 */ +#line 45154 "gram.c" break; - case 2021: -#line 14034 "gram.y" /* yacc.c:1652 */ - { + case 2021: /* func_expr_common_subexpr: CURRENT_DATE */ +#line 14034 "gram.y" + { (yyval.node) = makeSQLValueFunction(SVFOP_CURRENT_DATE, -1, (yylsp[0])); } -#line 44670 "gram.c" /* yacc.c:1652 */ +#line 45162 "gram.c" break; - case 2022: -#line 14038 "gram.y" /* yacc.c:1652 */ - { + case 2022: /* func_expr_common_subexpr: CURRENT_TIME */ +#line 14038 "gram.y" + { (yyval.node) = makeSQLValueFunction(SVFOP_CURRENT_TIME, -1, (yylsp[0])); } -#line 44678 "gram.c" /* yacc.c:1652 */ +#line 45170 "gram.c" break; - case 2023: -#line 14042 "gram.y" /* yacc.c:1652 */ - { + case 2023: /* func_expr_common_subexpr: CURRENT_TIME '(' Iconst ')' */ +#line 14042 "gram.y" + { (yyval.node) = makeSQLValueFunction(SVFOP_CURRENT_TIME_N, (yyvsp[-1].ival), (yylsp[-3])); } -#line 44686 "gram.c" /* yacc.c:1652 */ +#line 45178 "gram.c" break; - case 2024: -#line 14046 "gram.y" /* yacc.c:1652 */ - { + case 2024: /* func_expr_common_subexpr: CURRENT_TIMESTAMP */ +#line 14046 "gram.y" + { (yyval.node) = makeSQLValueFunction(SVFOP_CURRENT_TIMESTAMP, -1, (yylsp[0])); } -#line 44694 "gram.c" /* yacc.c:1652 */ +#line 45186 "gram.c" break; - case 2025: -#line 14050 "gram.y" /* yacc.c:1652 */ - { + case 2025: /* func_expr_common_subexpr: CURRENT_TIMESTAMP '(' Iconst ')' */ +#line 14050 "gram.y" + { (yyval.node) = makeSQLValueFunction(SVFOP_CURRENT_TIMESTAMP_N, (yyvsp[-1].ival), (yylsp[-3])); } -#line 44702 "gram.c" /* yacc.c:1652 */ +#line 45194 "gram.c" break; - case 2026: -#line 14054 "gram.y" /* yacc.c:1652 */ - { + case 2026: /* func_expr_common_subexpr: LOCALTIME */ +#line 14054 "gram.y" + { (yyval.node) = makeSQLValueFunction(SVFOP_LOCALTIME, -1, (yylsp[0])); } -#line 44710 "gram.c" /* yacc.c:1652 */ +#line 45202 "gram.c" break; - case 2027: -#line 14058 "gram.y" /* yacc.c:1652 */ - { + case 2027: /* func_expr_common_subexpr: LOCALTIME '(' Iconst ')' */ +#line 14058 "gram.y" + { (yyval.node) = makeSQLValueFunction(SVFOP_LOCALTIME_N, (yyvsp[-1].ival), (yylsp[-3])); } -#line 44718 "gram.c" /* yacc.c:1652 */ +#line 45210 "gram.c" break; - case 2028: -#line 14062 "gram.y" /* yacc.c:1652 */ - { + case 2028: /* func_expr_common_subexpr: LOCALTIMESTAMP */ +#line 14062 "gram.y" + { (yyval.node) = makeSQLValueFunction(SVFOP_LOCALTIMESTAMP, -1, (yylsp[0])); } -#line 44726 "gram.c" /* yacc.c:1652 */ +#line 45218 "gram.c" break; - case 2029: -#line 14066 "gram.y" /* yacc.c:1652 */ - { + case 2029: /* func_expr_common_subexpr: LOCALTIMESTAMP '(' Iconst ')' */ +#line 14066 "gram.y" + { (yyval.node) = makeSQLValueFunction(SVFOP_LOCALTIMESTAMP_N, (yyvsp[-1].ival), (yylsp[-3])); } -#line 44734 "gram.c" /* yacc.c:1652 */ +#line 45226 "gram.c" break; - case 2030: -#line 14070 "gram.y" /* yacc.c:1652 */ - { + case 2030: /* func_expr_common_subexpr: CURRENT_ROLE */ +#line 14070 "gram.y" + { (yyval.node) = makeSQLValueFunction(SVFOP_CURRENT_ROLE, -1, (yylsp[0])); } -#line 44742 "gram.c" /* yacc.c:1652 */ +#line 45234 "gram.c" break; - case 2031: -#line 14074 "gram.y" /* yacc.c:1652 */ - { + case 2031: /* func_expr_common_subexpr: CURRENT_USER */ +#line 14074 "gram.y" + { (yyval.node) = makeSQLValueFunction(SVFOP_CURRENT_USER, -1, (yylsp[0])); } -#line 44750 "gram.c" /* yacc.c:1652 */ +#line 45242 "gram.c" break; - case 2032: -#line 14078 "gram.y" /* yacc.c:1652 */ - { + case 2032: /* func_expr_common_subexpr: SESSION_USER */ +#line 14078 "gram.y" + { (yyval.node) = makeSQLValueFunction(SVFOP_SESSION_USER, -1, (yylsp[0])); } -#line 44758 "gram.c" /* yacc.c:1652 */ +#line 45250 "gram.c" break; - case 2033: -#line 14082 "gram.y" /* yacc.c:1652 */ - { + case 2033: /* func_expr_common_subexpr: USER */ +#line 14082 "gram.y" + { (yyval.node) = makeSQLValueFunction(SVFOP_USER, -1, (yylsp[0])); } -#line 44766 "gram.c" /* yacc.c:1652 */ +#line 45258 "gram.c" break; - case 2034: -#line 14086 "gram.y" /* yacc.c:1652 */ - { + case 2034: /* func_expr_common_subexpr: CURRENT_CATALOG */ +#line 14086 "gram.y" + { (yyval.node) = makeSQLValueFunction(SVFOP_CURRENT_CATALOG, -1, (yylsp[0])); } -#line 44774 "gram.c" /* yacc.c:1652 */ +#line 45266 "gram.c" break; - case 2035: -#line 14090 "gram.y" /* yacc.c:1652 */ - { + case 2035: /* func_expr_common_subexpr: CURRENT_SCHEMA */ +#line 14090 "gram.y" + { (yyval.node) = makeSQLValueFunction(SVFOP_CURRENT_SCHEMA, -1, (yylsp[0])); } -#line 44782 "gram.c" /* yacc.c:1652 */ +#line 45274 "gram.c" break; - case 2036: -#line 14094 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeTypeCast((yyvsp[-3].node), (yyvsp[-1].typnam), (yylsp[-5])); } -#line 44788 "gram.c" /* yacc.c:1652 */ + case 2036: /* func_expr_common_subexpr: CAST '(' a_expr AS Typename ')' */ +#line 14094 "gram.y" + { (yyval.node) = makeTypeCast((yyvsp[-3].node), (yyvsp[-1].typnam), (yylsp[-5])); } +#line 45280 "gram.c" break; - case 2037: -#line 14096 "gram.y" /* yacc.c:1652 */ - { + case 2037: /* func_expr_common_subexpr: EXTRACT '(' extract_list ')' */ +#line 14096 "gram.y" + { (yyval.node) = (Node *) makeFuncCall(SystemFuncName("extract"), (yyvsp[-1].list), COERCE_SQL_SYNTAX, (yylsp[-3])); } -#line 44799 "gram.c" /* yacc.c:1652 */ +#line 45291 "gram.c" break; - case 2038: -#line 14103 "gram.y" /* yacc.c:1652 */ - { + case 2038: /* func_expr_common_subexpr: NORMALIZE '(' a_expr ')' */ +#line 14103 "gram.y" + { (yyval.node) = (Node *) makeFuncCall(SystemFuncName("normalize"), list_make1((yyvsp[-1].node)), COERCE_SQL_SYNTAX, (yylsp[-3])); } -#line 44810 "gram.c" /* yacc.c:1652 */ +#line 45302 "gram.c" break; - case 2039: -#line 14110 "gram.y" /* yacc.c:1652 */ - { + case 2039: /* func_expr_common_subexpr: NORMALIZE '(' a_expr ',' unicode_normal_form ')' */ +#line 14110 "gram.y" + { (yyval.node) = (Node *) makeFuncCall(SystemFuncName("normalize"), list_make2((yyvsp[-3].node), makeStringConst((yyvsp[-1].str), (yylsp[-1]))), COERCE_SQL_SYNTAX, (yylsp[-5])); } -#line 44821 "gram.c" /* yacc.c:1652 */ +#line 45313 "gram.c" break; - case 2040: -#line 14117 "gram.y" /* yacc.c:1652 */ - { + case 2040: /* func_expr_common_subexpr: OVERLAY '(' overlay_list ')' */ +#line 14117 "gram.y" + { (yyval.node) = (Node *) makeFuncCall(SystemFuncName("overlay"), (yyvsp[-1].list), COERCE_SQL_SYNTAX, (yylsp[-3])); } -#line 44832 "gram.c" /* yacc.c:1652 */ +#line 45324 "gram.c" break; - case 2041: -#line 14124 "gram.y" /* yacc.c:1652 */ - { + case 2041: /* func_expr_common_subexpr: OVERLAY '(' func_arg_list_opt ')' */ +#line 14124 "gram.y" + { /* * allow functions named overlay() to be called without * special syntax @@ -44843,12 +45335,12 @@ yyreduce: COERCE_EXPLICIT_CALL, (yylsp[-3])); } -#line 44847 "gram.c" /* yacc.c:1652 */ +#line 45339 "gram.c" break; - case 2042: -#line 14135 "gram.y" /* yacc.c:1652 */ - { + case 2042: /* func_expr_common_subexpr: POSITION '(' position_list ')' */ +#line 14135 "gram.y" + { /* * position(A in B) is converted to position(B, A) * @@ -44861,12 +45353,12 @@ yyreduce: COERCE_SQL_SYNTAX, (yylsp[-3])); } -#line 44865 "gram.c" /* yacc.c:1652 */ +#line 45357 "gram.c" break; - case 2043: -#line 14149 "gram.y" /* yacc.c:1652 */ - { + case 2043: /* func_expr_common_subexpr: SUBSTRING '(' substr_list ')' */ +#line 14149 "gram.y" + { /* substring(A from B for C) is converted to * substring(A, B, C) - thomas 2000-11-28 */ @@ -44875,12 +45367,12 @@ yyreduce: COERCE_SQL_SYNTAX, (yylsp[-3])); } -#line 44879 "gram.c" /* yacc.c:1652 */ +#line 45371 "gram.c" break; - case 2044: -#line 14159 "gram.y" /* yacc.c:1652 */ - { + case 2044: /* func_expr_common_subexpr: SUBSTRING '(' func_arg_list_opt ')' */ +#line 14159 "gram.y" + { /* * allow functions named substring() to be called without * special syntax @@ -44890,12 +45382,12 @@ yyreduce: COERCE_EXPLICIT_CALL, (yylsp[-3])); } -#line 44894 "gram.c" /* yacc.c:1652 */ +#line 45386 "gram.c" break; - case 2045: -#line 14170 "gram.y" /* yacc.c:1652 */ - { + case 2045: /* func_expr_common_subexpr: TREAT '(' a_expr AS Typename ')' */ +#line 14170 "gram.y" + { /* TREAT(expr AS target) converts expr of a particular type to target, * which is defined to be a subtype of the original expression. * In SQL99, this is intended for use with structured UDTs, @@ -44910,12 +45402,12 @@ yyreduce: COERCE_EXPLICIT_CALL, (yylsp[-5])); } -#line 44914 "gram.c" /* yacc.c:1652 */ +#line 45406 "gram.c" break; - case 2046: -#line 14186 "gram.y" /* yacc.c:1652 */ - { + case 2046: /* func_expr_common_subexpr: TRIM '(' BOTH trim_list ')' */ +#line 14186 "gram.y" + { /* various trim expressions are defined in SQL * - thomas 1997-07-19 */ @@ -44924,128 +45416,128 @@ yyreduce: COERCE_SQL_SYNTAX, (yylsp[-4])); } -#line 44928 "gram.c" /* yacc.c:1652 */ +#line 45420 "gram.c" break; - case 2047: -#line 14196 "gram.y" /* yacc.c:1652 */ - { + case 2047: /* func_expr_common_subexpr: TRIM '(' LEADING trim_list ')' */ +#line 14196 "gram.y" + { (yyval.node) = (Node *) makeFuncCall(SystemFuncName("ltrim"), (yyvsp[-1].list), COERCE_SQL_SYNTAX, (yylsp[-4])); } -#line 44939 "gram.c" /* yacc.c:1652 */ +#line 45431 "gram.c" break; - case 2048: -#line 14203 "gram.y" /* yacc.c:1652 */ - { + case 2048: /* func_expr_common_subexpr: TRIM '(' TRAILING trim_list ')' */ +#line 14203 "gram.y" + { (yyval.node) = (Node *) makeFuncCall(SystemFuncName("rtrim"), (yyvsp[-1].list), COERCE_SQL_SYNTAX, (yylsp[-4])); } -#line 44950 "gram.c" /* yacc.c:1652 */ +#line 45442 "gram.c" break; - case 2049: -#line 14210 "gram.y" /* yacc.c:1652 */ - { + case 2049: /* func_expr_common_subexpr: TRIM '(' trim_list ')' */ +#line 14210 "gram.y" + { (yyval.node) = (Node *) makeFuncCall(SystemFuncName("btrim"), (yyvsp[-1].list), COERCE_SQL_SYNTAX, (yylsp[-3])); } -#line 44961 "gram.c" /* yacc.c:1652 */ +#line 45453 "gram.c" break; - case 2050: -#line 14217 "gram.y" /* yacc.c:1652 */ - { + case 2050: /* func_expr_common_subexpr: NULLIF '(' a_expr ',' a_expr ')' */ +#line 14217 "gram.y" + { (yyval.node) = (Node *) makeSimpleA_Expr(AEXPR_NULLIF, "=", (yyvsp[-3].node), (yyvsp[-1].node), (yylsp[-5])); } -#line 44969 "gram.c" /* yacc.c:1652 */ +#line 45461 "gram.c" break; - case 2051: -#line 14221 "gram.y" /* yacc.c:1652 */ - { + case 2051: /* func_expr_common_subexpr: COALESCE '(' expr_list ')' */ +#line 14221 "gram.y" + { CoalesceExpr *c = makeNode(CoalesceExpr); c->args = (yyvsp[-1].list); c->location = (yylsp[-3]); (yyval.node) = (Node *)c; } -#line 44980 "gram.c" /* yacc.c:1652 */ +#line 45472 "gram.c" break; - case 2052: -#line 14228 "gram.y" /* yacc.c:1652 */ - { + case 2052: /* func_expr_common_subexpr: GREATEST '(' expr_list ')' */ +#line 14228 "gram.y" + { MinMaxExpr *v = makeNode(MinMaxExpr); v->args = (yyvsp[-1].list); v->op = IS_GREATEST; v->location = (yylsp[-3]); (yyval.node) = (Node *)v; } -#line 44992 "gram.c" /* yacc.c:1652 */ +#line 45484 "gram.c" break; - case 2053: -#line 14236 "gram.y" /* yacc.c:1652 */ - { + case 2053: /* func_expr_common_subexpr: LEAST '(' expr_list ')' */ +#line 14236 "gram.y" + { MinMaxExpr *v = makeNode(MinMaxExpr); v->args = (yyvsp[-1].list); v->op = IS_LEAST; v->location = (yylsp[-3]); (yyval.node) = (Node *)v; } -#line 45004 "gram.c" /* yacc.c:1652 */ +#line 45496 "gram.c" break; - case 2054: -#line 14244 "gram.y" /* yacc.c:1652 */ - { + case 2054: /* func_expr_common_subexpr: XMLCONCAT '(' expr_list ')' */ +#line 14244 "gram.y" + { (yyval.node) = makeXmlExpr(IS_XMLCONCAT, NULL, NIL, (yyvsp[-1].list), (yylsp[-3])); } -#line 45012 "gram.c" /* yacc.c:1652 */ +#line 45504 "gram.c" break; - case 2055: -#line 14248 "gram.y" /* yacc.c:1652 */ - { + case 2055: /* func_expr_common_subexpr: XMLELEMENT '(' NAME_P ColLabel ')' */ +#line 14248 "gram.y" + { (yyval.node) = makeXmlExpr(IS_XMLELEMENT, (yyvsp[-1].str), NIL, NIL, (yylsp[-4])); } -#line 45020 "gram.c" /* yacc.c:1652 */ +#line 45512 "gram.c" break; - case 2056: -#line 14252 "gram.y" /* yacc.c:1652 */ - { + case 2056: /* func_expr_common_subexpr: XMLELEMENT '(' NAME_P ColLabel ',' xml_attributes ')' */ +#line 14252 "gram.y" + { (yyval.node) = makeXmlExpr(IS_XMLELEMENT, (yyvsp[-3].str), (yyvsp[-1].list), NIL, (yylsp[-6])); } -#line 45028 "gram.c" /* yacc.c:1652 */ +#line 45520 "gram.c" break; - case 2057: -#line 14256 "gram.y" /* yacc.c:1652 */ - { + case 2057: /* func_expr_common_subexpr: XMLELEMENT '(' NAME_P ColLabel ',' expr_list ')' */ +#line 14256 "gram.y" + { (yyval.node) = makeXmlExpr(IS_XMLELEMENT, (yyvsp[-3].str), NIL, (yyvsp[-1].list), (yylsp[-6])); } -#line 45036 "gram.c" /* yacc.c:1652 */ +#line 45528 "gram.c" break; - case 2058: -#line 14260 "gram.y" /* yacc.c:1652 */ - { + case 2058: /* func_expr_common_subexpr: XMLELEMENT '(' NAME_P ColLabel ',' xml_attributes ',' expr_list ')' */ +#line 14260 "gram.y" + { (yyval.node) = makeXmlExpr(IS_XMLELEMENT, (yyvsp[-5].str), (yyvsp[-3].list), (yyvsp[-1].list), (yylsp[-8])); } -#line 45044 "gram.c" /* yacc.c:1652 */ +#line 45536 "gram.c" break; - case 2059: -#line 14264 "gram.y" /* yacc.c:1652 */ - { + case 2059: /* func_expr_common_subexpr: XMLEXISTS '(' c_expr xmlexists_argument ')' */ +#line 14264 "gram.y" + { /* xmlexists(A PASSING [BY REF] B [BY REF]) is * converted to xmlexists(A, B)*/ (yyval.node) = (Node *) makeFuncCall(SystemFuncName("xmlexists"), @@ -45053,20 +45545,20 @@ yyreduce: COERCE_SQL_SYNTAX, (yylsp[-4])); } -#line 45057 "gram.c" /* yacc.c:1652 */ +#line 45549 "gram.c" break; - case 2060: -#line 14273 "gram.y" /* yacc.c:1652 */ - { + case 2060: /* func_expr_common_subexpr: XMLFOREST '(' xml_attribute_list ')' */ +#line 14273 "gram.y" + { (yyval.node) = makeXmlExpr(IS_XMLFOREST, NULL, (yyvsp[-1].list), NIL, (yylsp[-3])); } -#line 45065 "gram.c" /* yacc.c:1652 */ +#line 45557 "gram.c" break; - case 2061: -#line 14277 "gram.y" /* yacc.c:1652 */ - { + case 2061: /* func_expr_common_subexpr: XMLPARSE '(' document_or_content a_expr xml_whitespace_option ')' */ +#line 14277 "gram.y" + { XmlExpr *x = (XmlExpr *) makeXmlExpr(IS_XMLPARSE, NULL, NIL, list_make2((yyvsp[-2].node), makeBoolAConst((yyvsp[-1].boolean), -1)), @@ -45074,37 +45566,37 @@ yyreduce: x->xmloption = (yyvsp[-3].ival); (yyval.node) = (Node *)x; } -#line 45078 "gram.c" /* yacc.c:1652 */ +#line 45570 "gram.c" break; - case 2062: -#line 14286 "gram.y" /* yacc.c:1652 */ - { + case 2062: /* func_expr_common_subexpr: XMLPI '(' NAME_P ColLabel ')' */ +#line 14286 "gram.y" + { (yyval.node) = makeXmlExpr(IS_XMLPI, (yyvsp[-1].str), NULL, NIL, (yylsp[-4])); } -#line 45086 "gram.c" /* yacc.c:1652 */ +#line 45578 "gram.c" break; - case 2063: -#line 14290 "gram.y" /* yacc.c:1652 */ - { + case 2063: /* func_expr_common_subexpr: XMLPI '(' NAME_P ColLabel ',' a_expr ')' */ +#line 14290 "gram.y" + { (yyval.node) = makeXmlExpr(IS_XMLPI, (yyvsp[-3].str), NULL, list_make1((yyvsp[-1].node)), (yylsp[-6])); } -#line 45094 "gram.c" /* yacc.c:1652 */ +#line 45586 "gram.c" break; - case 2064: -#line 14294 "gram.y" /* yacc.c:1652 */ - { + case 2064: /* func_expr_common_subexpr: XMLROOT '(' a_expr ',' xml_root_version opt_xml_root_standalone ')' */ +#line 14294 "gram.y" + { (yyval.node) = makeXmlExpr(IS_XMLROOT, NULL, NIL, list_make3((yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node)), (yylsp[-6])); } -#line 45103 "gram.c" /* yacc.c:1652 */ +#line 45595 "gram.c" break; - case 2065: -#line 14299 "gram.y" /* yacc.c:1652 */ - { + case 2065: /* func_expr_common_subexpr: XMLSERIALIZE '(' document_or_content a_expr AS SimpleTypename ')' */ +#line 14299 "gram.y" + { XmlSerialize *n = makeNode(XmlSerialize); n->xmloption = (yyvsp[-4].ival); n->expr = (yyvsp[-3].node); @@ -45112,216 +45604,216 @@ yyreduce: n->location = (yylsp[-6]); (yyval.node) = (Node *)n; } -#line 45116 "gram.c" /* yacc.c:1652 */ +#line 45608 "gram.c" break; - case 2066: -#line 14313 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 45122 "gram.c" /* yacc.c:1652 */ + case 2066: /* xml_root_version: VERSION_P a_expr */ +#line 14313 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 45614 "gram.c" break; - case 2067: -#line 14315 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeNullAConst(-1); } -#line 45128 "gram.c" /* yacc.c:1652 */ + case 2067: /* xml_root_version: VERSION_P NO VALUE_P */ +#line 14315 "gram.y" + { (yyval.node) = makeNullAConst(-1); } +#line 45620 "gram.c" break; - case 2068: -#line 14319 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeIntConst(XML_STANDALONE_YES, -1); } -#line 45134 "gram.c" /* yacc.c:1652 */ + case 2068: /* opt_xml_root_standalone: ',' STANDALONE_P YES_P */ +#line 14319 "gram.y" + { (yyval.node) = makeIntConst(XML_STANDALONE_YES, -1); } +#line 45626 "gram.c" break; - case 2069: -#line 14321 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeIntConst(XML_STANDALONE_NO, -1); } -#line 45140 "gram.c" /* yacc.c:1652 */ + case 2069: /* opt_xml_root_standalone: ',' STANDALONE_P NO */ +#line 14321 "gram.y" + { (yyval.node) = makeIntConst(XML_STANDALONE_NO, -1); } +#line 45632 "gram.c" break; - case 2070: -#line 14323 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeIntConst(XML_STANDALONE_NO_VALUE, -1); } -#line 45146 "gram.c" /* yacc.c:1652 */ + case 2070: /* opt_xml_root_standalone: ',' STANDALONE_P NO VALUE_P */ +#line 14323 "gram.y" + { (yyval.node) = makeIntConst(XML_STANDALONE_NO_VALUE, -1); } +#line 45638 "gram.c" break; - case 2071: -#line 14325 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = makeIntConst(XML_STANDALONE_OMITTED, -1); } -#line 45152 "gram.c" /* yacc.c:1652 */ + case 2071: /* opt_xml_root_standalone: %empty */ +#line 14325 "gram.y" + { (yyval.node) = makeIntConst(XML_STANDALONE_OMITTED, -1); } +#line 45644 "gram.c" break; - case 2072: -#line 14328 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 45158 "gram.c" /* yacc.c:1652 */ + case 2072: /* xml_attributes: XMLATTRIBUTES '(' xml_attribute_list ')' */ +#line 14328 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 45650 "gram.c" break; - case 2073: -#line 14331 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].target)); } -#line 45164 "gram.c" /* yacc.c:1652 */ + case 2073: /* xml_attribute_list: xml_attribute_el */ +#line 14331 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].target)); } +#line 45656 "gram.c" break; - case 2074: -#line 14332 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].target)); } -#line 45170 "gram.c" /* yacc.c:1652 */ + case 2074: /* xml_attribute_list: xml_attribute_list ',' xml_attribute_el */ +#line 14332 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].target)); } +#line 45662 "gram.c" break; - case 2075: -#line 14336 "gram.y" /* yacc.c:1652 */ - { + case 2075: /* xml_attribute_el: a_expr AS ColLabel */ +#line 14336 "gram.y" + { (yyval.target) = makeNode(ResTarget); (yyval.target)->name = (yyvsp[0].str); (yyval.target)->indirection = NIL; (yyval.target)->val = (Node *) (yyvsp[-2].node); (yyval.target)->location = (yylsp[-2]); } -#line 45182 "gram.c" /* yacc.c:1652 */ +#line 45674 "gram.c" break; - case 2076: -#line 14344 "gram.y" /* yacc.c:1652 */ - { + case 2076: /* xml_attribute_el: a_expr */ +#line 14344 "gram.y" + { (yyval.target) = makeNode(ResTarget); (yyval.target)->name = NULL; (yyval.target)->indirection = NIL; (yyval.target)->val = (Node *) (yyvsp[0].node); (yyval.target)->location = (yylsp[0]); } -#line 45194 "gram.c" /* yacc.c:1652 */ +#line 45686 "gram.c" break; - case 2077: -#line 14353 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = XMLOPTION_DOCUMENT; } -#line 45200 "gram.c" /* yacc.c:1652 */ + case 2077: /* document_or_content: DOCUMENT_P */ +#line 14353 "gram.y" + { (yyval.ival) = XMLOPTION_DOCUMENT; } +#line 45692 "gram.c" break; - case 2078: -#line 14354 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = XMLOPTION_CONTENT; } -#line 45206 "gram.c" /* yacc.c:1652 */ + case 2078: /* document_or_content: CONTENT_P */ +#line 14354 "gram.y" + { (yyval.ival) = XMLOPTION_CONTENT; } +#line 45698 "gram.c" break; - case 2079: -#line 14357 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 45212 "gram.c" /* yacc.c:1652 */ + case 2079: /* xml_whitespace_option: PRESERVE WHITESPACE_P */ +#line 14357 "gram.y" + { (yyval.boolean) = true; } +#line 45704 "gram.c" break; - case 2080: -#line 14358 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 45218 "gram.c" /* yacc.c:1652 */ + case 2080: /* xml_whitespace_option: STRIP_P WHITESPACE_P */ +#line 14358 "gram.y" + { (yyval.boolean) = false; } +#line 45710 "gram.c" break; - case 2081: -#line 14359 "gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 45224 "gram.c" /* yacc.c:1652 */ + case 2081: /* xml_whitespace_option: %empty */ +#line 14359 "gram.y" + { (yyval.boolean) = false; } +#line 45716 "gram.c" break; - case 2082: -#line 14365 "gram.y" /* yacc.c:1652 */ - { + case 2082: /* xmlexists_argument: PASSING c_expr */ +#line 14365 "gram.y" + { (yyval.node) = (yyvsp[0].node); } -#line 45232 "gram.c" /* yacc.c:1652 */ +#line 45724 "gram.c" break; - case 2083: -#line 14369 "gram.y" /* yacc.c:1652 */ - { + case 2083: /* xmlexists_argument: PASSING c_expr xml_passing_mech */ +#line 14369 "gram.y" + { (yyval.node) = (yyvsp[-1].node); } -#line 45240 "gram.c" /* yacc.c:1652 */ +#line 45732 "gram.c" break; - case 2084: -#line 14373 "gram.y" /* yacc.c:1652 */ - { + case 2084: /* xmlexists_argument: PASSING xml_passing_mech c_expr */ +#line 14373 "gram.y" + { (yyval.node) = (yyvsp[0].node); } -#line 45248 "gram.c" /* yacc.c:1652 */ +#line 45740 "gram.c" break; - case 2085: -#line 14377 "gram.y" /* yacc.c:1652 */ - { + case 2085: /* xmlexists_argument: PASSING xml_passing_mech c_expr xml_passing_mech */ +#line 14377 "gram.y" + { (yyval.node) = (yyvsp[-1].node); } -#line 45256 "gram.c" /* yacc.c:1652 */ +#line 45748 "gram.c" break; - case 2088: -#line 14392 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 45262 "gram.c" /* yacc.c:1652 */ + case 2088: /* within_group_clause: WITHIN GROUP_P '(' sort_clause ')' */ +#line 14392 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 45754 "gram.c" break; - case 2089: -#line 14393 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 45268 "gram.c" /* yacc.c:1652 */ + case 2089: /* within_group_clause: %empty */ +#line 14393 "gram.y" + { (yyval.list) = NIL; } +#line 45760 "gram.c" break; - case 2090: -#line 14397 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[-1].node); } -#line 45274 "gram.c" /* yacc.c:1652 */ + case 2090: /* filter_clause: FILTER '(' WHERE a_expr ')' */ +#line 14397 "gram.y" + { (yyval.node) = (yyvsp[-1].node); } +#line 45766 "gram.c" break; - case 2091: -#line 14398 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 45280 "gram.c" /* yacc.c:1652 */ + case 2091: /* filter_clause: %empty */ +#line 14398 "gram.y" + { (yyval.node) = NULL; } +#line 45772 "gram.c" break; - case 2092: -#line 14406 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 45286 "gram.c" /* yacc.c:1652 */ + case 2092: /* window_clause: WINDOW window_definition_list */ +#line 14406 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 45778 "gram.c" break; - case 2093: -#line 14407 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 45292 "gram.c" /* yacc.c:1652 */ + case 2093: /* window_clause: %empty */ +#line 14407 "gram.y" + { (yyval.list) = NIL; } +#line 45784 "gram.c" break; - case 2094: -#line 14411 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].windef)); } -#line 45298 "gram.c" /* yacc.c:1652 */ + case 2094: /* window_definition_list: window_definition */ +#line 14411 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].windef)); } +#line 45790 "gram.c" break; - case 2095: -#line 14413 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].windef)); } -#line 45304 "gram.c" /* yacc.c:1652 */ + case 2095: /* window_definition_list: window_definition_list ',' window_definition */ +#line 14413 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].windef)); } +#line 45796 "gram.c" break; - case 2096: -#line 14418 "gram.y" /* yacc.c:1652 */ - { + case 2096: /* window_definition: ColId AS window_specification */ +#line 14418 "gram.y" + { WindowDef *n = (yyvsp[0].windef); n->name = (yyvsp[-2].str); (yyval.windef) = n; } -#line 45314 "gram.c" /* yacc.c:1652 */ +#line 45806 "gram.c" break; - case 2097: -#line 14426 "gram.y" /* yacc.c:1652 */ - { (yyval.windef) = (yyvsp[0].windef); } -#line 45320 "gram.c" /* yacc.c:1652 */ + case 2097: /* over_clause: OVER window_specification */ +#line 14426 "gram.y" + { (yyval.windef) = (yyvsp[0].windef); } +#line 45812 "gram.c" break; - case 2098: -#line 14428 "gram.y" /* yacc.c:1652 */ - { + case 2098: /* over_clause: OVER ColId */ +#line 14428 "gram.y" + { WindowDef *n = makeNode(WindowDef); n->name = (yyvsp[0].str); n->refname = NULL; @@ -45333,18 +45825,18 @@ yyreduce: n->location = (yylsp[0]); (yyval.windef) = n; } -#line 45337 "gram.c" /* yacc.c:1652 */ +#line 45829 "gram.c" break; - case 2099: -#line 14441 "gram.y" /* yacc.c:1652 */ - { (yyval.windef) = NULL; } -#line 45343 "gram.c" /* yacc.c:1652 */ + case 2099: /* over_clause: %empty */ +#line 14441 "gram.y" + { (yyval.windef) = NULL; } +#line 45835 "gram.c" break; - case 2100: -#line 14446 "gram.y" /* yacc.c:1652 */ - { + case 2100: /* window_specification: '(' opt_existing_window_name opt_partition_clause opt_sort_clause opt_frame_clause ')' */ +#line 14446 "gram.y" + { WindowDef *n = makeNode(WindowDef); n->name = NULL; n->refname = (yyvsp[-4].str); @@ -45357,81 +45849,81 @@ yyreduce: n->location = (yylsp[-5]); (yyval.windef) = n; } -#line 45361 "gram.c" /* yacc.c:1652 */ +#line 45853 "gram.c" break; - case 2101: -#line 14471 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 45367 "gram.c" /* yacc.c:1652 */ + case 2101: /* opt_existing_window_name: ColId */ +#line 14471 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 45859 "gram.c" break; - case 2102: -#line 14472 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 45373 "gram.c" /* yacc.c:1652 */ + case 2102: /* opt_existing_window_name: %empty */ +#line 14472 "gram.y" + { (yyval.str) = NULL; } +#line 45865 "gram.c" break; - case 2103: -#line 14475 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 45379 "gram.c" /* yacc.c:1652 */ + case 2103: /* opt_partition_clause: PARTITION BY expr_list */ +#line 14475 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 45871 "gram.c" break; - case 2104: -#line 14476 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 45385 "gram.c" /* yacc.c:1652 */ + case 2104: /* opt_partition_clause: %empty */ +#line 14476 "gram.y" + { (yyval.list) = NIL; } +#line 45877 "gram.c" break; - case 2105: -#line 14485 "gram.y" /* yacc.c:1652 */ - { + case 2105: /* opt_frame_clause: RANGE frame_extent opt_window_exclusion_clause */ +#line 14485 "gram.y" + { WindowDef *n = (yyvsp[-1].windef); n->frameOptions |= FRAMEOPTION_NONDEFAULT | FRAMEOPTION_RANGE; n->frameOptions |= (yyvsp[0].ival); (yyval.windef) = n; } -#line 45396 "gram.c" /* yacc.c:1652 */ +#line 45888 "gram.c" break; - case 2106: -#line 14492 "gram.y" /* yacc.c:1652 */ - { + case 2106: /* opt_frame_clause: ROWS frame_extent opt_window_exclusion_clause */ +#line 14492 "gram.y" + { WindowDef *n = (yyvsp[-1].windef); n->frameOptions |= FRAMEOPTION_NONDEFAULT | FRAMEOPTION_ROWS; n->frameOptions |= (yyvsp[0].ival); (yyval.windef) = n; } -#line 45407 "gram.c" /* yacc.c:1652 */ +#line 45899 "gram.c" break; - case 2107: -#line 14499 "gram.y" /* yacc.c:1652 */ - { + case 2107: /* opt_frame_clause: GROUPS frame_extent opt_window_exclusion_clause */ +#line 14499 "gram.y" + { WindowDef *n = (yyvsp[-1].windef); n->frameOptions |= FRAMEOPTION_NONDEFAULT | FRAMEOPTION_GROUPS; n->frameOptions |= (yyvsp[0].ival); (yyval.windef) = n; } -#line 45418 "gram.c" /* yacc.c:1652 */ +#line 45910 "gram.c" break; - case 2108: -#line 14506 "gram.y" /* yacc.c:1652 */ - { + case 2108: /* opt_frame_clause: %empty */ +#line 14506 "gram.y" + { WindowDef *n = makeNode(WindowDef); n->frameOptions = FRAMEOPTION_DEFAULTS; n->startOffset = NULL; n->endOffset = NULL; (yyval.windef) = n; } -#line 45430 "gram.c" /* yacc.c:1652 */ +#line 45922 "gram.c" break; - case 2109: -#line 14516 "gram.y" /* yacc.c:1652 */ - { + case 2109: /* frame_extent: frame_bound */ +#line 14516 "gram.y" + { WindowDef *n = (yyvsp[0].windef); /* reject invalid cases */ if (n->frameOptions & FRAMEOPTION_START_UNBOUNDED_FOLLOWING) @@ -45447,12 +45939,12 @@ yyreduce: n->frameOptions |= FRAMEOPTION_END_CURRENT_ROW; (yyval.windef) = n; } -#line 45451 "gram.c" /* yacc.c:1652 */ +#line 45943 "gram.c" break; - case 2110: -#line 14533 "gram.y" /* yacc.c:1652 */ - { + case 2110: /* frame_extent: BETWEEN frame_bound AND frame_bound */ +#line 14533 "gram.y" + { WindowDef *n1 = (yyvsp[-2].windef); WindowDef *n2 = (yyvsp[0].windef); /* form merged options */ @@ -45488,340 +45980,340 @@ yyreduce: n1->endOffset = n2->startOffset; (yyval.windef) = n1; } -#line 45492 "gram.c" /* yacc.c:1652 */ +#line 45984 "gram.c" break; - case 2111: -#line 14578 "gram.y" /* yacc.c:1652 */ - { + case 2111: /* frame_bound: UNBOUNDED PRECEDING */ +#line 14578 "gram.y" + { WindowDef *n = makeNode(WindowDef); n->frameOptions = FRAMEOPTION_START_UNBOUNDED_PRECEDING; n->startOffset = NULL; n->endOffset = NULL; (yyval.windef) = n; } -#line 45504 "gram.c" /* yacc.c:1652 */ +#line 45996 "gram.c" break; - case 2112: -#line 14586 "gram.y" /* yacc.c:1652 */ - { + case 2112: /* frame_bound: UNBOUNDED FOLLOWING */ +#line 14586 "gram.y" + { WindowDef *n = makeNode(WindowDef); n->frameOptions = FRAMEOPTION_START_UNBOUNDED_FOLLOWING; n->startOffset = NULL; n->endOffset = NULL; (yyval.windef) = n; } -#line 45516 "gram.c" /* yacc.c:1652 */ +#line 46008 "gram.c" break; - case 2113: -#line 14594 "gram.y" /* yacc.c:1652 */ - { + case 2113: /* frame_bound: CURRENT_P ROW */ +#line 14594 "gram.y" + { WindowDef *n = makeNode(WindowDef); n->frameOptions = FRAMEOPTION_START_CURRENT_ROW; n->startOffset = NULL; n->endOffset = NULL; (yyval.windef) = n; } -#line 45528 "gram.c" /* yacc.c:1652 */ +#line 46020 "gram.c" break; - case 2114: -#line 14602 "gram.y" /* yacc.c:1652 */ - { + case 2114: /* frame_bound: a_expr PRECEDING */ +#line 14602 "gram.y" + { WindowDef *n = makeNode(WindowDef); n->frameOptions = FRAMEOPTION_START_OFFSET_PRECEDING; n->startOffset = (yyvsp[-1].node); n->endOffset = NULL; (yyval.windef) = n; } -#line 45540 "gram.c" /* yacc.c:1652 */ +#line 46032 "gram.c" break; - case 2115: -#line 14610 "gram.y" /* yacc.c:1652 */ - { + case 2115: /* frame_bound: a_expr FOLLOWING */ +#line 14610 "gram.y" + { WindowDef *n = makeNode(WindowDef); n->frameOptions = FRAMEOPTION_START_OFFSET_FOLLOWING; n->startOffset = (yyvsp[-1].node); n->endOffset = NULL; (yyval.windef) = n; } -#line 45552 "gram.c" /* yacc.c:1652 */ +#line 46044 "gram.c" break; - case 2116: -#line 14620 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = FRAMEOPTION_EXCLUDE_CURRENT_ROW; } -#line 45558 "gram.c" /* yacc.c:1652 */ + case 2116: /* opt_window_exclusion_clause: EXCLUDE CURRENT_P ROW */ +#line 14620 "gram.y" + { (yyval.ival) = FRAMEOPTION_EXCLUDE_CURRENT_ROW; } +#line 46050 "gram.c" break; - case 2117: -#line 14621 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = FRAMEOPTION_EXCLUDE_GROUP; } -#line 45564 "gram.c" /* yacc.c:1652 */ + case 2117: /* opt_window_exclusion_clause: EXCLUDE GROUP_P */ +#line 14621 "gram.y" + { (yyval.ival) = FRAMEOPTION_EXCLUDE_GROUP; } +#line 46056 "gram.c" break; - case 2118: -#line 14622 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = FRAMEOPTION_EXCLUDE_TIES; } -#line 45570 "gram.c" /* yacc.c:1652 */ + case 2118: /* opt_window_exclusion_clause: EXCLUDE TIES */ +#line 14622 "gram.y" + { (yyval.ival) = FRAMEOPTION_EXCLUDE_TIES; } +#line 46062 "gram.c" break; - case 2119: -#line 14623 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = 0; } -#line 45576 "gram.c" /* yacc.c:1652 */ + case 2119: /* opt_window_exclusion_clause: EXCLUDE NO OTHERS */ +#line 14623 "gram.y" + { (yyval.ival) = 0; } +#line 46068 "gram.c" break; - case 2120: -#line 14624 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = 0; } -#line 45582 "gram.c" /* yacc.c:1652 */ + case 2120: /* opt_window_exclusion_clause: %empty */ +#line 14624 "gram.y" + { (yyval.ival) = 0; } +#line 46074 "gram.c" break; - case 2121: -#line 14638 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 45588 "gram.c" /* yacc.c:1652 */ + case 2121: /* row: ROW '(' expr_list ')' */ +#line 14638 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 46080 "gram.c" break; - case 2122: -#line 14639 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 45594 "gram.c" /* yacc.c:1652 */ + case 2122: /* row: ROW '(' ')' */ +#line 14639 "gram.y" + { (yyval.list) = NIL; } +#line 46086 "gram.c" break; - case 2123: -#line 14640 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-3].list), (yyvsp[-1].node)); } -#line 45600 "gram.c" /* yacc.c:1652 */ + case 2123: /* row: '(' expr_list ',' a_expr ')' */ +#line 14640 "gram.y" + { (yyval.list) = lappend((yyvsp[-3].list), (yyvsp[-1].node)); } +#line 46092 "gram.c" break; - case 2124: -#line 14643 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 45606 "gram.c" /* yacc.c:1652 */ + case 2124: /* explicit_row: ROW '(' expr_list ')' */ +#line 14643 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 46098 "gram.c" break; - case 2125: -#line 14644 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 45612 "gram.c" /* yacc.c:1652 */ + case 2125: /* explicit_row: ROW '(' ')' */ +#line 14644 "gram.y" + { (yyval.list) = NIL; } +#line 46104 "gram.c" break; - case 2126: -#line 14647 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-3].list), (yyvsp[-1].node)); } -#line 45618 "gram.c" /* yacc.c:1652 */ + case 2126: /* implicit_row: '(' expr_list ',' a_expr ')' */ +#line 14647 "gram.y" + { (yyval.list) = lappend((yyvsp[-3].list), (yyvsp[-1].node)); } +#line 46110 "gram.c" break; - case 2127: -#line 14650 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = ANY_SUBLINK; } -#line 45624 "gram.c" /* yacc.c:1652 */ + case 2127: /* sub_type: ANY */ +#line 14650 "gram.y" + { (yyval.ival) = ANY_SUBLINK; } +#line 46116 "gram.c" break; - case 2128: -#line 14651 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = ANY_SUBLINK; } -#line 45630 "gram.c" /* yacc.c:1652 */ + case 2128: /* sub_type: SOME */ +#line 14651 "gram.y" + { (yyval.ival) = ANY_SUBLINK; } +#line 46122 "gram.c" break; - case 2129: -#line 14652 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = ALL_SUBLINK; } -#line 45636 "gram.c" /* yacc.c:1652 */ + case 2129: /* sub_type: ALL */ +#line 14652 "gram.y" + { (yyval.ival) = ALL_SUBLINK; } +#line 46128 "gram.c" break; - case 2130: -#line 14655 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 45642 "gram.c" /* yacc.c:1652 */ + case 2130: /* all_Op: Op */ +#line 14655 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 46134 "gram.c" break; - case 2131: -#line 14656 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 45648 "gram.c" /* yacc.c:1652 */ + case 2131: /* all_Op: MathOp */ +#line 14656 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 46140 "gram.c" break; - case 2132: -#line 14659 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "+"; } -#line 45654 "gram.c" /* yacc.c:1652 */ + case 2132: /* MathOp: '+' */ +#line 14659 "gram.y" + { (yyval.str) = "+"; } +#line 46146 "gram.c" break; - case 2133: -#line 14660 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "-"; } -#line 45660 "gram.c" /* yacc.c:1652 */ + case 2133: /* MathOp: '-' */ +#line 14660 "gram.y" + { (yyval.str) = "-"; } +#line 46152 "gram.c" break; - case 2134: -#line 14661 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "*"; } -#line 45666 "gram.c" /* yacc.c:1652 */ + case 2134: /* MathOp: '*' */ +#line 14661 "gram.y" + { (yyval.str) = "*"; } +#line 46158 "gram.c" break; - case 2135: -#line 14662 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "/"; } -#line 45672 "gram.c" /* yacc.c:1652 */ + case 2135: /* MathOp: '/' */ +#line 14662 "gram.y" + { (yyval.str) = "/"; } +#line 46164 "gram.c" break; - case 2136: -#line 14663 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "%"; } -#line 45678 "gram.c" /* yacc.c:1652 */ + case 2136: /* MathOp: '%' */ +#line 14663 "gram.y" + { (yyval.str) = "%"; } +#line 46170 "gram.c" break; - case 2137: -#line 14664 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "^"; } -#line 45684 "gram.c" /* yacc.c:1652 */ + case 2137: /* MathOp: '^' */ +#line 14664 "gram.y" + { (yyval.str) = "^"; } +#line 46176 "gram.c" break; - case 2138: -#line 14665 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "<"; } -#line 45690 "gram.c" /* yacc.c:1652 */ + case 2138: /* MathOp: '<' */ +#line 14665 "gram.y" + { (yyval.str) = "<"; } +#line 46182 "gram.c" break; - case 2139: -#line 14666 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = ">"; } -#line 45696 "gram.c" /* yacc.c:1652 */ + case 2139: /* MathOp: '>' */ +#line 14666 "gram.y" + { (yyval.str) = ">"; } +#line 46188 "gram.c" break; - case 2140: -#line 14667 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "="; } -#line 45702 "gram.c" /* yacc.c:1652 */ + case 2140: /* MathOp: '=' */ +#line 14667 "gram.y" + { (yyval.str) = "="; } +#line 46194 "gram.c" break; - case 2141: -#line 14668 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "<="; } -#line 45708 "gram.c" /* yacc.c:1652 */ + case 2141: /* MathOp: LESS_EQUALS */ +#line 14668 "gram.y" + { (yyval.str) = "<="; } +#line 46200 "gram.c" break; - case 2142: -#line 14669 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = ">="; } -#line 45714 "gram.c" /* yacc.c:1652 */ + case 2142: /* MathOp: GREATER_EQUALS */ +#line 14669 "gram.y" + { (yyval.str) = ">="; } +#line 46206 "gram.c" break; - case 2143: -#line 14670 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "<>"; } -#line 45720 "gram.c" /* yacc.c:1652 */ + case 2143: /* MathOp: NOT_EQUALS */ +#line 14670 "gram.y" + { (yyval.str) = "<>"; } +#line 46212 "gram.c" break; - case 2144: -#line 14674 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } -#line 45726 "gram.c" /* yacc.c:1652 */ + case 2144: /* qual_Op: Op */ +#line 14674 "gram.y" + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } +#line 46218 "gram.c" break; - case 2145: -#line 14676 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 45732 "gram.c" /* yacc.c:1652 */ + case 2145: /* qual_Op: OPERATOR '(' any_operator ')' */ +#line 14676 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 46224 "gram.c" break; - case 2146: -#line 14681 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } -#line 45738 "gram.c" /* yacc.c:1652 */ + case 2146: /* qual_all_Op: all_Op */ +#line 14681 "gram.y" + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } +#line 46230 "gram.c" break; - case 2147: -#line 14683 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 45744 "gram.c" /* yacc.c:1652 */ + case 2147: /* qual_all_Op: OPERATOR '(' any_operator ')' */ +#line 14683 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 46236 "gram.c" break; - case 2148: -#line 14688 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } -#line 45750 "gram.c" /* yacc.c:1652 */ + case 2148: /* subquery_Op: all_Op */ +#line 14688 "gram.y" + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } +#line 46242 "gram.c" break; - case 2149: -#line 14690 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 45756 "gram.c" /* yacc.c:1652 */ + case 2149: /* subquery_Op: OPERATOR '(' any_operator ')' */ +#line 14690 "gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 46248 "gram.c" break; - case 2150: -#line 14692 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeString("~~")); } -#line 45762 "gram.c" /* yacc.c:1652 */ + case 2150: /* subquery_Op: LIKE */ +#line 14692 "gram.y" + { (yyval.list) = list_make1(makeString("~~")); } +#line 46254 "gram.c" break; - case 2151: -#line 14694 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeString("!~~")); } -#line 45768 "gram.c" /* yacc.c:1652 */ + case 2151: /* subquery_Op: NOT_LA LIKE */ +#line 14694 "gram.y" + { (yyval.list) = list_make1(makeString("!~~")); } +#line 46260 "gram.c" break; - case 2152: -#line 14696 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeString("~~*")); } -#line 45774 "gram.c" /* yacc.c:1652 */ + case 2152: /* subquery_Op: ILIKE */ +#line 14696 "gram.y" + { (yyval.list) = list_make1(makeString("~~*")); } +#line 46266 "gram.c" break; - case 2153: -#line 14698 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeString("!~~*")); } -#line 45780 "gram.c" /* yacc.c:1652 */ + case 2153: /* subquery_Op: NOT_LA ILIKE */ +#line 14698 "gram.y" + { (yyval.list) = list_make1(makeString("!~~*")); } +#line 46272 "gram.c" break; - case 2154: -#line 14710 "gram.y" /* yacc.c:1652 */ - { + case 2154: /* expr_list: a_expr */ +#line 14710 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 45788 "gram.c" /* yacc.c:1652 */ +#line 46280 "gram.c" break; - case 2155: -#line 14714 "gram.y" /* yacc.c:1652 */ - { + case 2155: /* expr_list: expr_list ',' a_expr */ +#line 14714 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 45796 "gram.c" /* yacc.c:1652 */ +#line 46288 "gram.c" break; - case 2156: -#line 14721 "gram.y" /* yacc.c:1652 */ - { + case 2156: /* func_arg_list: func_arg_expr */ +#line 14721 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 45804 "gram.c" /* yacc.c:1652 */ +#line 46296 "gram.c" break; - case 2157: -#line 14725 "gram.y" /* yacc.c:1652 */ - { + case 2157: /* func_arg_list: func_arg_list ',' func_arg_expr */ +#line 14725 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 45812 "gram.c" /* yacc.c:1652 */ +#line 46304 "gram.c" break; - case 2158: -#line 14731 "gram.y" /* yacc.c:1652 */ - { + case 2158: /* func_arg_expr: a_expr */ +#line 14731 "gram.y" + { (yyval.node) = (yyvsp[0].node); } -#line 45820 "gram.c" /* yacc.c:1652 */ +#line 46312 "gram.c" break; - case 2159: -#line 14735 "gram.y" /* yacc.c:1652 */ - { + case 2159: /* func_arg_expr: param_name COLON_EQUALS a_expr */ +#line 14735 "gram.y" + { NamedArgExpr *na = makeNode(NamedArgExpr); na->name = (yyvsp[-2].str); na->arg = (Expr *) (yyvsp[0].node); @@ -45829,12 +46321,12 @@ yyreduce: na->location = (yylsp[-2]); (yyval.node) = (Node *) na; } -#line 45833 "gram.c" /* yacc.c:1652 */ +#line 46325 "gram.c" break; - case 2160: -#line 14744 "gram.y" /* yacc.c:1652 */ - { + case 2160: /* func_arg_expr: param_name EQUALS_GREATER a_expr */ +#line 14744 "gram.y" + { NamedArgExpr *na = makeNode(NamedArgExpr); na->name = (yyvsp[-2].str); na->arg = (Expr *) (yyvsp[0].node); @@ -45842,193 +46334,193 @@ yyreduce: na->location = (yylsp[-2]); (yyval.node) = (Node *) na; } -#line 45846 "gram.c" /* yacc.c:1652 */ +#line 46338 "gram.c" break; - case 2161: -#line 14754 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 45852 "gram.c" /* yacc.c:1652 */ + case 2161: /* func_arg_list_opt: func_arg_list */ +#line 14754 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 46344 "gram.c" break; - case 2162: -#line 14755 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 45858 "gram.c" /* yacc.c:1652 */ + case 2162: /* func_arg_list_opt: %empty */ +#line 14755 "gram.y" + { (yyval.list) = NIL; } +#line 46350 "gram.c" break; - case 2163: -#line 14758 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].typnam)); } -#line 45864 "gram.c" /* yacc.c:1652 */ + case 2163: /* type_list: Typename */ +#line 14758 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].typnam)); } +#line 46356 "gram.c" break; - case 2164: -#line 14759 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].typnam)); } -#line 45870 "gram.c" /* yacc.c:1652 */ + case 2164: /* type_list: type_list ',' Typename */ +#line 14759 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].typnam)); } +#line 46362 "gram.c" break; - case 2165: -#line 14763 "gram.y" /* yacc.c:1652 */ - { + case 2165: /* array_expr: '[' expr_list ']' */ +#line 14763 "gram.y" + { (yyval.node) = makeAArrayExpr((yyvsp[-1].list), (yylsp[-2])); } -#line 45878 "gram.c" /* yacc.c:1652 */ +#line 46370 "gram.c" break; - case 2166: -#line 14767 "gram.y" /* yacc.c:1652 */ - { + case 2166: /* array_expr: '[' array_expr_list ']' */ +#line 14767 "gram.y" + { (yyval.node) = makeAArrayExpr((yyvsp[-1].list), (yylsp[-2])); } -#line 45886 "gram.c" /* yacc.c:1652 */ +#line 46378 "gram.c" break; - case 2167: -#line 14771 "gram.y" /* yacc.c:1652 */ - { + case 2167: /* array_expr: '[' ']' */ +#line 14771 "gram.y" + { (yyval.node) = makeAArrayExpr(NIL, (yylsp[-1])); } -#line 45894 "gram.c" /* yacc.c:1652 */ +#line 46386 "gram.c" break; - case 2168: -#line 14776 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 45900 "gram.c" /* yacc.c:1652 */ + case 2168: /* array_expr_list: array_expr */ +#line 14776 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 46392 "gram.c" break; - case 2169: -#line 14777 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } -#line 45906 "gram.c" /* yacc.c:1652 */ + case 2169: /* array_expr_list: array_expr_list ',' array_expr */ +#line 14777 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].node)); } +#line 46398 "gram.c" break; - case 2170: -#line 14783 "gram.y" /* yacc.c:1652 */ - { + case 2170: /* extract_list: extract_arg FROM a_expr */ +#line 14783 "gram.y" + { (yyval.list) = list_make2(makeStringConst((yyvsp[-2].str), (yylsp[-2])), (yyvsp[0].node)); } -#line 45914 "gram.c" /* yacc.c:1652 */ +#line 46406 "gram.c" break; - case 2171: -#line 14792 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 45920 "gram.c" /* yacc.c:1652 */ + case 2171: /* extract_arg: IDENT */ +#line 14792 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 46412 "gram.c" break; - case 2172: -#line 14793 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "year"; } -#line 45926 "gram.c" /* yacc.c:1652 */ + case 2172: /* extract_arg: YEAR_P */ +#line 14793 "gram.y" + { (yyval.str) = "year"; } +#line 46418 "gram.c" break; - case 2173: -#line 14794 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "month"; } -#line 45932 "gram.c" /* yacc.c:1652 */ + case 2173: /* extract_arg: MONTH_P */ +#line 14794 "gram.y" + { (yyval.str) = "month"; } +#line 46424 "gram.c" break; - case 2174: -#line 14795 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "day"; } -#line 45938 "gram.c" /* yacc.c:1652 */ + case 2174: /* extract_arg: DAY_P */ +#line 14795 "gram.y" + { (yyval.str) = "day"; } +#line 46430 "gram.c" break; - case 2175: -#line 14796 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "hour"; } -#line 45944 "gram.c" /* yacc.c:1652 */ + case 2175: /* extract_arg: HOUR_P */ +#line 14796 "gram.y" + { (yyval.str) = "hour"; } +#line 46436 "gram.c" break; - case 2176: -#line 14797 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "minute"; } -#line 45950 "gram.c" /* yacc.c:1652 */ + case 2176: /* extract_arg: MINUTE_P */ +#line 14797 "gram.y" + { (yyval.str) = "minute"; } +#line 46442 "gram.c" break; - case 2177: -#line 14798 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "second"; } -#line 45956 "gram.c" /* yacc.c:1652 */ + case 2177: /* extract_arg: SECOND_P */ +#line 14798 "gram.y" + { (yyval.str) = "second"; } +#line 46448 "gram.c" break; - case 2178: -#line 14799 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 45962 "gram.c" /* yacc.c:1652 */ + case 2178: /* extract_arg: Sconst */ +#line 14799 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 46454 "gram.c" break; - case 2179: -#line 14803 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "NFC"; } -#line 45968 "gram.c" /* yacc.c:1652 */ + case 2179: /* unicode_normal_form: NFC */ +#line 14803 "gram.y" + { (yyval.str) = "NFC"; } +#line 46460 "gram.c" break; - case 2180: -#line 14804 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "NFD"; } -#line 45974 "gram.c" /* yacc.c:1652 */ + case 2180: /* unicode_normal_form: NFD */ +#line 14804 "gram.y" + { (yyval.str) = "NFD"; } +#line 46466 "gram.c" break; - case 2181: -#line 14805 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "NFKC"; } -#line 45980 "gram.c" /* yacc.c:1652 */ + case 2181: /* unicode_normal_form: NFKC */ +#line 14805 "gram.y" + { (yyval.str) = "NFKC"; } +#line 46472 "gram.c" break; - case 2182: -#line 14806 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = "NFKD"; } -#line 45986 "gram.c" /* yacc.c:1652 */ + case 2182: /* unicode_normal_form: NFKD */ +#line 14806 "gram.y" + { (yyval.str) = "NFKD"; } +#line 46478 "gram.c" break; - case 2183: -#line 14812 "gram.y" /* yacc.c:1652 */ - { + case 2183: /* overlay_list: a_expr PLACING a_expr FROM a_expr FOR a_expr */ +#line 14812 "gram.y" + { /* overlay(A PLACING B FROM C FOR D) is converted to overlay(A, B, C, D) */ (yyval.list) = list_make4((yyvsp[-6].node), (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node)); } -#line 45995 "gram.c" /* yacc.c:1652 */ +#line 46487 "gram.c" break; - case 2184: -#line 14817 "gram.y" /* yacc.c:1652 */ - { + case 2184: /* overlay_list: a_expr PLACING a_expr FROM a_expr */ +#line 14817 "gram.y" + { /* overlay(A PLACING B FROM C) is converted to overlay(A, B, C) */ (yyval.list) = list_make3((yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node)); } -#line 46004 "gram.c" /* yacc.c:1652 */ +#line 46496 "gram.c" break; - case 2185: -#line 14825 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make2((yyvsp[0].node), (yyvsp[-2].node)); } -#line 46010 "gram.c" /* yacc.c:1652 */ + case 2185: /* position_list: b_expr IN_P b_expr */ +#line 14825 "gram.y" + { (yyval.list) = list_make2((yyvsp[0].node), (yyvsp[-2].node)); } +#line 46502 "gram.c" break; - case 2186: -#line 14847 "gram.y" /* yacc.c:1652 */ - { + case 2186: /* substr_list: a_expr FROM a_expr FOR a_expr */ +#line 14847 "gram.y" + { (yyval.list) = list_make3((yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node)); } -#line 46018 "gram.c" /* yacc.c:1652 */ +#line 46510 "gram.c" break; - case 2187: -#line 14851 "gram.y" /* yacc.c:1652 */ - { + case 2187: /* substr_list: a_expr FOR a_expr FROM a_expr */ +#line 14851 "gram.y" + { /* not legal per SQL, but might as well allow it */ (yyval.list) = list_make3((yyvsp[-4].node), (yyvsp[0].node), (yyvsp[-2].node)); } -#line 46027 "gram.c" /* yacc.c:1652 */ +#line 46519 "gram.c" break; - case 2188: -#line 14856 "gram.y" /* yacc.c:1652 */ - { + case 2188: /* substr_list: a_expr FROM a_expr */ +#line 14856 "gram.y" + { /* * Because we aren't restricting data types here, this * syntax can end up resolving to textregexsubstr(). @@ -46038,12 +46530,12 @@ yyreduce: */ (yyval.list) = list_make2((yyvsp[-2].node), (yyvsp[0].node)); } -#line 46042 "gram.c" /* yacc.c:1652 */ +#line 46534 "gram.c" break; - case 2189: -#line 14867 "gram.y" /* yacc.c:1652 */ - { + case 2189: /* substr_list: a_expr FOR a_expr */ +#line 14867 "gram.y" + { /* not legal per SQL */ /* @@ -46059,55 +46551,55 @@ yyreduce: makeTypeCast((yyvsp[0].node), SystemTypeName("int4"), -1)); } -#line 46063 "gram.c" /* yacc.c:1652 */ +#line 46555 "gram.c" break; - case 2190: -#line 14884 "gram.y" /* yacc.c:1652 */ - { + case 2190: /* substr_list: a_expr SIMILAR a_expr ESCAPE a_expr */ +#line 14884 "gram.y" + { (yyval.list) = list_make3((yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node)); } -#line 46071 "gram.c" /* yacc.c:1652 */ +#line 46563 "gram.c" break; - case 2191: -#line 14889 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[0].list), (yyvsp[-2].node)); } -#line 46077 "gram.c" /* yacc.c:1652 */ + case 2191: /* trim_list: a_expr FROM expr_list */ +#line 14889 "gram.y" + { (yyval.list) = lappend((yyvsp[0].list), (yyvsp[-2].node)); } +#line 46569 "gram.c" break; - case 2192: -#line 14890 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 46083 "gram.c" /* yacc.c:1652 */ + case 2192: /* trim_list: FROM expr_list */ +#line 14890 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 46575 "gram.c" break; - case 2193: -#line 14891 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 46089 "gram.c" /* yacc.c:1652 */ + case 2193: /* trim_list: expr_list */ +#line 14891 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 46581 "gram.c" break; - case 2194: -#line 14895 "gram.y" /* yacc.c:1652 */ - { + case 2194: /* in_expr: select_with_parens */ +#line 14895 "gram.y" + { SubLink *n = makeNode(SubLink); n->subselect = (yyvsp[0].node); /* other fields will be filled later */ (yyval.node) = (Node *)n; } -#line 46100 "gram.c" /* yacc.c:1652 */ +#line 46592 "gram.c" break; - case 2195: -#line 14901 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *)(yyvsp[-1].list); } -#line 46106 "gram.c" /* yacc.c:1652 */ + case 2195: /* in_expr: '(' expr_list ')' */ +#line 14901 "gram.y" + { (yyval.node) = (Node *)(yyvsp[-1].list); } +#line 46598 "gram.c" break; - case 2196: -#line 14912 "gram.y" /* yacc.c:1652 */ - { + case 2196: /* case_expr: CASE case_arg when_clause_list case_default END_P */ +#line 14912 "gram.y" + { CaseExpr *c = makeNode(CaseExpr); c->casetype = InvalidOid; /* not analyzed yet */ c->arg = (Expr *) (yyvsp[-3].node); @@ -46116,212 +46608,212 @@ yyreduce: c->location = (yylsp[-4]); (yyval.node) = (Node *)c; } -#line 46120 "gram.c" /* yacc.c:1652 */ +#line 46612 "gram.c" break; - case 2197: -#line 14925 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 46126 "gram.c" /* yacc.c:1652 */ + case 2197: /* when_clause_list: when_clause */ +#line 14925 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 46618 "gram.c" break; - case 2198: -#line 14926 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } -#line 46132 "gram.c" /* yacc.c:1652 */ + case 2198: /* when_clause_list: when_clause_list when_clause */ +#line 14926 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } +#line 46624 "gram.c" break; - case 2199: -#line 14931 "gram.y" /* yacc.c:1652 */ - { + case 2199: /* when_clause: WHEN a_expr THEN a_expr */ +#line 14931 "gram.y" + { CaseWhen *w = makeNode(CaseWhen); w->expr = (Expr *) (yyvsp[-2].node); w->result = (Expr *) (yyvsp[0].node); w->location = (yylsp[-3]); (yyval.node) = (Node *)w; } -#line 46144 "gram.c" /* yacc.c:1652 */ +#line 46636 "gram.c" break; - case 2200: -#line 14941 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 46150 "gram.c" /* yacc.c:1652 */ + case 2200: /* case_default: ELSE a_expr */ +#line 14941 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 46642 "gram.c" break; - case 2201: -#line 14942 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 46156 "gram.c" /* yacc.c:1652 */ + case 2201: /* case_default: %empty */ +#line 14942 "gram.y" + { (yyval.node) = NULL; } +#line 46648 "gram.c" break; - case 2202: -#line 14945 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 46162 "gram.c" /* yacc.c:1652 */ + case 2202: /* case_arg: a_expr */ +#line 14945 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 46654 "gram.c" break; - case 2203: -#line 14946 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 46168 "gram.c" /* yacc.c:1652 */ + case 2203: /* case_arg: %empty */ +#line 14946 "gram.y" + { (yyval.node) = NULL; } +#line 46660 "gram.c" break; - case 2204: -#line 14950 "gram.y" /* yacc.c:1652 */ - { + case 2204: /* columnref: ColId */ +#line 14950 "gram.y" + { (yyval.node) = makeColumnRef((yyvsp[0].str), NIL, (yylsp[0]), yyscanner); } -#line 46176 "gram.c" /* yacc.c:1652 */ +#line 46668 "gram.c" break; - case 2205: -#line 14954 "gram.y" /* yacc.c:1652 */ - { + case 2205: /* columnref: ColId indirection */ +#line 14954 "gram.y" + { (yyval.node) = makeColumnRef((yyvsp[-1].str), (yyvsp[0].list), (yylsp[-1]), yyscanner); } -#line 46184 "gram.c" /* yacc.c:1652 */ +#line 46676 "gram.c" break; - case 2206: -#line 14961 "gram.y" /* yacc.c:1652 */ - { + case 2206: /* indirection_el: '.' attr_name */ +#line 14961 "gram.y" + { (yyval.node) = (Node *) makeString((yyvsp[0].str)); } -#line 46192 "gram.c" /* yacc.c:1652 */ +#line 46684 "gram.c" break; - case 2207: -#line 14965 "gram.y" /* yacc.c:1652 */ - { + case 2207: /* indirection_el: '.' '*' */ +#line 14965 "gram.y" + { (yyval.node) = (Node *) makeNode(A_Star); } -#line 46200 "gram.c" /* yacc.c:1652 */ +#line 46692 "gram.c" break; - case 2208: -#line 14969 "gram.y" /* yacc.c:1652 */ - { + case 2208: /* indirection_el: '[' a_expr ']' */ +#line 14969 "gram.y" + { A_Indices *ai = makeNode(A_Indices); ai->is_slice = false; ai->lidx = NULL; ai->uidx = (yyvsp[-1].node); (yyval.node) = (Node *) ai; } -#line 46212 "gram.c" /* yacc.c:1652 */ +#line 46704 "gram.c" break; - case 2209: -#line 14977 "gram.y" /* yacc.c:1652 */ - { + case 2209: /* indirection_el: '[' opt_slice_bound ':' opt_slice_bound ']' */ +#line 14977 "gram.y" + { A_Indices *ai = makeNode(A_Indices); ai->is_slice = true; ai->lidx = (yyvsp[-3].node); ai->uidx = (yyvsp[-1].node); (yyval.node) = (Node *) ai; } -#line 46224 "gram.c" /* yacc.c:1652 */ +#line 46716 "gram.c" break; - case 2210: -#line 14987 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = (yyvsp[0].node); } -#line 46230 "gram.c" /* yacc.c:1652 */ + case 2210: /* opt_slice_bound: a_expr */ +#line 14987 "gram.y" + { (yyval.node) = (yyvsp[0].node); } +#line 46722 "gram.c" break; - case 2211: -#line 14988 "gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 46236 "gram.c" /* yacc.c:1652 */ + case 2211: /* opt_slice_bound: %empty */ +#line 14988 "gram.y" + { (yyval.node) = NULL; } +#line 46728 "gram.c" break; - case 2212: -#line 14992 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].node)); } -#line 46242 "gram.c" /* yacc.c:1652 */ + case 2212: /* indirection: indirection_el */ +#line 14992 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].node)); } +#line 46734 "gram.c" break; - case 2213: -#line 14993 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } -#line 46248 "gram.c" /* yacc.c:1652 */ + case 2213: /* indirection: indirection indirection_el */ +#line 14993 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } +#line 46740 "gram.c" break; - case 2214: -#line 14997 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 46254 "gram.c" /* yacc.c:1652 */ + case 2214: /* opt_indirection: %empty */ +#line 14997 "gram.y" + { (yyval.list) = NIL; } +#line 46746 "gram.c" break; - case 2215: -#line 14998 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } -#line 46260 "gram.c" /* yacc.c:1652 */ + case 2215: /* opt_indirection: opt_indirection indirection_el */ +#line 14998 "gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].node)); } +#line 46752 "gram.c" break; - case 2218: -#line 15012 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[0].list); } -#line 46266 "gram.c" /* yacc.c:1652 */ + case 2218: /* opt_target_list: target_list */ +#line 15012 "gram.y" + { (yyval.list) = (yyvsp[0].list); } +#line 46758 "gram.c" break; - case 2219: -#line 15013 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 46272 "gram.c" /* yacc.c:1652 */ + case 2219: /* opt_target_list: %empty */ +#line 15013 "gram.y" + { (yyval.list) = NIL; } +#line 46764 "gram.c" break; - case 2220: -#line 15017 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].target)); } -#line 46278 "gram.c" /* yacc.c:1652 */ + case 2220: /* target_list: target_el */ +#line 15017 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].target)); } +#line 46770 "gram.c" break; - case 2221: -#line 15018 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].target)); } -#line 46284 "gram.c" /* yacc.c:1652 */ + case 2221: /* target_list: target_list ',' target_el */ +#line 15018 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].target)); } +#line 46776 "gram.c" break; - case 2222: -#line 15022 "gram.y" /* yacc.c:1652 */ - { + case 2222: /* target_el: a_expr AS ColLabel */ +#line 15022 "gram.y" + { (yyval.target) = makeNode(ResTarget); (yyval.target)->name = (yyvsp[0].str); (yyval.target)->indirection = NIL; (yyval.target)->val = (Node *)(yyvsp[-2].node); (yyval.target)->location = (yylsp[-2]); } -#line 46296 "gram.c" /* yacc.c:1652 */ +#line 46788 "gram.c" break; - case 2223: -#line 15030 "gram.y" /* yacc.c:1652 */ - { + case 2223: /* target_el: a_expr BareColLabel */ +#line 15030 "gram.y" + { (yyval.target) = makeNode(ResTarget); (yyval.target)->name = (yyvsp[0].str); (yyval.target)->indirection = NIL; (yyval.target)->val = (Node *)(yyvsp[-1].node); (yyval.target)->location = (yylsp[-1]); } -#line 46308 "gram.c" /* yacc.c:1652 */ +#line 46800 "gram.c" break; - case 2224: -#line 15038 "gram.y" /* yacc.c:1652 */ - { + case 2224: /* target_el: a_expr */ +#line 15038 "gram.y" + { (yyval.target) = makeNode(ResTarget); (yyval.target)->name = NULL; (yyval.target)->indirection = NIL; (yyval.target)->val = (Node *)(yyvsp[0].node); (yyval.target)->location = (yylsp[0]); } -#line 46320 "gram.c" /* yacc.c:1652 */ +#line 46812 "gram.c" break; - case 2225: -#line 15046 "gram.y" /* yacc.c:1652 */ - { + case 2225: /* target_el: '*' */ +#line 15046 "gram.y" + { ColumnRef *n = makeNode(ColumnRef); n->fields = list_make1(makeNode(A_Star)); n->location = (yylsp[0]); @@ -46332,32 +46824,32 @@ yyreduce: (yyval.target)->val = (Node *)n; (yyval.target)->location = (yylsp[0]); } -#line 46336 "gram.c" /* yacc.c:1652 */ +#line 46828 "gram.c" break; - case 2226: -#line 15067 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].range)); } -#line 46342 "gram.c" /* yacc.c:1652 */ + case 2226: /* qualified_name_list: qualified_name */ +#line 15067 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].range)); } +#line 46834 "gram.c" break; - case 2227: -#line 15068 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].range)); } -#line 46348 "gram.c" /* yacc.c:1652 */ + case 2227: /* qualified_name_list: qualified_name_list ',' qualified_name */ +#line 15068 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].range)); } +#line 46840 "gram.c" break; - case 2228: -#line 15080 "gram.y" /* yacc.c:1652 */ - { + case 2228: /* qualified_name: ColId */ +#line 15080 "gram.y" + { (yyval.range) = makeRangeVar(NULL, (yyvsp[0].str), (yylsp[0])); } -#line 46356 "gram.c" /* yacc.c:1652 */ +#line 46848 "gram.c" break; - case 2229: -#line 15084 "gram.y" /* yacc.c:1652 */ - { + case 2229: /* qualified_name: ColId indirection */ +#line 15084 "gram.y" + { check_qualified_name((yyvsp[0].list), yyscanner); (yyval.range) = makeRangeVar(NULL, NULL, (yylsp[-1])); switch (list_length((yyvsp[0].list))) @@ -46381,89 +46873,89 @@ yyreduce: break; } } -#line 46385 "gram.c" /* yacc.c:1652 */ +#line 46877 "gram.c" break; - case 2230: -#line 15111 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } -#line 46391 "gram.c" /* yacc.c:1652 */ + case 2230: /* name_list: name */ +#line 15111 "gram.y" + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } +#line 46883 "gram.c" break; - case 2231: -#line 15113 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), makeString((yyvsp[0].str))); } -#line 46397 "gram.c" /* yacc.c:1652 */ + case 2231: /* name_list: name_list ',' name */ +#line 15113 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), makeString((yyvsp[0].str))); } +#line 46889 "gram.c" break; - case 2232: -#line 15117 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 46403 "gram.c" /* yacc.c:1652 */ + case 2232: /* name: ColId */ +#line 15117 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 46895 "gram.c" break; - case 2233: -#line 15119 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 46409 "gram.c" /* yacc.c:1652 */ + case 2233: /* attr_name: ColLabel */ +#line 15119 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 46901 "gram.c" break; - case 2234: -#line 15121 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 46415 "gram.c" /* yacc.c:1652 */ + case 2234: /* file_name: Sconst */ +#line 15121 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 46907 "gram.c" break; - case 2235: -#line 15132 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } -#line 46421 "gram.c" /* yacc.c:1652 */ + case 2235: /* func_name: type_function_name */ +#line 15132 "gram.y" + { (yyval.list) = list_make1(makeString((yyvsp[0].str))); } +#line 46913 "gram.c" break; - case 2236: -#line 15134 "gram.y" /* yacc.c:1652 */ - { + case 2236: /* func_name: ColId indirection */ +#line 15134 "gram.y" + { (yyval.list) = check_func_name(lcons(makeString((yyvsp[-1].str)), (yyvsp[0].list)), yyscanner); } -#line 46430 "gram.c" /* yacc.c:1652 */ +#line 46922 "gram.c" break; - case 2237: -#line 15145 "gram.y" /* yacc.c:1652 */ - { + case 2237: /* AexprConst: Iconst */ +#line 15145 "gram.y" + { (yyval.node) = makeIntConst((yyvsp[0].ival), (yylsp[0])); } -#line 46438 "gram.c" /* yacc.c:1652 */ +#line 46930 "gram.c" break; - case 2238: -#line 15149 "gram.y" /* yacc.c:1652 */ - { + case 2238: /* AexprConst: FCONST */ +#line 15149 "gram.y" + { (yyval.node) = makeFloatConst((yyvsp[0].str), (yylsp[0])); } -#line 46446 "gram.c" /* yacc.c:1652 */ +#line 46938 "gram.c" break; - case 2239: -#line 15153 "gram.y" /* yacc.c:1652 */ - { + case 2239: /* AexprConst: Sconst */ +#line 15153 "gram.y" + { (yyval.node) = makeStringConst((yyvsp[0].str), (yylsp[0])); } -#line 46454 "gram.c" /* yacc.c:1652 */ +#line 46946 "gram.c" break; - case 2240: -#line 15157 "gram.y" /* yacc.c:1652 */ - { + case 2240: /* AexprConst: BCONST */ +#line 15157 "gram.y" + { (yyval.node) = makeBitStringConst((yyvsp[0].str), (yylsp[0])); } -#line 46462 "gram.c" /* yacc.c:1652 */ +#line 46954 "gram.c" break; - case 2241: -#line 15161 "gram.y" /* yacc.c:1652 */ - { + case 2241: /* AexprConst: XCONST */ +#line 15161 "gram.y" + { /* This is a bit constant per SQL99: * Without Feature F511, "BIT data type", * a <general literal> shall not be a @@ -46471,23 +46963,23 @@ yyreduce: */ (yyval.node) = makeBitStringConst((yyvsp[0].str), (yylsp[0])); } -#line 46475 "gram.c" /* yacc.c:1652 */ +#line 46967 "gram.c" break; - case 2242: -#line 15170 "gram.y" /* yacc.c:1652 */ - { + case 2242: /* AexprConst: func_name Sconst */ +#line 15170 "gram.y" + { /* generic type 'literal' syntax */ TypeName *t = makeTypeNameFromNameList((yyvsp[-1].list)); t->location = (yylsp[-1]); (yyval.node) = makeStringConstCast((yyvsp[0].str), (yylsp[0]), t); } -#line 46486 "gram.c" /* yacc.c:1652 */ +#line 46978 "gram.c" break; - case 2243: -#line 15177 "gram.y" /* yacc.c:1652 */ - { + case 2243: /* AexprConst: func_name '(' func_arg_list opt_sort_clause ')' Sconst */ +#line 15177 "gram.y" + { /* generic syntax with a type modifier */ TypeName *t = makeTypeNameFromNameList((yyvsp[-5].list)); ListCell *lc; @@ -46518,95 +47010,95 @@ yyreduce: t->location = (yylsp[-5]); (yyval.node) = makeStringConstCast((yyvsp[0].str), (yylsp[0]), t); } -#line 46522 "gram.c" /* yacc.c:1652 */ +#line 47014 "gram.c" break; - case 2244: -#line 15209 "gram.y" /* yacc.c:1652 */ - { + case 2244: /* AexprConst: ConstTypename Sconst */ +#line 15209 "gram.y" + { (yyval.node) = makeStringConstCast((yyvsp[0].str), (yylsp[0]), (yyvsp[-1].typnam)); } -#line 46530 "gram.c" /* yacc.c:1652 */ +#line 47022 "gram.c" break; - case 2245: -#line 15213 "gram.y" /* yacc.c:1652 */ - { + case 2245: /* AexprConst: ConstInterval Sconst opt_interval */ +#line 15213 "gram.y" + { TypeName *t = (yyvsp[-2].typnam); t->typmods = (yyvsp[0].list); (yyval.node) = makeStringConstCast((yyvsp[-1].str), (yylsp[-1]), t); } -#line 46540 "gram.c" /* yacc.c:1652 */ +#line 47032 "gram.c" break; - case 2246: -#line 15219 "gram.y" /* yacc.c:1652 */ - { + case 2246: /* AexprConst: ConstInterval '(' Iconst ')' Sconst */ +#line 15219 "gram.y" + { TypeName *t = (yyvsp[-4].typnam); t->typmods = list_make2(makeIntConst(INTERVAL_FULL_RANGE, -1), makeIntConst((yyvsp[-2].ival), (yylsp[-2]))); (yyval.node) = makeStringConstCast((yyvsp[0].str), (yylsp[0]), t); } -#line 46551 "gram.c" /* yacc.c:1652 */ +#line 47043 "gram.c" break; - case 2247: -#line 15226 "gram.y" /* yacc.c:1652 */ - { + case 2247: /* AexprConst: TRUE_P */ +#line 15226 "gram.y" + { (yyval.node) = makeBoolAConst(true, (yylsp[0])); } -#line 46559 "gram.c" /* yacc.c:1652 */ +#line 47051 "gram.c" break; - case 2248: -#line 15230 "gram.y" /* yacc.c:1652 */ - { + case 2248: /* AexprConst: FALSE_P */ +#line 15230 "gram.y" + { (yyval.node) = makeBoolAConst(false, (yylsp[0])); } -#line 46567 "gram.c" /* yacc.c:1652 */ +#line 47059 "gram.c" break; - case 2249: -#line 15234 "gram.y" /* yacc.c:1652 */ - { + case 2249: /* AexprConst: NULL_P */ +#line 15234 "gram.y" + { (yyval.node) = makeNullAConst((yylsp[0])); } -#line 46575 "gram.c" /* yacc.c:1652 */ +#line 47067 "gram.c" break; - case 2250: -#line 15239 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = (yyvsp[0].ival); } -#line 46581 "gram.c" /* yacc.c:1652 */ + case 2250: /* Iconst: ICONST */ +#line 15239 "gram.y" + { (yyval.ival) = (yyvsp[0].ival); } +#line 47073 "gram.c" break; - case 2251: -#line 15240 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 46587 "gram.c" /* yacc.c:1652 */ + case 2251: /* Sconst: SCONST */ +#line 15240 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 47079 "gram.c" break; - case 2252: -#line 15242 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = (yyvsp[0].ival); } -#line 46593 "gram.c" /* yacc.c:1652 */ + case 2252: /* SignedIconst: Iconst */ +#line 15242 "gram.y" + { (yyval.ival) = (yyvsp[0].ival); } +#line 47085 "gram.c" break; - case 2253: -#line 15243 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = + (yyvsp[0].ival); } -#line 46599 "gram.c" /* yacc.c:1652 */ + case 2253: /* SignedIconst: '+' Iconst */ +#line 15243 "gram.y" + { (yyval.ival) = + (yyvsp[0].ival); } +#line 47091 "gram.c" break; - case 2254: -#line 15244 "gram.y" /* yacc.c:1652 */ - { (yyval.ival) = - (yyvsp[0].ival); } -#line 46605 "gram.c" /* yacc.c:1652 */ + case 2254: /* SignedIconst: '-' Iconst */ +#line 15244 "gram.y" + { (yyval.ival) = - (yyvsp[0].ival); } +#line 47097 "gram.c" break; - case 2255: -#line 15249 "gram.y" /* yacc.c:1652 */ - { + case 2255: /* RoleId: RoleSpec */ +#line 15249 "gram.y" + { RoleSpec *spc = (RoleSpec *) (yyvsp[0].rolespec); switch (spc->roletype) { @@ -46643,12 +47135,12 @@ yyreduce: break; } } -#line 46647 "gram.c" /* yacc.c:1652 */ +#line 47139 "gram.c" break; - case 2256: -#line 15289 "gram.y" /* yacc.c:1652 */ - { + case 2256: /* RoleSpec: NonReservedWord */ +#line 15289 "gram.y" + { /* * "public" and "none" are not keywords, but they must * be treated specially here. @@ -46674,48 +47166,48 @@ yyreduce: } (yyval.rolespec) = n; } -#line 46678 "gram.c" /* yacc.c:1652 */ +#line 47170 "gram.c" break; - case 2257: -#line 15316 "gram.y" /* yacc.c:1652 */ - { + case 2257: /* RoleSpec: CURRENT_ROLE */ +#line 15316 "gram.y" + { (yyval.rolespec) = makeRoleSpec(ROLESPEC_CURRENT_ROLE, (yylsp[0])); } -#line 46686 "gram.c" /* yacc.c:1652 */ +#line 47178 "gram.c" break; - case 2258: -#line 15320 "gram.y" /* yacc.c:1652 */ - { + case 2258: /* RoleSpec: CURRENT_USER */ +#line 15320 "gram.y" + { (yyval.rolespec) = makeRoleSpec(ROLESPEC_CURRENT_USER, (yylsp[0])); } -#line 46694 "gram.c" /* yacc.c:1652 */ +#line 47186 "gram.c" break; - case 2259: -#line 15324 "gram.y" /* yacc.c:1652 */ - { + case 2259: /* RoleSpec: SESSION_USER */ +#line 15324 "gram.y" + { (yyval.rolespec) = makeRoleSpec(ROLESPEC_SESSION_USER, (yylsp[0])); } -#line 46702 "gram.c" /* yacc.c:1652 */ +#line 47194 "gram.c" break; - case 2260: -#line 15330 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].rolespec)); } -#line 46708 "gram.c" /* yacc.c:1652 */ + case 2260: /* role_list: RoleSpec */ +#line 15330 "gram.y" + { (yyval.list) = list_make1((yyvsp[0].rolespec)); } +#line 47200 "gram.c" break; - case 2261: -#line 15332 "gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].rolespec)); } -#line 46714 "gram.c" /* yacc.c:1652 */ + case 2261: /* role_list: role_list ',' RoleSpec */ +#line 15332 "gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].rolespec)); } +#line 47206 "gram.c" break; - case 2262: -#line 15349 "gram.y" /* yacc.c:1652 */ - { + case 2262: /* PLpgSQL_Expr: opt_distinct_clause opt_target_list from_clause where_clause group_clause having_clause window_clause opt_sort_clause opt_select_limit opt_for_locking_clause */ +#line 15349 "gram.y" + { SelectStmt *n = makeNode(SelectStmt); n->distinctClause = (yyvsp[-9].list); @@ -46741,12 +47233,12 @@ yyreduce: n->lockingClause = (yyvsp[0].list); (yyval.node) = (Node *) n; } -#line 46745 "gram.c" /* yacc.c:1652 */ +#line 47237 "gram.c" break; - case 2263: -#line 15382 "gram.y" /* yacc.c:1652 */ - { + case 2263: /* PLAssignStmt: plassign_target opt_indirection plassign_equals PLpgSQL_Expr */ +#line 15382 "gram.y" + { PLAssignStmt *n = makeNode(PLAssignStmt); n->name = (yyvsp[-3].str); @@ -46756,125 +47248,126 @@ yyreduce: n->location = (yylsp[-3]); (yyval.node) = (Node *) n; } -#line 46760 "gram.c" /* yacc.c:1652 */ +#line 47252 "gram.c" break; - case 2264: -#line 15394 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 46766 "gram.c" /* yacc.c:1652 */ + case 2264: /* plassign_target: ColId */ +#line 15394 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 47258 "gram.c" break; - case 2265: -#line 15395 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = psprintf("$%d", (yyvsp[0].ival)); } -#line 46772 "gram.c" /* yacc.c:1652 */ + case 2265: /* plassign_target: PARAM */ +#line 15395 "gram.y" + { (yyval.str) = psprintf("$%d", (yyvsp[0].ival)); } +#line 47264 "gram.c" break; - case 2268: -#line 15416 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 46778 "gram.c" /* yacc.c:1652 */ + case 2268: /* ColId: IDENT */ +#line 15416 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 47270 "gram.c" break; - case 2269: -#line 15417 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 46784 "gram.c" /* yacc.c:1652 */ + case 2269: /* ColId: unreserved_keyword */ +#line 15417 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 47276 "gram.c" break; - case 2270: -#line 15418 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 46790 "gram.c" /* yacc.c:1652 */ + case 2270: /* ColId: col_name_keyword */ +#line 15418 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 47282 "gram.c" break; - case 2271: -#line 15423 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 46796 "gram.c" /* yacc.c:1652 */ + case 2271: /* type_function_name: IDENT */ +#line 15423 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 47288 "gram.c" break; - case 2272: -#line 15424 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 46802 "gram.c" /* yacc.c:1652 */ + case 2272: /* type_function_name: unreserved_keyword */ +#line 15424 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 47294 "gram.c" break; - case 2273: -#line 15425 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 46808 "gram.c" /* yacc.c:1652 */ + case 2273: /* type_function_name: type_func_name_keyword */ +#line 15425 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 47300 "gram.c" break; - case 2274: -#line 15430 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 46814 "gram.c" /* yacc.c:1652 */ + case 2274: /* NonReservedWord: IDENT */ +#line 15430 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 47306 "gram.c" break; - case 2275: -#line 15431 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 46820 "gram.c" /* yacc.c:1652 */ + case 2275: /* NonReservedWord: unreserved_keyword */ +#line 15431 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 47312 "gram.c" break; - case 2276: -#line 15432 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 46826 "gram.c" /* yacc.c:1652 */ + case 2276: /* NonReservedWord: col_name_keyword */ +#line 15432 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 47318 "gram.c" break; - case 2277: -#line 15433 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 46832 "gram.c" /* yacc.c:1652 */ + case 2277: /* NonReservedWord: type_func_name_keyword */ +#line 15433 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 47324 "gram.c" break; - case 2278: -#line 15439 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 46838 "gram.c" /* yacc.c:1652 */ + case 2278: /* ColLabel: IDENT */ +#line 15439 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 47330 "gram.c" break; - case 2279: -#line 15440 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 46844 "gram.c" /* yacc.c:1652 */ + case 2279: /* ColLabel: unreserved_keyword */ +#line 15440 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 47336 "gram.c" break; - case 2280: -#line 15441 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 46850 "gram.c" /* yacc.c:1652 */ + case 2280: /* ColLabel: col_name_keyword */ +#line 15441 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 47342 "gram.c" break; - case 2281: -#line 15442 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 46856 "gram.c" /* yacc.c:1652 */ + case 2281: /* ColLabel: type_func_name_keyword */ +#line 15442 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 47348 "gram.c" break; - case 2282: -#line 15443 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 46862 "gram.c" /* yacc.c:1652 */ + case 2282: /* ColLabel: reserved_keyword */ +#line 15443 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 47354 "gram.c" break; - case 2283: -#line 15449 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 46868 "gram.c" /* yacc.c:1652 */ + case 2283: /* BareColLabel: IDENT */ +#line 15449 "gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 47360 "gram.c" break; - case 2284: -#line 15450 "gram.y" /* yacc.c:1652 */ - { (yyval.str) = pstrdup((yyvsp[0].keyword)); } -#line 46874 "gram.c" /* yacc.c:1652 */ + case 2284: /* BareColLabel: bare_label_keyword */ +#line 15450 "gram.y" + { (yyval.str) = pstrdup((yyvsp[0].keyword)); } +#line 47366 "gram.c" break; -#line 46878 "gram.c" /* yacc.c:1652 */ +#line 47370 "gram.c" + default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -46888,11 +47381,10 @@ yyreduce: case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; *++yylsp = yyloc; @@ -46917,50 +47409,15 @@ yyreduce: yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; -#if ! YYERROR_VERBOSE yyerror (&yylloc, yyscanner, YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (&yylloc, yyscanner, yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif } yyerror_range[1] = yylloc; - if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an @@ -47009,13 +47466,14 @@ yyerrorlab: yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ + /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { yyn = yytable[yyn]; if (0 < yyn) @@ -47029,7 +47487,7 @@ yyerrlab1: yyerror_range[1] = *yylsp; yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp, yyscanner); + YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, yyscanner); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -47040,13 +47498,11 @@ yyerrlab1: YY_IGNORE_MAYBE_UNINITIALIZED_END yyerror_range[2] = yylloc; - /* Using YYLLOC is tempting, but would change the location of - the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, yyerror_range, 2); - *++yylsp = yyloc; + ++yylsp; + YYLLOC_DEFAULT (*yylsp, yyerror_range, 2); /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -47068,20 +47524,20 @@ yyabortlab: goto yyreturn; -#if !defined yyoverflow || YYERROR_VERBOSE +#if !defined yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (&yylloc, yyscanner, YY_("memory exhausted")); yyresult = 2; - /* Fall through. */ + goto yyreturn; #endif -/*-----------------------------------------------------. -| yyreturn -- parsing is finished, return the result. | -`-----------------------------------------------------*/ +/*-------------------------------------------------------. +| yyreturn -- parsing is finished, clean up and return. | +`-------------------------------------------------------*/ yyreturn: if (yychar != YYEMPTY) { @@ -47098,20 +47554,18 @@ yyreturn: while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp, yyscanner); + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, yyscanner); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif + return yyresult; } -#line 16394 "gram.y" /* yacc.c:1918 */ + +#line 16394 "gram.y" /* diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/parser/gram.h b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/parser/gram.h index 8c326a5ed62..a46a80021d9 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/parser/gram.h +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/parser/gram.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.3.2. */ +/* A Bison parser, made by GNU Bison 3.7.5. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -31,8 +31,9 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -/* Undocumented macros, especially those whose name start with YY_, - are private implementation details. Do not rely on them. */ +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ #ifndef YY_BASE_YY_GRAM_H_INCLUDED # define YY_BASE_YY_GRAM_H_INCLUDED @@ -44,503 +45,507 @@ extern int base_yydebug; #endif -/* Token type. */ +/* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { - IDENT = 258, - UIDENT = 259, - FCONST = 260, - SCONST = 261, - USCONST = 262, - BCONST = 263, - XCONST = 264, - Op = 265, - ICONST = 266, - PARAM = 267, - TYPECAST = 268, - DOT_DOT = 269, - COLON_EQUALS = 270, - EQUALS_GREATER = 271, - LESS_EQUALS = 272, - GREATER_EQUALS = 273, - NOT_EQUALS = 274, - ABORT_P = 275, - ABSOLUTE_P = 276, - ACCESS = 277, - ACTION = 278, - ADD_P = 279, - ADMIN = 280, - AFTER = 281, - AGGREGATE = 282, - ALL = 283, - ALSO = 284, - ALTER = 285, - ALWAYS = 286, - ANALYSE = 287, - ANALYZE = 288, - AND = 289, - ANY = 290, - ARRAY = 291, - AS = 292, - ASC = 293, - ASENSITIVE = 294, - ASSERTION = 295, - ASSIGNMENT = 296, - ASYMMETRIC = 297, - ATOMIC = 298, - AT = 299, - ATTACH = 300, - ATTRIBUTE = 301, - AUTHORIZATION = 302, - BACKWARD = 303, - BEFORE = 304, - BEGIN_P = 305, - BETWEEN = 306, - BIGINT = 307, - BINARY = 308, - BIT = 309, - BOOLEAN_P = 310, - BOTH = 311, - BREADTH = 312, - BY = 313, - CACHE = 314, - CALL = 315, - CALLED = 316, - CASCADE = 317, - CASCADED = 318, - CASE = 319, - CAST = 320, - CATALOG_P = 321, - CHAIN = 322, - CHAR_P = 323, - CHARACTER = 324, - CHARACTERISTICS = 325, - CHECK = 326, - CHECKPOINT = 327, - CLASS = 328, - CLOSE = 329, - CLUSTER = 330, - COALESCE = 331, - COLLATE = 332, - COLLATION = 333, - COLUMN = 334, - COLUMNS = 335, - COMMENT = 336, - COMMENTS = 337, - COMMIT = 338, - COMMITTED = 339, - COMPRESSION = 340, - CONCURRENTLY = 341, - CONFIGURATION = 342, - CONFLICT = 343, - CONNECTION = 344, - CONSTRAINT = 345, - CONSTRAINTS = 346, - CONTENT_P = 347, - CONTINUE_P = 348, - CONVERSION_P = 349, - COPY = 350, - COST = 351, - CREATE = 352, - CROSS = 353, - CSV = 354, - CUBE = 355, - CURRENT_P = 356, - CURRENT_CATALOG = 357, - CURRENT_DATE = 358, - CURRENT_ROLE = 359, - CURRENT_SCHEMA = 360, - CURRENT_TIME = 361, - CURRENT_TIMESTAMP = 362, - CURRENT_USER = 363, - CURSOR = 364, - CYCLE = 365, - DATA_P = 366, - DATABASE = 367, - DAY_P = 368, - DEALLOCATE = 369, - DEC = 370, - DECIMAL_P = 371, - DECLARE = 372, - DEFAULT = 373, - DEFAULTS = 374, - DEFERRABLE = 375, - DEFERRED = 376, - DEFINER = 377, - DELETE_P = 378, - DELIMITER = 379, - DELIMITERS = 380, - DEPENDS = 381, - DEPTH = 382, - DESC = 383, - DETACH = 384, - DICTIONARY = 385, - DISABLE_P = 386, - DISCARD = 387, - DISTINCT = 388, - DO = 389, - DOCUMENT_P = 390, - DOMAIN_P = 391, - DOUBLE_P = 392, - DROP = 393, - EACH = 394, - ELSE = 395, - ENABLE_P = 396, - ENCODING = 397, - ENCRYPTED = 398, - END_P = 399, - ENUM_P = 400, - ESCAPE = 401, - EVENT = 402, - EXCEPT = 403, - EXCLUDE = 404, - EXCLUDING = 405, - EXCLUSIVE = 406, - EXECUTE = 407, - EXISTS = 408, - EXPLAIN = 409, - EXPRESSION = 410, - EXTENSION = 411, - EXTERNAL = 412, - EXTRACT = 413, - FALSE_P = 414, - FAMILY = 415, - FETCH = 416, - FILTER = 417, - FINALIZE = 418, - FIRST_P = 419, - FLOAT_P = 420, - FOLLOWING = 421, - FOR = 422, - FORCE = 423, - FOREIGN = 424, - FORWARD = 425, - FREEZE = 426, - FROM = 427, - FULL = 428, - FUNCTION = 429, - FUNCTIONS = 430, - GENERATED = 431, - GLOBAL = 432, - GRANT = 433, - GRANTED = 434, - GREATEST = 435, - GROUP_P = 436, - GROUPING = 437, - GROUPS = 438, - HANDLER = 439, - HAVING = 440, - HEADER_P = 441, - HOLD = 442, - HOUR_P = 443, - IDENTITY_P = 444, - IF_P = 445, - ILIKE = 446, - IMMEDIATE = 447, - IMMUTABLE = 448, - IMPLICIT_P = 449, - IMPORT_P = 450, - IN_P = 451, - INCLUDE = 452, - INCLUDING = 453, - INCREMENT = 454, - INDEX = 455, - INDEXES = 456, - INHERIT = 457, - INHERITS = 458, - INITIALLY = 459, - INLINE_P = 460, - INNER_P = 461, - INOUT = 462, - INPUT_P = 463, - INSENSITIVE = 464, - INSERT = 465, - INSTEAD = 466, - INT_P = 467, - INTEGER = 468, - INTERSECT = 469, - INTERVAL = 470, - INTO = 471, - INVOKER = 472, - IS = 473, - ISNULL = 474, - ISOLATION = 475, - JOIN = 476, - KEY = 477, - LABEL = 478, - LANGUAGE = 479, - LARGE_P = 480, - LAST_P = 481, - LATERAL_P = 482, - LEADING = 483, - LEAKPROOF = 484, - LEAST = 485, - LEFT = 486, - LEVEL = 487, - LIKE = 488, - LIMIT = 489, - LISTEN = 490, - LOAD = 491, - LOCAL = 492, - LOCALTIME = 493, - LOCALTIMESTAMP = 494, - LOCATION = 495, - LOCK_P = 496, - LOCKED = 497, - LOGGED = 498, - MAPPING = 499, - MATCH = 500, - MATERIALIZED = 501, - MAXVALUE = 502, - METHOD = 503, - MINUTE_P = 504, - MINVALUE = 505, - MODE = 506, - MONTH_P = 507, - MOVE = 508, - NAME_P = 509, - NAMES = 510, - NATIONAL = 511, - NATURAL = 512, - NCHAR = 513, - NEW = 514, - NEXT = 515, - NFC = 516, - NFD = 517, - NFKC = 518, - NFKD = 519, - NO = 520, - NONE = 521, - NORMALIZE = 522, - NORMALIZED = 523, - NOT = 524, - NOTHING = 525, - NOTIFY = 526, - NOTNULL = 527, - NOWAIT = 528, - NULL_P = 529, - NULLIF = 530, - NULLS_P = 531, - NUMERIC = 532, - OBJECT_P = 533, - OF = 534, - OFF = 535, - OFFSET = 536, - OIDS = 537, - OLD = 538, - ON = 539, - ONLY = 540, - OPERATOR = 541, - OPTION = 542, - OPTIONS = 543, - OR = 544, - ORDER = 545, - ORDINALITY = 546, - OTHERS = 547, - OUT_P = 548, - OUTER_P = 549, - OVER = 550, - OVERLAPS = 551, - OVERLAY = 552, - OVERRIDING = 553, - OWNED = 554, - OWNER = 555, - PARALLEL = 556, - PARSER = 557, - PARTIAL = 558, - PARTITION = 559, - PASSING = 560, - PASSWORD = 561, - PLACING = 562, - PLANS = 563, - POLICY = 564, - POSITION = 565, - PRECEDING = 566, - PRECISION = 567, - PRESERVE = 568, - PREPARE = 569, - PREPARED = 570, - PRIMARY = 571, - PRIOR = 572, - PRIVILEGES = 573, - PROCEDURAL = 574, - PROCEDURE = 575, - PROCEDURES = 576, - PROGRAM = 577, - PUBLICATION = 578, - QUOTE = 579, - RANGE = 580, - READ = 581, - REAL = 582, - REASSIGN = 583, - RECHECK = 584, - RECURSIVE = 585, - REF = 586, - REFERENCES = 587, - REFERENCING = 588, - REFRESH = 589, - REINDEX = 590, - RELATIVE_P = 591, - RELEASE = 592, - RENAME = 593, - REPEATABLE = 594, - REPLACE = 595, - REPLICA = 596, - RESET = 597, - RESTART = 598, - RESTRICT = 599, - RETURN = 600, - RETURNING = 601, - RETURNS = 602, - REVOKE = 603, - RIGHT = 604, - ROLE = 605, - ROLLBACK = 606, - ROLLUP = 607, - ROUTINE = 608, - ROUTINES = 609, - ROW = 610, - ROWS = 611, - RULE = 612, - SAVEPOINT = 613, - SCHEMA = 614, - SCHEMAS = 615, - SCROLL = 616, - SEARCH = 617, - SECOND_P = 618, - SECURITY = 619, - SELECT = 620, - SEQUENCE = 621, - SEQUENCES = 622, - SERIALIZABLE = 623, - SERVER = 624, - SESSION = 625, - SESSION_USER = 626, - SET = 627, - SETS = 628, - SETOF = 629, - SHARE = 630, - SHOW = 631, - SIMILAR = 632, - SIMPLE = 633, - SKIP = 634, - SMALLINT = 635, - SNAPSHOT = 636, - SOME = 637, - SQL_P = 638, - STABLE = 639, - STANDALONE_P = 640, - START = 641, - STATEMENT = 642, - STATISTICS = 643, - STDIN = 644, - STDOUT = 645, - STORAGE = 646, - STORED = 647, - STRICT_P = 648, - STRIP_P = 649, - SUBSCRIPTION = 650, - SUBSTRING = 651, - SUPPORT = 652, - SYMMETRIC = 653, - SYSID = 654, - SYSTEM_P = 655, - TABLE = 656, - TABLES = 657, - TABLESAMPLE = 658, - TABLESPACE = 659, - TEMP = 660, - TEMPLATE = 661, - TEMPORARY = 662, - TEXT_P = 663, - THEN = 664, - TIES = 665, - TIME = 666, - TIMESTAMP = 667, - TO = 668, - TRAILING = 669, - TRANSACTION = 670, - TRANSFORM = 671, - TREAT = 672, - TRIGGER = 673, - TRIM = 674, - TRUE_P = 675, - TRUNCATE = 676, - TRUSTED = 677, - TYPE_P = 678, - TYPES_P = 679, - UESCAPE = 680, - UNBOUNDED = 681, - UNCOMMITTED = 682, - UNENCRYPTED = 683, - UNION = 684, - UNIQUE = 685, - UNKNOWN = 686, - UNLISTEN = 687, - UNLOGGED = 688, - UNTIL = 689, - UPDATE = 690, - USER = 691, - USING = 692, - VACUUM = 693, - VALID = 694, - VALIDATE = 695, - VALIDATOR = 696, - VALUE_P = 697, - VALUES = 698, - VARCHAR = 699, - VARIADIC = 700, - VARYING = 701, - VERBOSE = 702, - VERSION_P = 703, - VIEW = 704, - VIEWS = 705, - VOLATILE = 706, - WHEN = 707, - WHERE = 708, - WHITESPACE_P = 709, - WINDOW = 710, - WITH = 711, - WITHIN = 712, - WITHOUT = 713, - WORK = 714, - WRAPPER = 715, - WRITE = 716, - XML_P = 717, - XMLATTRIBUTES = 718, - XMLCONCAT = 719, - XMLELEMENT = 720, - XMLEXISTS = 721, - XMLFOREST = 722, - XMLNAMESPACES = 723, - XMLPARSE = 724, - XMLPI = 725, - XMLROOT = 726, - XMLSERIALIZE = 727, - XMLTABLE = 728, - YEAR_P = 729, - YES_P = 730, - ZONE = 731, - NOT_LA = 732, - NULLS_LA = 733, - WITH_LA = 734, - MODE_TYPE_NAME = 735, - MODE_PLPGSQL_EXPR = 736, - MODE_PLPGSQL_ASSIGN1 = 737, - MODE_PLPGSQL_ASSIGN2 = 738, - MODE_PLPGSQL_ASSIGN3 = 739, - UMINUS = 740 + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + IDENT = 258, /* IDENT */ + UIDENT = 259, /* UIDENT */ + FCONST = 260, /* FCONST */ + SCONST = 261, /* SCONST */ + USCONST = 262, /* USCONST */ + BCONST = 263, /* BCONST */ + XCONST = 264, /* XCONST */ + Op = 265, /* Op */ + ICONST = 266, /* ICONST */ + PARAM = 267, /* PARAM */ + TYPECAST = 268, /* TYPECAST */ + DOT_DOT = 269, /* DOT_DOT */ + COLON_EQUALS = 270, /* COLON_EQUALS */ + EQUALS_GREATER = 271, /* EQUALS_GREATER */ + LESS_EQUALS = 272, /* LESS_EQUALS */ + GREATER_EQUALS = 273, /* GREATER_EQUALS */ + NOT_EQUALS = 274, /* NOT_EQUALS */ + ABORT_P = 275, /* ABORT_P */ + ABSOLUTE_P = 276, /* ABSOLUTE_P */ + ACCESS = 277, /* ACCESS */ + ACTION = 278, /* ACTION */ + ADD_P = 279, /* ADD_P */ + ADMIN = 280, /* ADMIN */ + AFTER = 281, /* AFTER */ + AGGREGATE = 282, /* AGGREGATE */ + ALL = 283, /* ALL */ + ALSO = 284, /* ALSO */ + ALTER = 285, /* ALTER */ + ALWAYS = 286, /* ALWAYS */ + ANALYSE = 287, /* ANALYSE */ + ANALYZE = 288, /* ANALYZE */ + AND = 289, /* AND */ + ANY = 290, /* ANY */ + ARRAY = 291, /* ARRAY */ + AS = 292, /* AS */ + ASC = 293, /* ASC */ + ASENSITIVE = 294, /* ASENSITIVE */ + ASSERTION = 295, /* ASSERTION */ + ASSIGNMENT = 296, /* ASSIGNMENT */ + ASYMMETRIC = 297, /* ASYMMETRIC */ + ATOMIC = 298, /* ATOMIC */ + AT = 299, /* AT */ + ATTACH = 300, /* ATTACH */ + ATTRIBUTE = 301, /* ATTRIBUTE */ + AUTHORIZATION = 302, /* AUTHORIZATION */ + BACKWARD = 303, /* BACKWARD */ + BEFORE = 304, /* BEFORE */ + BEGIN_P = 305, /* BEGIN_P */ + BETWEEN = 306, /* BETWEEN */ + BIGINT = 307, /* BIGINT */ + BINARY = 308, /* BINARY */ + BIT = 309, /* BIT */ + BOOLEAN_P = 310, /* BOOLEAN_P */ + BOTH = 311, /* BOTH */ + BREADTH = 312, /* BREADTH */ + BY = 313, /* BY */ + CACHE = 314, /* CACHE */ + CALL = 315, /* CALL */ + CALLED = 316, /* CALLED */ + CASCADE = 317, /* CASCADE */ + CASCADED = 318, /* CASCADED */ + CASE = 319, /* CASE */ + CAST = 320, /* CAST */ + CATALOG_P = 321, /* CATALOG_P */ + CHAIN = 322, /* CHAIN */ + CHAR_P = 323, /* CHAR_P */ + CHARACTER = 324, /* CHARACTER */ + CHARACTERISTICS = 325, /* CHARACTERISTICS */ + CHECK = 326, /* CHECK */ + CHECKPOINT = 327, /* CHECKPOINT */ + CLASS = 328, /* CLASS */ + CLOSE = 329, /* CLOSE */ + CLUSTER = 330, /* CLUSTER */ + COALESCE = 331, /* COALESCE */ + COLLATE = 332, /* COLLATE */ + COLLATION = 333, /* COLLATION */ + COLUMN = 334, /* COLUMN */ + COLUMNS = 335, /* COLUMNS */ + COMMENT = 336, /* COMMENT */ + COMMENTS = 337, /* COMMENTS */ + COMMIT = 338, /* COMMIT */ + COMMITTED = 339, /* COMMITTED */ + COMPRESSION = 340, /* COMPRESSION */ + CONCURRENTLY = 341, /* CONCURRENTLY */ + CONFIGURATION = 342, /* CONFIGURATION */ + CONFLICT = 343, /* CONFLICT */ + CONNECTION = 344, /* CONNECTION */ + CONSTRAINT = 345, /* CONSTRAINT */ + CONSTRAINTS = 346, /* CONSTRAINTS */ + CONTENT_P = 347, /* CONTENT_P */ + CONTINUE_P = 348, /* CONTINUE_P */ + CONVERSION_P = 349, /* CONVERSION_P */ + COPY = 350, /* COPY */ + COST = 351, /* COST */ + CREATE = 352, /* CREATE */ + CROSS = 353, /* CROSS */ + CSV = 354, /* CSV */ + CUBE = 355, /* CUBE */ + CURRENT_P = 356, /* CURRENT_P */ + CURRENT_CATALOG = 357, /* CURRENT_CATALOG */ + CURRENT_DATE = 358, /* CURRENT_DATE */ + CURRENT_ROLE = 359, /* CURRENT_ROLE */ + CURRENT_SCHEMA = 360, /* CURRENT_SCHEMA */ + CURRENT_TIME = 361, /* CURRENT_TIME */ + CURRENT_TIMESTAMP = 362, /* CURRENT_TIMESTAMP */ + CURRENT_USER = 363, /* CURRENT_USER */ + CURSOR = 364, /* CURSOR */ + CYCLE = 365, /* CYCLE */ + DATA_P = 366, /* DATA_P */ + DATABASE = 367, /* DATABASE */ + DAY_P = 368, /* DAY_P */ + DEALLOCATE = 369, /* DEALLOCATE */ + DEC = 370, /* DEC */ + DECIMAL_P = 371, /* DECIMAL_P */ + DECLARE = 372, /* DECLARE */ + DEFAULT = 373, /* DEFAULT */ + DEFAULTS = 374, /* DEFAULTS */ + DEFERRABLE = 375, /* DEFERRABLE */ + DEFERRED = 376, /* DEFERRED */ + DEFINER = 377, /* DEFINER */ + DELETE_P = 378, /* DELETE_P */ + DELIMITER = 379, /* DELIMITER */ + DELIMITERS = 380, /* DELIMITERS */ + DEPENDS = 381, /* DEPENDS */ + DEPTH = 382, /* DEPTH */ + DESC = 383, /* DESC */ + DETACH = 384, /* DETACH */ + DICTIONARY = 385, /* DICTIONARY */ + DISABLE_P = 386, /* DISABLE_P */ + DISCARD = 387, /* DISCARD */ + DISTINCT = 388, /* DISTINCT */ + DO = 389, /* DO */ + DOCUMENT_P = 390, /* DOCUMENT_P */ + DOMAIN_P = 391, /* DOMAIN_P */ + DOUBLE_P = 392, /* DOUBLE_P */ + DROP = 393, /* DROP */ + EACH = 394, /* EACH */ + ELSE = 395, /* ELSE */ + ENABLE_P = 396, /* ENABLE_P */ + ENCODING = 397, /* ENCODING */ + ENCRYPTED = 398, /* ENCRYPTED */ + END_P = 399, /* END_P */ + ENUM_P = 400, /* ENUM_P */ + ESCAPE = 401, /* ESCAPE */ + EVENT = 402, /* EVENT */ + EXCEPT = 403, /* EXCEPT */ + EXCLUDE = 404, /* EXCLUDE */ + EXCLUDING = 405, /* EXCLUDING */ + EXCLUSIVE = 406, /* EXCLUSIVE */ + EXECUTE = 407, /* EXECUTE */ + EXISTS = 408, /* EXISTS */ + EXPLAIN = 409, /* EXPLAIN */ + EXPRESSION = 410, /* EXPRESSION */ + EXTENSION = 411, /* EXTENSION */ + EXTERNAL = 412, /* EXTERNAL */ + EXTRACT = 413, /* EXTRACT */ + FALSE_P = 414, /* FALSE_P */ + FAMILY = 415, /* FAMILY */ + FETCH = 416, /* FETCH */ + FILTER = 417, /* FILTER */ + FINALIZE = 418, /* FINALIZE */ + FIRST_P = 419, /* FIRST_P */ + FLOAT_P = 420, /* FLOAT_P */ + FOLLOWING = 421, /* FOLLOWING */ + FOR = 422, /* FOR */ + FORCE = 423, /* FORCE */ + FOREIGN = 424, /* FOREIGN */ + FORWARD = 425, /* FORWARD */ + FREEZE = 426, /* FREEZE */ + FROM = 427, /* FROM */ + FULL = 428, /* FULL */ + FUNCTION = 429, /* FUNCTION */ + FUNCTIONS = 430, /* FUNCTIONS */ + GENERATED = 431, /* GENERATED */ + GLOBAL = 432, /* GLOBAL */ + GRANT = 433, /* GRANT */ + GRANTED = 434, /* GRANTED */ + GREATEST = 435, /* GREATEST */ + GROUP_P = 436, /* GROUP_P */ + GROUPING = 437, /* GROUPING */ + GROUPS = 438, /* GROUPS */ + HANDLER = 439, /* HANDLER */ + HAVING = 440, /* HAVING */ + HEADER_P = 441, /* HEADER_P */ + HOLD = 442, /* HOLD */ + HOUR_P = 443, /* HOUR_P */ + IDENTITY_P = 444, /* IDENTITY_P */ + IF_P = 445, /* IF_P */ + ILIKE = 446, /* ILIKE */ + IMMEDIATE = 447, /* IMMEDIATE */ + IMMUTABLE = 448, /* IMMUTABLE */ + IMPLICIT_P = 449, /* IMPLICIT_P */ + IMPORT_P = 450, /* IMPORT_P */ + IN_P = 451, /* IN_P */ + INCLUDE = 452, /* INCLUDE */ + INCLUDING = 453, /* INCLUDING */ + INCREMENT = 454, /* INCREMENT */ + INDEX = 455, /* INDEX */ + INDEXES = 456, /* INDEXES */ + INHERIT = 457, /* INHERIT */ + INHERITS = 458, /* INHERITS */ + INITIALLY = 459, /* INITIALLY */ + INLINE_P = 460, /* INLINE_P */ + INNER_P = 461, /* INNER_P */ + INOUT = 462, /* INOUT */ + INPUT_P = 463, /* INPUT_P */ + INSENSITIVE = 464, /* INSENSITIVE */ + INSERT = 465, /* INSERT */ + INSTEAD = 466, /* INSTEAD */ + INT_P = 467, /* INT_P */ + INTEGER = 468, /* INTEGER */ + INTERSECT = 469, /* INTERSECT */ + INTERVAL = 470, /* INTERVAL */ + INTO = 471, /* INTO */ + INVOKER = 472, /* INVOKER */ + IS = 473, /* IS */ + ISNULL = 474, /* ISNULL */ + ISOLATION = 475, /* ISOLATION */ + JOIN = 476, /* JOIN */ + KEY = 477, /* KEY */ + LABEL = 478, /* LABEL */ + LANGUAGE = 479, /* LANGUAGE */ + LARGE_P = 480, /* LARGE_P */ + LAST_P = 481, /* LAST_P */ + LATERAL_P = 482, /* LATERAL_P */ + LEADING = 483, /* LEADING */ + LEAKPROOF = 484, /* LEAKPROOF */ + LEAST = 485, /* LEAST */ + LEFT = 486, /* LEFT */ + LEVEL = 487, /* LEVEL */ + LIKE = 488, /* LIKE */ + LIMIT = 489, /* LIMIT */ + LISTEN = 490, /* LISTEN */ + LOAD = 491, /* LOAD */ + LOCAL = 492, /* LOCAL */ + LOCALTIME = 493, /* LOCALTIME */ + LOCALTIMESTAMP = 494, /* LOCALTIMESTAMP */ + LOCATION = 495, /* LOCATION */ + LOCK_P = 496, /* LOCK_P */ + LOCKED = 497, /* LOCKED */ + LOGGED = 498, /* LOGGED */ + MAPPING = 499, /* MAPPING */ + MATCH = 500, /* MATCH */ + MATERIALIZED = 501, /* MATERIALIZED */ + MAXVALUE = 502, /* MAXVALUE */ + METHOD = 503, /* METHOD */ + MINUTE_P = 504, /* MINUTE_P */ + MINVALUE = 505, /* MINVALUE */ + MODE = 506, /* MODE */ + MONTH_P = 507, /* MONTH_P */ + MOVE = 508, /* MOVE */ + NAME_P = 509, /* NAME_P */ + NAMES = 510, /* NAMES */ + NATIONAL = 511, /* NATIONAL */ + NATURAL = 512, /* NATURAL */ + NCHAR = 513, /* NCHAR */ + NEW = 514, /* NEW */ + NEXT = 515, /* NEXT */ + NFC = 516, /* NFC */ + NFD = 517, /* NFD */ + NFKC = 518, /* NFKC */ + NFKD = 519, /* NFKD */ + NO = 520, /* NO */ + NONE = 521, /* NONE */ + NORMALIZE = 522, /* NORMALIZE */ + NORMALIZED = 523, /* NORMALIZED */ + NOT = 524, /* NOT */ + NOTHING = 525, /* NOTHING */ + NOTIFY = 526, /* NOTIFY */ + NOTNULL = 527, /* NOTNULL */ + NOWAIT = 528, /* NOWAIT */ + NULL_P = 529, /* NULL_P */ + NULLIF = 530, /* NULLIF */ + NULLS_P = 531, /* NULLS_P */ + NUMERIC = 532, /* NUMERIC */ + OBJECT_P = 533, /* OBJECT_P */ + OF = 534, /* OF */ + OFF = 535, /* OFF */ + OFFSET = 536, /* OFFSET */ + OIDS = 537, /* OIDS */ + OLD = 538, /* OLD */ + ON = 539, /* ON */ + ONLY = 540, /* ONLY */ + OPERATOR = 541, /* OPERATOR */ + OPTION = 542, /* OPTION */ + OPTIONS = 543, /* OPTIONS */ + OR = 544, /* OR */ + ORDER = 545, /* ORDER */ + ORDINALITY = 546, /* ORDINALITY */ + OTHERS = 547, /* OTHERS */ + OUT_P = 548, /* OUT_P */ + OUTER_P = 549, /* OUTER_P */ + OVER = 550, /* OVER */ + OVERLAPS = 551, /* OVERLAPS */ + OVERLAY = 552, /* OVERLAY */ + OVERRIDING = 553, /* OVERRIDING */ + OWNED = 554, /* OWNED */ + OWNER = 555, /* OWNER */ + PARALLEL = 556, /* PARALLEL */ + PARSER = 557, /* PARSER */ + PARTIAL = 558, /* PARTIAL */ + PARTITION = 559, /* PARTITION */ + PASSING = 560, /* PASSING */ + PASSWORD = 561, /* PASSWORD */ + PLACING = 562, /* PLACING */ + PLANS = 563, /* PLANS */ + POLICY = 564, /* POLICY */ + POSITION = 565, /* POSITION */ + PRECEDING = 566, /* PRECEDING */ + PRECISION = 567, /* PRECISION */ + PRESERVE = 568, /* PRESERVE */ + PREPARE = 569, /* PREPARE */ + PREPARED = 570, /* PREPARED */ + PRIMARY = 571, /* PRIMARY */ + PRIOR = 572, /* PRIOR */ + PRIVILEGES = 573, /* PRIVILEGES */ + PROCEDURAL = 574, /* PROCEDURAL */ + PROCEDURE = 575, /* PROCEDURE */ + PROCEDURES = 576, /* PROCEDURES */ + PROGRAM = 577, /* PROGRAM */ + PUBLICATION = 578, /* PUBLICATION */ + QUOTE = 579, /* QUOTE */ + RANGE = 580, /* RANGE */ + READ = 581, /* READ */ + REAL = 582, /* REAL */ + REASSIGN = 583, /* REASSIGN */ + RECHECK = 584, /* RECHECK */ + RECURSIVE = 585, /* RECURSIVE */ + REF = 586, /* REF */ + REFERENCES = 587, /* REFERENCES */ + REFERENCING = 588, /* REFERENCING */ + REFRESH = 589, /* REFRESH */ + REINDEX = 590, /* REINDEX */ + RELATIVE_P = 591, /* RELATIVE_P */ + RELEASE = 592, /* RELEASE */ + RENAME = 593, /* RENAME */ + REPEATABLE = 594, /* REPEATABLE */ + REPLACE = 595, /* REPLACE */ + REPLICA = 596, /* REPLICA */ + RESET = 597, /* RESET */ + RESTART = 598, /* RESTART */ + RESTRICT = 599, /* RESTRICT */ + RETURN = 600, /* RETURN */ + RETURNING = 601, /* RETURNING */ + RETURNS = 602, /* RETURNS */ + REVOKE = 603, /* REVOKE */ + RIGHT = 604, /* RIGHT */ + ROLE = 605, /* ROLE */ + ROLLBACK = 606, /* ROLLBACK */ + ROLLUP = 607, /* ROLLUP */ + ROUTINE = 608, /* ROUTINE */ + ROUTINES = 609, /* ROUTINES */ + ROW = 610, /* ROW */ + ROWS = 611, /* ROWS */ + RULE = 612, /* RULE */ + SAVEPOINT = 613, /* SAVEPOINT */ + SCHEMA = 614, /* SCHEMA */ + SCHEMAS = 615, /* SCHEMAS */ + SCROLL = 616, /* SCROLL */ + SEARCH = 617, /* SEARCH */ + SECOND_P = 618, /* SECOND_P */ + SECURITY = 619, /* SECURITY */ + SELECT = 620, /* SELECT */ + SEQUENCE = 621, /* SEQUENCE */ + SEQUENCES = 622, /* SEQUENCES */ + SERIALIZABLE = 623, /* SERIALIZABLE */ + SERVER = 624, /* SERVER */ + SESSION = 625, /* SESSION */ + SESSION_USER = 626, /* SESSION_USER */ + SET = 627, /* SET */ + SETS = 628, /* SETS */ + SETOF = 629, /* SETOF */ + SHARE = 630, /* SHARE */ + SHOW = 631, /* SHOW */ + SIMILAR = 632, /* SIMILAR */ + SIMPLE = 633, /* SIMPLE */ + SKIP = 634, /* SKIP */ + SMALLINT = 635, /* SMALLINT */ + SNAPSHOT = 636, /* SNAPSHOT */ + SOME = 637, /* SOME */ + SQL_P = 638, /* SQL_P */ + STABLE = 639, /* STABLE */ + STANDALONE_P = 640, /* STANDALONE_P */ + START = 641, /* START */ + STATEMENT = 642, /* STATEMENT */ + STATISTICS = 643, /* STATISTICS */ + STDIN = 644, /* STDIN */ + STDOUT = 645, /* STDOUT */ + STORAGE = 646, /* STORAGE */ + STORED = 647, /* STORED */ + STRICT_P = 648, /* STRICT_P */ + STRIP_P = 649, /* STRIP_P */ + SUBSCRIPTION = 650, /* SUBSCRIPTION */ + SUBSTRING = 651, /* SUBSTRING */ + SUPPORT = 652, /* SUPPORT */ + SYMMETRIC = 653, /* SYMMETRIC */ + SYSID = 654, /* SYSID */ + SYSTEM_P = 655, /* SYSTEM_P */ + TABLE = 656, /* TABLE */ + TABLES = 657, /* TABLES */ + TABLESAMPLE = 658, /* TABLESAMPLE */ + TABLESPACE = 659, /* TABLESPACE */ + TEMP = 660, /* TEMP */ + TEMPLATE = 661, /* TEMPLATE */ + TEMPORARY = 662, /* TEMPORARY */ + TEXT_P = 663, /* TEXT_P */ + THEN = 664, /* THEN */ + TIES = 665, /* TIES */ + TIME = 666, /* TIME */ + TIMESTAMP = 667, /* TIMESTAMP */ + TO = 668, /* TO */ + TRAILING = 669, /* TRAILING */ + TRANSACTION = 670, /* TRANSACTION */ + TRANSFORM = 671, /* TRANSFORM */ + TREAT = 672, /* TREAT */ + TRIGGER = 673, /* TRIGGER */ + TRIM = 674, /* TRIM */ + TRUE_P = 675, /* TRUE_P */ + TRUNCATE = 676, /* TRUNCATE */ + TRUSTED = 677, /* TRUSTED */ + TYPE_P = 678, /* TYPE_P */ + TYPES_P = 679, /* TYPES_P */ + UESCAPE = 680, /* UESCAPE */ + UNBOUNDED = 681, /* UNBOUNDED */ + UNCOMMITTED = 682, /* UNCOMMITTED */ + UNENCRYPTED = 683, /* UNENCRYPTED */ + UNION = 684, /* UNION */ + UNIQUE = 685, /* UNIQUE */ + UNKNOWN = 686, /* UNKNOWN */ + UNLISTEN = 687, /* UNLISTEN */ + UNLOGGED = 688, /* UNLOGGED */ + UNTIL = 689, /* UNTIL */ + UPDATE = 690, /* UPDATE */ + USER = 691, /* USER */ + USING = 692, /* USING */ + VACUUM = 693, /* VACUUM */ + VALID = 694, /* VALID */ + VALIDATE = 695, /* VALIDATE */ + VALIDATOR = 696, /* VALIDATOR */ + VALUE_P = 697, /* VALUE_P */ + VALUES = 698, /* VALUES */ + VARCHAR = 699, /* VARCHAR */ + VARIADIC = 700, /* VARIADIC */ + VARYING = 701, /* VARYING */ + VERBOSE = 702, /* VERBOSE */ + VERSION_P = 703, /* VERSION_P */ + VIEW = 704, /* VIEW */ + VIEWS = 705, /* VIEWS */ + VOLATILE = 706, /* VOLATILE */ + WHEN = 707, /* WHEN */ + WHERE = 708, /* WHERE */ + WHITESPACE_P = 709, /* WHITESPACE_P */ + WINDOW = 710, /* WINDOW */ + WITH = 711, /* WITH */ + WITHIN = 712, /* WITHIN */ + WITHOUT = 713, /* WITHOUT */ + WORK = 714, /* WORK */ + WRAPPER = 715, /* WRAPPER */ + WRITE = 716, /* WRITE */ + XML_P = 717, /* XML_P */ + XMLATTRIBUTES = 718, /* XMLATTRIBUTES */ + XMLCONCAT = 719, /* XMLCONCAT */ + XMLELEMENT = 720, /* XMLELEMENT */ + XMLEXISTS = 721, /* XMLEXISTS */ + XMLFOREST = 722, /* XMLFOREST */ + XMLNAMESPACES = 723, /* XMLNAMESPACES */ + XMLPARSE = 724, /* XMLPARSE */ + XMLPI = 725, /* XMLPI */ + XMLROOT = 726, /* XMLROOT */ + XMLSERIALIZE = 727, /* XMLSERIALIZE */ + XMLTABLE = 728, /* XMLTABLE */ + YEAR_P = 729, /* YEAR_P */ + YES_P = 730, /* YES_P */ + ZONE = 731, /* ZONE */ + NOT_LA = 732, /* NOT_LA */ + NULLS_LA = 733, /* NULLS_LA */ + WITH_LA = 734, /* WITH_LA */ + MODE_TYPE_NAME = 735, /* MODE_TYPE_NAME */ + MODE_PLPGSQL_EXPR = 736, /* MODE_PLPGSQL_EXPR */ + MODE_PLPGSQL_ASSIGN1 = 737, /* MODE_PLPGSQL_ASSIGN1 */ + MODE_PLPGSQL_ASSIGN2 = 738, /* MODE_PLPGSQL_ASSIGN2 */ + MODE_PLPGSQL_ASSIGN3 = 739, /* MODE_PLPGSQL_ASSIGN3 */ + UMINUS = 740 /* UMINUS */ }; + typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - union YYSTYPE { -#line 217 "gram.y" /* yacc.c:1921 */ +#line 217 "gram.y" core_YYSTYPE core_yystype; /* these fields must match core_YYSTYPE: */ @@ -588,9 +593,9 @@ union YYSTYPE SetQuantifier setquantifier; struct GroupClause *groupclause; -#line 592 "gram.h" /* yacc.c:1921 */ -}; +#line 597 "gram.h" +}; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/parser/parse_utilcmd.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/parser/parse_utilcmd.c index c1d5a5d540b..05e4fa8ce8c 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/parser/parse_utilcmd.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/parser/parse_utilcmd.c @@ -3421,7 +3421,8 @@ transformAlterTableStmt(Oid relid, AlterTableStmt *stmt, errmsg("column \"%s\" of relation \"%s\" does not exist", cmd->name, RelationGetRelationName(rel)))); - if (TupleDescAttr(tupdesc, attnum - 1)->attidentity) + if (attnum > 0 && + TupleDescAttr(tupdesc, attnum - 1)->attidentity) { Oid seq_relid = getIdentitySequence(relid, attnum, false); Oid typeOid = typenameTypeId(pstate, def->typeName); diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/postmaster/checkpointer.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/postmaster/checkpointer.c index c154a660624..21bb9f1a914 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/postmaster/checkpointer.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/postmaster/checkpointer.c @@ -490,6 +490,9 @@ CheckpointerMain(void) } ckpt_active = false; + + /* We may have received an interrupt during the checkpoint. */ + HandleCheckpointerInterrupts(); } /* Check for archive_timeout and switch xlog files if necessary. */ @@ -732,7 +735,10 @@ CheckpointWriteDelay(int flags, double progress) * Checkpointer and bgwriter are no longer related so take the Big * Sleep. */ - pg_usleep(100000L); + WaitLatch(MyLatch, WL_LATCH_SET | WL_EXIT_ON_PM_DEATH | WL_TIMEOUT, + 100, + WAIT_EVENT_CHECKPOINT_WRITE_DELAY); + ResetLatch(MyLatch); } else if (--absorb_counter <= 0) { diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/postmaster/postmaster.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/postmaster/postmaster.c index a537a7d00ec..3a558de0662 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/postmaster/postmaster.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/postmaster/postmaster.c @@ -1033,7 +1033,7 @@ PostmasterMain(int argc, char *argv[]) /* * Set reference point for stack-depth checking. */ - set_stack_base(); + (void) set_stack_base(); /* * Initialize pipe (or process handle on Windows) that allows children to diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/replication/logical/launcher.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/replication/logical/launcher.c index edd02d20be5..c3ae7063264 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/replication/logical/launcher.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/replication/logical/launcher.c @@ -344,11 +344,11 @@ retry: } /* - * If we reached the sync worker limit per subscription, just exit - * silently as we might get here because of an otherwise harmless race - * condition. + * We don't allow to invoke more sync workers once we have reached the sync + * worker limit per subscription. So, just return silently as we might get + * here because of an otherwise harmless race condition. */ - if (nsyncworkers >= max_sync_workers_per_subscription) + if (OidIsValid(relid) && nsyncworkers >= max_sync_workers_per_subscription) { LWLockRelease(LogicalRepWorkerLock); return; diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/replication/repl_gram.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/replication/repl_gram.c index 476c52888da..dd505c1904c 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/replication/repl_gram.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/replication/repl_gram.c @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.3.2. */ +/* A Bison parser, made by GNU Bison 3.7.5. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -34,6 +34,10 @@ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. @@ -41,14 +45,11 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Undocumented macros, especially those whose name start with YY_, - are private implementation details. Do not rely on them. */ - -/* Identify Bison output. */ -#define YYBISON 1 +/* Identify Bison output, and Bison version. */ +#define YYBISON 30705 -/* Bison version. */ -#define YYBISON_VERSION "3.3.2" +/* Bison version string. */ +#define YYBISON_VERSION "3.7.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -69,12 +70,11 @@ #define yyerror replication_yyerror #define yydebug replication_yydebug #define yynerrs replication_yynerrs - #define yylval replication_yylval #define yychar replication_yychar /* First part of user prologue. */ -#line 1 "repl_gram.y" /* yacc.c:337 */ +#line 1 "repl_gram.y" /*------------------------------------------------------------------------- * @@ -115,7 +115,17 @@ __thread Node *replication_parse_result; #define YYFREE pfree -#line 119 "repl_gram.c" /* yacc.c:337 */ +#line 119 "repl_gram.c" + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast<Type> (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus @@ -128,14 +138,6 @@ __thread Node *replication_parse_result; # endif # endif -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - /* Debug traces. */ #ifndef YYDEBUG @@ -145,51 +147,55 @@ __thread Node *replication_parse_result; extern int replication_yydebug; #endif -/* Token type. */ +/* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { - SCONST = 258, - IDENT = 259, - UCONST = 260, - RECPTR = 261, - K_BASE_BACKUP = 262, - K_IDENTIFY_SYSTEM = 263, - K_SHOW = 264, - K_START_REPLICATION = 265, - K_CREATE_REPLICATION_SLOT = 266, - K_DROP_REPLICATION_SLOT = 267, - K_TIMELINE_HISTORY = 268, - K_LABEL = 269, - K_PROGRESS = 270, - K_FAST = 271, - K_WAIT = 272, - K_NOWAIT = 273, - K_MAX_RATE = 274, - K_WAL = 275, - K_TABLESPACE_MAP = 276, - K_NOVERIFY_CHECKSUMS = 277, - K_TIMELINE = 278, - K_PHYSICAL = 279, - K_LOGICAL = 280, - K_SLOT = 281, - K_RESERVE_WAL = 282, - K_TEMPORARY = 283, - K_EXPORT_SNAPSHOT = 284, - K_NOEXPORT_SNAPSHOT = 285, - K_USE_SNAPSHOT = 286, - K_MANIFEST = 287, - K_MANIFEST_CHECKSUMS = 288 + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + SCONST = 258, /* SCONST */ + IDENT = 259, /* IDENT */ + UCONST = 260, /* UCONST */ + RECPTR = 261, /* RECPTR */ + K_BASE_BACKUP = 262, /* K_BASE_BACKUP */ + K_IDENTIFY_SYSTEM = 263, /* K_IDENTIFY_SYSTEM */ + K_SHOW = 264, /* K_SHOW */ + K_START_REPLICATION = 265, /* K_START_REPLICATION */ + K_CREATE_REPLICATION_SLOT = 266, /* K_CREATE_REPLICATION_SLOT */ + K_DROP_REPLICATION_SLOT = 267, /* K_DROP_REPLICATION_SLOT */ + K_TIMELINE_HISTORY = 268, /* K_TIMELINE_HISTORY */ + K_LABEL = 269, /* K_LABEL */ + K_PROGRESS = 270, /* K_PROGRESS */ + K_FAST = 271, /* K_FAST */ + K_WAIT = 272, /* K_WAIT */ + K_NOWAIT = 273, /* K_NOWAIT */ + K_MAX_RATE = 274, /* K_MAX_RATE */ + K_WAL = 275, /* K_WAL */ + K_TABLESPACE_MAP = 276, /* K_TABLESPACE_MAP */ + K_NOVERIFY_CHECKSUMS = 277, /* K_NOVERIFY_CHECKSUMS */ + K_TIMELINE = 278, /* K_TIMELINE */ + K_PHYSICAL = 279, /* K_PHYSICAL */ + K_LOGICAL = 280, /* K_LOGICAL */ + K_SLOT = 281, /* K_SLOT */ + K_RESERVE_WAL = 282, /* K_RESERVE_WAL */ + K_TEMPORARY = 283, /* K_TEMPORARY */ + K_EXPORT_SNAPSHOT = 284, /* K_EXPORT_SNAPSHOT */ + K_NOEXPORT_SNAPSHOT = 285, /* K_NOEXPORT_SNAPSHOT */ + K_USE_SNAPSHOT = 286, /* K_USE_SNAPSHOT */ + K_MANIFEST = 287, /* K_MANIFEST */ + K_MANIFEST_CHECKSUMS = 288 /* K_MANIFEST_CHECKSUMS */ }; + typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - union YYSTYPE { -#line 45 "repl_gram.y" /* yacc.c:352 */ +#line 45 "repl_gram.y" char *str; bool boolval; @@ -200,9 +206,9 @@ union YYSTYPE List *list; DefElem *defelt; -#line 204 "repl_gram.c" /* yacc.c:352 */ -}; +#line 210 "repl_gram.c" +}; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 @@ -214,6 +220,77 @@ extern __thread YYSTYPE replication_yylval; int replication_yyparse (void); +/* Symbol kind. */ +enum yysymbol_kind_t +{ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_SCONST = 3, /* SCONST */ + YYSYMBOL_IDENT = 4, /* IDENT */ + YYSYMBOL_UCONST = 5, /* UCONST */ + YYSYMBOL_RECPTR = 6, /* RECPTR */ + YYSYMBOL_K_BASE_BACKUP = 7, /* K_BASE_BACKUP */ + YYSYMBOL_K_IDENTIFY_SYSTEM = 8, /* K_IDENTIFY_SYSTEM */ + YYSYMBOL_K_SHOW = 9, /* K_SHOW */ + YYSYMBOL_K_START_REPLICATION = 10, /* K_START_REPLICATION */ + YYSYMBOL_K_CREATE_REPLICATION_SLOT = 11, /* K_CREATE_REPLICATION_SLOT */ + YYSYMBOL_K_DROP_REPLICATION_SLOT = 12, /* K_DROP_REPLICATION_SLOT */ + YYSYMBOL_K_TIMELINE_HISTORY = 13, /* K_TIMELINE_HISTORY */ + YYSYMBOL_K_LABEL = 14, /* K_LABEL */ + YYSYMBOL_K_PROGRESS = 15, /* K_PROGRESS */ + YYSYMBOL_K_FAST = 16, /* K_FAST */ + YYSYMBOL_K_WAIT = 17, /* K_WAIT */ + YYSYMBOL_K_NOWAIT = 18, /* K_NOWAIT */ + YYSYMBOL_K_MAX_RATE = 19, /* K_MAX_RATE */ + YYSYMBOL_K_WAL = 20, /* K_WAL */ + YYSYMBOL_K_TABLESPACE_MAP = 21, /* K_TABLESPACE_MAP */ + YYSYMBOL_K_NOVERIFY_CHECKSUMS = 22, /* K_NOVERIFY_CHECKSUMS */ + YYSYMBOL_K_TIMELINE = 23, /* K_TIMELINE */ + YYSYMBOL_K_PHYSICAL = 24, /* K_PHYSICAL */ + YYSYMBOL_K_LOGICAL = 25, /* K_LOGICAL */ + YYSYMBOL_K_SLOT = 26, /* K_SLOT */ + YYSYMBOL_K_RESERVE_WAL = 27, /* K_RESERVE_WAL */ + YYSYMBOL_K_TEMPORARY = 28, /* K_TEMPORARY */ + YYSYMBOL_K_EXPORT_SNAPSHOT = 29, /* K_EXPORT_SNAPSHOT */ + YYSYMBOL_K_NOEXPORT_SNAPSHOT = 30, /* K_NOEXPORT_SNAPSHOT */ + YYSYMBOL_K_USE_SNAPSHOT = 31, /* K_USE_SNAPSHOT */ + YYSYMBOL_K_MANIFEST = 32, /* K_MANIFEST */ + YYSYMBOL_K_MANIFEST_CHECKSUMS = 33, /* K_MANIFEST_CHECKSUMS */ + YYSYMBOL_34_ = 34, /* ';' */ + YYSYMBOL_35_ = 35, /* '.' */ + YYSYMBOL_36_ = 36, /* '(' */ + YYSYMBOL_37_ = 37, /* ')' */ + YYSYMBOL_38_ = 38, /* ',' */ + YYSYMBOL_YYACCEPT = 39, /* $accept */ + YYSYMBOL_firstcmd = 40, /* firstcmd */ + YYSYMBOL_opt_semicolon = 41, /* opt_semicolon */ + YYSYMBOL_command = 42, /* command */ + YYSYMBOL_identify_system = 43, /* identify_system */ + YYSYMBOL_show = 44, /* show */ + YYSYMBOL_var_name = 45, /* var_name */ + YYSYMBOL_base_backup = 46, /* base_backup */ + YYSYMBOL_base_backup_opt_list = 47, /* base_backup_opt_list */ + YYSYMBOL_base_backup_opt = 48, /* base_backup_opt */ + YYSYMBOL_create_replication_slot = 49, /* create_replication_slot */ + YYSYMBOL_create_slot_opt_list = 50, /* create_slot_opt_list */ + YYSYMBOL_create_slot_opt = 51, /* create_slot_opt */ + YYSYMBOL_drop_replication_slot = 52, /* drop_replication_slot */ + YYSYMBOL_start_replication = 53, /* start_replication */ + YYSYMBOL_start_logical_replication = 54, /* start_logical_replication */ + YYSYMBOL_timeline_history = 55, /* timeline_history */ + YYSYMBOL_opt_physical = 56, /* opt_physical */ + YYSYMBOL_opt_temporary = 57, /* opt_temporary */ + YYSYMBOL_opt_slot = 58, /* opt_slot */ + YYSYMBOL_opt_timeline = 59, /* opt_timeline */ + YYSYMBOL_plugin_options = 60, /* plugin_options */ + YYSYMBOL_plugin_opt_list = 61, /* plugin_opt_list */ + YYSYMBOL_plugin_opt_elem = 62, /* plugin_opt_elem */ + YYSYMBOL_plugin_opt_arg = 63 /* plugin_opt_arg */ +}; +typedef enum yysymbol_kind_t yysymbol_kind_t; + @@ -221,28 +298,87 @@ int replication_yyparse (void); # undef short #endif -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; +/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure + <limits.h> and (if available) <stdint.h> are included + so that the code can choose integer types of a good width. */ + +#ifndef __PTRDIFF_MAX__ +# include <limits.h> /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include <stdint.h> /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif #endif -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; +/* Narrow types that promote to a signed type and that can represent a + signed or unsigned integer of at least N bits. In tables they can + save space and decrease cache pressure. Promoting to a signed type + helps avoid bugs in integer arithmetic. */ + +#ifdef __INT_LEAST8_MAX__ +typedef __INT_LEAST8_TYPE__ yytype_int8; +#elif defined YY_STDINT_H +typedef int_least8_t yytype_int8; #else typedef signed char yytype_int8; #endif -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; +#ifdef __INT_LEAST16_MAX__ +typedef __INT_LEAST16_TYPE__ yytype_int16; +#elif defined YY_STDINT_H +typedef int_least16_t yytype_int16; #else -typedef unsigned short yytype_uint16; +typedef short yytype_int16; #endif -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 +#endif + +#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST8_TYPE__ yytype_uint8; +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) +typedef uint_least8_t yytype_uint8; +#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX +typedef unsigned char yytype_uint8; #else -typedef short yytype_int16; +typedef short yytype_uint8; +#endif + +#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST16_TYPE__ yytype_uint16; +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) +typedef uint_least16_t yytype_uint16; +#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX +typedef unsigned short yytype_uint16; +#else +typedef int yytype_uint16; +#endif + +#ifndef YYPTRDIFF_T +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif #endif #ifndef YYSIZE_T @@ -250,7 +386,7 @@ typedef short yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -258,7 +394,20 @@ typedef short yytype_int16; # endif #endif -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) + + +/* Stored state numbers (used for stacks). */ +typedef yytype_int8 yy_state_t; + +/* State numbers in computations. */ +typedef int yy_state_fast_t; #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS @@ -272,38 +421,37 @@ typedef short yytype_int16; # endif #endif -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif #ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif #endif #ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value @@ -316,8 +464,22 @@ typedef short yytype_int16; # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + + +#define YY_ASSERT(E) ((void) (0 && (E))) -#if ! defined yyoverflow || YYERROR_VERBOSE +#if !defined yyoverflow /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -382,8 +544,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - +#endif /* !defined yyoverflow */ #if (! defined yyoverflow \ && (! defined __cplusplus \ @@ -392,17 +553,17 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss_alloc; + yy_state_t yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 @@ -415,11 +576,11 @@ union yyalloc # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ - YYSIZE_T yynewbytes; \ + YYPTRDIFF_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ } \ while (0) @@ -431,12 +592,12 @@ union yyalloc # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ - YYSIZE_T yyi; \ + YYPTRDIFF_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ @@ -459,17 +620,20 @@ union yyalloc /* YYNSTATES -- Number of states. */ #define YYNSTATES 78 -#define YYUNDEFTOK 2 +/* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 288 + /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_uint8 yytranslate[] = +static const yytype_int8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -504,7 +668,7 @@ static const yytype_uint8 yytranslate[] = #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = +static const yytype_int16 yyrline[] = { 0, 107, 107, 113, 114, 118, 119, 120, 121, 122, 123, 124, 125, 132, 142, 149, 150, 160, 169, 172, @@ -515,50 +679,63 @@ static const yytype_uint16 yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 0 +/** Accessing symbol of state STATE. */ +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) + +#if YYDEBUG || 0 +/* The user-facing name of the symbol whose (internal) number is + YYSYMBOL. No bounds checking. */ +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; + /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "SCONST", "IDENT", "UCONST", "RECPTR", - "K_BASE_BACKUP", "K_IDENTIFY_SYSTEM", "K_SHOW", "K_START_REPLICATION", - "K_CREATE_REPLICATION_SLOT", "K_DROP_REPLICATION_SLOT", - "K_TIMELINE_HISTORY", "K_LABEL", "K_PROGRESS", "K_FAST", "K_WAIT", - "K_NOWAIT", "K_MAX_RATE", "K_WAL", "K_TABLESPACE_MAP", - "K_NOVERIFY_CHECKSUMS", "K_TIMELINE", "K_PHYSICAL", "K_LOGICAL", - "K_SLOT", "K_RESERVE_WAL", "K_TEMPORARY", "K_EXPORT_SNAPSHOT", - "K_NOEXPORT_SNAPSHOT", "K_USE_SNAPSHOT", "K_MANIFEST", - "K_MANIFEST_CHECKSUMS", "';'", "'.'", "'('", "')'", "','", "$accept", - "firstcmd", "opt_semicolon", "command", "identify_system", "show", - "var_name", "base_backup", "base_backup_opt_list", "base_backup_opt", - "create_replication_slot", "create_slot_opt_list", "create_slot_opt", - "drop_replication_slot", "start_replication", + "\"end of file\"", "error", "\"invalid token\"", "SCONST", "IDENT", + "UCONST", "RECPTR", "K_BASE_BACKUP", "K_IDENTIFY_SYSTEM", "K_SHOW", + "K_START_REPLICATION", "K_CREATE_REPLICATION_SLOT", + "K_DROP_REPLICATION_SLOT", "K_TIMELINE_HISTORY", "K_LABEL", "K_PROGRESS", + "K_FAST", "K_WAIT", "K_NOWAIT", "K_MAX_RATE", "K_WAL", + "K_TABLESPACE_MAP", "K_NOVERIFY_CHECKSUMS", "K_TIMELINE", "K_PHYSICAL", + "K_LOGICAL", "K_SLOT", "K_RESERVE_WAL", "K_TEMPORARY", + "K_EXPORT_SNAPSHOT", "K_NOEXPORT_SNAPSHOT", "K_USE_SNAPSHOT", + "K_MANIFEST", "K_MANIFEST_CHECKSUMS", "';'", "'.'", "'('", "')'", "','", + "$accept", "firstcmd", "opt_semicolon", "command", "identify_system", + "show", "var_name", "base_backup", "base_backup_opt_list", + "base_backup_opt", "create_replication_slot", "create_slot_opt_list", + "create_slot_opt", "drop_replication_slot", "start_replication", "start_logical_replication", "timeline_history", "opt_physical", "opt_temporary", "opt_slot", "opt_timeline", "plugin_options", "plugin_opt_list", "plugin_opt_elem", "plugin_opt_arg", YY_NULLPTR }; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif -# ifdef YYPRINT +#ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = +static const yytype_int16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 59, 46, 40, 41, 44 }; -# endif +#endif -#define YYPACT_NINF -25 +#define YYPACT_NINF (-25) -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-25))) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF -1 +#define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yytable_value) \ +#define yytable_value_is_error(Yyn) \ 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing @@ -578,7 +755,7 @@ static const yytype_int8 yypact[] = /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = +static const yytype_int8 yydefact[] = { 0, 19, 13, 0, 48, 0, 0, 0, 0, 4, 5, 12, 6, 9, 10, 7, 8, 11, 17, 15, @@ -601,7 +778,7 @@ static const yytype_int8 yypgoto[] = /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { - -1, 8, 28, 9, 10, 11, 20, 12, 18, 39, + 0, 8, 28, 9, 10, 11, 20, 12, 18, 39, 13, 59, 68, 14, 15, 16, 17, 43, 45, 22, 58, 62, 71, 72, 74 }; @@ -609,7 +786,7 @@ static const yytype_int8 yydefgoto[] = /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = +static const yytype_int8 yytable[] = { 29, 30, 31, 19, 32, 33, 34, 35, 36, 1, 2, 3, 4, 5, 6, 7, 54, 55, 37, 38, @@ -619,7 +796,7 @@ static const yytype_uint8 yytable[] = 70, 69, 77 }; -static const yytype_uint8 yycheck[] = +static const yytype_int8 yycheck[] = { 14, 15, 16, 4, 18, 19, 20, 21, 22, 7, 8, 9, 10, 11, 12, 13, 24, 25, 32, 33, @@ -631,7 +808,7 @@ static const yytype_uint8 yycheck[] = /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = +static const yytype_int8 yystos[] = { 0, 7, 8, 9, 10, 11, 12, 13, 40, 42, 43, 44, 46, 49, 52, 53, 54, 55, 47, 4, @@ -644,7 +821,7 @@ static const yytype_uint8 yystos[] = }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = +static const yytype_int8 yyr1[] = { 0, 39, 40, 41, 41, 42, 42, 42, 42, 42, 42, 42, 42, 43, 44, 45, 45, 46, 47, 47, @@ -655,7 +832,7 @@ static const yytype_uint8 yyr1[] = }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +static const yytype_int8 yyr2[] = { 0, 2, 2, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 0, @@ -666,10 +843,10 @@ static const yytype_uint8 yyr2[] = }; +enum { YYENOMEM = -2 }; + #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab @@ -695,10 +872,9 @@ static const yytype_uint8 yyr2[] = } \ while (0) -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - +/* Backward compatibility with an undocumented macro. + Use YYerror or YYUNDEF. */ +#define YYERRCODE YYUNDEF /* Enable debugging if requested. */ @@ -716,18 +892,18 @@ do { \ } while (0) /* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif +# ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ - Type, Value); \ + Kind, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) @@ -738,17 +914,20 @@ do { \ `-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { FILE *yyoutput = yyo; - YYUSE (yyoutput); + YY_USE (yyoutput); if (!yyvaluep) return; # ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyo, yytoknum[yytype], *yyvaluep); + if (yykind < YYNTOKENS) + YYPRINT (yyo, yytoknum[yykind], *yyvaluep); # endif - YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -757,12 +936,13 @@ yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) `---------------------------*/ static void -yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { YYFPRINTF (yyo, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - yy_symbol_value_print (yyo, yytype, yyvaluep); + yy_symbol_value_print (yyo, yykind, yyvaluep); YYFPRINTF (yyo, ")"); } @@ -772,7 +952,7 @@ yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) `------------------------------------------------------------------*/ static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -795,21 +975,21 @@ do { \ `------------------------------------------------*/ static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, + int yyrule) { - unsigned long yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &yyvsp[(yyi + 1) - (yynrhs)] - ); + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)]); YYFPRINTF (stderr, "\n"); } } @@ -824,8 +1004,8 @@ do { \ multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -848,254 +1028,30 @@ int yydebug; #endif -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return 2; - } - } - } - } - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - default: /* Avoid compiler warnings. */ - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return 2; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep) { - YYUSE (yyvaluep); + YY_USE (yyvaluep); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - - -/* The lookahead symbol. */ +/* Lookahead token kind. */ __thread int yychar; /* The semantic value of the lookahead symbol. */ @@ -1104,6 +1060,8 @@ __thread YYSTYPE replication_yylval; __thread int yynerrs; + + /*----------. | yyparse. | `----------*/ @@ -1111,43 +1069,36 @@ __thread int yynerrs; int yyparse (void) { - int yystate; + yy_state_fast_t yystate = 0; /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. + int yyerrstatus = 0; - Refer to the stacks through separate pointers, to allow yyoverflow + /* Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - YYSIZE_T yystacksize; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; int yyn; + /* The return value of yyparse. */ int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; + /* Lookahead symbol kind. */ + yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif + #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) @@ -1155,15 +1106,8 @@ yyparse (void) Keep to zero when no symbol should be popped. */ int yylen = 0; - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - YYDPRINTF ((stderr, "Starting parse\n")); - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; @@ -1178,10 +1122,15 @@ yynewstate: /*--------------------------------------------------------------------. -| yynewstate -- set current state (the top of the stack) to yystate. | +| yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - *yyssp = (yytype_int16) yystate; + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YY_IGNORE_USELESS_CAST_BEGIN + *yyssp = YY_CAST (yy_state_t, yystate); + YY_IGNORE_USELESS_CAST_END + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE @@ -1189,23 +1138,23 @@ yysetstate: #else { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); + YYPTRDIFF_T yysize = yyssp - yyss + 1; # if defined yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ + yy_state_t *yyss1 = yyss; YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; @@ -1219,14 +1168,15 @@ yysetstate: yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; + yy_state_t *yyss1 = yyss; union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE +# undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } @@ -1235,16 +1185,16 @@ yysetstate: yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long) yystacksize)); + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END if (yyss + yystacksize - 1 <= yyssp) YYABORT; } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - if (yystate == YYFINAL) YYACCEPT; @@ -1265,18 +1215,29 @@ yybackup: /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token: ")); + YYDPRINTF ((stderr, "Reading a token\n")); yychar = yylex (); } if (yychar <= YYEOF) { - yychar = yytoken = YYEOF; + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + goto yyerrlab1; + } else { yytoken = YYTRANSLATE (yychar); @@ -1304,15 +1265,13 @@ yybackup: /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END + /* Discard the shifted token. */ + yychar = YYEMPTY; goto yynewstate; @@ -1347,159 +1306,159 @@ yyreduce: YY_REDUCE_PRINT (yyn); switch (yyn) { - case 2: -#line 108 "repl_gram.y" /* yacc.c:1652 */ - { + case 2: /* firstcmd: command opt_semicolon */ +#line 108 "repl_gram.y" + { replication_parse_result = (yyvsp[-1].node); } -#line 1356 "repl_gram.c" /* yacc.c:1652 */ +#line 1315 "repl_gram.c" break; - case 13: -#line 133 "repl_gram.y" /* yacc.c:1652 */ - { + case 13: /* identify_system: K_IDENTIFY_SYSTEM */ +#line 133 "repl_gram.y" + { (yyval.node) = (Node *) makeNode(IdentifySystemCmd); } -#line 1364 "repl_gram.c" /* yacc.c:1652 */ +#line 1323 "repl_gram.c" break; - case 14: -#line 143 "repl_gram.y" /* yacc.c:1652 */ - { + case 14: /* show: K_SHOW var_name */ +#line 143 "repl_gram.y" + { VariableShowStmt *n = makeNode(VariableShowStmt); n->name = (yyvsp[0].str); (yyval.node) = (Node *) n; } -#line 1374 "repl_gram.c" /* yacc.c:1652 */ +#line 1333 "repl_gram.c" break; - case 15: -#line 149 "repl_gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 1380 "repl_gram.c" /* yacc.c:1652 */ + case 15: /* var_name: IDENT */ +#line 149 "repl_gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 1339 "repl_gram.c" break; - case 16: -#line 151 "repl_gram.y" /* yacc.c:1652 */ - { (yyval.str) = psprintf("%s.%s", (yyvsp[-2].str), (yyvsp[0].str)); } -#line 1386 "repl_gram.c" /* yacc.c:1652 */ + case 16: /* var_name: var_name '.' IDENT */ +#line 151 "repl_gram.y" + { (yyval.str) = psprintf("%s.%s", (yyvsp[-2].str), (yyvsp[0].str)); } +#line 1345 "repl_gram.c" break; - case 17: -#line 161 "repl_gram.y" /* yacc.c:1652 */ - { + case 17: /* base_backup: K_BASE_BACKUP base_backup_opt_list */ +#line 161 "repl_gram.y" + { BaseBackupCmd *cmd = makeNode(BaseBackupCmd); cmd->options = (yyvsp[0].list); (yyval.node) = (Node *) cmd; } -#line 1396 "repl_gram.c" /* yacc.c:1652 */ +#line 1355 "repl_gram.c" break; - case 18: -#line 170 "repl_gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 1402 "repl_gram.c" /* yacc.c:1652 */ + case 18: /* base_backup_opt_list: base_backup_opt_list base_backup_opt */ +#line 170 "repl_gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 1361 "repl_gram.c" break; - case 19: -#line 172 "repl_gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 1408 "repl_gram.c" /* yacc.c:1652 */ + case 19: /* base_backup_opt_list: %empty */ +#line 172 "repl_gram.y" + { (yyval.list) = NIL; } +#line 1367 "repl_gram.c" break; - case 20: -#line 177 "repl_gram.y" /* yacc.c:1652 */ - { + case 20: /* base_backup_opt: K_LABEL SCONST */ +#line 177 "repl_gram.y" + { (yyval.defelt) = makeDefElem("label", (Node *)makeString((yyvsp[0].str)), -1); } -#line 1417 "repl_gram.c" /* yacc.c:1652 */ +#line 1376 "repl_gram.c" break; - case 21: -#line 182 "repl_gram.y" /* yacc.c:1652 */ - { + case 21: /* base_backup_opt: K_PROGRESS */ +#line 182 "repl_gram.y" + { (yyval.defelt) = makeDefElem("progress", (Node *)makeInteger(true), -1); } -#line 1426 "repl_gram.c" /* yacc.c:1652 */ +#line 1385 "repl_gram.c" break; - case 22: -#line 187 "repl_gram.y" /* yacc.c:1652 */ - { + case 22: /* base_backup_opt: K_FAST */ +#line 187 "repl_gram.y" + { (yyval.defelt) = makeDefElem("fast", (Node *)makeInteger(true), -1); } -#line 1435 "repl_gram.c" /* yacc.c:1652 */ +#line 1394 "repl_gram.c" break; - case 23: -#line 192 "repl_gram.y" /* yacc.c:1652 */ - { + case 23: /* base_backup_opt: K_WAL */ +#line 192 "repl_gram.y" + { (yyval.defelt) = makeDefElem("wal", (Node *)makeInteger(true), -1); } -#line 1444 "repl_gram.c" /* yacc.c:1652 */ +#line 1403 "repl_gram.c" break; - case 24: -#line 197 "repl_gram.y" /* yacc.c:1652 */ - { + case 24: /* base_backup_opt: K_NOWAIT */ +#line 197 "repl_gram.y" + { (yyval.defelt) = makeDefElem("nowait", (Node *)makeInteger(true), -1); } -#line 1453 "repl_gram.c" /* yacc.c:1652 */ +#line 1412 "repl_gram.c" break; - case 25: -#line 202 "repl_gram.y" /* yacc.c:1652 */ - { + case 25: /* base_backup_opt: K_MAX_RATE UCONST */ +#line 202 "repl_gram.y" + { (yyval.defelt) = makeDefElem("max_rate", (Node *)makeInteger((yyvsp[0].uintval)), -1); } -#line 1462 "repl_gram.c" /* yacc.c:1652 */ +#line 1421 "repl_gram.c" break; - case 26: -#line 207 "repl_gram.y" /* yacc.c:1652 */ - { + case 26: /* base_backup_opt: K_TABLESPACE_MAP */ +#line 207 "repl_gram.y" + { (yyval.defelt) = makeDefElem("tablespace_map", (Node *)makeInteger(true), -1); } -#line 1471 "repl_gram.c" /* yacc.c:1652 */ +#line 1430 "repl_gram.c" break; - case 27: -#line 212 "repl_gram.y" /* yacc.c:1652 */ - { + case 27: /* base_backup_opt: K_NOVERIFY_CHECKSUMS */ +#line 212 "repl_gram.y" + { (yyval.defelt) = makeDefElem("noverify_checksums", (Node *)makeInteger(true), -1); } -#line 1480 "repl_gram.c" /* yacc.c:1652 */ +#line 1439 "repl_gram.c" break; - case 28: -#line 217 "repl_gram.y" /* yacc.c:1652 */ - { + case 28: /* base_backup_opt: K_MANIFEST SCONST */ +#line 217 "repl_gram.y" + { (yyval.defelt) = makeDefElem("manifest", (Node *)makeString((yyvsp[0].str)), -1); } -#line 1489 "repl_gram.c" /* yacc.c:1652 */ +#line 1448 "repl_gram.c" break; - case 29: -#line 222 "repl_gram.y" /* yacc.c:1652 */ - { + case 29: /* base_backup_opt: K_MANIFEST_CHECKSUMS SCONST */ +#line 222 "repl_gram.y" + { (yyval.defelt) = makeDefElem("manifest_checksums", (Node *)makeString((yyvsp[0].str)), -1); } -#line 1498 "repl_gram.c" /* yacc.c:1652 */ +#line 1457 "repl_gram.c" break; - case 30: -#line 231 "repl_gram.y" /* yacc.c:1652 */ - { + case 30: /* create_replication_slot: K_CREATE_REPLICATION_SLOT IDENT opt_temporary K_PHYSICAL create_slot_opt_list */ +#line 231 "repl_gram.y" + { CreateReplicationSlotCmd *cmd; cmd = makeNode(CreateReplicationSlotCmd); cmd->kind = REPLICATION_KIND_PHYSICAL; @@ -1508,12 +1467,12 @@ yyreduce: cmd->options = (yyvsp[0].list); (yyval.node) = (Node *) cmd; } -#line 1512 "repl_gram.c" /* yacc.c:1652 */ +#line 1471 "repl_gram.c" break; - case 31: -#line 242 "repl_gram.y" /* yacc.c:1652 */ - { + case 31: /* create_replication_slot: K_CREATE_REPLICATION_SLOT IDENT opt_temporary K_LOGICAL IDENT create_slot_opt_list */ +#line 242 "repl_gram.y" + { CreateReplicationSlotCmd *cmd; cmd = makeNode(CreateReplicationSlotCmd); cmd->kind = REPLICATION_KIND_LOGICAL; @@ -1523,84 +1482,84 @@ yyreduce: cmd->options = (yyvsp[0].list); (yyval.node) = (Node *) cmd; } -#line 1527 "repl_gram.c" /* yacc.c:1652 */ +#line 1486 "repl_gram.c" break; - case 32: -#line 256 "repl_gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } -#line 1533 "repl_gram.c" /* yacc.c:1652 */ + case 32: /* create_slot_opt_list: create_slot_opt_list create_slot_opt */ +#line 256 "repl_gram.y" + { (yyval.list) = lappend((yyvsp[-1].list), (yyvsp[0].defelt)); } +#line 1492 "repl_gram.c" break; - case 33: -#line 258 "repl_gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 1539 "repl_gram.c" /* yacc.c:1652 */ + case 33: /* create_slot_opt_list: %empty */ +#line 258 "repl_gram.y" + { (yyval.list) = NIL; } +#line 1498 "repl_gram.c" break; - case 34: -#line 263 "repl_gram.y" /* yacc.c:1652 */ - { + case 34: /* create_slot_opt: K_EXPORT_SNAPSHOT */ +#line 263 "repl_gram.y" + { (yyval.defelt) = makeDefElem("export_snapshot", (Node *)makeInteger(true), -1); } -#line 1548 "repl_gram.c" /* yacc.c:1652 */ +#line 1507 "repl_gram.c" break; - case 35: -#line 268 "repl_gram.y" /* yacc.c:1652 */ - { + case 35: /* create_slot_opt: K_NOEXPORT_SNAPSHOT */ +#line 268 "repl_gram.y" + { (yyval.defelt) = makeDefElem("export_snapshot", (Node *)makeInteger(false), -1); } -#line 1557 "repl_gram.c" /* yacc.c:1652 */ +#line 1516 "repl_gram.c" break; - case 36: -#line 273 "repl_gram.y" /* yacc.c:1652 */ - { + case 36: /* create_slot_opt: K_USE_SNAPSHOT */ +#line 273 "repl_gram.y" + { (yyval.defelt) = makeDefElem("use_snapshot", (Node *)makeInteger(true), -1); } -#line 1566 "repl_gram.c" /* yacc.c:1652 */ +#line 1525 "repl_gram.c" break; - case 37: -#line 278 "repl_gram.y" /* yacc.c:1652 */ - { + case 37: /* create_slot_opt: K_RESERVE_WAL */ +#line 278 "repl_gram.y" + { (yyval.defelt) = makeDefElem("reserve_wal", (Node *)makeInteger(true), -1); } -#line 1575 "repl_gram.c" /* yacc.c:1652 */ +#line 1534 "repl_gram.c" break; - case 38: -#line 287 "repl_gram.y" /* yacc.c:1652 */ - { + case 38: /* drop_replication_slot: K_DROP_REPLICATION_SLOT IDENT */ +#line 287 "repl_gram.y" + { DropReplicationSlotCmd *cmd; cmd = makeNode(DropReplicationSlotCmd); cmd->slotname = (yyvsp[0].str); cmd->wait = false; (yyval.node) = (Node *) cmd; } -#line 1587 "repl_gram.c" /* yacc.c:1652 */ +#line 1546 "repl_gram.c" break; - case 39: -#line 295 "repl_gram.y" /* yacc.c:1652 */ - { + case 39: /* drop_replication_slot: K_DROP_REPLICATION_SLOT IDENT K_WAIT */ +#line 295 "repl_gram.y" + { DropReplicationSlotCmd *cmd; cmd = makeNode(DropReplicationSlotCmd); cmd->slotname = (yyvsp[-1].str); cmd->wait = true; (yyval.node) = (Node *) cmd; } -#line 1599 "repl_gram.c" /* yacc.c:1652 */ +#line 1558 "repl_gram.c" break; - case 40: -#line 309 "repl_gram.y" /* yacc.c:1652 */ - { + case 40: /* start_replication: K_START_REPLICATION opt_slot opt_physical RECPTR opt_timeline */ +#line 309 "repl_gram.y" + { StartReplicationCmd *cmd; cmd = makeNode(StartReplicationCmd); @@ -1610,12 +1569,12 @@ yyreduce: cmd->timeline = (yyvsp[0].uintval); (yyval.node) = (Node *) cmd; } -#line 1614 "repl_gram.c" /* yacc.c:1652 */ +#line 1573 "repl_gram.c" break; - case 41: -#line 324 "repl_gram.y" /* yacc.c:1652 */ - { + case 41: /* start_logical_replication: K_START_REPLICATION K_SLOT IDENT K_LOGICAL RECPTR plugin_options */ +#line 324 "repl_gram.y" + { StartReplicationCmd *cmd; cmd = makeNode(StartReplicationCmd); cmd->kind = REPLICATION_KIND_LOGICAL; @@ -1624,12 +1583,12 @@ yyreduce: cmd->options = (yyvsp[0].list); (yyval.node) = (Node *) cmd; } -#line 1628 "repl_gram.c" /* yacc.c:1652 */ +#line 1587 "repl_gram.c" break; - case 42: -#line 339 "repl_gram.y" /* yacc.c:1652 */ - { + case 42: /* timeline_history: K_TIMELINE_HISTORY UCONST */ +#line 339 "repl_gram.y" + { TimeLineHistoryCmd *cmd; if ((yyvsp[0].uintval) <= 0) @@ -1642,101 +1601,102 @@ yyreduce: (yyval.node) = (Node *) cmd; } -#line 1646 "repl_gram.c" /* yacc.c:1652 */ +#line 1605 "repl_gram.c" break; - case 45: -#line 360 "repl_gram.y" /* yacc.c:1652 */ - { (yyval.boolval) = true; } -#line 1652 "repl_gram.c" /* yacc.c:1652 */ + case 45: /* opt_temporary: K_TEMPORARY */ +#line 360 "repl_gram.y" + { (yyval.boolval) = true; } +#line 1611 "repl_gram.c" break; - case 46: -#line 361 "repl_gram.y" /* yacc.c:1652 */ - { (yyval.boolval) = false; } -#line 1658 "repl_gram.c" /* yacc.c:1652 */ + case 46: /* opt_temporary: %empty */ +#line 361 "repl_gram.y" + { (yyval.boolval) = false; } +#line 1617 "repl_gram.c" break; - case 47: -#line 366 "repl_gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 1664 "repl_gram.c" /* yacc.c:1652 */ + case 47: /* opt_slot: K_SLOT IDENT */ +#line 366 "repl_gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 1623 "repl_gram.c" break; - case 48: -#line 368 "repl_gram.y" /* yacc.c:1652 */ - { (yyval.str) = NULL; } -#line 1670 "repl_gram.c" /* yacc.c:1652 */ + case 48: /* opt_slot: %empty */ +#line 368 "repl_gram.y" + { (yyval.str) = NULL; } +#line 1629 "repl_gram.c" break; - case 49: -#line 373 "repl_gram.y" /* yacc.c:1652 */ - { + case 49: /* opt_timeline: K_TIMELINE UCONST */ +#line 373 "repl_gram.y" + { if ((yyvsp[0].uintval) <= 0) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("invalid timeline %u", (yyvsp[0].uintval)))); (yyval.uintval) = (yyvsp[0].uintval); } -#line 1682 "repl_gram.c" /* yacc.c:1652 */ +#line 1641 "repl_gram.c" break; - case 50: -#line 380 "repl_gram.y" /* yacc.c:1652 */ - { (yyval.uintval) = 0; } -#line 1688 "repl_gram.c" /* yacc.c:1652 */ + case 50: /* opt_timeline: %empty */ +#line 380 "repl_gram.y" + { (yyval.uintval) = 0; } +#line 1647 "repl_gram.c" break; - case 51: -#line 385 "repl_gram.y" /* yacc.c:1652 */ - { (yyval.list) = (yyvsp[-1].list); } -#line 1694 "repl_gram.c" /* yacc.c:1652 */ + case 51: /* plugin_options: '(' plugin_opt_list ')' */ +#line 385 "repl_gram.y" + { (yyval.list) = (yyvsp[-1].list); } +#line 1653 "repl_gram.c" break; - case 52: -#line 386 "repl_gram.y" /* yacc.c:1652 */ - { (yyval.list) = NIL; } -#line 1700 "repl_gram.c" /* yacc.c:1652 */ + case 52: /* plugin_options: %empty */ +#line 386 "repl_gram.y" + { (yyval.list) = NIL; } +#line 1659 "repl_gram.c" break; - case 53: -#line 391 "repl_gram.y" /* yacc.c:1652 */ - { + case 53: /* plugin_opt_list: plugin_opt_elem */ +#line 391 "repl_gram.y" + { (yyval.list) = list_make1((yyvsp[0].defelt)); } -#line 1708 "repl_gram.c" /* yacc.c:1652 */ +#line 1667 "repl_gram.c" break; - case 54: -#line 395 "repl_gram.y" /* yacc.c:1652 */ - { + case 54: /* plugin_opt_list: plugin_opt_list ',' plugin_opt_elem */ +#line 395 "repl_gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].defelt)); } -#line 1716 "repl_gram.c" /* yacc.c:1652 */ +#line 1675 "repl_gram.c" break; - case 55: -#line 402 "repl_gram.y" /* yacc.c:1652 */ - { + case 55: /* plugin_opt_elem: IDENT plugin_opt_arg */ +#line 402 "repl_gram.y" + { (yyval.defelt) = makeDefElem((yyvsp[-1].str), (yyvsp[0].node), -1); } -#line 1724 "repl_gram.c" /* yacc.c:1652 */ +#line 1683 "repl_gram.c" break; - case 56: -#line 408 "repl_gram.y" /* yacc.c:1652 */ - { (yyval.node) = (Node *) makeString((yyvsp[0].str)); } -#line 1730 "repl_gram.c" /* yacc.c:1652 */ + case 56: /* plugin_opt_arg: SCONST */ +#line 408 "repl_gram.y" + { (yyval.node) = (Node *) makeString((yyvsp[0].str)); } +#line 1689 "repl_gram.c" break; - case 57: -#line 409 "repl_gram.y" /* yacc.c:1652 */ - { (yyval.node) = NULL; } -#line 1736 "repl_gram.c" /* yacc.c:1652 */ + case 57: /* plugin_opt_arg: %empty */ +#line 409 "repl_gram.y" + { (yyval.node) = NULL; } +#line 1695 "repl_gram.c" break; -#line 1740 "repl_gram.c" /* yacc.c:1652 */ +#line 1699 "repl_gram.c" + default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -1750,11 +1710,10 @@ yyreduce: case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -1778,50 +1737,14 @@ yyreduce: yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; -#if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif } - - if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an @@ -1870,13 +1793,14 @@ yyerrorlab: yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ + /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { yyn = yytable[yyn]; if (0 < yyn) @@ -1890,7 +1814,7 @@ yyerrlab1: yydestruct ("Error: popping", - yystos[yystate], yyvsp); + YY_ACCESSING_SYMBOL (yystate), yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -1902,7 +1826,7 @@ yyerrlab1: /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -1924,20 +1848,20 @@ yyabortlab: goto yyreturn; -#if !defined yyoverflow || YYERROR_VERBOSE +#if !defined yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - /* Fall through. */ + goto yyreturn; #endif -/*-----------------------------------------------------. -| yyreturn -- parsing is finished, return the result. | -`-----------------------------------------------------*/ +/*-------------------------------------------------------. +| yyreturn -- parsing is finished, clean up and return. | +`-------------------------------------------------------*/ yyreturn: if (yychar != YYEMPTY) { @@ -1954,20 +1878,18 @@ yyreturn: while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif + return yyresult; } -#line 412 "repl_gram.y" /* yacc.c:1918 */ + +#line 412 "repl_gram.y" #include "repl_scanner.c" diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/replication/syncrep_gram.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/replication/syncrep_gram.c index 5177a9eb4d7..5a53db63e76 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/replication/syncrep_gram.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/replication/syncrep_gram.c @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.3.2. */ +/* A Bison parser, made by GNU Bison 3.7.5. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -34,6 +34,10 @@ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. @@ -41,14 +45,11 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Undocumented macros, especially those whose name start with YY_, - are private implementation details. Do not rely on them. */ - -/* Identify Bison output. */ -#define YYBISON 1 +/* Identify Bison output, and Bison version. */ +#define YYBISON 30705 -/* Bison version. */ -#define YYBISON_VERSION "3.3.2" +/* Bison version string. */ +#define YYBISON_VERSION "3.7.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -69,12 +70,11 @@ #define yyerror syncrep_yyerror #define yydebug syncrep_yydebug #define yynerrs syncrep_yynerrs - #define yylval syncrep_yylval #define yychar syncrep_yychar /* First part of user prologue. */ -#line 1 "syncrep_gram.y" /* yacc.c:337 */ +#line 1 "syncrep_gram.y" /*------------------------------------------------------------------------- * @@ -112,7 +112,17 @@ static SyncRepConfigData *create_syncrep_config(const char *num_sync, #define YYFREE pfree -#line 116 "syncrep_gram.c" /* yacc.c:337 */ +#line 116 "syncrep_gram.c" + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast<Type> (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus @@ -125,14 +135,6 @@ static SyncRepConfigData *create_syncrep_config(const char *num_sync, # endif # endif -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - /* Debug traces. */ #ifndef YYDEBUG @@ -142,33 +144,37 @@ static SyncRepConfigData *create_syncrep_config(const char *num_sync, extern int syncrep_yydebug; #endif -/* Token type. */ +/* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { - NAME = 258, - NUM = 259, - JUNK = 260, - ANY = 261, - FIRST = 262 + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + NAME = 258, /* NAME */ + NUM = 259, /* NUM */ + JUNK = 260, /* JUNK */ + ANY = 261, /* ANY */ + FIRST = 262 /* FIRST */ }; + typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - union YYSTYPE { -#line 43 "syncrep_gram.y" /* yacc.c:352 */ +#line 43 "syncrep_gram.y" char *str; List *list; SyncRepConfigData *config; -#line 170 "syncrep_gram.c" /* yacc.c:352 */ -}; +#line 176 "syncrep_gram.c" +}; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 @@ -180,6 +186,29 @@ extern __thread YYSTYPE syncrep_yylval; int syncrep_yyparse (void); +/* Symbol kind. */ +enum yysymbol_kind_t +{ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_NAME = 3, /* NAME */ + YYSYMBOL_NUM = 4, /* NUM */ + YYSYMBOL_JUNK = 5, /* JUNK */ + YYSYMBOL_ANY = 6, /* ANY */ + YYSYMBOL_FIRST = 7, /* FIRST */ + YYSYMBOL_8_ = 8, /* '(' */ + YYSYMBOL_9_ = 9, /* ')' */ + YYSYMBOL_10_ = 10, /* ',' */ + YYSYMBOL_YYACCEPT = 11, /* $accept */ + YYSYMBOL_result = 12, /* result */ + YYSYMBOL_standby_config = 13, /* standby_config */ + YYSYMBOL_standby_list = 14, /* standby_list */ + YYSYMBOL_standby_name = 15 /* standby_name */ +}; +typedef enum yysymbol_kind_t yysymbol_kind_t; + @@ -187,28 +216,87 @@ int syncrep_yyparse (void); # undef short #endif -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; +/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure + <limits.h> and (if available) <stdint.h> are included + so that the code can choose integer types of a good width. */ + +#ifndef __PTRDIFF_MAX__ +# include <limits.h> /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include <stdint.h> /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif #endif -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; +/* Narrow types that promote to a signed type and that can represent a + signed or unsigned integer of at least N bits. In tables they can + save space and decrease cache pressure. Promoting to a signed type + helps avoid bugs in integer arithmetic. */ + +#ifdef __INT_LEAST8_MAX__ +typedef __INT_LEAST8_TYPE__ yytype_int8; +#elif defined YY_STDINT_H +typedef int_least8_t yytype_int8; #else typedef signed char yytype_int8; #endif -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; +#ifdef __INT_LEAST16_MAX__ +typedef __INT_LEAST16_TYPE__ yytype_int16; +#elif defined YY_STDINT_H +typedef int_least16_t yytype_int16; #else -typedef unsigned short yytype_uint16; +typedef short yytype_int16; +#endif + +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 #endif -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; +#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST8_TYPE__ yytype_uint8; +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) +typedef uint_least8_t yytype_uint8; +#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX +typedef unsigned char yytype_uint8; #else -typedef short yytype_int16; +typedef short yytype_uint8; +#endif + +#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST16_TYPE__ yytype_uint16; +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) +typedef uint_least16_t yytype_uint16; +#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX +typedef unsigned short yytype_uint16; +#else +typedef int yytype_uint16; +#endif + +#ifndef YYPTRDIFF_T +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif #endif #ifndef YYSIZE_T @@ -216,7 +304,7 @@ typedef short yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -224,7 +312,20 @@ typedef short yytype_int16; # endif #endif -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) + + +/* Stored state numbers (used for stacks). */ +typedef yytype_int8 yy_state_t; + +/* State numbers in computations. */ +typedef int yy_state_fast_t; #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS @@ -238,38 +339,37 @@ typedef short yytype_int16; # endif #endif -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif #ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif #endif #ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value @@ -282,8 +382,22 @@ typedef short yytype_int16; # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + + +#define YY_ASSERT(E) ((void) (0 && (E))) -#if ! defined yyoverflow || YYERROR_VERBOSE +#if !defined yyoverflow /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -348,8 +462,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - +#endif /* !defined yyoverflow */ #if (! defined yyoverflow \ && (! defined __cplusplus \ @@ -358,17 +471,17 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss_alloc; + yy_state_t yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 @@ -381,11 +494,11 @@ union yyalloc # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ - YYSIZE_T yynewbytes; \ + YYPTRDIFF_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ } \ while (0) @@ -397,12 +510,12 @@ union yyalloc # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ - YYSIZE_T yyi; \ + YYPTRDIFF_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ @@ -425,17 +538,20 @@ union yyalloc /* YYNSTATES -- Number of states. */ #define YYNSTATES 24 -#define YYUNDEFTOK 2 +/* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 262 + /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_uint8 yytranslate[] = +static const yytype_int8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -468,42 +584,55 @@ static const yytype_uint8 yytranslate[] = #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint8 yyrline[] = +static const yytype_int8 yyrline[] = { 0, 59, 59, 63, 64, 65, 66, 70, 71, 75, 76 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 0 +/** Accessing symbol of state STATE. */ +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) + +#if YYDEBUG || 0 +/* The user-facing name of the symbol whose (internal) number is + YYSYMBOL. No bounds checking. */ +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; + /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "NAME", "NUM", "JUNK", "ANY", "FIRST", - "'('", "')'", "','", "$accept", "result", "standby_config", - "standby_list", "standby_name", YY_NULLPTR + "\"end of file\"", "error", "\"invalid token\"", "NAME", "NUM", "JUNK", + "ANY", "FIRST", "'('", "')'", "','", "$accept", "result", + "standby_config", "standby_list", "standby_name", YY_NULLPTR }; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif -# ifdef YYPRINT +#ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = +static const yytype_int16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 40, 41, 44 }; -# endif +#endif -#define YYPACT_NINF -10 +#define YYPACT_NINF (-10) -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-10))) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF -1 +#define YYTABLE_NINF (-1) -#define yytable_value_is_error(Yytable_value) \ +#define yytable_value_is_error(Yyn) \ 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing @@ -518,7 +647,7 @@ static const yytype_int8 yypact[] = /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = +static const yytype_int8 yydefact[] = { 0, 9, 10, 0, 0, 0, 2, 3, 7, 0, 0, 0, 1, 0, 10, 0, 0, 0, 8, 4, @@ -534,20 +663,20 @@ static const yytype_int8 yypgoto[] = /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { - -1, 5, 6, 7, 8 + 0, 5, 6, 7, 8 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = +static const yytype_int8 yytable[] = { 15, 1, 2, 9, 3, 4, 13, 20, 21, 1, 14, 19, 13, 22, 13, 10, 23, 13, 11, 12, 16, 17, 18 }; -static const yytype_uint8 yycheck[] = +static const yytype_int8 yycheck[] = { 9, 3, 4, 8, 6, 7, 10, 16, 17, 3, 4, 9, 10, 9, 10, 4, 9, 10, 4, 0, @@ -556,7 +685,7 @@ static const yytype_uint8 yycheck[] = /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = +static const yytype_int8 yystos[] = { 0, 3, 4, 6, 7, 12, 13, 14, 15, 8, 4, 4, 0, 10, 4, 14, 8, 8, 15, 9, @@ -564,24 +693,24 @@ static const yytype_uint8 yystos[] = }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = +static const yytype_int8 yyr1[] = { 0, 11, 12, 13, 13, 13, 13, 14, 14, 15, 15 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +static const yytype_int8 yyr2[] = { 0, 2, 1, 1, 4, 5, 5, 1, 3, 1, 1 }; +enum { YYENOMEM = -2 }; + #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab @@ -607,10 +736,9 @@ static const yytype_uint8 yyr2[] = } \ while (0) -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - +/* Backward compatibility with an undocumented macro. + Use YYerror or YYUNDEF. */ +#define YYERRCODE YYUNDEF /* Enable debugging if requested. */ @@ -628,18 +756,18 @@ do { \ } while (0) /* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif +# ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ - Type, Value); \ + Kind, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) @@ -650,17 +778,20 @@ do { \ `-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { FILE *yyoutput = yyo; - YYUSE (yyoutput); + YY_USE (yyoutput); if (!yyvaluep) return; # ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyo, yytoknum[yytype], *yyvaluep); + if (yykind < YYNTOKENS) + YYPRINT (yyo, yytoknum[yykind], *yyvaluep); # endif - YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -669,12 +800,13 @@ yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) `---------------------------*/ static void -yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { YYFPRINTF (yyo, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - yy_symbol_value_print (yyo, yytype, yyvaluep); + yy_symbol_value_print (yyo, yykind, yyvaluep); YYFPRINTF (yyo, ")"); } @@ -684,7 +816,7 @@ yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) `------------------------------------------------------------------*/ static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -707,21 +839,21 @@ do { \ `------------------------------------------------*/ static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, + int yyrule) { - unsigned long yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &yyvsp[(yyi + 1) - (yynrhs)] - ); + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)]); YYFPRINTF (stderr, "\n"); } } @@ -736,8 +868,8 @@ do { \ multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -760,254 +892,30 @@ int yydebug; #endif -#if YYERROR_VERBOSE -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return 2; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - default: /* Avoid compiler warnings. */ - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return 2; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep) { - YYUSE (yyvaluep); + YY_USE (yyvaluep); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - - -/* The lookahead symbol. */ +/* Lookahead token kind. */ __thread int yychar; /* The semantic value of the lookahead symbol. */ @@ -1016,6 +924,8 @@ __thread YYSTYPE syncrep_yylval; __thread int yynerrs; + + /*----------. | yyparse. | `----------*/ @@ -1023,43 +933,36 @@ __thread int yynerrs; int yyparse (void) { - int yystate; + yy_state_fast_t yystate = 0; /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. + int yyerrstatus = 0; - Refer to the stacks through separate pointers, to allow yyoverflow + /* Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - YYSIZE_T yystacksize; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; int yyn; + /* The return value of yyparse. */ int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; + /* Lookahead symbol kind. */ + yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif + #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) @@ -1067,15 +970,8 @@ yyparse (void) Keep to zero when no symbol should be popped. */ int yylen = 0; - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - YYDPRINTF ((stderr, "Starting parse\n")); - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; @@ -1090,10 +986,15 @@ yynewstate: /*--------------------------------------------------------------------. -| yynewstate -- set current state (the top of the stack) to yystate. | +| yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - *yyssp = (yytype_int16) yystate; + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YY_IGNORE_USELESS_CAST_BEGIN + *yyssp = YY_CAST (yy_state_t, yystate); + YY_IGNORE_USELESS_CAST_END + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE @@ -1101,23 +1002,23 @@ yysetstate: #else { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); + YYPTRDIFF_T yysize = yyssp - yyss + 1; # if defined yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ + yy_state_t *yyss1 = yyss; YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; @@ -1131,14 +1032,15 @@ yysetstate: yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; + yy_state_t *yyss1 = yyss; union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE +# undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } @@ -1147,16 +1049,16 @@ yysetstate: yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long) yystacksize)); + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END if (yyss + yystacksize - 1 <= yyssp) YYABORT; } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - if (yystate == YYFINAL) YYACCEPT; @@ -1177,18 +1079,29 @@ yybackup: /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token: ")); + YYDPRINTF ((stderr, "Reading a token\n")); yychar = yylex (); } if (yychar <= YYEOF) { - yychar = yytoken = YYEOF; + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + goto yyerrlab1; + } else { yytoken = YYTRANSLATE (yychar); @@ -1216,15 +1129,13 @@ yybackup: /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END + /* Discard the shifted token. */ + yychar = YYEMPTY; goto yynewstate; @@ -1259,62 +1170,63 @@ yyreduce: YY_REDUCE_PRINT (yyn); switch (yyn) { - case 2: -#line 59 "syncrep_gram.y" /* yacc.c:1652 */ - { syncrep_parse_result = (yyvsp[0].config); } -#line 1266 "syncrep_gram.c" /* yacc.c:1652 */ + case 2: /* result: standby_config */ +#line 59 "syncrep_gram.y" + { syncrep_parse_result = (yyvsp[0].config); } +#line 1177 "syncrep_gram.c" break; - case 3: -#line 63 "syncrep_gram.y" /* yacc.c:1652 */ - { (yyval.config) = create_syncrep_config("1", (yyvsp[0].list), SYNC_REP_PRIORITY); } -#line 1272 "syncrep_gram.c" /* yacc.c:1652 */ + case 3: /* standby_config: standby_list */ +#line 63 "syncrep_gram.y" + { (yyval.config) = create_syncrep_config("1", (yyvsp[0].list), SYNC_REP_PRIORITY); } +#line 1183 "syncrep_gram.c" break; - case 4: -#line 64 "syncrep_gram.y" /* yacc.c:1652 */ - { (yyval.config) = create_syncrep_config((yyvsp[-3].str), (yyvsp[-1].list), SYNC_REP_PRIORITY); } -#line 1278 "syncrep_gram.c" /* yacc.c:1652 */ + case 4: /* standby_config: NUM '(' standby_list ')' */ +#line 64 "syncrep_gram.y" + { (yyval.config) = create_syncrep_config((yyvsp[-3].str), (yyvsp[-1].list), SYNC_REP_PRIORITY); } +#line 1189 "syncrep_gram.c" break; - case 5: -#line 65 "syncrep_gram.y" /* yacc.c:1652 */ - { (yyval.config) = create_syncrep_config((yyvsp[-3].str), (yyvsp[-1].list), SYNC_REP_QUORUM); } -#line 1284 "syncrep_gram.c" /* yacc.c:1652 */ + case 5: /* standby_config: ANY NUM '(' standby_list ')' */ +#line 65 "syncrep_gram.y" + { (yyval.config) = create_syncrep_config((yyvsp[-3].str), (yyvsp[-1].list), SYNC_REP_QUORUM); } +#line 1195 "syncrep_gram.c" break; - case 6: -#line 66 "syncrep_gram.y" /* yacc.c:1652 */ - { (yyval.config) = create_syncrep_config((yyvsp[-3].str), (yyvsp[-1].list), SYNC_REP_PRIORITY); } -#line 1290 "syncrep_gram.c" /* yacc.c:1652 */ + case 6: /* standby_config: FIRST NUM '(' standby_list ')' */ +#line 66 "syncrep_gram.y" + { (yyval.config) = create_syncrep_config((yyvsp[-3].str), (yyvsp[-1].list), SYNC_REP_PRIORITY); } +#line 1201 "syncrep_gram.c" break; - case 7: -#line 70 "syncrep_gram.y" /* yacc.c:1652 */ - { (yyval.list) = list_make1((yyvsp[0].str)); } -#line 1296 "syncrep_gram.c" /* yacc.c:1652 */ + case 7: /* standby_list: standby_name */ +#line 70 "syncrep_gram.y" + { (yyval.list) = list_make1((yyvsp[0].str)); } +#line 1207 "syncrep_gram.c" break; - case 8: -#line 71 "syncrep_gram.y" /* yacc.c:1652 */ - { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].str)); } -#line 1302 "syncrep_gram.c" /* yacc.c:1652 */ + case 8: /* standby_list: standby_list ',' standby_name */ +#line 71 "syncrep_gram.y" + { (yyval.list) = lappend((yyvsp[-2].list), (yyvsp[0].str)); } +#line 1213 "syncrep_gram.c" break; - case 9: -#line 75 "syncrep_gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 1308 "syncrep_gram.c" /* yacc.c:1652 */ + case 9: /* standby_name: NAME */ +#line 75 "syncrep_gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 1219 "syncrep_gram.c" break; - case 10: -#line 76 "syncrep_gram.y" /* yacc.c:1652 */ - { (yyval.str) = (yyvsp[0].str); } -#line 1314 "syncrep_gram.c" /* yacc.c:1652 */ + case 10: /* standby_name: NUM */ +#line 76 "syncrep_gram.y" + { (yyval.str) = (yyvsp[0].str); } +#line 1225 "syncrep_gram.c" break; -#line 1318 "syncrep_gram.c" /* yacc.c:1652 */ +#line 1229 "syncrep_gram.c" + default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -1328,11 +1240,10 @@ yyreduce: case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -1356,50 +1267,14 @@ yyreduce: yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; -#if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif } - - if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an @@ -1448,13 +1323,14 @@ yyerrorlab: yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ + /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { yyn = yytable[yyn]; if (0 < yyn) @@ -1468,7 +1344,7 @@ yyerrlab1: yydestruct ("Error: popping", - yystos[yystate], yyvsp); + YY_ACCESSING_SYMBOL (yystate), yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -1480,7 +1356,7 @@ yyerrlab1: /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -1502,20 +1378,20 @@ yyabortlab: goto yyreturn; -#if !defined yyoverflow || YYERROR_VERBOSE +#if !defined yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - /* Fall through. */ + goto yyreturn; #endif -/*-----------------------------------------------------. -| yyreturn -- parsing is finished, return the result. | -`-----------------------------------------------------*/ +/*-------------------------------------------------------. +| yyreturn -- parsing is finished, clean up and return. | +`-------------------------------------------------------*/ yyreturn: if (yychar != YYEMPTY) { @@ -1532,20 +1408,18 @@ yyreturn: while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif + return yyresult; } -#line 78 "syncrep_gram.y" /* yacc.c:1918 */ + +#line 78 "syncrep_gram.y" static SyncRepConfigData * diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/rewrite/rewriteSearchCycle.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/rewrite/rewriteSearchCycle.c index b657c7e6ba9..175f33cccc4 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/rewrite/rewriteSearchCycle.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/rewrite/rewriteSearchCycle.c @@ -383,19 +383,32 @@ rewriteSearchAndCycle(CommonTableExpr *cte) newrte->eref = newrte->alias; /* - * Find the reference to our CTE in the range table + * Find the reference to the recursive CTE in the right UNION subquery's + * range table. We expect it to be two levels up from the UNION subquery + * (and must check that to avoid being fooled by sub-WITHs with the same + * CTE name). There will not be more than one such reference, because the + * parser would have rejected that (see checkWellFormedRecursion() in + * parse_cte.c). However, the parser doesn't insist that the reference + * appear in the UNION subquery's topmost range table, so we might fail to + * find it at all. That's an unimplemented case for the moment. */ for (int rti = 1; rti <= list_length(rte2->subquery->rtable); rti++) { RangeTblEntry *e = rt_fetch(rti, rte2->subquery->rtable); - if (e->rtekind == RTE_CTE && strcmp(cte->ctename, e->ctename) == 0) + if (e->rtekind == RTE_CTE && + strcmp(cte->ctename, e->ctename) == 0 && + e->ctelevelsup == 2) { cte_rtindex = rti; break; } } - Assert(cte_rtindex > 0); + if (cte_rtindex <= 0) + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("with a SEARCH or CYCLE clause, the recursive reference to WITH query \"%s\" must be at the top level of its right-hand SELECT", + cte->ctename))); newsubquery = copyObject(rte2->subquery); IncrementVarSublevelsUp((Node *) newsubquery, 1, 1); diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/buffer/bufmgr.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/buffer/bufmgr.c index 570dd25a629..9d109622f3d 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/buffer/bufmgr.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/buffer/bufmgr.c @@ -3946,7 +3946,9 @@ MarkBufferDirtyHint(Buffer buffer, bool buffer_std) * essential that CreateCheckpoint waits for virtual transactions * rather than full transactionids. */ - MyProc->delayChkpt = delayChkpt = true; + Assert(!MyProc->delayChkpt); + MyProc->delayChkpt = true; + delayChkpt = true; lsn = XLogSaveBufferForHint(buffer, buffer_std); } diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/ipc/latch.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/ipc/latch.c index c90329d2067..6a5c4381995 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/ipc/latch.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/ipc/latch.c @@ -43,6 +43,9 @@ #ifdef HAVE_SYS_EVENT_H #include <sys/event.h> #endif +#ifdef HAVE_SYS_SIGNALFD_H +#include <sys/signalfd.h> +#endif #ifdef HAVE_POLL_H #include <poll.h> #endif @@ -69,7 +72,7 @@ #if defined(WAIT_USE_EPOLL) || defined(WAIT_USE_POLL) || \ defined(WAIT_USE_KQUEUE) || defined(WAIT_USE_WIN32) /* don't overwrite manual choice */ -#elif defined(HAVE_SYS_EPOLL_H) +#elif defined(HAVE_SYS_EPOLL_H) && defined(HAVE_SYS_SIGNALFD_H) #define WAIT_USE_EPOLL #elif defined(HAVE_KQUEUE) #define WAIT_USE_KQUEUE @@ -81,10 +84,6 @@ #error "no wait set implementation available" #endif -#ifdef WAIT_USE_EPOLL -#include <sys/signalfd.h> -#endif - /* typedef in latch.h */ struct WaitEventSet { @@ -691,7 +690,7 @@ CreateWaitEventSet(MemoryContext context, int nevents) * Use MAXALIGN size/alignment to guarantee that later uses of memory are * aligned correctly. E.g. epoll_event might need 8 byte alignment on some * platforms, but earlier allocations like WaitEventSet and WaitEvent - * might not sized to guarantee that when purely using sizeof(). + * might not be sized to guarantee that when purely using sizeof(). */ sz += MAXALIGN(sizeof(WaitEventSet)); sz += MAXALIGN(sizeof(WaitEvent) * nevents); diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/ipc/procarray.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/ipc/procarray.c index 184b0e4b955..7eabe9ce1fc 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/ipc/procarray.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/ipc/procarray.c @@ -330,6 +330,11 @@ static void DisplayXidCache(void); #define xc_slow_answer_inc() ((void) 0) #endif /* XIDCACHE_DEBUG */ +static VirtualTransactionId *GetVirtualXIDsDelayingChkptGuts(int *nvxids, + int type); +static bool HaveVirtualXIDsDelayingChkptGuts(VirtualTransactionId *vxids, + int nvxids, int type); + /* Primitives for KnownAssignedXids array handling for standby */ static void KnownAssignedXidsCompress(bool force); static void KnownAssignedXidsAdd(TransactionId from_xid, TransactionId to_xid, @@ -689,7 +694,11 @@ ProcArrayEndTransaction(PGPROC *proc, TransactionId latestXid) proc->lxid = InvalidLocalTransactionId; proc->xmin = InvalidTransactionId; - proc->delayChkpt = false; /* be sure this is cleared in abort */ + + /* be sure these are cleared in abort */ + proc->delayChkpt = false; + proc->delayChkptEnd = false; + proc->recoveryConflictPending = false; /* must be cleared with xid/xmin: */ @@ -728,7 +737,11 @@ ProcArrayEndTransactionInternal(PGPROC *proc, TransactionId latestXid) proc->xid = InvalidTransactionId; proc->lxid = InvalidLocalTransactionId; proc->xmin = InvalidTransactionId; - proc->delayChkpt = false; /* be sure this is cleared in abort */ + + /* be sure these are cleared in abort */ + proc->delayChkpt = false; + proc->delayChkptEnd = false; + proc->recoveryConflictPending = false; /* must be cleared with xid/xmin: */ @@ -3039,31 +3052,36 @@ GetOldestSafeDecodingTransactionId(bool catalogOnly) } /* - * GetVirtualXIDsDelayingChkpt -- Get the VXIDs of transactions that are - * delaying checkpoint because they have critical actions in progress. + * GetVirtualXIDsDelayingChkptGuts -- Get the VXIDs of transactions that are + * delaying the start or end of a checkpoint because they have critical + * actions in progress. * * Constructs an array of VXIDs of transactions that are currently in commit - * critical sections, as shown by having delayChkpt set in their PGPROC. + * critical sections, as shown by having delayChkpt or delayChkptEnd set in + * their PGPROC. * * Returns a palloc'd array that should be freed by the caller. * *nvxids is the number of valid entries. * - * Note that because backends set or clear delayChkpt without holding any lock, - * the result is somewhat indeterminate, but we don't really care. Even in - * a multiprocessor with delayed writes to shared memory, it should be certain - * that setting of delayChkpt will propagate to shared memory when the backend - * takes a lock, so we cannot fail to see a virtual xact as delayChkpt if - * it's already inserted its commit record. Whether it takes a little while - * for clearing of delayChkpt to propagate is unimportant for correctness. + * Note that because backends set or clear delayChkpt and delayChkptEnd + * without holding any lock, the result is somewhat indeterminate, but we + * don't really care. Even in a multiprocessor with delayed writes to + * shared memory, it should be certain that setting of delayChkpt will + * propagate to shared memory when the backend takes a lock, so we cannot + * fail to see a virtual xact as delayChkpt if it's already inserted its + * commit record. Whether it takes a little while for clearing of + * delayChkpt to propagate is unimportant for correctness. */ -VirtualTransactionId * -GetVirtualXIDsDelayingChkpt(int *nvxids) +static VirtualTransactionId * +GetVirtualXIDsDelayingChkptGuts(int *nvxids, int type) { VirtualTransactionId *vxids; ProcArrayStruct *arrayP = procArray; int count = 0; int index; + Assert(type != 0); + /* allocate what's certainly enough result space */ vxids = (VirtualTransactionId *) palloc(sizeof(VirtualTransactionId) * arrayP->maxProcs); @@ -3075,7 +3093,8 @@ GetVirtualXIDsDelayingChkpt(int *nvxids) int pgprocno = arrayP->pgprocnos[index]; PGPROC *proc = &allProcs[pgprocno]; - if (proc->delayChkpt) + if (((type & DELAY_CHKPT_START) && proc->delayChkpt) || + ((type & DELAY_CHKPT_COMPLETE) && proc->delayChkptEnd)) { VirtualTransactionId vxid; @@ -3092,6 +3111,26 @@ GetVirtualXIDsDelayingChkpt(int *nvxids) } /* + * GetVirtualXIDsDelayingChkpt - Get the VXIDs of transactions that are + * delaying the start of a checkpoint. + */ +VirtualTransactionId * +GetVirtualXIDsDelayingChkpt(int *nvxids) +{ + return GetVirtualXIDsDelayingChkptGuts(nvxids, DELAY_CHKPT_START); +} + +/* + * GetVirtualXIDsDelayingChkptEnd - Get the VXIDs of transactions that are + * delaying the end of a checkpoint. + */ +VirtualTransactionId * +GetVirtualXIDsDelayingChkptEnd(int *nvxids) +{ + return GetVirtualXIDsDelayingChkptGuts(nvxids, DELAY_CHKPT_COMPLETE); +} + +/* * HaveVirtualXIDsDelayingChkpt -- Are any of the specified VXIDs delaying? * * This is used with the results of GetVirtualXIDsDelayingChkpt to see if any @@ -3100,13 +3139,16 @@ GetVirtualXIDsDelayingChkpt(int *nvxids) * Note: this is O(N^2) in the number of vxacts that are/were delaying, but * those numbers should be small enough for it not to be a problem. */ -bool -HaveVirtualXIDsDelayingChkpt(VirtualTransactionId *vxids, int nvxids) +static bool +HaveVirtualXIDsDelayingChkptGuts(VirtualTransactionId *vxids, int nvxids, + int type) { bool result = false; ProcArrayStruct *arrayP = procArray; int index; + Assert(type != 0); + LWLockAcquire(ProcArrayLock, LW_SHARED); for (index = 0; index < arrayP->numProcs; index++) @@ -3117,7 +3159,9 @@ HaveVirtualXIDsDelayingChkpt(VirtualTransactionId *vxids, int nvxids) GET_VXID_FROM_PGPROC(vxid, *proc); - if (proc->delayChkpt && VirtualTransactionIdIsValid(vxid)) + if ((((type & DELAY_CHKPT_START) && proc->delayChkpt) || + ((type & DELAY_CHKPT_COMPLETE) && proc->delayChkptEnd)) && + VirtualTransactionIdIsValid(vxid)) { int i; @@ -3140,6 +3184,28 @@ HaveVirtualXIDsDelayingChkpt(VirtualTransactionId *vxids, int nvxids) } /* + * HaveVirtualXIDsDelayingChkpt -- Are any of the specified VXIDs delaying + * the start of a checkpoint? + */ +bool +HaveVirtualXIDsDelayingChkpt(VirtualTransactionId *vxids, int nvxids) +{ + return HaveVirtualXIDsDelayingChkptGuts(vxids, nvxids, + DELAY_CHKPT_START); +} + +/* + * HaveVirtualXIDsDelayingChkptEnd -- Are any of the specified VXIDs delaying + * the end of a checkpoint? + */ +bool +HaveVirtualXIDsDelayingChkptEnd(VirtualTransactionId *vxids, int nvxids) +{ + return HaveVirtualXIDsDelayingChkptGuts(vxids, nvxids, + DELAY_CHKPT_COMPLETE); +} + +/* * BackendPidGetProc -- get a backend's PGPROC given its PID * * Returns NULL if not found. Note that it is up to the caller to be diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/ipc/shm_mq.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/ipc/shm_mq.c index 8a46962f939..3240af4872a 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/ipc/shm_mq.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/ipc/shm_mq.c @@ -748,8 +748,11 @@ shm_mq_receive(shm_mq_handle *mqh, Size *nbytesp, void **datap, bool nowait) /* Copy as much as we can. */ Assert(mqh->mqh_partial_bytes + rb <= nbytes); - memcpy(&mqh->mqh_buffer[mqh->mqh_partial_bytes], rawdata, rb); - mqh->mqh_partial_bytes += rb; + if (rb > 0) + { + memcpy(&mqh->mqh_buffer[mqh->mqh_partial_bytes], rawdata, rb); + mqh->mqh_partial_bytes += rb; + } /* * Update count of bytes that can be consumed, accounting for diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/ipc/standby.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/ipc/standby.c index 9d61da319ef..acced62ab02 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/ipc/standby.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/ipc/standby.c @@ -45,6 +45,7 @@ static __thread HTAB *RecoveryLockLists; /* Flags set by timeout handlers */ static __thread volatile sig_atomic_t got_standby_deadlock_timeout = false; +static __thread volatile sig_atomic_t got_standby_delay_timeout = false; static __thread volatile sig_atomic_t got_standby_lock_timeout = false; static void ResolveRecoveryConflictWithVirtualXIDs(VirtualTransactionId *waitlist, @@ -793,7 +794,8 @@ ResolveRecoveryConflictWithBufferPin(void) } /* - * Wait to be signaled by UnpinBuffer(). + * Wait to be signaled by UnpinBuffer() or for the wait to be interrupted + * by one of the timeouts established above. * * We assume that only UnpinBuffer() and the timeout requests established * above can wake us up here. WakeupRecovery() called by walreceiver or @@ -802,7 +804,9 @@ ResolveRecoveryConflictWithBufferPin(void) */ ProcWaitForSignal(PG_WAIT_BUFFER_PIN); - if (got_standby_deadlock_timeout) + if (got_standby_delay_timeout) + SendRecoveryConflictWithBufferPin(PROCSIG_RECOVERY_CONFLICT_BUFFERPIN); + else if (got_standby_deadlock_timeout) { /* * Send out a request for hot-standby backends to check themselves for @@ -828,6 +832,7 @@ ResolveRecoveryConflictWithBufferPin(void) * individually, but that'd be slower. */ disable_all_timeouts(false); + got_standby_delay_timeout = false; got_standby_deadlock_timeout = false; } @@ -887,8 +892,8 @@ CheckRecoveryConflictDeadlock(void) */ /* - * StandbyDeadLockHandler() will be called if STANDBY_DEADLOCK_TIMEOUT - * occurs before STANDBY_TIMEOUT. + * StandbyDeadLockHandler() will be called if STANDBY_DEADLOCK_TIMEOUT is + * exceeded. */ void StandbyDeadLockHandler(void) @@ -898,16 +903,11 @@ StandbyDeadLockHandler(void) /* * StandbyTimeoutHandler() will be called if STANDBY_TIMEOUT is exceeded. - * Send out a request to release conflicting buffer pins unconditionally, - * so we can press ahead with applying changes in recovery. */ void StandbyTimeoutHandler(void) { - /* forget any pending STANDBY_DEADLOCK_TIMEOUT request */ - disable_timeout(STANDBY_DEADLOCK_TIMEOUT, false); - - SendRecoveryConflictWithBufferPin(PROCSIG_RECOVERY_CONFLICT_BUFFERPIN); + got_standby_delay_timeout = true; } /* diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/lmgr/proc.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/lmgr/proc.c index 64c4678489f..1faba0849d5 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/lmgr/proc.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/lmgr/proc.c @@ -394,7 +394,7 @@ InitProcess(void) MyProc->roleId = InvalidOid; MyProc->tempNamespaceId = InvalidOid; MyProc->isBackgroundWorker = IsBackgroundWorker; - MyProc->delayChkpt = false; + MyProc->delayChkpt = 0; MyProc->statusFlags = 0; /* NB -- autovac launcher intentionally does not set IS_AUTOVACUUM */ if (IsAutoVacuumWorkerProcess()) @@ -579,7 +579,7 @@ InitAuxiliaryProcess(void) MyProc->roleId = InvalidOid; MyProc->tempNamespaceId = InvalidOid; MyProc->isBackgroundWorker = IsBackgroundWorker; - MyProc->delayChkpt = false; + MyProc->delayChkpt = 0; MyProc->statusFlags = 0; MyProc->lwWaiting = false; MyProc->lwWaitMode = 0; diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/sync/sync.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/sync/sync.c index 6754fb58f4d..dbb5c29d147 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/sync/sync.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/storage/sync/sync.c @@ -30,6 +30,7 @@ #include "postmaster/bgwriter.h" #include "storage/bufmgr.h" #include "storage/ipc.h" +#include "storage/latch.h" #include "storage/md.h" #include "utils/hsearch.h" #include "utils/inval.h" @@ -172,7 +173,9 @@ InitSync(void) * counter is incremented here. * * This must be called *before* the checkpoint REDO point is determined. - * That ensures that we won't delete files too soon. + * That ensures that we won't delete files too soon. Since this calls + * AbsorbSyncRequests(), which performs memory allocations, it cannot be + * called within a critical section. * * Note that we can't do anything here that depends on the assumption * that the checkpoint will be completed. @@ -181,6 +184,16 @@ void SyncPreCheckpoint(void) { /* + * Operations such as DROP TABLESPACE assume that the next checkpoint will + * process all recently forwarded unlink requests, but if they aren't + * absorbed prior to advancing the cycle counter, they won't be processed + * until a future checkpoint. The following absorb ensures that any + * unlink requests forwarded before the checkpoint began will be processed + * in the current checkpoint. + */ + AbsorbSyncRequests(); + + /* * Any unlink requests arriving after this point will be assigned the next * cycle counter, and won't be unlinked until next checkpoint. */ @@ -606,7 +619,8 @@ RegisterSyncRequest(const FileTag *ftag, SyncRequestType type, if (ret || (!ret && !retryOnError)) break; - pg_usleep(10000L); + WaitLatch(NULL, WL_EXIT_ON_PM_DEATH | WL_TIMEOUT, 10, + WAIT_EVENT_REGISTER_SYNC_REQUEST); } return ret; diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/tcop/postgres.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/tcop/postgres.c index 537bd23677b..abd8ef0e7d3 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/tcop/postgres.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/tcop/postgres.c @@ -3415,7 +3415,9 @@ ia64_get_bsp(void) pg_stack_base_t set_stack_base(void) { +#ifndef HAVE__BUILTIN_FRAME_ADDRESS char stack_base; +#endif pg_stack_base_t old; #if defined(__ia64__) || defined(__ia64) @@ -3425,8 +3427,16 @@ set_stack_base(void) old = stack_base_ptr; #endif - /* Set up reference point for stack depth checking */ + /* + * Set up reference point for stack depth checking. On recent gcc we use + * __builtin_frame_address() to avoid a warning about storing a local + * variable's address in a long-lived variable. + */ +#ifdef HAVE__BUILTIN_FRAME_ADDRESS + stack_base_ptr = __builtin_frame_address(0); +#else stack_base_ptr = &stack_base; +#endif #if defined(__ia64__) || defined(__ia64) register_stack_base_ptr = ia64_get_bsp(); #endif diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/activity/wait_event.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/activity/wait_event.c index 6baf67740c7..1a30faf8ad4 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/activity/wait_event.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/activity/wait_event.c @@ -473,6 +473,9 @@ pgstat_get_wait_timeout(WaitEventTimeout w) case WAIT_EVENT_BASE_BACKUP_THROTTLE: event_name = "BaseBackupThrottle"; break; + case WAIT_EVENT_CHECKPOINT_WRITE_DELAY: + event_name = "CheckpointWriteDelay"; + break; case WAIT_EVENT_PG_SLEEP: event_name = "PgSleep"; break; @@ -482,6 +485,9 @@ pgstat_get_wait_timeout(WaitEventTimeout w) case WAIT_EVENT_RECOVERY_RETRIEVE_RETRY_INTERVAL: event_name = "RecoveryRetrieveRetryInterval"; break; + case WAIT_EVENT_REGISTER_SYNC_REQUEST: + event_name = "RegisterSyncRequest"; + break; case WAIT_EVENT_VACUUM_DELAY: event_name = "VacuumDelay"; break; diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/jsonpath_gram.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/jsonpath_gram.c index 7c3f4947ce3..a933dfdc659 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/jsonpath_gram.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/jsonpath_gram.c @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.3.2. */ +/* A Bison parser, made by GNU Bison 3.7.5. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -34,6 +34,10 @@ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. @@ -41,14 +45,11 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Undocumented macros, especially those whose name start with YY_, - are private implementation details. Do not rely on them. */ - -/* Identify Bison output. */ -#define YYBISON 1 +/* Identify Bison output, and Bison version. */ +#define YYBISON 30705 -/* Bison version. */ -#define YYBISON_VERSION "3.3.2" +/* Bison version string. */ +#define YYBISON_VERSION "3.7.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -70,9 +71,8 @@ #define yydebug jsonpath_yydebug #define yynerrs jsonpath_yynerrs - /* First part of user prologue. */ -#line 1 "jsonpath_gram.y" /* yacc.c:337 */ +#line 1 "jsonpath_gram.y" /*------------------------------------------------------------------------- * @@ -144,7 +144,17 @@ static JsonPathParseItem *makeItemLikeRegex(JsonPathParseItem *expr, #define YYFREE pfree -#line 148 "jsonpath_gram.c" /* yacc.c:337 */ +#line 148 "jsonpath_gram.c" + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast<Type> (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus @@ -157,14 +167,6 @@ static JsonPathParseItem *makeItemLikeRegex(JsonPathParseItem *expr, # endif # endif -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - /* Debug traces. */ #ifndef YYDEBUG @@ -174,58 +176,62 @@ static JsonPathParseItem *makeItemLikeRegex(JsonPathParseItem *expr, extern int jsonpath_yydebug; #endif -/* Token type. */ +/* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { - TO_P = 258, - NULL_P = 259, - TRUE_P = 260, - FALSE_P = 261, - IS_P = 262, - UNKNOWN_P = 263, - EXISTS_P = 264, - IDENT_P = 265, - STRING_P = 266, - NUMERIC_P = 267, - INT_P = 268, - VARIABLE_P = 269, - OR_P = 270, - AND_P = 271, - NOT_P = 272, - LESS_P = 273, - LESSEQUAL_P = 274, - EQUAL_P = 275, - NOTEQUAL_P = 276, - GREATEREQUAL_P = 277, - GREATER_P = 278, - ANY_P = 279, - STRICT_P = 280, - LAX_P = 281, - LAST_P = 282, - STARTS_P = 283, - WITH_P = 284, - LIKE_REGEX_P = 285, - FLAG_P = 286, - ABS_P = 287, - SIZE_P = 288, - TYPE_P = 289, - FLOOR_P = 290, - DOUBLE_P = 291, - CEILING_P = 292, - KEYVALUE_P = 293, - DATETIME_P = 294, - UMINUS = 295 + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + TO_P = 258, /* TO_P */ + NULL_P = 259, /* NULL_P */ + TRUE_P = 260, /* TRUE_P */ + FALSE_P = 261, /* FALSE_P */ + IS_P = 262, /* IS_P */ + UNKNOWN_P = 263, /* UNKNOWN_P */ + EXISTS_P = 264, /* EXISTS_P */ + IDENT_P = 265, /* IDENT_P */ + STRING_P = 266, /* STRING_P */ + NUMERIC_P = 267, /* NUMERIC_P */ + INT_P = 268, /* INT_P */ + VARIABLE_P = 269, /* VARIABLE_P */ + OR_P = 270, /* OR_P */ + AND_P = 271, /* AND_P */ + NOT_P = 272, /* NOT_P */ + LESS_P = 273, /* LESS_P */ + LESSEQUAL_P = 274, /* LESSEQUAL_P */ + EQUAL_P = 275, /* EQUAL_P */ + NOTEQUAL_P = 276, /* NOTEQUAL_P */ + GREATEREQUAL_P = 277, /* GREATEREQUAL_P */ + GREATER_P = 278, /* GREATER_P */ + ANY_P = 279, /* ANY_P */ + STRICT_P = 280, /* STRICT_P */ + LAX_P = 281, /* LAX_P */ + LAST_P = 282, /* LAST_P */ + STARTS_P = 283, /* STARTS_P */ + WITH_P = 284, /* WITH_P */ + LIKE_REGEX_P = 285, /* LIKE_REGEX_P */ + FLAG_P = 286, /* FLAG_P */ + ABS_P = 287, /* ABS_P */ + SIZE_P = 288, /* SIZE_P */ + TYPE_P = 289, /* TYPE_P */ + FLOOR_P = 290, /* FLOOR_P */ + DOUBLE_P = 291, /* DOUBLE_P */ + CEILING_P = 292, /* CEILING_P */ + KEYVALUE_P = 293, /* KEYVALUE_P */ + DATETIME_P = 294, /* DATETIME_P */ + UMINUS = 295 /* UMINUS */ }; + typedef enum yytokentype yytoken_kind_t; #endif /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - union YYSTYPE { -#line 80 "jsonpath_gram.y" /* yacc.c:352 */ +#line 80 "jsonpath_gram.y" JsonPathString str; List *elems; /* list of JsonPathParseItem */ @@ -236,9 +242,9 @@ union YYSTYPE bool boolean; int integer; -#line 240 "jsonpath_gram.c" /* yacc.c:352 */ -}; +#line 246 "jsonpath_gram.c" +}; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 @@ -249,6 +255,93 @@ typedef union YYSTYPE YYSTYPE; int jsonpath_yyparse (JsonPathParseResult **result); +/* Symbol kind. */ +enum yysymbol_kind_t +{ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_TO_P = 3, /* TO_P */ + YYSYMBOL_NULL_P = 4, /* NULL_P */ + YYSYMBOL_TRUE_P = 5, /* TRUE_P */ + YYSYMBOL_FALSE_P = 6, /* FALSE_P */ + YYSYMBOL_IS_P = 7, /* IS_P */ + YYSYMBOL_UNKNOWN_P = 8, /* UNKNOWN_P */ + YYSYMBOL_EXISTS_P = 9, /* EXISTS_P */ + YYSYMBOL_IDENT_P = 10, /* IDENT_P */ + YYSYMBOL_STRING_P = 11, /* STRING_P */ + YYSYMBOL_NUMERIC_P = 12, /* NUMERIC_P */ + YYSYMBOL_INT_P = 13, /* INT_P */ + YYSYMBOL_VARIABLE_P = 14, /* VARIABLE_P */ + YYSYMBOL_OR_P = 15, /* OR_P */ + YYSYMBOL_AND_P = 16, /* AND_P */ + YYSYMBOL_NOT_P = 17, /* NOT_P */ + YYSYMBOL_LESS_P = 18, /* LESS_P */ + YYSYMBOL_LESSEQUAL_P = 19, /* LESSEQUAL_P */ + YYSYMBOL_EQUAL_P = 20, /* EQUAL_P */ + YYSYMBOL_NOTEQUAL_P = 21, /* NOTEQUAL_P */ + YYSYMBOL_GREATEREQUAL_P = 22, /* GREATEREQUAL_P */ + YYSYMBOL_GREATER_P = 23, /* GREATER_P */ + YYSYMBOL_ANY_P = 24, /* ANY_P */ + YYSYMBOL_STRICT_P = 25, /* STRICT_P */ + YYSYMBOL_LAX_P = 26, /* LAX_P */ + YYSYMBOL_LAST_P = 27, /* LAST_P */ + YYSYMBOL_STARTS_P = 28, /* STARTS_P */ + YYSYMBOL_WITH_P = 29, /* WITH_P */ + YYSYMBOL_LIKE_REGEX_P = 30, /* LIKE_REGEX_P */ + YYSYMBOL_FLAG_P = 31, /* FLAG_P */ + YYSYMBOL_ABS_P = 32, /* ABS_P */ + YYSYMBOL_SIZE_P = 33, /* SIZE_P */ + YYSYMBOL_TYPE_P = 34, /* TYPE_P */ + YYSYMBOL_FLOOR_P = 35, /* FLOOR_P */ + YYSYMBOL_DOUBLE_P = 36, /* DOUBLE_P */ + YYSYMBOL_CEILING_P = 37, /* CEILING_P */ + YYSYMBOL_KEYVALUE_P = 38, /* KEYVALUE_P */ + YYSYMBOL_DATETIME_P = 39, /* DATETIME_P */ + YYSYMBOL_40_ = 40, /* '+' */ + YYSYMBOL_41_ = 41, /* '-' */ + YYSYMBOL_42_ = 42, /* '*' */ + YYSYMBOL_43_ = 43, /* '/' */ + YYSYMBOL_44_ = 44, /* '%' */ + YYSYMBOL_UMINUS = 45, /* UMINUS */ + YYSYMBOL_46_ = 46, /* '(' */ + YYSYMBOL_47_ = 47, /* ')' */ + YYSYMBOL_48_ = 48, /* '$' */ + YYSYMBOL_49_ = 49, /* '@' */ + YYSYMBOL_50_ = 50, /* ',' */ + YYSYMBOL_51_ = 51, /* '[' */ + YYSYMBOL_52_ = 52, /* ']' */ + YYSYMBOL_53_ = 53, /* '{' */ + YYSYMBOL_54_ = 54, /* '}' */ + YYSYMBOL_55_ = 55, /* '.' */ + YYSYMBOL_56_ = 56, /* '?' */ + YYSYMBOL_YYACCEPT = 57, /* $accept */ + YYSYMBOL_result = 58, /* result */ + YYSYMBOL_expr_or_predicate = 59, /* expr_or_predicate */ + YYSYMBOL_mode = 60, /* mode */ + YYSYMBOL_scalar_value = 61, /* scalar_value */ + YYSYMBOL_comp_op = 62, /* comp_op */ + YYSYMBOL_delimited_predicate = 63, /* delimited_predicate */ + YYSYMBOL_predicate = 64, /* predicate */ + YYSYMBOL_starts_with_initial = 65, /* starts_with_initial */ + YYSYMBOL_path_primary = 66, /* path_primary */ + YYSYMBOL_accessor_expr = 67, /* accessor_expr */ + YYSYMBOL_expr = 68, /* expr */ + YYSYMBOL_index_elem = 69, /* index_elem */ + YYSYMBOL_index_list = 70, /* index_list */ + YYSYMBOL_array_accessor = 71, /* array_accessor */ + YYSYMBOL_any_level = 72, /* any_level */ + YYSYMBOL_any_path = 73, /* any_path */ + YYSYMBOL_accessor_op = 74, /* accessor_op */ + YYSYMBOL_datetime_template = 75, /* datetime_template */ + YYSYMBOL_opt_datetime_template = 76, /* opt_datetime_template */ + YYSYMBOL_key = 77, /* key */ + YYSYMBOL_key_name = 78, /* key_name */ + YYSYMBOL_method = 79 /* method */ +}; +typedef enum yysymbol_kind_t yysymbol_kind_t; + @@ -256,28 +349,87 @@ int jsonpath_yyparse (JsonPathParseResult **result); # undef short #endif -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; +/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure + <limits.h> and (if available) <stdint.h> are included + so that the code can choose integer types of a good width. */ + +#ifndef __PTRDIFF_MAX__ +# include <limits.h> /* INFRINGES ON USER NAME SPACE */ +# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ +# include <stdint.h> /* INFRINGES ON USER NAME SPACE */ +# define YY_STDINT_H +# endif #endif -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; +/* Narrow types that promote to a signed type and that can represent a + signed or unsigned integer of at least N bits. In tables they can + save space and decrease cache pressure. Promoting to a signed type + helps avoid bugs in integer arithmetic. */ + +#ifdef __INT_LEAST8_MAX__ +typedef __INT_LEAST8_TYPE__ yytype_int8; +#elif defined YY_STDINT_H +typedef int_least8_t yytype_int8; #else typedef signed char yytype_int8; #endif -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; +#ifdef __INT_LEAST16_MAX__ +typedef __INT_LEAST16_TYPE__ yytype_int16; +#elif defined YY_STDINT_H +typedef int_least16_t yytype_int16; #else -typedef unsigned short yytype_uint16; +typedef short yytype_int16; +#endif + +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 +#endif + +#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST8_TYPE__ yytype_uint8; +#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST8_MAX <= INT_MAX) +typedef uint_least8_t yytype_uint8; +#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX +typedef unsigned char yytype_uint8; +#else +typedef short yytype_uint8; #endif -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; +#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ +typedef __UINT_LEAST16_TYPE__ yytype_uint16; +#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ + && UINT_LEAST16_MAX <= INT_MAX) +typedef uint_least16_t yytype_uint16; +#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX +typedef unsigned short yytype_uint16; #else -typedef short yytype_int16; +typedef int yytype_uint16; +#endif + +#ifndef YYPTRDIFF_T +# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ +# define YYPTRDIFF_T __PTRDIFF_TYPE__ +# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ +# elif defined PTRDIFF_MAX +# ifndef ptrdiff_t +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# endif +# define YYPTRDIFF_T ptrdiff_t +# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX +# else +# define YYPTRDIFF_T long +# define YYPTRDIFF_MAXIMUM LONG_MAX +# endif #endif #ifndef YYSIZE_T @@ -285,7 +437,7 @@ typedef short yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T +# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -293,7 +445,20 @@ typedef short yytype_int16; # endif #endif -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) +#define YYSIZE_MAXIMUM \ + YY_CAST (YYPTRDIFF_T, \ + (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ + ? YYPTRDIFF_MAXIMUM \ + : YY_CAST (YYSIZE_T, -1))) + +#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) + + +/* Stored state numbers (used for stacks). */ +typedef yytype_uint8 yy_state_t; + +/* State numbers in computations. */ +typedef int yy_state_fast_t; #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS @@ -307,38 +472,37 @@ typedef short yytype_int16; # endif #endif -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif #ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif #endif #ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value @@ -351,8 +515,22 @@ typedef short yytype_int16; # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + -#if ! defined yyoverflow || YYERROR_VERBOSE +#define YY_ASSERT(E) ((void) (0 && (E))) + +#if 1 /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -417,8 +595,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - +#endif /* 1 */ #if (! defined yyoverflow \ && (! defined __cplusplus \ @@ -427,17 +604,17 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss_alloc; + yy_state_t yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) +# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 @@ -450,11 +627,11 @@ union yyalloc # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ - YYSIZE_T yynewbytes; \ + YYPTRDIFF_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ + yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / YYSIZEOF (*yyptr); \ } \ while (0) @@ -466,12 +643,12 @@ union yyalloc # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) + __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ - YYSIZE_T yyi; \ + YYPTRDIFF_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ @@ -494,17 +671,20 @@ union yyalloc /* YYNSTATES -- Number of states. */ #define YYNSTATES 143 -#define YYUNDEFTOK 2 +/* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 295 + /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ -static const yytype_uint8 yytranslate[] = +static const yytype_int8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -540,7 +720,7 @@ static const yytype_uint8 yytranslate[] = #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = +static const yytype_int16 yyrline[] = { 0, 130, 130, 135, 139, 140, 144, 145, 146, 150, 151, 152, 153, 154, 155, 156, 160, 161, 162, 163, @@ -556,32 +736,46 @@ static const yytype_uint16 yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 1 +/** Accessing symbol of state STATE. */ +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) + +#if 1 +/* The user-facing name of the symbol whose (internal) number is + YYSYMBOL. No bounds checking. */ +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; + /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "TO_P", "NULL_P", "TRUE_P", "FALSE_P", - "IS_P", "UNKNOWN_P", "EXISTS_P", "IDENT_P", "STRING_P", "NUMERIC_P", - "INT_P", "VARIABLE_P", "OR_P", "AND_P", "NOT_P", "LESS_P", "LESSEQUAL_P", - "EQUAL_P", "NOTEQUAL_P", "GREATEREQUAL_P", "GREATER_P", "ANY_P", - "STRICT_P", "LAX_P", "LAST_P", "STARTS_P", "WITH_P", "LIKE_REGEX_P", - "FLAG_P", "ABS_P", "SIZE_P", "TYPE_P", "FLOOR_P", "DOUBLE_P", - "CEILING_P", "KEYVALUE_P", "DATETIME_P", "'+'", "'-'", "'*'", "'/'", - "'%'", "UMINUS", "'('", "')'", "'$'", "'@'", "','", "'['", "']'", "'{'", - "'}'", "'.'", "'?'", "$accept", "result", "expr_or_predicate", "mode", - "scalar_value", "comp_op", "delimited_predicate", "predicate", - "starts_with_initial", "path_primary", "accessor_expr", "expr", - "index_elem", "index_list", "array_accessor", "any_level", "any_path", - "accessor_op", "datetime_template", "opt_datetime_template", "key", - "key_name", "method", YY_NULLPTR + "\"end of file\"", "error", "\"invalid token\"", "TO_P", "NULL_P", + "TRUE_P", "FALSE_P", "IS_P", "UNKNOWN_P", "EXISTS_P", "IDENT_P", + "STRING_P", "NUMERIC_P", "INT_P", "VARIABLE_P", "OR_P", "AND_P", "NOT_P", + "LESS_P", "LESSEQUAL_P", "EQUAL_P", "NOTEQUAL_P", "GREATEREQUAL_P", + "GREATER_P", "ANY_P", "STRICT_P", "LAX_P", "LAST_P", "STARTS_P", + "WITH_P", "LIKE_REGEX_P", "FLAG_P", "ABS_P", "SIZE_P", "TYPE_P", + "FLOOR_P", "DOUBLE_P", "CEILING_P", "KEYVALUE_P", "DATETIME_P", "'+'", + "'-'", "'*'", "'/'", "'%'", "UMINUS", "'('", "')'", "'$'", "'@'", "','", + "'['", "']'", "'{'", "'}'", "'.'", "'?'", "$accept", "result", + "expr_or_predicate", "mode", "scalar_value", "comp_op", + "delimited_predicate", "predicate", "starts_with_initial", + "path_primary", "accessor_expr", "expr", "index_elem", "index_list", + "array_accessor", "any_level", "any_path", "accessor_op", + "datetime_template", "opt_datetime_template", "key", "key_name", + "method", YY_NULLPTR }; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif -# ifdef YYPRINT +#ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = +static const yytype_int16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, @@ -590,16 +784,16 @@ static const yytype_uint16 yytoknum[] = 43, 45, 42, 47, 37, 295, 40, 41, 36, 64, 44, 91, 93, 123, 125, 46, 63 }; -# endif +#endif -#define YYPACT_NINF -44 +#define YYPACT_NINF (-44) -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-44))) +#define yypact_value_is_default(Yyn) \ + ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF -105 +#define YYTABLE_NINF (-105) -#define yytable_value_is_error(Yytable_value) \ +#define yytable_value_is_error(Yyn) \ 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing @@ -626,7 +820,7 @@ static const yytype_int16 yypact[] = /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ -static const yytype_uint8 yydefact[] = +static const yytype_int8 yydefact[] = { 8, 6, 7, 0, 0, 1, 10, 11, 12, 0, 9, 13, 14, 15, 0, 38, 0, 0, 0, 36, @@ -654,9 +848,9 @@ static const yytype_int8 yypgoto[] = }; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = +static const yytype_uint8 yydefgoto[] = { - -1, 3, 21, 4, 22, 56, 23, 24, 124, 25, + 0, 3, 21, 4, 22, 56, 23, 24, 124, 25, 26, 59, 67, 68, 41, 131, 95, 112, 133, 134, 96, 97, 98 }; @@ -722,7 +916,7 @@ static const yytype_int16 yycheck[] = /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = +static const yytype_int8 yystos[] = { 0, 25, 26, 58, 60, 0, 4, 5, 6, 9, 11, 12, 13, 14, 17, 27, 40, 41, 46, 48, @@ -742,7 +936,7 @@ static const yytype_uint8 yystos[] = }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = +static const yytype_int8 yyr1[] = { 0, 57, 58, 58, 59, 59, 60, 60, 60, 61, 61, 61, 61, 61, 61, 61, 62, 62, 62, 62, @@ -758,7 +952,7 @@ static const yytype_uint8 yyr1[] = }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +static const yytype_int8 yyr2[] = { 0, 2, 2, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -774,10 +968,10 @@ static const yytype_uint8 yyr2[] = }; +enum { YYENOMEM = -2 }; + #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab @@ -803,10 +997,9 @@ static const yytype_uint8 yyr2[] = } \ while (0) -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - +/* Backward compatibility with an undocumented macro. + Use YYerror or YYUNDEF. */ +#define YYERRCODE YYUNDEF /* Enable debugging if requested. */ @@ -824,18 +1017,18 @@ do { \ } while (0) /* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif +# ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ - Type, Value, result); \ + Kind, Value, result); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) @@ -846,18 +1039,21 @@ do { \ `-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, JsonPathParseResult **result) +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, JsonPathParseResult **result) { FILE *yyoutput = yyo; - YYUSE (yyoutput); - YYUSE (result); + YY_USE (yyoutput); + YY_USE (result); if (!yyvaluep) return; # ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyo, yytoknum[yytype], *yyvaluep); + if (yykind < YYNTOKENS) + YYPRINT (yyo, yytoknum[yykind], *yyvaluep); # endif - YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YY_USE (yykind); + YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -866,12 +1062,13 @@ yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, Js `---------------------------*/ static void -yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, JsonPathParseResult **result) +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, JsonPathParseResult **result) { YYFPRINTF (yyo, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - yy_symbol_value_print (yyo, yytype, yyvaluep, result); + yy_symbol_value_print (yyo, yykind, yyvaluep, result); YYFPRINTF (yyo, ")"); } @@ -881,7 +1078,7 @@ yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, JsonPath `------------------------------------------------------------------*/ static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -904,21 +1101,21 @@ do { \ `------------------------------------------------*/ static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, JsonPathParseResult **result) +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, + int yyrule, JsonPathParseResult **result) { - unsigned long yylno = yyrline[yyrule]; + int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &yyvsp[(yyi + 1) - (yynrhs)] - , result); + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)], result); YYFPRINTF (stderr, "\n"); } } @@ -933,8 +1130,8 @@ do { \ multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -957,28 +1154,76 @@ int yydebug; #endif -#if YYERROR_VERBOSE +/* Context of a parse error. */ +typedef struct +{ + yy_state_t *yyssp; + yysymbol_kind_t yytoken; +} yypcontext_t; -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else +/* Put in YYARG at most YYARGN of the expected tokens given the + current YYCTX, and return the number of tokens stored in YYARG. If + YYARG is null, return the number of expected tokens (guaranteed to + be less than YYNTOKENS). Return YYENOMEM on memory exhaustion. + Return 0 if there are more than YYARGN expected tokens, yet fill + YYARG up to YYARGN. */ +static int +yypcontext_expected_tokens (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) +{ + /* Actual size of YYARG. */ + int yycount = 0; + int yyn = yypact[+*yyctx->yyssp]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYSYMBOL_YYerror + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (!yyarg) + ++yycount; + else if (yycount == yyargn) + return 0; + else + yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx); + } + } + if (yyarg && yycount == 0 && 0 < yyargn) + yyarg[0] = YYSYMBOL_YYEMPTY; + return yycount; +} + + + + +#ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) +# else /* Return the length of YYSTR. */ -static YYSIZE_T +static YYPTRDIFF_T yystrlen (const char *yystr) { - YYSIZE_T yylen; + YYPTRDIFF_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } -# endif # endif +#endif -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else +#ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ static char * @@ -992,10 +1237,10 @@ yystpcpy (char *yydest, const char *yysrc) return yyd - 1; } -# endif # endif +#endif -# ifndef yytnamerr +#ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string @@ -1003,14 +1248,13 @@ yystpcpy (char *yydest, const char *yysrc) backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ -static YYSIZE_T +static YYPTRDIFF_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { - YYSIZE_T yyn = 0; + YYPTRDIFF_T yyn = 0; char const *yyp = yystr; - for (;;) switch (*++yyp) { @@ -1039,36 +1283,20 @@ yytnamerr (char *yyres, const char *yystr) do_not_strip_quotes: ; } - if (! yyres) + if (yyres) + return yystpcpy (yyres, yystr) - yyres; + else return yystrlen (yystr); - - return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); } -# endif +#endif -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) +yy_syntax_error_arguments (const yypcontext_t *yyctx, + yysymbol_kind_t yyarg[], int yyargn) { - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ + /* Actual size of YYARG. */ int yycount = 0; - /* There are many possibilities here to consider: - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action @@ -1092,49 +1320,54 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ - if (yytoken != YYEMPTY) + if (yyctx->yytoken != YYSYMBOL_YYEMPTY) { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return 2; - } - } - } + int yyn; + if (yyarg) + yyarg[yycount] = yyctx->yytoken; + ++yycount; + yyn = yypcontext_expected_tokens (yyctx, + yyarg ? yyarg + 1 : yyarg, yyargn - 1); + if (yyn == YYENOMEM) + return YYENOMEM; + else + yycount += yyn; } + return yycount; +} + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return -1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return YYENOMEM if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, + const yypcontext_t *yyctx) +{ + enum { YYARGS_MAX = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat: reported tokens (one for the "unexpected", + one per "expected"). */ + yysymbol_kind_t yyarg[YYARGS_MAX]; + /* Cumulated lengths of YYARG. */ + YYPTRDIFF_T yysize = 0; + + /* Actual size of YYARG. */ + int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX); + if (yycount == YYENOMEM) + return YYENOMEM; switch (yycount) { -# define YYCASE_(N, S) \ +#define YYCASE_(N, S) \ case N: \ yyformat = S; \ - break + break default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); @@ -1142,15 +1375,23 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ +#undef YYCASE_ } + /* Compute error message size. Don't count the "%s"s, but reserve + room for the terminator. */ + yysize = yystrlen (yyformat) - 2 * yycount + 1; { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return 2; + int yyi; + for (yyi = 0; yyi < yycount; ++yyi) + { + YYPTRDIFF_T yysize1 + = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]); + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else + return YYENOMEM; + } } if (*yymsg_alloc < yysize) @@ -1159,7 +1400,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; + return -1; } /* Avoid sprintf, as that infringes on the user's name space. @@ -1171,40 +1412,43 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { - yyp += yytnamerr (yyp, yyarg[yyi++]); + yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]); yyformat += 2; } else { - yyp++; - yyformat++; + ++yyp; + ++yyformat; } } return 0; } -#endif /* YYERROR_VERBOSE */ + /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, JsonPathParseResult **result) +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep, JsonPathParseResult **result) { - YYUSE (yyvaluep); - YYUSE (result); + YY_USE (yyvaluep); + YY_USE (result); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } + + /*----------. | yyparse. | `----------*/ @@ -1212,7 +1456,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, JsonPathParseResul int yyparse (JsonPathParseResult **result) { -/* The lookahead symbol. */ +/* Lookahead token kind. */ int yychar; @@ -1223,45 +1467,41 @@ YY_INITIAL_VALUE (static __thread YYSTYPE yyval_default;) YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Number of syntax errors so far. */ - int yynerrs; + int yynerrs = 0; - int yystate; + yy_state_fast_t yystate = 0; /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. + int yyerrstatus = 0; - Refer to the stacks through separate pointers, to allow yyoverflow + /* Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; + /* The state stack: array, bottom, top. */ + yy_state_t yyssa[YYINITDEPTH]; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - YYSIZE_T yystacksize; + /* The semantic value stack: array, bottom, top. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; int yyn; + /* The return value of yyparse. */ int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; + /* Lookahead symbol kind. */ + yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; -#if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif + YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) @@ -1269,15 +1509,8 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); Keep to zero when no symbol should be popped. */ int yylen = 0; - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - YYDPRINTF ((stderr, "Starting parse\n")); - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; @@ -1292,10 +1525,15 @@ yynewstate: /*--------------------------------------------------------------------. -| yynewstate -- set current state (the top of the stack) to yystate. | +| yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: - *yyssp = (yytype_int16) yystate; + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + YY_ASSERT (0 <= yystate && yystate < YYNSTATES); + YY_IGNORE_USELESS_CAST_BEGIN + *yyssp = YY_CAST (yy_state_t, yystate); + YY_IGNORE_USELESS_CAST_END + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE @@ -1303,23 +1541,23 @@ yysetstate: #else { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); + YYPTRDIFF_T yysize = yyssp - yyss + 1; # if defined yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ + yy_state_t *yyss1 = yyss; YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), + &yyss1, yysize * YYSIZEOF (*yyssp), + &yyvs1, yysize * YYSIZEOF (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; @@ -1333,14 +1571,15 @@ yysetstate: yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; + yy_state_t *yyss1 = yyss; union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + YY_CAST (union yyalloc *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE +# undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } @@ -1349,16 +1588,16 @@ yysetstate: yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long) yystacksize)); + YY_IGNORE_USELESS_CAST_BEGIN + YYDPRINTF ((stderr, "Stack size increased to %ld\n", + YY_CAST (long, yystacksize))); + YY_IGNORE_USELESS_CAST_END if (yyss + yystacksize - 1 <= yyssp) YYABORT; } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - if (yystate == YYFINAL) YYACCEPT; @@ -1379,18 +1618,29 @@ yybackup: /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token: ")); + YYDPRINTF ((stderr, "Reading a token\n")); yychar = yylex (&yylval); } if (yychar <= YYEOF) { - yychar = yytoken = YYEOF; + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + goto yyerrlab1; + } else { yytoken = YYTRANSLATE (yychar); @@ -1418,15 +1668,13 @@ yybackup: /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END + /* Discard the shifted token. */ + yychar = YYEMPTY; goto yynewstate; @@ -1461,486 +1709,487 @@ yyreduce: YY_REDUCE_PRINT (yyn); switch (yyn) { - case 2: -#line 130 "jsonpath_gram.y" /* yacc.c:1652 */ - { + case 2: /* result: mode expr_or_predicate */ +#line 130 "jsonpath_gram.y" + { *result = palloc(sizeof(JsonPathParseResult)); (*result)->expr = (yyvsp[0].value); (*result)->lax = (yyvsp[-1].boolean); } -#line 1472 "jsonpath_gram.c" /* yacc.c:1652 */ +#line 1720 "jsonpath_gram.c" break; - case 3: -#line 135 "jsonpath_gram.y" /* yacc.c:1652 */ - { *result = NULL; } -#line 1478 "jsonpath_gram.c" /* yacc.c:1652 */ + case 3: /* result: %empty */ +#line 135 "jsonpath_gram.y" + { *result = NULL; } +#line 1726 "jsonpath_gram.c" break; - case 4: -#line 139 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = (yyvsp[0].value); } -#line 1484 "jsonpath_gram.c" /* yacc.c:1652 */ + case 4: /* expr_or_predicate: expr */ +#line 139 "jsonpath_gram.y" + { (yyval.value) = (yyvsp[0].value); } +#line 1732 "jsonpath_gram.c" break; - case 5: -#line 140 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = (yyvsp[0].value); } -#line 1490 "jsonpath_gram.c" /* yacc.c:1652 */ + case 5: /* expr_or_predicate: predicate */ +#line 140 "jsonpath_gram.y" + { (yyval.value) = (yyvsp[0].value); } +#line 1738 "jsonpath_gram.c" break; - case 6: -#line 144 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = false; } -#line 1496 "jsonpath_gram.c" /* yacc.c:1652 */ + case 6: /* mode: STRICT_P */ +#line 144 "jsonpath_gram.y" + { (yyval.boolean) = false; } +#line 1744 "jsonpath_gram.c" break; - case 7: -#line 145 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 1502 "jsonpath_gram.c" /* yacc.c:1652 */ + case 7: /* mode: LAX_P */ +#line 145 "jsonpath_gram.y" + { (yyval.boolean) = true; } +#line 1750 "jsonpath_gram.c" break; - case 8: -#line 146 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.boolean) = true; } -#line 1508 "jsonpath_gram.c" /* yacc.c:1652 */ + case 8: /* mode: %empty */ +#line 146 "jsonpath_gram.y" + { (yyval.boolean) = true; } +#line 1756 "jsonpath_gram.c" break; - case 9: -#line 150 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemString(&(yyvsp[0].str)); } -#line 1514 "jsonpath_gram.c" /* yacc.c:1652 */ + case 9: /* scalar_value: STRING_P */ +#line 150 "jsonpath_gram.y" + { (yyval.value) = makeItemString(&(yyvsp[0].str)); } +#line 1762 "jsonpath_gram.c" break; - case 10: -#line 151 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemString(NULL); } -#line 1520 "jsonpath_gram.c" /* yacc.c:1652 */ + case 10: /* scalar_value: NULL_P */ +#line 151 "jsonpath_gram.y" + { (yyval.value) = makeItemString(NULL); } +#line 1768 "jsonpath_gram.c" break; - case 11: -#line 152 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemBool(true); } -#line 1526 "jsonpath_gram.c" /* yacc.c:1652 */ + case 11: /* scalar_value: TRUE_P */ +#line 152 "jsonpath_gram.y" + { (yyval.value) = makeItemBool(true); } +#line 1774 "jsonpath_gram.c" break; - case 12: -#line 153 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemBool(false); } -#line 1532 "jsonpath_gram.c" /* yacc.c:1652 */ + case 12: /* scalar_value: FALSE_P */ +#line 153 "jsonpath_gram.y" + { (yyval.value) = makeItemBool(false); } +#line 1780 "jsonpath_gram.c" break; - case 13: -#line 154 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemNumeric(&(yyvsp[0].str)); } -#line 1538 "jsonpath_gram.c" /* yacc.c:1652 */ + case 13: /* scalar_value: NUMERIC_P */ +#line 154 "jsonpath_gram.y" + { (yyval.value) = makeItemNumeric(&(yyvsp[0].str)); } +#line 1786 "jsonpath_gram.c" break; - case 14: -#line 155 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemNumeric(&(yyvsp[0].str)); } -#line 1544 "jsonpath_gram.c" /* yacc.c:1652 */ + case 14: /* scalar_value: INT_P */ +#line 155 "jsonpath_gram.y" + { (yyval.value) = makeItemNumeric(&(yyvsp[0].str)); } +#line 1792 "jsonpath_gram.c" break; - case 15: -#line 156 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemVariable(&(yyvsp[0].str)); } -#line 1550 "jsonpath_gram.c" /* yacc.c:1652 */ + case 15: /* scalar_value: VARIABLE_P */ +#line 156 "jsonpath_gram.y" + { (yyval.value) = makeItemVariable(&(yyvsp[0].str)); } +#line 1798 "jsonpath_gram.c" break; - case 16: -#line 160 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.optype) = jpiEqual; } -#line 1556 "jsonpath_gram.c" /* yacc.c:1652 */ + case 16: /* comp_op: EQUAL_P */ +#line 160 "jsonpath_gram.y" + { (yyval.optype) = jpiEqual; } +#line 1804 "jsonpath_gram.c" break; - case 17: -#line 161 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.optype) = jpiNotEqual; } -#line 1562 "jsonpath_gram.c" /* yacc.c:1652 */ + case 17: /* comp_op: NOTEQUAL_P */ +#line 161 "jsonpath_gram.y" + { (yyval.optype) = jpiNotEqual; } +#line 1810 "jsonpath_gram.c" break; - case 18: -#line 162 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.optype) = jpiLess; } -#line 1568 "jsonpath_gram.c" /* yacc.c:1652 */ + case 18: /* comp_op: LESS_P */ +#line 162 "jsonpath_gram.y" + { (yyval.optype) = jpiLess; } +#line 1816 "jsonpath_gram.c" break; - case 19: -#line 163 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.optype) = jpiGreater; } -#line 1574 "jsonpath_gram.c" /* yacc.c:1652 */ + case 19: /* comp_op: GREATER_P */ +#line 163 "jsonpath_gram.y" + { (yyval.optype) = jpiGreater; } +#line 1822 "jsonpath_gram.c" break; - case 20: -#line 164 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.optype) = jpiLessOrEqual; } -#line 1580 "jsonpath_gram.c" /* yacc.c:1652 */ + case 20: /* comp_op: LESSEQUAL_P */ +#line 164 "jsonpath_gram.y" + { (yyval.optype) = jpiLessOrEqual; } +#line 1828 "jsonpath_gram.c" break; - case 21: -#line 165 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.optype) = jpiGreaterOrEqual; } -#line 1586 "jsonpath_gram.c" /* yacc.c:1652 */ + case 21: /* comp_op: GREATEREQUAL_P */ +#line 165 "jsonpath_gram.y" + { (yyval.optype) = jpiGreaterOrEqual; } +#line 1834 "jsonpath_gram.c" break; - case 22: -#line 169 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = (yyvsp[-1].value); } -#line 1592 "jsonpath_gram.c" /* yacc.c:1652 */ + case 22: /* delimited_predicate: '(' predicate ')' */ +#line 169 "jsonpath_gram.y" + { (yyval.value) = (yyvsp[-1].value); } +#line 1840 "jsonpath_gram.c" break; - case 23: -#line 170 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemUnary(jpiExists, (yyvsp[-1].value)); } -#line 1598 "jsonpath_gram.c" /* yacc.c:1652 */ + case 23: /* delimited_predicate: EXISTS_P '(' expr ')' */ +#line 170 "jsonpath_gram.y" + { (yyval.value) = makeItemUnary(jpiExists, (yyvsp[-1].value)); } +#line 1846 "jsonpath_gram.c" break; - case 24: -#line 174 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = (yyvsp[0].value); } -#line 1604 "jsonpath_gram.c" /* yacc.c:1652 */ + case 24: /* predicate: delimited_predicate */ +#line 174 "jsonpath_gram.y" + { (yyval.value) = (yyvsp[0].value); } +#line 1852 "jsonpath_gram.c" break; - case 25: -#line 175 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemBinary((yyvsp[-1].optype), (yyvsp[-2].value), (yyvsp[0].value)); } -#line 1610 "jsonpath_gram.c" /* yacc.c:1652 */ + case 25: /* predicate: expr comp_op expr */ +#line 175 "jsonpath_gram.y" + { (yyval.value) = makeItemBinary((yyvsp[-1].optype), (yyvsp[-2].value), (yyvsp[0].value)); } +#line 1858 "jsonpath_gram.c" break; - case 26: -#line 176 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemBinary(jpiAnd, (yyvsp[-2].value), (yyvsp[0].value)); } -#line 1616 "jsonpath_gram.c" /* yacc.c:1652 */ + case 26: /* predicate: predicate AND_P predicate */ +#line 176 "jsonpath_gram.y" + { (yyval.value) = makeItemBinary(jpiAnd, (yyvsp[-2].value), (yyvsp[0].value)); } +#line 1864 "jsonpath_gram.c" break; - case 27: -#line 177 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemBinary(jpiOr, (yyvsp[-2].value), (yyvsp[0].value)); } -#line 1622 "jsonpath_gram.c" /* yacc.c:1652 */ + case 27: /* predicate: predicate OR_P predicate */ +#line 177 "jsonpath_gram.y" + { (yyval.value) = makeItemBinary(jpiOr, (yyvsp[-2].value), (yyvsp[0].value)); } +#line 1870 "jsonpath_gram.c" break; - case 28: -#line 178 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemUnary(jpiNot, (yyvsp[0].value)); } -#line 1628 "jsonpath_gram.c" /* yacc.c:1652 */ + case 28: /* predicate: NOT_P delimited_predicate */ +#line 178 "jsonpath_gram.y" + { (yyval.value) = makeItemUnary(jpiNot, (yyvsp[0].value)); } +#line 1876 "jsonpath_gram.c" break; - case 29: -#line 180 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemUnary(jpiIsUnknown, (yyvsp[-3].value)); } -#line 1634 "jsonpath_gram.c" /* yacc.c:1652 */ + case 29: /* predicate: '(' predicate ')' IS_P UNKNOWN_P */ +#line 180 "jsonpath_gram.y" + { (yyval.value) = makeItemUnary(jpiIsUnknown, (yyvsp[-3].value)); } +#line 1882 "jsonpath_gram.c" break; - case 30: -#line 182 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemBinary(jpiStartsWith, (yyvsp[-3].value), (yyvsp[0].value)); } -#line 1640 "jsonpath_gram.c" /* yacc.c:1652 */ + case 30: /* predicate: expr STARTS_P WITH_P starts_with_initial */ +#line 182 "jsonpath_gram.y" + { (yyval.value) = makeItemBinary(jpiStartsWith, (yyvsp[-3].value), (yyvsp[0].value)); } +#line 1888 "jsonpath_gram.c" break; - case 31: -#line 183 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemLikeRegex((yyvsp[-2].value), &(yyvsp[0].str), NULL); } -#line 1646 "jsonpath_gram.c" /* yacc.c:1652 */ + case 31: /* predicate: expr LIKE_REGEX_P STRING_P */ +#line 183 "jsonpath_gram.y" + { (yyval.value) = makeItemLikeRegex((yyvsp[-2].value), &(yyvsp[0].str), NULL); } +#line 1894 "jsonpath_gram.c" break; - case 32: -#line 185 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemLikeRegex((yyvsp[-4].value), &(yyvsp[-2].str), &(yyvsp[0].str)); } -#line 1652 "jsonpath_gram.c" /* yacc.c:1652 */ + case 32: /* predicate: expr LIKE_REGEX_P STRING_P FLAG_P STRING_P */ +#line 185 "jsonpath_gram.y" + { (yyval.value) = makeItemLikeRegex((yyvsp[-4].value), &(yyvsp[-2].str), &(yyvsp[0].str)); } +#line 1900 "jsonpath_gram.c" break; - case 33: -#line 189 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemString(&(yyvsp[0].str)); } -#line 1658 "jsonpath_gram.c" /* yacc.c:1652 */ + case 33: /* starts_with_initial: STRING_P */ +#line 189 "jsonpath_gram.y" + { (yyval.value) = makeItemString(&(yyvsp[0].str)); } +#line 1906 "jsonpath_gram.c" break; - case 34: -#line 190 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemVariable(&(yyvsp[0].str)); } -#line 1664 "jsonpath_gram.c" /* yacc.c:1652 */ + case 34: /* starts_with_initial: VARIABLE_P */ +#line 190 "jsonpath_gram.y" + { (yyval.value) = makeItemVariable(&(yyvsp[0].str)); } +#line 1912 "jsonpath_gram.c" break; - case 35: -#line 194 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = (yyvsp[0].value); } -#line 1670 "jsonpath_gram.c" /* yacc.c:1652 */ + case 35: /* path_primary: scalar_value */ +#line 194 "jsonpath_gram.y" + { (yyval.value) = (yyvsp[0].value); } +#line 1918 "jsonpath_gram.c" break; - case 36: -#line 195 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemType(jpiRoot); } -#line 1676 "jsonpath_gram.c" /* yacc.c:1652 */ + case 36: /* path_primary: '$' */ +#line 195 "jsonpath_gram.y" + { (yyval.value) = makeItemType(jpiRoot); } +#line 1924 "jsonpath_gram.c" break; - case 37: -#line 196 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemType(jpiCurrent); } -#line 1682 "jsonpath_gram.c" /* yacc.c:1652 */ + case 37: /* path_primary: '@' */ +#line 196 "jsonpath_gram.y" + { (yyval.value) = makeItemType(jpiCurrent); } +#line 1930 "jsonpath_gram.c" break; - case 38: -#line 197 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemType(jpiLast); } -#line 1688 "jsonpath_gram.c" /* yacc.c:1652 */ + case 38: /* path_primary: LAST_P */ +#line 197 "jsonpath_gram.y" + { (yyval.value) = makeItemType(jpiLast); } +#line 1936 "jsonpath_gram.c" break; - case 39: -#line 201 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.elems) = list_make1((yyvsp[0].value)); } -#line 1694 "jsonpath_gram.c" /* yacc.c:1652 */ + case 39: /* accessor_expr: path_primary */ +#line 201 "jsonpath_gram.y" + { (yyval.elems) = list_make1((yyvsp[0].value)); } +#line 1942 "jsonpath_gram.c" break; - case 40: -#line 202 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.elems) = list_make2((yyvsp[-2].value), (yyvsp[0].value)); } -#line 1700 "jsonpath_gram.c" /* yacc.c:1652 */ + case 40: /* accessor_expr: '(' expr ')' accessor_op */ +#line 202 "jsonpath_gram.y" + { (yyval.elems) = list_make2((yyvsp[-2].value), (yyvsp[0].value)); } +#line 1948 "jsonpath_gram.c" break; - case 41: -#line 203 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.elems) = list_make2((yyvsp[-2].value), (yyvsp[0].value)); } -#line 1706 "jsonpath_gram.c" /* yacc.c:1652 */ + case 41: /* accessor_expr: '(' predicate ')' accessor_op */ +#line 203 "jsonpath_gram.y" + { (yyval.elems) = list_make2((yyvsp[-2].value), (yyvsp[0].value)); } +#line 1954 "jsonpath_gram.c" break; - case 42: -#line 204 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.elems) = lappend((yyvsp[-1].elems), (yyvsp[0].value)); } -#line 1712 "jsonpath_gram.c" /* yacc.c:1652 */ + case 42: /* accessor_expr: accessor_expr accessor_op */ +#line 204 "jsonpath_gram.y" + { (yyval.elems) = lappend((yyvsp[-1].elems), (yyvsp[0].value)); } +#line 1960 "jsonpath_gram.c" break; - case 43: -#line 208 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemList((yyvsp[0].elems)); } -#line 1718 "jsonpath_gram.c" /* yacc.c:1652 */ + case 43: /* expr: accessor_expr */ +#line 208 "jsonpath_gram.y" + { (yyval.value) = makeItemList((yyvsp[0].elems)); } +#line 1966 "jsonpath_gram.c" break; - case 44: -#line 209 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = (yyvsp[-1].value); } -#line 1724 "jsonpath_gram.c" /* yacc.c:1652 */ + case 44: /* expr: '(' expr ')' */ +#line 209 "jsonpath_gram.y" + { (yyval.value) = (yyvsp[-1].value); } +#line 1972 "jsonpath_gram.c" break; - case 45: -#line 210 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemUnary(jpiPlus, (yyvsp[0].value)); } -#line 1730 "jsonpath_gram.c" /* yacc.c:1652 */ + case 45: /* expr: '+' expr */ +#line 210 "jsonpath_gram.y" + { (yyval.value) = makeItemUnary(jpiPlus, (yyvsp[0].value)); } +#line 1978 "jsonpath_gram.c" break; - case 46: -#line 211 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemUnary(jpiMinus, (yyvsp[0].value)); } -#line 1736 "jsonpath_gram.c" /* yacc.c:1652 */ + case 46: /* expr: '-' expr */ +#line 211 "jsonpath_gram.y" + { (yyval.value) = makeItemUnary(jpiMinus, (yyvsp[0].value)); } +#line 1984 "jsonpath_gram.c" break; - case 47: -#line 212 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemBinary(jpiAdd, (yyvsp[-2].value), (yyvsp[0].value)); } -#line 1742 "jsonpath_gram.c" /* yacc.c:1652 */ + case 47: /* expr: expr '+' expr */ +#line 212 "jsonpath_gram.y" + { (yyval.value) = makeItemBinary(jpiAdd, (yyvsp[-2].value), (yyvsp[0].value)); } +#line 1990 "jsonpath_gram.c" break; - case 48: -#line 213 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemBinary(jpiSub, (yyvsp[-2].value), (yyvsp[0].value)); } -#line 1748 "jsonpath_gram.c" /* yacc.c:1652 */ + case 48: /* expr: expr '-' expr */ +#line 213 "jsonpath_gram.y" + { (yyval.value) = makeItemBinary(jpiSub, (yyvsp[-2].value), (yyvsp[0].value)); } +#line 1996 "jsonpath_gram.c" break; - case 49: -#line 214 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemBinary(jpiMul, (yyvsp[-2].value), (yyvsp[0].value)); } -#line 1754 "jsonpath_gram.c" /* yacc.c:1652 */ + case 49: /* expr: expr '*' expr */ +#line 214 "jsonpath_gram.y" + { (yyval.value) = makeItemBinary(jpiMul, (yyvsp[-2].value), (yyvsp[0].value)); } +#line 2002 "jsonpath_gram.c" break; - case 50: -#line 215 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemBinary(jpiDiv, (yyvsp[-2].value), (yyvsp[0].value)); } -#line 1760 "jsonpath_gram.c" /* yacc.c:1652 */ + case 50: /* expr: expr '/' expr */ +#line 215 "jsonpath_gram.y" + { (yyval.value) = makeItemBinary(jpiDiv, (yyvsp[-2].value), (yyvsp[0].value)); } +#line 2008 "jsonpath_gram.c" break; - case 51: -#line 216 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemBinary(jpiMod, (yyvsp[-2].value), (yyvsp[0].value)); } -#line 1766 "jsonpath_gram.c" /* yacc.c:1652 */ + case 51: /* expr: expr '%' expr */ +#line 216 "jsonpath_gram.y" + { (yyval.value) = makeItemBinary(jpiMod, (yyvsp[-2].value), (yyvsp[0].value)); } +#line 2014 "jsonpath_gram.c" break; - case 52: -#line 220 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemBinary(jpiSubscript, (yyvsp[0].value), NULL); } -#line 1772 "jsonpath_gram.c" /* yacc.c:1652 */ + case 52: /* index_elem: expr */ +#line 220 "jsonpath_gram.y" + { (yyval.value) = makeItemBinary(jpiSubscript, (yyvsp[0].value), NULL); } +#line 2020 "jsonpath_gram.c" break; - case 53: -#line 221 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemBinary(jpiSubscript, (yyvsp[-2].value), (yyvsp[0].value)); } -#line 1778 "jsonpath_gram.c" /* yacc.c:1652 */ + case 53: /* index_elem: expr TO_P expr */ +#line 221 "jsonpath_gram.y" + { (yyval.value) = makeItemBinary(jpiSubscript, (yyvsp[-2].value), (yyvsp[0].value)); } +#line 2026 "jsonpath_gram.c" break; - case 54: -#line 225 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.indexs) = list_make1((yyvsp[0].value)); } -#line 1784 "jsonpath_gram.c" /* yacc.c:1652 */ + case 54: /* index_list: index_elem */ +#line 225 "jsonpath_gram.y" + { (yyval.indexs) = list_make1((yyvsp[0].value)); } +#line 2032 "jsonpath_gram.c" break; - case 55: -#line 226 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.indexs) = lappend((yyvsp[-2].indexs), (yyvsp[0].value)); } -#line 1790 "jsonpath_gram.c" /* yacc.c:1652 */ + case 55: /* index_list: index_list ',' index_elem */ +#line 226 "jsonpath_gram.y" + { (yyval.indexs) = lappend((yyvsp[-2].indexs), (yyvsp[0].value)); } +#line 2038 "jsonpath_gram.c" break; - case 56: -#line 230 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemType(jpiAnyArray); } -#line 1796 "jsonpath_gram.c" /* yacc.c:1652 */ + case 56: /* array_accessor: '[' '*' ']' */ +#line 230 "jsonpath_gram.y" + { (yyval.value) = makeItemType(jpiAnyArray); } +#line 2044 "jsonpath_gram.c" break; - case 57: -#line 231 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeIndexArray((yyvsp[-1].indexs)); } -#line 1802 "jsonpath_gram.c" /* yacc.c:1652 */ + case 57: /* array_accessor: '[' index_list ']' */ +#line 231 "jsonpath_gram.y" + { (yyval.value) = makeIndexArray((yyvsp[-1].indexs)); } +#line 2050 "jsonpath_gram.c" break; - case 58: -#line 235 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.integer) = pg_atoi((yyvsp[0].str).val, 4, 0); } -#line 1808 "jsonpath_gram.c" /* yacc.c:1652 */ + case 58: /* any_level: INT_P */ +#line 235 "jsonpath_gram.y" + { (yyval.integer) = pg_atoi((yyvsp[0].str).val, 4, 0); } +#line 2056 "jsonpath_gram.c" break; - case 59: -#line 236 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.integer) = -1; } -#line 1814 "jsonpath_gram.c" /* yacc.c:1652 */ + case 59: /* any_level: LAST_P */ +#line 236 "jsonpath_gram.y" + { (yyval.integer) = -1; } +#line 2062 "jsonpath_gram.c" break; - case 60: -#line 240 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeAny(0, -1); } -#line 1820 "jsonpath_gram.c" /* yacc.c:1652 */ + case 60: /* any_path: ANY_P */ +#line 240 "jsonpath_gram.y" + { (yyval.value) = makeAny(0, -1); } +#line 2068 "jsonpath_gram.c" break; - case 61: -#line 241 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeAny((yyvsp[-1].integer), (yyvsp[-1].integer)); } -#line 1826 "jsonpath_gram.c" /* yacc.c:1652 */ + case 61: /* any_path: ANY_P '{' any_level '}' */ +#line 241 "jsonpath_gram.y" + { (yyval.value) = makeAny((yyvsp[-1].integer), (yyvsp[-1].integer)); } +#line 2074 "jsonpath_gram.c" break; - case 62: -#line 243 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeAny((yyvsp[-3].integer), (yyvsp[-1].integer)); } -#line 1832 "jsonpath_gram.c" /* yacc.c:1652 */ + case 62: /* any_path: ANY_P '{' any_level TO_P any_level '}' */ +#line 243 "jsonpath_gram.y" + { (yyval.value) = makeAny((yyvsp[-3].integer), (yyvsp[-1].integer)); } +#line 2080 "jsonpath_gram.c" break; - case 63: -#line 247 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = (yyvsp[0].value); } -#line 1838 "jsonpath_gram.c" /* yacc.c:1652 */ + case 63: /* accessor_op: '.' key */ +#line 247 "jsonpath_gram.y" + { (yyval.value) = (yyvsp[0].value); } +#line 2086 "jsonpath_gram.c" break; - case 64: -#line 248 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemType(jpiAnyKey); } -#line 1844 "jsonpath_gram.c" /* yacc.c:1652 */ + case 64: /* accessor_op: '.' '*' */ +#line 248 "jsonpath_gram.y" + { (yyval.value) = makeItemType(jpiAnyKey); } +#line 2092 "jsonpath_gram.c" break; - case 65: -#line 249 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = (yyvsp[0].value); } -#line 1850 "jsonpath_gram.c" /* yacc.c:1652 */ + case 65: /* accessor_op: array_accessor */ +#line 249 "jsonpath_gram.y" + { (yyval.value) = (yyvsp[0].value); } +#line 2098 "jsonpath_gram.c" break; - case 66: -#line 250 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = (yyvsp[0].value); } -#line 1856 "jsonpath_gram.c" /* yacc.c:1652 */ + case 66: /* accessor_op: '.' any_path */ +#line 250 "jsonpath_gram.y" + { (yyval.value) = (yyvsp[0].value); } +#line 2104 "jsonpath_gram.c" break; - case 67: -#line 251 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemType((yyvsp[-2].optype)); } -#line 1862 "jsonpath_gram.c" /* yacc.c:1652 */ + case 67: /* accessor_op: '.' method '(' ')' */ +#line 251 "jsonpath_gram.y" + { (yyval.value) = makeItemType((yyvsp[-2].optype)); } +#line 2110 "jsonpath_gram.c" break; - case 68: -#line 253 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemUnary(jpiDatetime, (yyvsp[-1].value)); } -#line 1868 "jsonpath_gram.c" /* yacc.c:1652 */ + case 68: /* accessor_op: '.' DATETIME_P '(' opt_datetime_template ')' */ +#line 253 "jsonpath_gram.y" + { (yyval.value) = makeItemUnary(jpiDatetime, (yyvsp[-1].value)); } +#line 2116 "jsonpath_gram.c" break; - case 69: -#line 254 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemUnary(jpiFilter, (yyvsp[-1].value)); } -#line 1874 "jsonpath_gram.c" /* yacc.c:1652 */ + case 69: /* accessor_op: '?' '(' predicate ')' */ +#line 254 "jsonpath_gram.y" + { (yyval.value) = makeItemUnary(jpiFilter, (yyvsp[-1].value)); } +#line 2122 "jsonpath_gram.c" break; - case 70: -#line 258 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemString(&(yyvsp[0].str)); } -#line 1880 "jsonpath_gram.c" /* yacc.c:1652 */ + case 70: /* datetime_template: STRING_P */ +#line 258 "jsonpath_gram.y" + { (yyval.value) = makeItemString(&(yyvsp[0].str)); } +#line 2128 "jsonpath_gram.c" break; - case 71: -#line 262 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = (yyvsp[0].value); } -#line 1886 "jsonpath_gram.c" /* yacc.c:1652 */ + case 71: /* opt_datetime_template: datetime_template */ +#line 262 "jsonpath_gram.y" + { (yyval.value) = (yyvsp[0].value); } +#line 2134 "jsonpath_gram.c" break; - case 72: -#line 263 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = NULL; } -#line 1892 "jsonpath_gram.c" /* yacc.c:1652 */ + case 72: /* opt_datetime_template: %empty */ +#line 263 "jsonpath_gram.y" + { (yyval.value) = NULL; } +#line 2140 "jsonpath_gram.c" break; - case 73: -#line 267 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.value) = makeItemKey(&(yyvsp[0].str)); } -#line 1898 "jsonpath_gram.c" /* yacc.c:1652 */ + case 73: /* key: key_name */ +#line 267 "jsonpath_gram.y" + { (yyval.value) = makeItemKey(&(yyvsp[0].str)); } +#line 2146 "jsonpath_gram.c" break; - case 98: -#line 298 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.optype) = jpiAbs; } -#line 1904 "jsonpath_gram.c" /* yacc.c:1652 */ + case 98: /* method: ABS_P */ +#line 298 "jsonpath_gram.y" + { (yyval.optype) = jpiAbs; } +#line 2152 "jsonpath_gram.c" break; - case 99: -#line 299 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.optype) = jpiSize; } -#line 1910 "jsonpath_gram.c" /* yacc.c:1652 */ + case 99: /* method: SIZE_P */ +#line 299 "jsonpath_gram.y" + { (yyval.optype) = jpiSize; } +#line 2158 "jsonpath_gram.c" break; - case 100: -#line 300 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.optype) = jpiType; } -#line 1916 "jsonpath_gram.c" /* yacc.c:1652 */ + case 100: /* method: TYPE_P */ +#line 300 "jsonpath_gram.y" + { (yyval.optype) = jpiType; } +#line 2164 "jsonpath_gram.c" break; - case 101: -#line 301 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.optype) = jpiFloor; } -#line 1922 "jsonpath_gram.c" /* yacc.c:1652 */ + case 101: /* method: FLOOR_P */ +#line 301 "jsonpath_gram.y" + { (yyval.optype) = jpiFloor; } +#line 2170 "jsonpath_gram.c" break; - case 102: -#line 302 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.optype) = jpiDouble; } -#line 1928 "jsonpath_gram.c" /* yacc.c:1652 */ + case 102: /* method: DOUBLE_P */ +#line 302 "jsonpath_gram.y" + { (yyval.optype) = jpiDouble; } +#line 2176 "jsonpath_gram.c" break; - case 103: -#line 303 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.optype) = jpiCeiling; } -#line 1934 "jsonpath_gram.c" /* yacc.c:1652 */ + case 103: /* method: CEILING_P */ +#line 303 "jsonpath_gram.y" + { (yyval.optype) = jpiCeiling; } +#line 2182 "jsonpath_gram.c" break; - case 104: -#line 304 "jsonpath_gram.y" /* yacc.c:1652 */ - { (yyval.optype) = jpiKeyValue; } -#line 1940 "jsonpath_gram.c" /* yacc.c:1652 */ + case 104: /* method: KEYVALUE_P */ +#line 304 "jsonpath_gram.y" + { (yyval.optype) = jpiKeyValue; } +#line 2188 "jsonpath_gram.c" break; -#line 1944 "jsonpath_gram.c" /* yacc.c:1652 */ +#line 2192 "jsonpath_gram.c" + default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -1954,11 +2203,10 @@ yyreduce: case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -1982,50 +2230,44 @@ yyreduce: yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (result, YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) { + yypcontext_t yyctx + = {yyssp, yytoken}; char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; + yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); if (yysyntax_error_status == 0) yymsgp = yymsg; - else if (yysyntax_error_status == 1) + else if (yysyntax_error_status == -1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) + yymsg = YY_CAST (char *, + YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); + if (yymsg) { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; + yysyntax_error_status + = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx); + yymsgp = yymsg; } else { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = YYENOMEM; } } yyerror (result, yymsgp); - if (yysyntax_error_status == 2) + if (yysyntax_error_status == YYENOMEM) goto yyexhaustedlab; } -# undef YYSYNTAX_ERROR -#endif } - - if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an @@ -2074,13 +2316,14 @@ yyerrorlab: yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ + /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { yyn = yytable[yyn]; if (0 < yyn) @@ -2094,7 +2337,7 @@ yyerrlab1: yydestruct ("Error: popping", - yystos[yystate], yyvsp, result); + YY_ACCESSING_SYMBOL (yystate), yyvsp, result); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -2106,7 +2349,7 @@ yyerrlab1: /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -2128,20 +2371,20 @@ yyabortlab: goto yyreturn; -#if !defined yyoverflow || YYERROR_VERBOSE +#if 1 /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (result, YY_("memory exhausted")); yyresult = 2; - /* Fall through. */ + goto yyreturn; #endif -/*-----------------------------------------------------. -| yyreturn -- parsing is finished, return the result. | -`-----------------------------------------------------*/ +/*-------------------------------------------------------. +| yyreturn -- parsing is finished, clean up and return. | +`-------------------------------------------------------*/ yyreturn: if (yychar != YYEMPTY) { @@ -2158,20 +2401,19 @@ yyreturn: while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, result); + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, result); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif -#if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); -#endif return yyresult; } -#line 306 "jsonpath_gram.y" /* yacc.c:1918 */ + +#line 306 "jsonpath_gram.y" /* diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/numeric.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/numeric.c index d1cd6d76240..700b230c2fe 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/numeric.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/numeric.c @@ -9896,12 +9896,20 @@ exp_var(const NumericVar *arg, NumericVar *result, int rscale) * * Essentially, we're approximating log10(abs(ln(var))). This is used to * determine the appropriate rscale when computing natural logarithms. + * + * Note: many callers call this before range-checking the input. Therefore, + * we must be robust against values that are invalid to apply ln() to. + * We don't wish to throw an error here, so just return zero in such cases. */ static int estimate_ln_dweight(const NumericVar *var) { int ln_dweight; + /* Caller should fail on ln(negative), but for the moment return zero */ + if (var->sign != NUMERIC_POS) + return 0; + if (cmp_var(var, &const_zero_point_nine) >= 0 && cmp_var(var, &const_one_point_one) <= 0) { diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/pgstatfuncs.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/pgstatfuncs.c index d899ba86f0f..6fc2196d59a 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/pgstatfuncs.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/pgstatfuncs.c @@ -2315,7 +2315,7 @@ Datum pg_stat_get_replication_slot(PG_FUNCTION_ARGS) { #define PG_STAT_GET_REPLICATION_SLOT_COLS 10 - text *slotname_text = PG_GETARG_TEXT_P(0); + text *slotname_text; NameData slotname; TupleDesc tupdesc; Datum values[PG_STAT_GET_REPLICATION_SLOT_COLS]; @@ -2323,6 +2323,15 @@ pg_stat_get_replication_slot(PG_FUNCTION_ARGS) PgStat_StatReplSlotEntry *slotent; PgStat_StatReplSlotEntry allzero; + /* + * Function was accidentally marked as non-strict, can't change that post + * release. + */ + if (PG_ARGISNULL(0)) + PG_RETURN_NULL(); + + slotname_text = PG_GETARG_TEXT_P(0); + /* Initialise values and NULL flags arrays */ MemSet(values, 0, sizeof(values)); MemSet(nulls, 0, sizeof(nulls)); diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/ruleutils.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/ruleutils.c index 72fe1da833f..24537ac323b 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/ruleutils.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/ruleutils.c @@ -7895,12 +7895,13 @@ get_parameter(Param *param, deparse_context *context) context->varprefix = true; /* - * A Param's expansion is typically a Var, Aggref, or upper-level - * Param, which wouldn't need extra parentheses. Otherwise, insert - * parens to ensure the expression looks atomic. + * A Param's expansion is typically a Var, Aggref, GroupingFunc, or + * upper-level Param, which wouldn't need extra parentheses. + * Otherwise, insert parens to ensure the expression looks atomic. */ need_paren = !(IsA(expr, Var) || IsA(expr, Aggref) || + IsA(expr, GroupingFunc) || IsA(expr, Param)); if (need_paren) appendStringInfoChar(context->buf, '('); @@ -8028,6 +8029,7 @@ isSimpleNode(Node *node, Node *parentNode, int prettyFlags) case T_NextValueExpr: case T_NullIfExpr: case T_Aggref: + case T_GroupingFunc: case T_WindowFunc: case T_FuncExpr: /* function-like: name(..) or name[..] */ @@ -8144,6 +8146,7 @@ isSimpleNode(Node *node, Node *parentNode, int prettyFlags) case T_XmlExpr: /* own parentheses */ case T_NullIfExpr: /* other separators */ case T_Aggref: /* own parentheses */ + case T_GroupingFunc: /* own parentheses */ case T_WindowFunc: /* own parentheses */ case T_CaseExpr: /* other separators */ return true; @@ -8194,6 +8197,7 @@ isSimpleNode(Node *node, Node *parentNode, int prettyFlags) case T_XmlExpr: /* own parentheses */ case T_NullIfExpr: /* other separators */ case T_Aggref: /* own parentheses */ + case T_GroupingFunc: /* own parentheses */ case T_WindowFunc: /* own parentheses */ case T_CaseExpr: /* other separators */ return true; diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/timestamp.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/timestamp.c index c5abbf7da9c..2b083c7f56a 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/timestamp.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/timestamp.c @@ -5287,10 +5287,16 @@ interval_part_common(PG_FUNCTION_ARGS, bool retnumeric) int64 secs_from_day_month; int64 val; - /* this always fits into int64 */ - secs_from_day_month = ((int64) DAYS_PER_YEAR * (interval->month / MONTHS_PER_YEAR) + - (int64) DAYS_PER_MONTH * (interval->month % MONTHS_PER_YEAR) + - interval->day) * SECS_PER_DAY; + /* + * To do this calculation in integer arithmetic even though + * DAYS_PER_YEAR is fractional, multiply everything by 4 and then + * divide by 4 again at the end. This relies on DAYS_PER_YEAR + * being a multiple of 0.25 and on SECS_PER_DAY being a multiple + * of 4. + */ + secs_from_day_month = ((int64) (4 * DAYS_PER_YEAR) * (interval->month / MONTHS_PER_YEAR) + + (int64) (4 * DAYS_PER_MONTH) * (interval->month % MONTHS_PER_YEAR) + + (int64) 4 * interval->day) * (SECS_PER_DAY / 4); /*--- * result = secs_from_day_month + interval->time / 1'000'000 diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/xml.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/xml.c index 50478dbe38c..077d47fb758 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/xml.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/adt/xml.c @@ -3659,7 +3659,7 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod) case TIMEOID: case TIMETZOID: { - const char *tz = (typeoid == TIMETZOID ? "(+|-)\\p{Nd}{2}:\\p{Nd}{2}" : ""); + const char *tz = (typeoid == TIMETZOID ? "(\\+|-)\\p{Nd}{2}:\\p{Nd}{2}" : ""); if (typmod == -1) appendStringInfo(&result, @@ -3682,7 +3682,7 @@ map_sql_type_to_xmlschema_type(Oid typeoid, int typmod) case TIMESTAMPOID: case TIMESTAMPTZOID: { - const char *tz = (typeoid == TIMESTAMPTZOID ? "(+|-)\\p{Nd}{2}:\\p{Nd}{2}" : ""); + const char *tz = (typeoid == TIMESTAMPTZOID ? "(\\+|-)\\p{Nd}{2}:\\p{Nd}{2}" : ""); if (typmod == -1) appendStringInfo(&result, diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/cache/lsyscache.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/cache/lsyscache.c index 4f4f37337f4..09089fc29ab 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/cache/lsyscache.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/cache/lsyscache.c @@ -1126,8 +1126,13 @@ get_constraint_name(Oid conoid) * Given the OID of a unique, primary-key, or exclusion constraint, * return the OID of the underlying index. * - * Return InvalidOid if the index couldn't be found; this suggests the - * given OID is bogus, but we leave it to caller to decide what to do. + * Returns InvalidOid if the constraint could not be found or is of + * the wrong type. + * + * The intent of this function is to return the index "owned" by the + * specified constraint. Therefore we must check contype, since some + * pg_constraint entries (e.g. for foreign-key constraints) store the + * OID of an index that is referenced but not owned by the constraint. */ Oid get_constraint_index(Oid conoid) @@ -1140,7 +1145,12 @@ get_constraint_index(Oid conoid) Form_pg_constraint contup = (Form_pg_constraint) GETSTRUCT(tp); Oid result; - result = contup->conindid; + if (contup->contype == CONSTRAINT_UNIQUE || + contup->contype == CONSTRAINT_PRIMARY || + contup->contype == CONSTRAINT_EXCLUSION) + result = contup->conindid; + else + result = InvalidOid; ReleaseSysCache(tp); return result; } diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/cache/relcache.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/cache/relcache.c index 85c9a24368e..7ce31e0d3c5 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/cache/relcache.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/cache/relcache.c @@ -6485,7 +6485,7 @@ write_item(const void *data, Size len, FILE *fp) { if (fwrite(&len, 1, sizeof(len), fp) != sizeof(len)) elog(FATAL, "could not write init file"); - if (fwrite(data, 1, len, fp) != len) + if (len > 0 && fwrite(data, 1, len, fp) != len) elog(FATAL, "could not write init file"); } diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/init/miscinit.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/init/miscinit.c index 1322d54359f..3de47ce581e 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/init/miscinit.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/init/miscinit.c @@ -95,13 +95,12 @@ InitPostmasterChild(void) IsUnderPostmaster = true; /* we are a postmaster subprocess now */ /* - * Set reference point for stack-depth checking. We re-do that even in the - * !EXEC_BACKEND case, because there are some edge cases where processes - * are started with an alternative stack (e.g. starting bgworkers when - * running postgres using the rr debugger, as bgworkers are launched from - * signal handlers). + * Set reference point for stack-depth checking. This might seem + * redundant in !EXEC_BACKEND builds; but it's not because the postmaster + * launches its children from signal handlers, so we might be running on + * an alternative stack. */ - set_stack_base(); + (void) set_stack_base(); InitProcessGlobals(); @@ -553,15 +552,21 @@ GetAuthenticatedUserId(void) * with guc.c's internal state, so SET ROLE has to be disallowed. * * SECURITY_RESTRICTED_OPERATION indicates that we are inside an operation - * that does not wish to trust called user-defined functions at all. This - * bit prevents not only SET ROLE, but various other changes of session state - * that normally is unprotected but might possibly be used to subvert the - * calling session later. An example is replacing an existing prepared - * statement with new code, which will then be executed with the outer - * session's permissions when the prepared statement is next used. Since - * these restrictions are fairly draconian, we apply them only in contexts - * where the called functions are really supposed to be side-effect-free - * anyway, such as VACUUM/ANALYZE/REINDEX. + * that does not wish to trust called user-defined functions at all. The + * policy is to use this before operations, e.g. autovacuum and REINDEX, that + * enumerate relations of a database or schema and run functions associated + * with each found relation. The relation owner is the new user ID. Set this + * as soon as possible after locking the relation. Restore the old user ID as + * late as possible before closing the relation; restoring it shortly after + * close is also tolerable. If a command has both relation-enumerating and + * non-enumerating modes, e.g. ANALYZE, both modes set this bit. This bit + * prevents not only SET ROLE, but various other changes of session state that + * normally is unprotected but might possibly be used to subvert the calling + * session later. An example is replacing an existing prepared statement with + * new code, which will then be executed with the outer session's permissions + * when the prepared statement is next used. These restrictions are fairly + * draconian, but the functions called in relation-enumerating operations are + * really supposed to be side-effect-free anyway. * * SECURITY_NOFORCE_RLS indicates that we are inside an operation which should * ignore the FORCE ROW LEVEL SECURITY per-table indication. This is used to diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/misc/guc.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/misc/guc.c index 3c6963c0946..c07f609a8ff 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/misc/guc.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/misc/guc.c @@ -409,6 +409,7 @@ static const const struct config_enum_entry backslash_quote_options[] = { */ static const struct config_enum_entry compute_query_id_options[] = { {"auto", COMPUTE_QUERY_ID_AUTO, false}, + {"regress", COMPUTE_QUERY_ID_REGRESS, false}, {"on", COMPUTE_QUERY_ID_ON, false}, {"off", COMPUTE_QUERY_ID_OFF, false}, {"true", COMPUTE_QUERY_ID_ON, true}, @@ -1310,13 +1311,13 @@ valid_custom_variable_name(const char *name) name_start = true; } else if (strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz", *p) != NULL || + "abcdefghijklmnopqrstuvwxyz_", *p) != NULL || IS_HIGHBIT_SET(*p)) { /* okay as first or non-first character */ name_start = false; } - else if (!name_start && strchr("0123456789_$", *p) != NULL) + else if (!name_start && strchr("0123456789$", *p) != NULL) /* okay as non-first character */ ; else return false; @@ -5521,7 +5522,7 @@ GetConfigOptionByNum(int varnum, const char **values, bool *noshow) values[4] = _(conf->short_desc); /* extra_desc */ - values[5] = _(conf->long_desc); + values[5] = conf->long_desc != NULL ? _(conf->long_desc) : NULL; /* context */ values[6] = GucContext_Names[conf->context]; diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/misc/ps_status.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/misc/ps_status.c index 096b3ad1c5b..43570c6cec5 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/misc/ps_status.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/misc/ps_status.c @@ -443,6 +443,7 @@ get_ps_display(int *displen) return ps_buffer + ps_buffer_fixed_size; #else + *displen = 0; return ""; #endif } diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/misc/timeout.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/misc/timeout.c index 794fb2f9d63..fd0aee4bcd8 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/misc/timeout.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/misc/timeout.c @@ -70,11 +70,12 @@ static __thread volatile sig_atomic_t alarm_enabled = false; /* * State recording if and when we next expect the interrupt to fire. + * (signal_due_at is valid only when signal_pending is true.) * Note that the signal handler will unconditionally reset signal_pending to * false, so that can change asynchronously even when alarm_enabled is false. */ static __thread volatile sig_atomic_t signal_pending = false; -static __thread TimestampTz signal_due_at = 0; /* valid only when signal_pending */ +static __thread volatile TimestampTz signal_due_at = 0; /***************************************************************************** @@ -215,9 +216,21 @@ schedule_alarm(TimestampTz now) MemSet(&timeval, 0, sizeof(struct itimerval)); /* + * If we think there's a signal pending, but current time is more than + * 10ms past when the signal was due, then assume that the timeout + * request got lost somehow; clear signal_pending so that we'll reset + * the interrupt request below. (10ms corresponds to the worst-case + * timeout granularity on modern systems.) It won't hurt us if the + * interrupt does manage to fire between now and when we reach the + * setitimer() call. + */ + if (signal_pending && now > signal_due_at + 10 * 1000) + signal_pending = false; + + /* * Get the time remaining till the nearest pending timeout. If it is - * negative, assume that we somehow missed an interrupt, and force - * signal_pending off. This gives us a chance to recover if the + * negative, assume that we somehow missed an interrupt, and clear + * signal_pending. This gives us another chance to recover if the * kernel drops a timeout request for some reason. */ nearest_timeout = active_timeouts[0]->fin_time; diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/sort/tuplesort.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/sort/tuplesort.c index 95fa43cf949..7b87adb712d 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/sort/tuplesort.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/sort/tuplesort.c @@ -975,6 +975,7 @@ tuplesort_begin_cluster(TupleDesc tupDesc, { Tuplesortstate *state = tuplesort_begin_common(workMem, coordinate, randomAccess); + AttrNumber leading; BTScanInsert indexScanKey; MemoryContext oldcontext; int i; @@ -1007,6 +1008,7 @@ tuplesort_begin_cluster(TupleDesc tupDesc, state->abbrevNext = 10; state->indexInfo = BuildIndexInfo(indexRel); + leading = state->indexInfo->ii_IndexAttrNumbers[0]; state->tupDesc = tupDesc; /* assume we need not copy tupDesc */ @@ -1045,7 +1047,7 @@ tuplesort_begin_cluster(TupleDesc tupDesc, (scanKey->sk_flags & SK_BT_NULLS_FIRST) != 0; sortKey->ssup_attno = scanKey->sk_attno; /* Convey if abbreviation optimization is applicable in principle */ - sortKey->abbreviate = (i == 0); + sortKey->abbreviate = (i == 0 && leading != 0); AssertState(sortKey->ssup_attno != 0); diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/time/snapmgr.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/time/snapmgr.c index e9c962cd26f..17aa77d79d3 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/time/snapmgr.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/backend/utils/time/snapmgr.c @@ -536,12 +536,14 @@ SetTransactionSnapshot(Snapshot sourcesnap, VirtualTransactionId *sourcevxid, CurrentSnapshot->xmax = sourcesnap->xmax; CurrentSnapshot->xcnt = sourcesnap->xcnt; Assert(sourcesnap->xcnt <= GetMaxSnapshotXidCount()); - memcpy(CurrentSnapshot->xip, sourcesnap->xip, - sourcesnap->xcnt * sizeof(TransactionId)); + if (sourcesnap->xcnt > 0) + memcpy(CurrentSnapshot->xip, sourcesnap->xip, + sourcesnap->xcnt * sizeof(TransactionId)); CurrentSnapshot->subxcnt = sourcesnap->subxcnt; Assert(sourcesnap->subxcnt <= GetMaxSnapshotSubxidCount()); - memcpy(CurrentSnapshot->subxip, sourcesnap->subxip, - sourcesnap->subxcnt * sizeof(TransactionId)); + if (sourcesnap->subxcnt > 0) + memcpy(CurrentSnapshot->subxip, sourcesnap->subxip, + sourcesnap->subxcnt * sizeof(TransactionId)); CurrentSnapshot->suboverflowed = sourcesnap->suboverflowed; CurrentSnapshot->takenDuringRecovery = sourcesnap->takenDuringRecovery; /* NB: curcid should NOT be copied, it's a local matter */ diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/common/exec.c b/ydb/library/yql/parser/pg_wrapper/postgresql/src/common/exec.c index d1801bae6af..26b8f61dce4 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/common/exec.c +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/common/exec.c @@ -25,6 +25,11 @@ #include <sys/wait.h> #include <unistd.h> +/* Inhibit mingw CRT's auto-globbing of command line arguments */ +#if defined(WIN32) && !defined(_MSC_VER) +extern int _CRT_glob = 0; /* 0 turns off globbing; 1 turns it on */ +#endif + /* * Hacky solution to allow expressing both frontend and backend error reports * in one macro call. First argument of log_error is an errcode() call of diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/access/heapam.h b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/access/heapam.h index e63b49fc385..4f1dff9ca1b 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/access/heapam.h +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/access/heapam.h @@ -134,6 +134,9 @@ extern bool heap_getnextslot_tidrange(TableScanDesc sscan, TupleTableSlot *slot); extern bool heap_fetch(Relation relation, Snapshot snapshot, HeapTuple tuple, Buffer *userbuf); +extern bool heap_fetch_extended(Relation relation, Snapshot snapshot, + HeapTuple tuple, Buffer *userbuf, + bool keep_buf); extern bool heap_hot_search_buffer(ItemPointer tid, Relation relation, Buffer buffer, Snapshot snapshot, HeapTuple heapTuple, bool *all_dead, bool first_call); diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/nodes/pathnodes.h b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/nodes/pathnodes.h index 8ee40cc68c2..f16466a0df1 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/nodes/pathnodes.h +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/nodes/pathnodes.h @@ -240,7 +240,8 @@ struct PlannerInfo List *init_plans; /* init SubPlans for query */ - List *cte_plan_ids; /* per-CTE-item list of subplan IDs */ + List *cte_plan_ids; /* per-CTE-item list of subplan IDs (or -1 if + * no subplan was made for that CTE) */ List *multiexpr_params; /* List of Lists of Params for MULTIEXPR * subquery outputs */ diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/pg_config-linux.h b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/pg_config-linux.h index 068918eedfd..2174de8881b 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/pg_config-linux.h +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/pg_config-linux.h @@ -44,7 +44,7 @@ #define BLCKSZ 8192 /* Saved arguments from configure */ -#define CONFIGURE_ARGS " '--prefix=/var/empty/postgresql-14.2' '--with-openssl' '--with-libxml' '--sysconfdir=/etc' '--libdir=$(lib)/lib' '--with-system-tzdata=/var/empty/tzdata-2021c/share/zoneinfo' '--enable-debug' '--with-systemd' '--with-ossp-uuid' '--with-icu' '--with-lz4' '--with-gssapi' '--without-gssapi' '--without-systemd' 'CC=cc' 'CXX=g++' 'PKG_CONFIG=pkg-config' 'PKG_CONFIG_PATH=/var/empty/zlib-1.2.11-dev/lib/pkgconfig:/var/empty/ncurses-6.2-dev/lib/pkgconfig:/var/empty/openssl-1.1.1l-dev/lib/pkgconfig:/var/empty/libxml2-2.9.12-dev/lib/pkgconfig:/var/empty/icu4c-70.1-dev/lib/pkgconfig:/var/empty/lz4-1.9.3-dev/lib/pkgconfig:/var/empty/systemd-249.5-dev/lib/pkgconfig:/var/empty/systemd-249.5-dev/share/pkgconfig:/var/empty/libkrb5-1.18-dev/lib/pkgconfig:/var/empty/libossp-uuid-1.6.2/lib/pkgconfig'" +#define CONFIGURE_ARGS " '--with-openssl' '--with-icu' '--with-libxml' '--enable-debug' '--without-systemd' '--without-gssapi' '--with-lz4' '--with-ossp-uuid' 'CC=clang' 'CFLAGS=-ffunction-sections -fdata-sections'" /* Define to the default TCP port number on which the server listens and to which clients will try to connect. This can be overridden at run-time, but @@ -644,6 +644,9 @@ /* Define to 1 if you have the <sys/shm.h> header file. */ #define HAVE_SYS_SHM_H 1 +/* Define to 1 if you have the <sys/signalfd.h> header file. */ +/* #undef HAVE_SYS_SIGNALFD_H */ + /* Define to 1 if you have the <sys/sockio.h> header file. */ /* #undef HAVE_SYS_SOCKIO_H */ @@ -749,6 +752,9 @@ /* Define to 1 if your compiler understands __builtin_ctz. */ #define HAVE__BUILTIN_CTZ 1 +/* Define to 1 if your compiler understands __builtin_frame_address. */ +/* #undef HAVE__BUILTIN_FRAME_ADDRESS */ /* problems with sanitizers */ + /* Define to 1 if your compiler understands __builtin_$op_overflow. */ #define HAVE__BUILTIN_OP_OVERFLOW 1 @@ -802,7 +808,7 @@ #define PACKAGE_NAME "PostgreSQL" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "PostgreSQL 14.2" +#define PACKAGE_STRING "PostgreSQL 14.3" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "postgresql" @@ -811,7 +817,7 @@ #define PACKAGE_URL "https://www.postgresql.org/" /* Define to the version of this package. */ -#define PACKAGE_VERSION "14.2" +#define PACKAGE_VERSION "14.3" /* Define to the name of a signed 128-bit integer type. */ #define PG_INT128_TYPE __int128 @@ -830,7 +836,7 @@ #define PG_MAJORVERSION_NUM 14 /* PostgreSQL minor version number */ -#define PG_MINORVERSION_NUM 2 +#define PG_MINORVERSION_NUM 3 /* Define to best printf format archetype, usually gnu_printf if available. */ #define PG_PRINTF_ATTRIBUTE gnu_printf @@ -839,13 +845,13 @@ #define PG_USE_STDBOOL 1 /* PostgreSQL version as a string */ -#define PG_VERSION "14.2" +#define PG_VERSION "14.3" /* PostgreSQL version as a number */ -#define PG_VERSION_NUM 140002 +#define PG_VERSION_NUM 140003 /* A string containing the version number, platform, and C compiler */ -#define PG_VERSION_STR "PostgreSQL 14.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 10.3.0, 64-bit" +#define PG_VERSION_STR "PostgreSQL 14.3 on x86_64-pc-linux-gnu, compiled by clang version 16.0.6, 64-bit" /* Define to 1 to allow profiling output to be saved separately for each process. */ diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/storage/block.h b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/storage/block.h index 4a5c476d2d0..e7d86e5fe60 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/storage/block.h +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/storage/block.h @@ -115,7 +115,7 @@ typedef BlockIdData *BlockId; /* block identifier */ #define BlockIdGetBlockNumber(blockId) \ ( \ AssertMacro(BlockIdIsValid(blockId)), \ - (BlockNumber) (((blockId)->bi_hi << 16) | ((uint16) (blockId)->bi_lo)) \ + ((((BlockNumber) (blockId)->bi_hi) << 16) | ((BlockNumber) (blockId)->bi_lo)) \ ) #endif /* BLOCK_H */ diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/storage/proc.h b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/storage/proc.h index d003fa3b389..96500ea3abe 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/storage/proc.h +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/storage/proc.h @@ -86,6 +86,13 @@ struct XidCache */ #define INVALID_PGPROCNO PG_INT32_MAX +/* + * Flags used only for type of internal functions + * GetVirtualXIDsDelayingChkptGuts and HaveVirtualXIDsDelayingChkptGuts. + */ +#define DELAY_CHKPT_START (1<<0) +#define DELAY_CHKPT_COMPLETE (1<<1) + typedef enum { PROC_WAIT_STATUS_OK, @@ -196,6 +203,7 @@ struct PGPROC uint8 statusFlags; /* this backend's status flags, see PROC_* * above. mirrored in * ProcGlobal->statusFlags[pgxactoff] */ + bool delayChkptEnd; /* true if this proc delays checkpoint end */ /* * Info to allow us to wait for synchronous replication, if needed. diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/storage/procarray.h b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/storage/procarray.h index b01fa52139a..f5d7d410986 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/storage/procarray.h +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/storage/procarray.h @@ -60,7 +60,11 @@ extern TransactionId GetOldestSafeDecodingTransactionId(bool catalogOnly); extern void GetReplicationHorizons(TransactionId *slot_xmin, TransactionId *catalog_xmin); extern VirtualTransactionId *GetVirtualXIDsDelayingChkpt(int *nvxids); -extern bool HaveVirtualXIDsDelayingChkpt(VirtualTransactionId *vxids, int nvxids); +extern VirtualTransactionId *GetVirtualXIDsDelayingChkptEnd(int *nvxids); +extern bool HaveVirtualXIDsDelayingChkpt(VirtualTransactionId *vxids, + int nvxids); +extern bool HaveVirtualXIDsDelayingChkptEnd(VirtualTransactionId *vxids, + int nvxids); extern PGPROC *BackendPidGetProc(int pid); extern PGPROC *BackendPidGetProcWithLock(int pid); diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/utils/queryjumble.h b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/utils/queryjumble.h index 0fd4b9309ce..cc06f4a61ff 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/utils/queryjumble.h +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/utils/queryjumble.h @@ -57,7 +57,8 @@ enum ComputeQueryIdType { COMPUTE_QUERY_ID_OFF, COMPUTE_QUERY_ID_ON, - COMPUTE_QUERY_ID_AUTO + COMPUTE_QUERY_ID_AUTO, + COMPUTE_QUERY_ID_REGRESS }; /* GUC parameters */ diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/utils/rel.h b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/utils/rel.h index 77d176a9348..d62ac86c520 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/utils/rel.h +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/utils/rel.h @@ -319,7 +319,6 @@ typedef struct StdRdOptions { int32 vl_len_; /* varlena header (do not touch directly!) */ int fillfactor; /* page fill factor in percent (0..100) */ - /* fraction of newly inserted tuples prior to trigger index cleanup */ int toast_tuple_target; /* target for tuple toasting */ AutoVacOpts autovacuum; /* autovacuum-related options */ bool user_catalog_table; /* use as an additional catalog relation */ diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/utils/relptr.h b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/utils/relptr.h index 55965f28d5a..e71c7d0bdca 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/utils/relptr.h +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/utils/relptr.h @@ -56,11 +56,24 @@ #define relptr_is_null(rp) \ ((rp).relptr_off == 0) +/* We use this inline to avoid double eval of "val" in relptr_store */ +static inline Size +relptr_store_eval(char *base, char *val) +{ + if (val == NULL) + return 0; + else + { + Assert(val > base); + return val - base; + } +} + #ifdef HAVE__BUILTIN_TYPES_COMPATIBLE_P #define relptr_store(base, rp, val) \ (AssertVariableIsOfTypeMacro(base, char *), \ AssertVariableIsOfTypeMacro(val, __typeof__((rp).relptr_type)), \ - (rp).relptr_off = ((val) == NULL ? 0 : ((char *) (val)) - (base))) + (rp).relptr_off = relptr_store_eval(base, (char *) (val))) #else /* * If we don't have __builtin_types_compatible_p, assume we might not have @@ -68,7 +81,7 @@ */ #define relptr_store(base, rp, val) \ (AssertVariableIsOfTypeMacro(base, char *), \ - (rp).relptr_off = ((val) == NULL ? 0 : ((char *) (val)) - (base))) + (rp).relptr_off = relptr_store_eval(base, (char *) (val))) #endif #define relptr_copy(rp1, rp2) \ diff --git a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/utils/wait_event.h b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/utils/wait_event.h index 6c6ec2e7118..4b1cea65938 100644 --- a/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/utils/wait_event.h +++ b/ydb/library/yql/parser/pg_wrapper/postgresql/src/include/utils/wait_event.h @@ -140,7 +140,9 @@ typedef enum WAIT_EVENT_PG_SLEEP, WAIT_EVENT_RECOVERY_APPLY_DELAY, WAIT_EVENT_RECOVERY_RETRIEVE_RETRY_INTERVAL, - WAIT_EVENT_VACUUM_DELAY + WAIT_EVENT_VACUUM_DELAY, + WAIT_EVENT_CHECKPOINT_WRITE_DELAY, + WAIT_EVENT_REGISTER_SYNC_REQUEST } WaitEventTimeout; /* ---------- diff --git a/ydb/library/yql/parser/pg_wrapper/vars.txt b/ydb/library/yql/parser/pg_wrapper/vars.txt index a9ca5a5c3a0..923027bf7cf 100644 --- a/ydb/library/yql/parser/pg_wrapper/vars.txt +++ b/ydb/library/yql/parser/pg_wrapper/vars.txt @@ -854,6 +854,7 @@ got_SIGUSR2 got_STOPPING got_deadlock_timeout got_standby_deadlock_timeout +got_standby_delay_timeout got_standby_lock_timeout guc_dirty guc_variables |
