diff --git a/pkg/ccl/backupccl/restore_data_processor.go b/pkg/ccl/backupccl/restore_data_processor.go index 95d000c37d17..1b6ca666df71 100644 --- a/pkg/ccl/backupccl/restore_data_processor.go +++ b/pkg/ccl/backupccl/restore_data_processor.go @@ -65,9 +65,6 @@ type restoreDataProcessor struct { phaseGroup ctxgroup.Group cancelWorkersAndWait func() - // sstCh is a channel that holds SSTs opened by the processor, but not yet - // ingested. - sstCh chan mergedSST // Metas from the input are forwarded to the output of this processor. metaCh chan *execinfrapb.ProducerMetadata // progress updates are accumulated on this channel. It is populated by the @@ -133,6 +130,7 @@ func newRestoreDataProcessor( output execinfra.RowReceiver, ) (execinfra.Processor, error) { sv := &flowCtx.Cfg.Settings.SV + numWorkers := int(numRestoreWorkers.Get(sv)) rd := &restoreDataProcessor{ flowCtx: flowCtx, @@ -140,8 +138,8 @@ func newRestoreDataProcessor( spec: spec, output: output, progCh: make(chan backuppb.RestoreProgress, maxConcurrentRestoreWorkers), - metaCh: make(chan *execinfrapb.ProducerMetadata, 1), - numWorkers: int(numRestoreWorkers.Get(sv)), + metaCh: make(chan *execinfrapb.ProducerMetadata, numWorkers), + numWorkers: numWorkers, } if err := rd.Init(rd, post, restoreDataOutputTypes, flowCtx, processorID, output, nil, /* memMonitor */ @@ -174,26 +172,14 @@ func (rd *restoreDataProcessor) Start(ctx context.Context) { log.Infof(ctx, "starting restore data") entries := make(chan execinfrapb.RestoreSpanEntry, rd.numWorkers) - rd.sstCh = make(chan mergedSST, rd.numWorkers) rd.phaseGroup.GoCtx(func(ctx context.Context) error { defer close(entries) return inputReader(ctx, rd.input, entries, rd.metaCh) }) - rd.phaseGroup.GoCtx(func(ctx context.Context) error { - defer close(rd.sstCh) - for entry := range entries { - if err := rd.openSSTs(ctx, entry, rd.sstCh); err != nil { - return err - } - } - - return nil - }) - rd.phaseGroup.GoCtx(func(ctx context.Context) error { defer close(rd.progCh) - return rd.runRestoreWorkers(ctx, rd.sstCh) + return rd.runRestoreWorkers(ctx, entries) }) } @@ -267,10 +253,8 @@ type mergedSST struct { } func (rd *restoreDataProcessor) openSSTs( - ctx context.Context, entry execinfrapb.RestoreSpanEntry, sstCh chan mergedSST, -) error { - ctxDone := ctx.Done() - + ctx context.Context, entry execinfrapb.RestoreSpanEntry, +) (mergedSST, error) { // TODO(msbutler): use a a map of external storage factories to avoid reopening the same dir // in a given restore span entry var dirs []cloud.ExternalStorage @@ -285,9 +269,9 @@ func (rd *restoreDataProcessor) openSSTs( } }() - // sendIter sends a multiplexed iterator covering the currently accumulated files over the - // channel. - sendIter := func(iter storage.SimpleMVCCIterator, dirsToSend []cloud.ExternalStorage) error { + // getIter returns a multiplexed iterator covering the currently accumulated + // files over the channel. + getIter := func(iter storage.SimpleMVCCIterator, dirsToSend []cloud.ExternalStorage) (mergedSST, error) { readAsOfIter := storage.NewReadAsOfIterator(iter, rd.spec.RestoreTime) cleanup := func() { @@ -306,14 +290,8 @@ func (rd *restoreDataProcessor) openSSTs( cleanup: cleanup, } - select { - case sstCh <- mSST: - case <-ctxDone: - return ctx.Err() - } - dirs = make([]cloud.ExternalStorage, 0) - return nil + return mSST, nil } log.VEventf(ctx, 1 /* level */, "ingesting span [%s-%s)", entry.Span.Key, entry.Span.EndKey) @@ -324,12 +302,12 @@ func (rd *restoreDataProcessor) openSSTs( dir, err := rd.flowCtx.Cfg.ExternalStorage(ctx, file.Dir) if err != nil { - return err + return mergedSST{}, err } dirs = append(dirs, dir) storeFiles = append(storeFiles, storageccl.StoreFile{Store: dir, FilePath: file.Path}) - // TODO(pbardea): When memory monitoring is added, send the currently - // accumulated iterators on the channel if we run into memory pressure. + // TODO(pbardea): When memory monitoring is added, return the currently + // accumulated iterators if we run into memory pressure. } iterOpts := storage.IterOptions{ RangeKeyMaskingBelow: rd.spec.RestoreTime, @@ -339,12 +317,14 @@ func (rd *restoreDataProcessor) openSSTs( } iter, err := storageccl.ExternalSSTReader(ctx, storeFiles, rd.spec.Encryption, iterOpts) if err != nil { - return err + return mergedSST{}, err } - return sendIter(iter, dirs) + return getIter(iter, dirs) } -func (rd *restoreDataProcessor) runRestoreWorkers(ctx context.Context, ssts chan mergedSST) error { +func (rd *restoreDataProcessor) runRestoreWorkers( + ctx context.Context, entries chan execinfrapb.RestoreSpanEntry, +) error { return ctxgroup.GroupWorkers(ctx, rd.numWorkers, func(ctx context.Context, worker int) error { kr, err := MakeKeyRewriterFromRekeys(rd.FlowCtx.Codec(), rd.spec.TableRekeys, rd.spec.TenantRekeys, false /* restoreTenantFromStream */) @@ -358,12 +338,17 @@ func (rd *restoreDataProcessor) runRestoreWorkers(ctx context.Context, ssts chan for { done, err := func() (done bool, _ error) { - sstIter, ok := <-ssts + entry, ok := <-entries if !ok { done = true return done, nil } + sstIter, err := rd.openSSTs(ctx, entry) + if err != nil { + return done, err + } + summary, err := rd.processRestoreSpanEntry(ctx, kr, sstIter) if err != nil { return done, err @@ -572,12 +557,6 @@ func (rd *restoreDataProcessor) ConsumerClosed() { return } rd.cancelWorkersAndWait() - if rd.sstCh != nil { - // Cleanup all the remaining open SSTs that have not been consumed. - for sst := range rd.sstCh { - sst.cleanup() - } - } rd.agg.Close() rd.InternalClose() } diff --git a/pkg/ccl/backupccl/restore_data_processor_test.go b/pkg/ccl/backupccl/restore_data_processor_test.go index 9bc258bd6f7f..7ec3ff84e3f1 100644 --- a/pkg/ccl/backupccl/restore_data_processor_test.go +++ b/pkg/ccl/backupccl/restore_data_processor_test.go @@ -386,10 +386,8 @@ func runTestIngest(t *testing.T, init func(*cluster.Settings)) { mockRestoreDataProcessor, err := newTestingRestoreDataProcessor(&evalCtx, &flowCtx, mockRestoreDataSpec) require.NoError(t, err) - ssts := make(chan mergedSST, 1) - require.NoError(t, mockRestoreDataProcessor.openSSTs(ctx, restoreSpanEntry, ssts)) - close(ssts) - sst := <-ssts + sst, err := mockRestoreDataProcessor.openSSTs(ctx, restoreSpanEntry) + require.NoError(t, err) rewriter, err := MakeKeyRewriterFromRekeys(flowCtx.Codec(), mockRestoreDataSpec.TableRekeys, mockRestoreDataSpec.TenantRekeys, false /* restoreTenantFromStream */) require.NoError(t, err) diff --git a/pkg/sql/plpgsql/parser/lexbase/keywords.go b/pkg/sql/plpgsql/parser/lexbase/keywords.go new file mode 100644 index 000000000000..343063869af6 --- /dev/null +++ b/pkg/sql/plpgsql/parser/lexbase/keywords.go @@ -0,0 +1,353 @@ +// Code generated by pkg/sql/lexbase/allkeywords. DO NOT EDIT. + +package lexbase + +var KeywordsCategories = map[string]string{ +"absolute": "U", +"alias": "U", +"all": "R", +"and": "U", +"array": "U", +"assert": "U", +"backward": "U", +"begin": "R", +"by": "R", +"call": "U", +"case": "R", +"chain": "U", +"close": "U", +"collate": "U", +"column": "U", +"column_name": "U", +"commit": "U", +"constant": "U", +"constraint": "U", +"constraint_name": "U", +"continue": "U", +"current": "U", +"cursor": "U", +"datatype": "U", +"debug": "U", +"declare": "R", +"default": "U", +"detail": "U", +"diagnostics": "U", +"do": "U", +"dump": "U", +"else": "R", +"elsif": "U", +"end": "R", +"end_case": "R", +"end_if": "R", +"errcode": "U", +"error": "U", +"exception": "U", +"execute": "R", +"exit": "U", +"fetch": "U", +"first": "U", +"for": "R", +"foreach": "R", +"forward": "U", +"from": "R", +"get": "U", +"hint": "U", +"if": "R", +"import": "U", +"in": "R", +"info": "U", +"insert": "U", +"into": "R", +"is": "U", +"last": "U", +"log": "U", +"loop": "R", +"merge": "U", +"message": "U", +"message_text": "U", +"move": "U", +"next": "U", +"no": "U", +"not": "R", +"notice": "U", +"no_scroll": "U", +"null": "R", +"open": "U", +"option": "U", +"or": "R", +"perform": "U", +"pg_context": "U", +"pg_datatype_name": "U", +"pg_exception_context": "U", +"pg_exception_detail": "U", +"pg_exception_hint": "U", +"print_strict_params": "U", +"prior": "U", +"query": "U", +"raise": "U", +"relative": "U", +"return": "U", +"returned_sqlstate": "U", +"return_next": "U", +"return_query": "U", +"reverse": "U", +"rollback": "U", +"rowtype": "U", +"row_count": "U", +"schema": "U", +"schema_name": "U", +"scroll": "U", +"slice": "U", +"sqlstate": "U", +"stacked": "U", +"strict": "R", +"table": "U", +"table_name": "U", +"then": "R", +"to": "R", +"type": "U", +"use_column": "U", +"use_variable": "U", +"using": "R", +"variable_conflict": "U", +"warning": "U", +"when": "R", +"while": "R", +} + +// KeywordNames contains all keywords sorted, so that pg_get_keywords returns +// deterministic results. +var KeywordNames = []string{ +"absolute", +"alias", +"all", +"and", +"array", +"assert", +"backward", +"begin", +"by", +"call", +"case", +"chain", +"close", +"collate", +"column", +"column_name", +"commit", +"constant", +"constraint", +"constraint_name", +"continue", +"current", +"cursor", +"datatype", +"debug", +"declare", +"default", +"detail", +"diagnostics", +"do", +"dump", +"else", +"elsif", +"end", +"end_case", +"end_if", +"errcode", +"error", +"exception", +"execute", +"exit", +"fetch", +"first", +"for", +"foreach", +"forward", +"from", +"get", +"hint", +"if", +"import", +"in", +"info", +"insert", +"into", +"is", +"last", +"log", +"loop", +"merge", +"message", +"message_text", +"move", +"next", +"no", +"not", +"notice", +"no_scroll", +"null", +"open", +"option", +"or", +"perform", +"pg_context", +"pg_datatype_name", +"pg_exception_context", +"pg_exception_detail", +"pg_exception_hint", +"print_strict_params", +"prior", +"query", +"raise", +"relative", +"return", +"returned_sqlstate", +"return_next", +"return_query", +"reverse", +"rollback", +"rowtype", +"row_count", +"schema", +"schema_name", +"scroll", +"slice", +"sqlstate", +"stacked", +"strict", +"table", +"table_name", +"then", +"to", +"type", +"use_column", +"use_variable", +"using", +"variable_conflict", +"warning", +"when", +"while", +} + +// GetKeywordID returns the lex id of the SQL keyword k or IDENT if k is +// not a keyword. +func GetKeywordID(k string) int32 { + // The previous implementation generated a map that did a string -> + // id lookup. Various ideas were benchmarked and the implementation below + // was the fastest of those, between 3% and 10% faster (at parsing, so the + // scanning speedup is even more) than the map implementation. + switch k { + case "absolute": return ABSOLUTE + case "alias": return ALIAS + case "all": return ALL + case "and": return AND + case "array": return ARRAY + case "assert": return ASSERT + case "backward": return BACKWARD + case "begin": return BEGIN + case "by": return BY + case "call": return CALL + case "case": return CASE + case "chain": return CHAIN + case "close": return CLOSE + case "collate": return COLLATE + case "column": return COLUMN + case "column_name": return COLUMN_NAME + case "commit": return COMMIT + case "constant": return CONSTANT + case "constraint": return CONSTRAINT + case "constraint_name": return CONSTRAINT_NAME + case "continue": return CONTINUE + case "current": return CURRENT + case "cursor": return CURSOR + case "datatype": return DATATYPE + case "debug": return DEBUG + case "declare": return DECLARE + case "default": return DEFAULT + case "detail": return DETAIL + case "diagnostics": return DIAGNOSTICS + case "do": return DO + case "dump": return DUMP + case "else": return ELSE + case "elsif": return ELSIF + case "end": return END + case "end_case": return END_CASE + case "end_if": return END_IF + case "errcode": return ERRCODE + case "error": return ERROR + case "exception": return EXCEPTION + case "execute": return EXECUTE + case "exit": return EXIT + case "fetch": return FETCH + case "first": return FIRST + case "for": return FOR + case "foreach": return FOREACH + case "forward": return FORWARD + case "from": return FROM + case "get": return GET + case "hint": return HINT + case "if": return IF + case "import": return IMPORT + case "in": return IN + case "info": return INFO + case "insert": return INSERT + case "into": return INTO + case "is": return IS + case "last": return LAST + case "log": return LOG + case "loop": return LOOP + case "merge": return MERGE + case "message": return MESSAGE + case "message_text": return MESSAGE_TEXT + case "move": return MOVE + case "next": return NEXT + case "no": return NO + case "not": return NOT + case "notice": return NOTICE + case "no_scroll": return NO_SCROLL + case "null": return NULL + case "open": return OPEN + case "option": return OPTION + case "or": return OR + case "perform": return PERFORM + case "pg_context": return PG_CONTEXT + case "pg_datatype_name": return PG_DATATYPE_NAME + case "pg_exception_context": return PG_EXCEPTION_CONTEXT + case "pg_exception_detail": return PG_EXCEPTION_DETAIL + case "pg_exception_hint": return PG_EXCEPTION_HINT + case "print_strict_params": return PRINT_STRICT_PARAMS + case "prior": return PRIOR + case "query": return QUERY + case "raise": return RAISE + case "relative": return RELATIVE + case "return": return RETURN + case "returned_sqlstate": return RETURNED_SQLSTATE + case "return_next": return RETURN_NEXT + case "return_query": return RETURN_QUERY + case "reverse": return REVERSE + case "rollback": return ROLLBACK + case "rowtype": return ROWTYPE + case "row_count": return ROW_COUNT + case "schema": return SCHEMA + case "schema_name": return SCHEMA_NAME + case "scroll": return SCROLL + case "slice": return SLICE + case "sqlstate": return SQLSTATE + case "stacked": return STACKED + case "strict": return STRICT + case "table": return TABLE + case "table_name": return TABLE_NAME + case "then": return THEN + case "to": return TO + case "type": return TYPE + case "use_column": return USE_COLUMN + case "use_variable": return USE_VARIABLE + case "using": return USING + case "variable_conflict": return VARIABLE_CONFLICT + case "warning": return WARNING + case "when": return WHEN + case "while": return WHILE + default: return IDENT + } +} diff --git a/pkg/sql/plpgsql/parser/lexbase/tokens.go b/pkg/sql/plpgsql/parser/lexbase/tokens.go new file mode 100644 index 000000000000..1df2c174ce47 --- /dev/null +++ b/pkg/sql/plpgsql/parser/lexbase/tokens.go @@ -0,0 +1,133 @@ +// Code generated by make. DO NOT EDIT. +// GENERATED FILE DO NOT EDIT + +package lexbase + +const IDENT = 57346 +const UIDENT = 57347 +const FCONST = 57348 +const SCONST = 57349 +const USCONST = 57350 +const BCONST = 57351 +const XCONST = 57352 +const ICONST = 57354 +const PARAM = 57355 +const TYPECAST = 57356 +const DOT_DOT = 57357 +const COLON_EQUALS = 57358 +const EQUALS_GREATER = 57359 +const LESS_EQUALS = 57360 +const GREATER_EQUALS = 57361 +const NOT_EQUALS = 57362 +const LESS_LESS = 57363 +const GREATER_GREATER = 57364 +const ABSOLUTE = 57365 +const ALIAS = 57366 +const ALL = 57367 +const AND = 57368 +const ARRAY = 57369 +const ASSERT = 57370 +const BACKWARD = 57371 +const BEGIN = 57372 +const BY = 57373 +const CALL = 57374 +const CASE = 57375 +const CHAIN = 57376 +const CLOSE = 57377 +const COLLATE = 57378 +const COLUMN = 57379 +const COLUMN_NAME = 57380 +const COMMIT = 57381 +const CONSTANT = 57382 +const CONSTRAINT = 57383 +const CONSTRAINT_NAME = 57384 +const CONTINUE = 57385 +const CURRENT = 57386 +const CURSOR = 57387 +const DATATYPE = 57388 +const DEBUG = 57389 +const DECLARE = 57390 +const DEFAULT = 57391 +const DETAIL = 57392 +const DIAGNOSTICS = 57393 +const DO = 57394 +const DUMP = 57395 +const ELSE = 57396 +const ELSIF = 57397 +const END = 57398 +const END_CASE = 57399 +const END_IF = 57400 +const ERRCODE = 57401 +const ERROR = 57402 +const EXCEPTION = 57403 +const EXECUTE = 57404 +const EXIT = 57405 +const FETCH = 57406 +const FIRST = 57407 +const FOR = 57408 +const FOREACH = 57409 +const FORWARD = 57410 +const FROM = 57411 +const GET = 57412 +const HINT = 57413 +const IF = 57414 +const IMPORT = 57415 +const IN = 57416 +const INFO = 57417 +const INSERT = 57418 +const INTO = 57419 +const IS = 57420 +const LAST = 57421 +const LOG = 57422 +const LOOP = 57423 +const MERGE = 57424 +const MESSAGE = 57425 +const MESSAGE_TEXT = 57426 +const MOVE = 57427 +const NEXT = 57428 +const NO = 57429 +const NO_SCROLL = 57430 +const NOT = 57431 +const NOTICE = 57432 +const NULL = 57433 +const OPEN = 57434 +const OPTION = 57435 +const OR = 57436 +const PERFORM = 57437 +const PG_CONTEXT = 57438 +const PG_DATATYPE_NAME = 57439 +const PG_EXCEPTION_CONTEXT = 57440 +const PG_EXCEPTION_DETAIL = 57441 +const PG_EXCEPTION_HINT = 57442 +const PRINT_STRICT_PARAMS = 57443 +const PRIOR = 57444 +const QUERY = 57445 +const RAISE = 57446 +const RELATIVE = 57447 +const RETURN = 57448 +const RETURN_NEXT = 57449 +const RETURN_QUERY = 57450 +const RETURNED_SQLSTATE = 57451 +const REVERSE = 57452 +const ROLLBACK = 57453 +const ROW_COUNT = 57454 +const ROWTYPE = 57455 +const SCHEMA = 57456 +const SCHEMA_NAME = 57457 +const SCROLL = 57458 +const SLICE = 57459 +const SQLSTATE = 57460 +const STACKED = 57461 +const STRICT = 57462 +const TABLE = 57463 +const TABLE_NAME = 57464 +const THEN = 57465 +const TO = 57466 +const TYPE = 57467 +const USE_COLUMN = 57468 +const USE_VARIABLE = 57469 +const USING = 57470 +const VARIABLE_CONFLICT = 57471 +const WARNING = 57472 +const WHEN = 57473 +const WHILE = 57474 diff --git a/pkg/sql/plpgsql/parser/plpgsql.go b/pkg/sql/plpgsql/parser/plpgsql.go new file mode 100644 index 000000000000..d3128d8e0c32 --- /dev/null +++ b/pkg/sql/plpgsql/parser/plpgsql.go @@ -0,0 +1,2203 @@ +// Code generated by goyacc -p plpgsql -o bazel-out/darwin-fastbuild/bin/pkg/sql/plpgsql/parser/plpgsql.go plpgsql-gen.y. DO NOT EDIT. + +//line plpgsql-gen.y:2 +package parser + +import ( + "fmt" + __yyfmt__ "fmt" + + "github.com/cockroachdb/cockroach/pkg/sql/scanner" + "github.com/cockroachdb/cockroach/pkg/sql/sem/plpgsqltree" + "github.com/cockroachdb/cockroach/pkg/sql/sem/tree" + "github.com/cockroachdb/errors" + "github.com/cockroachdb/redact" +) //line plpgsql-gen.y:2 + +//line plpgsql-gen.y:17 +func setErr(plpgsqllex plpgsqlLexer, err error) int { + plpgsqllex.(*lexer).setErr(err) + return 1 +} + +func unimplemented(plpgsqllex plpgsqlLexer, feature string) int { + plpgsqllex.(*lexer).Unimplemented(feature) + return 1 +} + +var _ scanner.ScanSymType = &plpgsqlSymType{} + +func (s *plpgsqlSymType) ID() int32 { + return s.id +} + +func (s *plpgsqlSymType) SetID(id int32) { + s.id = id +} + +func (s *plpgsqlSymType) Pos() int32 { + return s.pos +} + +func (s *plpgsqlSymType) SetPos(pos int32) { + s.pos = pos +} + +func (s *plpgsqlSymType) Str() string { + return s.str +} + +func (s *plpgsqlSymType) SetStr(str string) { + s.str = str +} + +func (s *plpgsqlSymType) UnionVal() interface{} { + return s.union.val +} + +func (s *plpgsqlSymType) SetUnionVal(val interface{}) { + s.union.val = val +} + +func (s *plpgsqlSymType) plpgsqlScanSymType() {} + +type plpgsqlSymUnion struct { + val interface{} +} + +func (u *plpgsqlSymUnion) plpgsqlStmtBlock() *plpgsqltree.PLpgSQLStmtBlock { + return u.val.(*plpgsqltree.PLpgSQLStmtBlock) +} + +func (u *plpgsqlSymUnion) plpgsqlStmtCaseWhenArm() *plpgsqltree.PLpgSQLStmtCaseWhenArm { + return u.val.(*plpgsqltree.PLpgSQLStmtCaseWhenArm) +} + +func (u *plpgsqlSymUnion) plpgsqlStmtCaseWhenArms() []*plpgsqltree.PLpgSQLStmtCaseWhenArm { + return u.val.([]*plpgsqltree.PLpgSQLStmtCaseWhenArm) +} + +func (u *plpgsqlSymUnion) plpgsqlStatement() plpgsqltree.PLpgSQLStatement { + return u.val.(plpgsqltree.PLpgSQLStatement) +} + +func (u *plpgsqlSymUnion) plpgsqlDeclareheader() *declareHeader { + return u.val.(*declareHeader) +} + +func (u *plpgsqlSymUnion) plpgsqlStatements() []plpgsqltree.PLpgSQLStatement { + return u.val.([]plpgsqltree.PLpgSQLStatement) +} + +func (u *plpgsqlSymUnion) int32() int32 { + return u.val.(int32) +} + +func (u *plpgsqlSymUnion) uint32() uint32 { + return u.val.(uint32) +} + +func (u *plpgsqlSymUnion) bool() bool { + return u.val.(bool) +} + +func (u *plpgsqlSymUnion) numVal() *tree.NumVal { + return u.val.(*tree.NumVal) +} + +func (u *plpgsqlSymUnion) pLpgSQLGetDiagKind() plpgsqltree.PLpgSQLGetDiagKind { + return u.val.(plpgsqltree.PLpgSQLGetDiagKind) +} + +func (u *plpgsqlSymUnion) pLpgSQLStmtGetDiagItem() *plpgsqltree.PLpgSQLStmtGetDiagItem { + return u.val.(*plpgsqltree.PLpgSQLStmtGetDiagItem) +} + +func (u *plpgsqlSymUnion) pLpgSQLStmtGetDiagItemList() plpgsqltree.PLpgSQLStmtGetDiagItemList { + return u.val.(plpgsqltree.PLpgSQLStmtGetDiagItemList) +} + +func (u *plpgsqlSymUnion) pLpgSQLStmtIfElseIfArmList() []*plpgsqltree.PLpgSQLStmtIfElseIfArm { + return u.val.([]*plpgsqltree.PLpgSQLStmtIfElseIfArm) +} + +func (u *plpgsqlSymUnion) pLpgSQLStmtOpen() *plpgsqltree.PLpgSQLStmtOpen { + return u.val.(*plpgsqltree.PLpgSQLStmtOpen) +} + +//line plpgsql-gen.y:264 +type plpgsqlSymType struct { + yys int + id int32 + pos int32 + str string + union plpgsqlSymUnion +} + +const IDENT = 57346 +const UIDENT = 57347 +const FCONST = 57348 +const SCONST = 57349 +const USCONST = 57350 +const BCONST = 57351 +const XCONST = 57352 +const Op = 57353 +const ICONST = 57354 +const PARAM = 57355 +const TYPECAST = 57356 +const DOT_DOT = 57357 +const COLON_EQUALS = 57358 +const EQUALS_GREATER = 57359 +const LESS_EQUALS = 57360 +const GREATER_EQUALS = 57361 +const NOT_EQUALS = 57362 +const LESS_LESS = 57363 +const GREATER_GREATER = 57364 +const ABSOLUTE = 57365 +const ALIAS = 57366 +const ALL = 57367 +const AND = 57368 +const ARRAY = 57369 +const ASSERT = 57370 +const BACKWARD = 57371 +const BEGIN = 57372 +const BY = 57373 +const CALL = 57374 +const CASE = 57375 +const CHAIN = 57376 +const CLOSE = 57377 +const COLLATE = 57378 +const COLUMN = 57379 +const COLUMN_NAME = 57380 +const COMMIT = 57381 +const CONSTANT = 57382 +const CONSTRAINT = 57383 +const CONSTRAINT_NAME = 57384 +const CONTINUE = 57385 +const CURRENT = 57386 +const CURSOR = 57387 +const DATATYPE = 57388 +const DEBUG = 57389 +const DECLARE = 57390 +const DEFAULT = 57391 +const DETAIL = 57392 +const DIAGNOSTICS = 57393 +const DO = 57394 +const DUMP = 57395 +const ELSE = 57396 +const ELSIF = 57397 +const END = 57398 +const END_CASE = 57399 +const END_IF = 57400 +const ERRCODE = 57401 +const ERROR = 57402 +const EXCEPTION = 57403 +const EXECUTE = 57404 +const EXIT = 57405 +const FETCH = 57406 +const FIRST = 57407 +const FOR = 57408 +const FOREACH = 57409 +const FORWARD = 57410 +const FROM = 57411 +const GET = 57412 +const HINT = 57413 +const IF = 57414 +const IMPORT = 57415 +const IN = 57416 +const INFO = 57417 +const INSERT = 57418 +const INTO = 57419 +const IS = 57420 +const LAST = 57421 +const LOG = 57422 +const LOOP = 57423 +const MERGE = 57424 +const MESSAGE = 57425 +const MESSAGE_TEXT = 57426 +const MOVE = 57427 +const NEXT = 57428 +const NO = 57429 +const NO_SCROLL = 57430 +const NOT = 57431 +const NOTICE = 57432 +const NULL = 57433 +const OPEN = 57434 +const OPTION = 57435 +const OR = 57436 +const PERFORM = 57437 +const PG_CONTEXT = 57438 +const PG_DATATYPE_NAME = 57439 +const PG_EXCEPTION_CONTEXT = 57440 +const PG_EXCEPTION_DETAIL = 57441 +const PG_EXCEPTION_HINT = 57442 +const PRINT_STRICT_PARAMS = 57443 +const PRIOR = 57444 +const QUERY = 57445 +const RAISE = 57446 +const RELATIVE = 57447 +const RETURN = 57448 +const RETURN_NEXT = 57449 +const RETURN_QUERY = 57450 +const RETURNED_SQLSTATE = 57451 +const REVERSE = 57452 +const ROLLBACK = 57453 +const ROW_COUNT = 57454 +const ROWTYPE = 57455 +const SCHEMA = 57456 +const SCHEMA_NAME = 57457 +const SCROLL = 57458 +const SLICE = 57459 +const SQLSTATE = 57460 +const STACKED = 57461 +const STRICT = 57462 +const TABLE = 57463 +const TABLE_NAME = 57464 +const THEN = 57465 +const TO = 57466 +const TYPE = 57467 +const USE_COLUMN = 57468 +const USE_VARIABLE = 57469 +const USING = 57470 +const VARIABLE_CONFLICT = 57471 +const WARNING = 57472 +const WHEN = 57473 +const WHILE = 57474 + +var plpgsqlToknames = [...]string{ + "$end", + "error", + "$unk", + "IDENT", + "UIDENT", + "FCONST", + "SCONST", + "USCONST", + "BCONST", + "XCONST", + "Op", + "ICONST", + "PARAM", + "TYPECAST", + "DOT_DOT", + "COLON_EQUALS", + "EQUALS_GREATER", + "LESS_EQUALS", + "GREATER_EQUALS", + "NOT_EQUALS", + "LESS_LESS", + "GREATER_GREATER", + "ABSOLUTE", + "ALIAS", + "ALL", + "AND", + "ARRAY", + "ASSERT", + "BACKWARD", + "BEGIN", + "BY", + "CALL", + "CASE", + "CHAIN", + "CLOSE", + "COLLATE", + "COLUMN", + "COLUMN_NAME", + "COMMIT", + "CONSTANT", + "CONSTRAINT", + "CONSTRAINT_NAME", + "CONTINUE", + "CURRENT", + "CURSOR", + "DATATYPE", + "DEBUG", + "DECLARE", + "DEFAULT", + "DETAIL", + "DIAGNOSTICS", + "DO", + "DUMP", + "ELSE", + "ELSIF", + "END", + "END_CASE", + "END_IF", + "ERRCODE", + "ERROR", + "EXCEPTION", + "EXECUTE", + "EXIT", + "FETCH", + "FIRST", + "FOR", + "FOREACH", + "FORWARD", + "FROM", + "GET", + "HINT", + "IF", + "IMPORT", + "IN", + "INFO", + "INSERT", + "INTO", + "IS", + "LAST", + "LOG", + "LOOP", + "MERGE", + "MESSAGE", + "MESSAGE_TEXT", + "MOVE", + "NEXT", + "NO", + "NO_SCROLL", + "NOT", + "NOTICE", + "NULL", + "OPEN", + "OPTION", + "OR", + "PERFORM", + "PG_CONTEXT", + "PG_DATATYPE_NAME", + "PG_EXCEPTION_CONTEXT", + "PG_EXCEPTION_DETAIL", + "PG_EXCEPTION_HINT", + "PRINT_STRICT_PARAMS", + "PRIOR", + "QUERY", + "RAISE", + "RELATIVE", + "RETURN", + "RETURN_NEXT", + "RETURN_QUERY", + "RETURNED_SQLSTATE", + "REVERSE", + "ROLLBACK", + "ROW_COUNT", + "ROWTYPE", + "SCHEMA", + "SCHEMA_NAME", + "SCROLL", + "SLICE", + "SQLSTATE", + "STACKED", + "STRICT", + "TABLE", + "TABLE_NAME", + "THEN", + "TO", + "TYPE", + "USE_COLUMN", + "USE_VARIABLE", + "USING", + "VARIABLE_CONFLICT", + "WARNING", + "WHEN", + "WHILE", + "';'", + "'('", + "')'", + "','", + "'='", +} + +var plpgsqlStatenames = [...]string{} + +const plpgsqlEofCode = 1 +const plpgsqlErrCode = 2 +const plpgsqlInitialStackSize = 16 + +//line plpgsql-gen.y:1325 + +//line yacctab:1 +var plpgsqlExca = [...]int16{ + -1, 1, + 1, -1, + -2, 0, + -1, 98, + 30, 166, + 48, 166, + 56, 151, + -2, 168, + -1, 103, + 45, 16, + -2, 31, + -1, 227, + 30, 166, + 48, 166, + -2, 168, + -1, 262, + 30, 167, + 48, 167, + -2, 169, + -1, 276, + 30, 166, + 48, 166, + 54, 86, + 55, 86, + 58, 86, + -2, 168, + -1, 319, + 30, 166, + 48, 166, + 57, 96, + -2, 168, + -1, 342, + 30, 166, + 48, 166, + 56, 156, + 131, 156, + -2, 168, + -1, 348, + 30, 166, + 48, 166, + 54, 94, + 57, 94, + 131, 94, + -2, 168, + -1, 363, + 30, 166, + 48, 166, + 58, 89, + -2, 168, + -1, 375, + 30, 166, + 48, 166, + 54, 87, + 55, 87, + 58, 87, + -2, 168, +} + +const plpgsqlPrivate = 57344 + +const plpgsqlLast = 1309 + +var plpgsqlAct = [...]int16{ + 227, 226, 185, 13, 103, 312, 175, 228, 181, 98, + 172, 297, 182, 105, 290, 272, 224, 219, 11, 212, + 241, 183, 230, 208, 203, 197, 339, 340, 329, 184, + 269, 330, 235, 174, 234, 104, 374, 365, 364, 359, + 358, 324, 307, 301, 299, 289, 179, 180, 288, 275, + 261, 258, 174, 257, 14, 15, 252, 16, 17, 18, + 19, 177, 251, 20, 250, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 102, + 35, 36, 37, 38, 39, 336, 40, 249, 240, 236, + 41, 42, 43, 207, 44, 45, 46, 171, 7, 47, + 220, 48, 49, 105, 50, 225, 51, 52, 279, 53, + 54, 55, 178, 56, 57, 58, 59, 60, 61, 62, + 291, 63, 372, 64, 65, 320, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 196, 91, 92, 173, 315, 93, 94, 95, 186, + 96, 97, 222, 191, 244, 164, 200, 242, 286, 333, + 188, 216, 211, 173, 337, 221, 198, 190, 217, 204, + 304, 166, 210, 100, 314, 225, 259, 187, 321, 326, + 310, 193, 231, 231, 300, 322, 192, 284, 328, 371, + 214, 361, 309, 232, 318, 346, 345, 253, 215, 238, + 327, 169, 245, 246, 247, 248, 10, 264, 267, 302, + 347, 8, 325, 276, 350, 209, 262, 106, 5, 167, + 282, 283, 280, 273, 323, 316, 270, 298, 287, 260, + 278, 201, 213, 256, 255, 206, 194, 202, 110, 2, + 218, 170, 195, 189, 334, 311, 308, 168, 265, 101, + 292, 293, 294, 295, 99, 9, 6, 1, 306, 165, + 356, 296, 199, 105, 313, 277, 223, 271, 243, 107, + 319, 117, 113, 162, 133, 132, 131, 130, 129, 128, + 127, 126, 125, 124, 116, 123, 122, 121, 120, 119, + 118, 115, 114, 112, 111, 108, 344, 317, 239, 331, + 137, 4, 229, 285, 335, 342, 205, 233, 176, 237, + 254, 348, 268, 263, 338, 332, 138, 303, 273, 163, + 349, 343, 3, 341, 0, 357, 351, 352, 353, 354, + 0, 0, 355, 0, 105, 313, 360, 363, 0, 0, + 0, 0, 362, 0, 367, 368, 369, 370, 366, 104, + 0, 0, 0, 0, 0, 0, 0, 0, 373, 0, + 0, 0, 0, 375, 0, 0, 0, 0, 14, 15, + 0, 16, 17, 18, 19, 0, 0, 20, 0, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 0, 35, 36, 37, 38, 39, 0, + 40, 0, 0, 0, 41, 42, 43, 0, 44, 45, + 46, 0, 0, 47, 0, 48, 49, 0, 50, 0, + 51, 52, 0, 53, 54, 55, 0, 56, 57, 58, + 59, 60, 61, 62, 0, 63, 0, 64, 65, 0, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 12, 91, 92, 0, 0, + 93, 94, 95, 0, 96, 97, 0, 0, 0, 0, + 0, 0, 0, 0, 14, 15, 0, 16, 17, 18, + 19, 0, 0, 20, 0, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 0, + 35, 36, 37, 38, 39, 0, 40, 0, 0, 0, + 41, 42, 43, 0, 44, 45, 46, 0, 0, 47, + 0, 48, 49, 0, 50, 0, 51, 52, 0, 53, + 54, 55, 0, 56, 57, 58, 59, 60, 61, 62, + 0, 63, 0, 64, 65, 0, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 12, 91, 92, 0, 0, 93, 94, 95, 0, + 96, 97, 0, 0, 0, 0, 0, 0, 0, 0, + 14, 15, 0, 16, 17, 18, 19, 0, 0, 20, + 0, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 0, 35, 36, 37, 38, + 39, 0, 40, 0, 0, 0, 41, 42, 43, 0, + 44, 45, 46, 0, 0, 47, 0, 48, 49, 0, + 50, 0, 51, 52, 0, 53, 54, 55, 0, 56, + 57, 58, 59, 60, 61, 62, 0, 63, 0, 64, + 65, 0, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 274, 90, 305, 91, 92, + 0, 0, 93, 94, 95, 0, 96, 97, 0, 0, + 0, 0, 0, 0, 0, 0, 14, 15, 0, 16, + 17, 18, 19, 0, 0, 20, 0, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 0, 35, 36, 37, 38, 39, 0, 40, 0, + 0, 0, 41, 42, 43, 0, 44, 45, 46, 0, + 0, 47, 0, 48, 49, 0, 50, 0, 51, 52, + 0, 53, 54, 55, 0, 56, 57, 58, 59, 60, + 61, 62, 0, 63, 0, 64, 65, 0, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 266, 91, 92, 0, 0, 93, 94, + 95, 0, 96, 97, 0, 0, 0, 0, 0, 0, + 0, 0, 14, 15, 0, 16, 17, 18, 19, 0, + 0, 20, 0, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 0, 35, 36, + 37, 38, 39, 0, 40, 0, 0, 0, 41, 42, + 43, 0, 44, 45, 46, 0, 0, 47, 0, 48, + 49, 0, 50, 0, 51, 52, 0, 53, 54, 55, + 0, 56, 57, 58, 59, 60, 61, 62, 0, 63, + 0, 64, 65, 0, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 0, + 91, 92, 0, 0, 93, 94, 95, 0, 96, 97, + 14, 15, 0, 16, 17, 18, 19, 0, 0, 20, + 0, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 0, 35, 36, 37, 38, + 39, 0, 40, 0, 0, 0, 41, 42, 43, 0, + 44, 45, 46, 0, 0, 47, 0, 48, 49, 0, + 50, 0, 51, 52, 0, 53, 54, 55, 0, 56, + 57, 58, 59, 60, 61, 62, 0, 63, 0, 64, + 65, 0, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 134, 91, 92, + 0, 0, 93, 94, 95, 0, 96, 97, 0, 0, + 0, 0, 0, 0, 159, 0, 0, 0, 0, 0, + 0, 143, 0, 0, 0, 149, 136, 0, 155, 0, + 0, 0, 157, 0, 0, 0, 161, 0, 0, 0, + 0, 0, 0, 0, 0, 150, 0, 0, 0, 281, + 0, 0, 0, 0, 0, 147, 160, 153, 0, 0, + 0, 0, 0, 151, 0, 135, 144, 0, 0, 145, + 0, 0, 0, 0, 134, 146, 0, 0, 154, 0, + 0, 0, 0, 0, 156, 152, 0, 0, 148, 0, + 0, 159, 0, 0, 0, 0, 0, 142, 143, 139, + 140, 141, 149, 136, 158, 155, 0, 0, 0, 157, + 0, 0, 0, 161, 0, 0, 0, 0, 0, 0, + 0, 0, 150, 0, 0, 0, 0, 0, 0, 0, + 0, 109, 147, 160, 153, 0, 0, 0, 0, 0, + 151, 0, 135, 144, 0, 0, 145, 0, 0, 0, + 0, 134, 146, 0, 0, 154, 0, 0, 0, 0, + 0, 156, 152, 0, 0, 148, 0, 0, 159, 0, + 0, 0, 0, 0, 142, 143, 139, 140, 141, 149, + 136, 158, 155, 0, 0, 0, 157, 0, 0, 0, + 161, 0, 0, 0, 0, 0, 0, 0, 0, 150, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, + 160, 153, 0, 0, 0, 0, 0, 151, 0, 135, + 144, 0, 0, 145, 0, 0, 0, 0, 0, 146, + 0, 0, 154, 0, 0, 0, 0, 0, 156, 152, + 0, 0, 148, 0, 0, 0, 0, 0, 0, 0, + 0, 142, 0, 139, 140, 141, 0, 0, 158, +} + +var plpgsqlPact = [...]int16{ + 207, -1000, -35, 191, 168, 471, -1000, -1000, -1000, 31, + -1000, 205, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 1120, 31, + -1000, -1000, -1000, 141, -1000, -1000, -1000, 155, -1000, -1000, + -36, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -1000, -1000, -1000, 17, -1000, -1000, -20, 471, 25, + 101, 67, 116, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, 122, 243, -1000, -1000, 241, -40, 199, 199, 471, + -1000, -1000, -1000, 238, 134, 163, -1000, 55, -1000, 471, + -31, -1000, -1000, -1000, -1000, 39, -26, -1000, -1000, 471, + 471, -99, -1000, -44, -1000, -1000, -1000, 25, -1000, -45, + 160, 160, 160, 160, 160, -46, -69, -71, -77, 156, + -1000, -1000, -1000, 240, 239, -80, -1000, -1000, -82, 152, + -83, 204, 181, -1000, 819, -104, -1000, -1000, -31, -1000, + 587, -84, -1000, 54, -1000, -1000, -1000, 1043, -1000, -1000, + 123, -1000, 51, -1000, -1000, -1000, -1000, -1000, -85, -88, + -1000, -8, -1000, -1000, -1000, -8, -8, -8, -8, -1000, + -1000, -1000, -1000, 233, -89, 117, -90, -1000, -1000, -1000, + 185, -1000, -1000, 91, 703, -91, -1000, -1000, 124, 355, + -1000, 61, -1000, -1000, 228, -1000, 1197, 147, -1000, -1000, + 2, 107, -1000, -1000, -1000, 121, 222, -92, -1000, -1000, + -1000, 139, -1000, -1000, -1000, -1000, -105, -1000, 17, -1000, + -1000, -1000, -1000, 36, 83, -1000, -1000, -1000, -1000, -1000, + -1000, -109, -1000, 238, -1000, 587, -1000, 151, 187, 1197, + -1000, 471, 197, -1000, -1000, 17, 17, 17, 17, -1000, + 233, 927, -1000, -1000, -93, -1000, -1000, -1000, -94, -1000, + 355, -1000, 1197, -1000, 143, -1000, -1000, -95, 1197, -96, + -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, 127, -1, 1197, -1000, -1000, -1000, -1000, -1000, -1000, + -1000, -97, -1000, -1000, -1000, 1197, +} + +var plpgsqlPgo = [...]int16{ + 0, 332, 4, 329, 327, 326, 325, 324, 19, 323, + 322, 320, 2, 319, 6, 7, 318, 317, 316, 5, + 22, 21, 313, 312, 12, 311, 310, 8, 308, 0, + 307, 306, 1, 248, 305, 304, 303, 302, 301, 300, + 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, + 289, 288, 287, 286, 285, 284, 282, 281, 279, 17, + 277, 15, 16, 276, 275, 272, 271, 11, 270, 269, + 24, 23, 3, 267, 266, 265, 264, 183, 259, 258, + 256, 255, 254, 10, 25, 254, 253, 20, 14, 252, + 251, 250, 250, +} + +var plpgsqlR1 = [...]int8{ + 0, 73, 74, 74, 33, 1, 1, 1, 75, 76, + 76, 77, 77, 78, 78, 78, 69, 69, 69, 7, + 10, 10, 81, 81, 19, 80, 80, 79, 79, 2, + 2, 3, 3, 8, 9, 9, 9, 4, 4, 6, + 6, 82, 82, 83, 83, 29, 29, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 46, 47, 47, 84, 35, 48, 65, 65, 65, + 66, 66, 67, 68, 85, 36, 30, 30, 31, 31, + 56, 16, 63, 63, 62, 64, 64, 37, 38, 45, + 23, 20, 57, 22, 22, 39, 5, 5, 40, 40, + 40, 28, 21, 21, 21, 41, 86, 86, 86, 86, + 86, 86, 87, 87, 87, 87, 88, 88, 88, 88, + 88, 42, 89, 32, 43, 43, 43, 43, 44, 49, + 50, 51, 70, 52, 53, 54, 55, 71, 71, 71, + 18, 58, 90, 58, 91, 91, 59, 60, 60, 61, + 61, 11, 12, 14, 15, 13, 25, 25, 26, 26, + 27, 27, 17, 17, 24, 24, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, +} + +var plpgsqlR2 = [...]int8{ + 0, 2, 0, 1, 6, 1, 2, 3, 1, 2, + 1, 1, 1, 6, 5, 7, 0, 2, 1, 0, + 0, 3, 1, 3, 2, 1, 1, 1, 1, 1, + 1, 0, 1, 1, 0, 2, 2, 0, 2, 1, + 2, 1, 1, 1, 1, 0, 2, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 3, 3, 0, 4, 5, 0, 1, 1, + 3, 1, 3, 1, 1, 9, 0, 5, 0, 2, + 7, 0, 2, 1, 4, 0, 2, 3, 4, 4, + 2, 1, 8, 0, 2, 3, 1, 1, 3, 4, + 4, 0, 1, 1, 2, 3, 0, 3, 3, 3, + 3, 3, 0, 1, 1, 1, 0, 4, 4, 4, + 4, 3, 0, 5, 1, 1, 1, 1, 1, 4, + 4, 4, 0, 3, 2, 3, 3, 2, 3, 0, + 1, 0, 0, 3, 2, 1, 4, 3, 1, 1, + 2, 0, 0, 0, 0, 0, 0, 3, 0, 3, + 0, 1, 1, 3, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, +} + +var plpgsqlChk = [...]int16{ + -1000, -73, -33, -1, -25, 21, -74, 133, 30, -75, + 48, -24, 4, -72, 23, 24, 26, 27, 28, 29, + 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, + 55, 59, 60, 61, 63, 64, 65, 68, 70, 71, + 73, 75, 76, 78, 79, 80, 82, 83, 84, 85, + 86, 87, 88, 90, 92, 93, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 121, 122, 125, 126, 127, 129, 130, -29, -76, + -77, -78, 48, -2, 4, -72, 22, -58, -34, 61, + -33, -35, -36, -56, -37, -38, -45, -57, -39, -40, + -41, -42, -43, -44, -46, -47, -48, -49, -50, -51, + -52, -53, -54, -55, 4, 72, 33, -26, -5, 106, + 107, 108, 104, 28, 73, 76, 82, 62, 95, 32, + 52, 70, 92, 64, 85, 35, 91, 39, 111, 21, + 63, 43, -77, -3, 24, -69, 40, 88, 116, 56, + -90, 133, -83, 137, 16, -14, -16, 81, 132, 66, + 67, -27, -24, -21, 4, -12, 134, 86, 103, -86, + 61, 47, 80, 75, 130, -89, -12, -84, -84, -65, + 44, 119, 4, -70, -70, -18, 4, 133, -71, 26, + -71, -24, -8, 4, 66, 45, 116, -27, -91, -59, + 131, -12, 123, -63, -62, 131, -32, -29, -15, -23, + -20, -24, -20, -17, 133, 131, 133, -13, -21, -28, + 133, -87, 7, 118, 4, -87, -87, -87, -87, 133, + 133, 133, 133, 51, -11, 4, 4, 133, 133, 34, + 87, 133, 22, -9, 36, -79, 4, -72, -10, 134, + -59, -60, -61, -24, 118, 133, -29, -64, -62, 54, + -14, 56, -32, -32, 74, -22, 117, -12, 133, 133, + -88, 128, -88, -88, -88, -88, -66, -67, 4, 133, + 77, 133, 34, -4, 89, 4, -72, 133, -80, 78, + 66, -81, -19, -2, 123, 94, 7, -30, 57, -29, + 123, 81, 74, 12, 133, 83, 50, 71, 59, 133, + 136, -83, -6, 133, -82, -83, 49, 91, -7, 135, + 136, -8, -29, -61, -31, 55, 54, 33, -29, -27, + 27, -83, -83, -83, -83, -67, -68, -72, 133, 133, + -19, 58, -14, -29, 133, 133, -15, -12, -12, -12, + -12, 72, 123, -32, 133, -29, +} + +var plpgsqlDef = [...]int16{ + 166, -2, 2, 0, 5, 0, 1, 3, 45, 6, + 8, 0, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, -2, 7, + 10, 11, 12, -2, 29, 30, 167, 0, 46, 152, + 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 137, 163, 91, 0, 170, 162, + 0, 0, 116, 132, 134, 135, 136, 138, 162, 74, + 74, 77, 0, 142, 142, 0, 0, 149, 149, 0, + 106, 107, 9, 0, 0, 0, 32, 0, 18, 170, + 0, 47, 162, 43, 44, 0, 0, 45, 164, 0, + 0, 0, 171, 0, 112, 113, 165, 162, 111, 0, + 122, 122, 122, 122, 122, 0, 0, 0, 0, 0, + 78, 79, 161, 0, 0, 0, 150, 144, 0, 0, + 0, 0, 34, 33, 0, 20, 17, 4, 153, 155, + 0, 0, 45, 95, 93, 163, 97, -2, 45, 45, + 0, 101, 103, 105, 172, 162, 108, 114, 0, 0, + 115, 126, 123, 124, 125, 126, 126, 126, 126, 131, + 71, 72, 73, 0, 0, 0, 0, 143, 145, 147, + 0, 146, -2, 37, 0, 0, 27, 28, 0, 0, + 154, 0, 158, 159, 251, 75, -2, 0, 92, 45, + 0, 0, 98, 99, 100, 0, 0, 0, 109, 110, + 117, 0, 118, 119, 120, 121, 0, 81, 0, 139, + 140, 141, 148, 0, 0, 35, 36, 14, 19, 25, + 26, 0, 22, 0, 45, 0, 160, 88, 0, -2, + 45, 170, 0, 104, 173, 0, 0, 0, 0, 76, + 0, 0, 13, 39, 0, 41, 42, 38, 0, 21, + 0, 24, -2, 157, 0, 163, 45, 0, -2, 0, + 164, 162, 162, 162, 162, 80, 82, 83, 40, 15, + 23, 0, 0, -2, 90, 133, 45, 127, 128, 129, + 130, 0, 45, 102, 85, -2, +} + +var plpgsqlTok1 = [...]uint8{ + 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 134, 135, 3, 3, 136, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 133, + 3, 137, +} + +var plpgsqlTok2 = [...]uint8{ + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, +} + +var plpgsqlTok3 = [...]int8{ + 0, +} + +var plpgsqlErrorMessages = [...]struct { + state int + token int + msg string +}{} + +//line yaccpar:1 + +/* parser for yacc output */ + +var ( + plpgsqlDebug = 0 + plpgsqlErrorVerbose = false +) + +type plpgsqlLexer interface { + Lex(lval *plpgsqlSymType) int + Error(s string) +} + +type plpgsqlParser interface { + Parse(plpgsqlLexer) int + Lookahead() int +} + +type plpgsqlParserImpl struct { + lval plpgsqlSymType + stack [plpgsqlInitialStackSize]plpgsqlSymType + char int +} + +func (p *plpgsqlParserImpl) Lookahead() int { + return p.char +} + +func plpgsqlNewParser() plpgsqlParser { + return &plpgsqlParserImpl{} +} + +const plpgsqlFlag = -1000 + +func plpgsqlTokname(c int) string { + if c >= 1 && c-1 < len(plpgsqlToknames) { + if plpgsqlToknames[c-1] != "" { + return plpgsqlToknames[c-1] + } + } + return __yyfmt__.Sprintf("tok-%v", c) +} + +func plpgsqlStatname(s int) string { + if s >= 0 && s < len(plpgsqlStatenames) { + if plpgsqlStatenames[s] != "" { + return plpgsqlStatenames[s] + } + } + return __yyfmt__.Sprintf("state-%v", s) +} + +func plpgsqlErrorMessage(state, lookAhead int) string { + const TOKSTART = 4 + + if !plpgsqlErrorVerbose { + return "syntax error" + } + + for _, e := range plpgsqlErrorMessages { + if e.state == state && e.token == lookAhead { + return "syntax error: " + e.msg + } + } + + res := "syntax error: unexpected " + plpgsqlTokname(lookAhead) + + // To match Bison, suggest at most four expected tokens. + expected := make([]int, 0, 4) + + // Look for shiftable tokens. + base := int(plpgsqlPact[state]) + for tok := TOKSTART; tok-1 < len(plpgsqlToknames); tok++ { + if n := base + tok; n >= 0 && n < plpgsqlLast && int(plpgsqlChk[int(plpgsqlAct[n])]) == tok { + if len(expected) == cap(expected) { + return res + } + expected = append(expected, tok) + } + } + + if plpgsqlDef[state] == -2 { + i := 0 + for plpgsqlExca[i] != -1 || int(plpgsqlExca[i+1]) != state { + i += 2 + } + + // Look for tokens that we accept or reduce. + for i += 2; plpgsqlExca[i] >= 0; i += 2 { + tok := int(plpgsqlExca[i]) + if tok < TOKSTART || plpgsqlExca[i+1] == 0 { + continue + } + if len(expected) == cap(expected) { + return res + } + expected = append(expected, tok) + } + + // If the default action is to accept or reduce, give up. + if plpgsqlExca[i+1] != 0 { + return res + } + } + + for i, tok := range expected { + if i == 0 { + res += ", expecting " + } else { + res += " or " + } + res += plpgsqlTokname(tok) + } + return res +} + +func plpgsqllex1(lex plpgsqlLexer, lval *plpgsqlSymType) (char, token int) { + token = 0 + char = lex.Lex(lval) + if char <= 0 { + token = int(plpgsqlTok1[0]) + goto out + } + if char < len(plpgsqlTok1) { + token = int(plpgsqlTok1[char]) + goto out + } + if char >= plpgsqlPrivate { + if char < plpgsqlPrivate+len(plpgsqlTok2) { + token = int(plpgsqlTok2[char-plpgsqlPrivate]) + goto out + } + } + for i := 0; i < len(plpgsqlTok3); i += 2 { + token = int(plpgsqlTok3[i+0]) + if token == char { + token = int(plpgsqlTok3[i+1]) + goto out + } + } + +out: + if token == 0 { + token = int(plpgsqlTok2[1]) /* unknown char */ + } + if plpgsqlDebug >= 3 { + __yyfmt__.Printf("lex %s(%d)\n", plpgsqlTokname(token), uint(char)) + } + return char, token +} + +func plpgsqlParse(plpgsqllex plpgsqlLexer) int { + return plpgsqlNewParser().Parse(plpgsqllex) +} + +func (plpgsqlrcvr *plpgsqlParserImpl) Parse(plpgsqllex plpgsqlLexer) int { + var plpgsqln int + var plpgsqlVAL plpgsqlSymType + var plpgsqlDollar []plpgsqlSymType + _ = plpgsqlDollar // silence set and not used + plpgsqlS := plpgsqlrcvr.stack[:] + + Nerrs := 0 /* number of errors */ + Errflag := 0 /* error recovery flag */ + plpgsqlstate := 0 + plpgsqlrcvr.char = -1 + plpgsqltoken := -1 // plpgsqlrcvr.char translated into internal numbering + defer func() { + // Make sure we report no lookahead when not parsing. + plpgsqlstate = -1 + plpgsqlrcvr.char = -1 + plpgsqltoken = -1 + }() + plpgsqlp := -1 + goto plpgsqlstack + +ret0: + return 0 + +ret1: + return 1 + +plpgsqlstack: + /* put a state and value onto the stack */ + if plpgsqlDebug >= 4 { + __yyfmt__.Printf("char %v in %v\n", plpgsqlTokname(plpgsqltoken), plpgsqlStatname(plpgsqlstate)) + } + + plpgsqlp++ + if plpgsqlp >= len(plpgsqlS) { + nyys := make([]plpgsqlSymType, len(plpgsqlS)*2) + copy(nyys, plpgsqlS) + plpgsqlS = nyys + } + plpgsqlS[plpgsqlp] = plpgsqlVAL + plpgsqlS[plpgsqlp].yys = plpgsqlstate + +plpgsqlnewstate: + plpgsqln = int(plpgsqlPact[plpgsqlstate]) + if plpgsqln <= plpgsqlFlag { + goto plpgsqldefault /* simple state */ + } + if plpgsqlrcvr.char < 0 { + plpgsqlrcvr.char, plpgsqltoken = plpgsqllex1(plpgsqllex, &plpgsqlrcvr.lval) + } + plpgsqln += plpgsqltoken + if plpgsqln < 0 || plpgsqln >= plpgsqlLast { + goto plpgsqldefault + } + plpgsqln = int(plpgsqlAct[plpgsqln]) + if int(plpgsqlChk[plpgsqln]) == plpgsqltoken { /* valid shift */ + plpgsqlrcvr.char = -1 + plpgsqltoken = -1 + plpgsqlVAL = plpgsqlrcvr.lval + plpgsqlstate = plpgsqln + if Errflag > 0 { + Errflag-- + } + goto plpgsqlstack + } + +plpgsqldefault: + /* default state action */ + plpgsqln = int(plpgsqlDef[plpgsqlstate]) + if plpgsqln == -2 { + if plpgsqlrcvr.char < 0 { + plpgsqlrcvr.char, plpgsqltoken = plpgsqllex1(plpgsqllex, &plpgsqlrcvr.lval) + } + + /* look through exception table */ + xi := 0 + for { + if plpgsqlExca[xi+0] == -1 && int(plpgsqlExca[xi+1]) == plpgsqlstate { + break + } + xi += 2 + } + for xi += 2; ; xi += 2 { + plpgsqln = int(plpgsqlExca[xi+0]) + if plpgsqln < 0 || plpgsqln == plpgsqltoken { + break + } + } + plpgsqln = int(plpgsqlExca[xi+1]) + if plpgsqln < 0 { + goto ret0 + } + } + if plpgsqln == 0 { + /* error ... attempt to resume parsing */ + switch Errflag { + case 0: /* brand new error */ + plpgsqllex.Error(plpgsqlErrorMessage(plpgsqlstate, plpgsqltoken)) + Nerrs++ + if plpgsqlDebug >= 1 { + __yyfmt__.Printf("%s", plpgsqlStatname(plpgsqlstate)) + __yyfmt__.Printf(" saw %s\n", plpgsqlTokname(plpgsqltoken)) + } + fallthrough + + case 1, 2: /* incompletely recovered error ... try again */ + Errflag = 3 + + /* find a state where "error" is a legal shift action */ + for plpgsqlp >= 0 { + plpgsqln = int(plpgsqlPact[plpgsqlS[plpgsqlp].yys]) + plpgsqlErrCode + if plpgsqln >= 0 && plpgsqln < plpgsqlLast { + plpgsqlstate = int(plpgsqlAct[plpgsqln]) /* simulate a shift of "error" */ + if int(plpgsqlChk[plpgsqlstate]) == plpgsqlErrCode { + goto plpgsqlstack + } + } + + /* the current p has no shift on "error", pop stack */ + if plpgsqlDebug >= 2 { + __yyfmt__.Printf("error recovery pops state %d\n", plpgsqlS[plpgsqlp].yys) + } + plpgsqlp-- + } + /* there is no state on the stack with an error shift ... abort */ + goto ret1 + + case 3: /* no shift yet; clobber input char */ + if plpgsqlDebug >= 2 { + __yyfmt__.Printf("error recovery discards %s\n", plpgsqlTokname(plpgsqltoken)) + } + if plpgsqltoken == plpgsqlEofCode { + goto ret1 + } + plpgsqlrcvr.char = -1 + plpgsqltoken = -1 + goto plpgsqlnewstate /* try again in the same state */ + } + } + + /* reduction by production plpgsqln */ + if plpgsqlDebug >= 2 { + __yyfmt__.Printf("reduce %v in:\n\t%v\n", plpgsqln, plpgsqlStatname(plpgsqlstate)) + } + + plpgsqlnt := plpgsqln + plpgsqlpt := plpgsqlp + _ = plpgsqlpt // guard against "declared and not used" + + plpgsqlp -= int(plpgsqlR2[plpgsqln]) + // plpgsqlp is now the index of $0. Perform the default action. Iff the + // reduced production is ε, $1 is possibly out of range. + if plpgsqlp+1 >= len(plpgsqlS) { + nyys := make([]plpgsqlSymType, len(plpgsqlS)*2) + copy(nyys, plpgsqlS) + plpgsqlS = nyys + } + plpgsqlVAL = plpgsqlS[plpgsqlp+1] + + /* consult goto table to find next state */ + plpgsqln = int(plpgsqlR1[plpgsqln]) + plpgsqlg := int(plpgsqlPgo[plpgsqln]) + plpgsqlj := plpgsqlg + plpgsqlS[plpgsqlp].yys + 1 + + if plpgsqlj >= plpgsqlLast { + plpgsqlstate = int(plpgsqlAct[plpgsqlg]) + } else { + plpgsqlstate = int(plpgsqlAct[plpgsqlj]) + if int(plpgsqlChk[plpgsqlstate]) != -plpgsqln { + plpgsqlstate = int(plpgsqlAct[plpgsqlg]) + } + } + // dummy call; replaced with literal code + switch plpgsqlnt { + + case 1: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:330 + { + plpgsqllex.(*lexer).SetStmt(plpgsqlDollar[1].union.plpgsqlStatement()) + } + case 4: + plpgsqlDollar = plpgsqlS[plpgsqlpt-6 : plpgsqlpt+1] +//line plpgsql-gen.y:339 + { + + header := plpgsqlDollar[1].union.plpgsqlDeclareheader() + stmtBlock := &plpgsqltree.PLpgSQLStmtBlock{ + Label: header.label, + Body: plpgsqlDollar[3].union.plpgsqlStatements(), + } + if header.initVars != nil { + stmtBlock.InitVars = header.initVars + } + plpgsqlVAL.union.val = stmtBlock + } + case 5: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:354 + { + plpgsqlVAL.union.val = &declareHeader{label: plpgsqlDollar[1].str} + } + case 6: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:358 + { + plpgsqlVAL.union.val = &declareHeader{ + label: plpgsqlDollar[1].str, + initVars: make([]plpgsqltree.PLpgSQLVariable, 0), + } + } + case 7: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:365 + { + h := &declareHeader{ + label: plpgsqlDollar[1].str, + + initVars: make([]plpgsqltree.PLpgSQLVariable, 1), + } + h.initVars = append(h.initVars, nil) + plpgsqlVAL.union.val = h + } + case 8: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:380 + { + } + case 12: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:390 + { + + } + case 13: + plpgsqlDollar = plpgsqlS[plpgsqlpt-6 : plpgsqlpt+1] +//line plpgsql-gen.y:402 + { + } + case 14: + plpgsqlDollar = plpgsqlS[plpgsqlpt-5 : plpgsqlpt+1] +//line plpgsql-gen.y:405 + { + } + case 15: + plpgsqlDollar = plpgsqlS[plpgsqlpt-7 : plpgsqlpt+1] +//line plpgsql-gen.y:408 + { + } + case 16: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:413 + { + fmt.Println("plpgsqllex.(*lexer).pos in opt_scrollable empty", plpgsqllex.(*lexer).lastPos) + } + case 17: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:417 + { + fmt.Println("plpgsqllex.(*lexer).pos in opt_scrollable no_scroll", plpgsqllex.(*lexer).lastPos) + } + case 18: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:421 + { + fmt.Println("plpgsqllex.(*lexer).pos in opt_scrollable scroll", plpgsqllex.(*lexer).lastPos) + } + case 19: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:427 + { + plpgsqllex.(*lexer).ReadSqlExpressionStr(';') + } + case 20: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:433 + { + } + case 21: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:436 + { + } + case 22: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:441 + { + } + case 23: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:444 + { + } + case 24: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:449 + { + } + case 27: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:458 + { + } + case 28: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:461 + { + } + case 29: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:466 + { + } + case 30: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:469 + { + } + case 31: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:474 + { + } + case 32: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:476 + { + } + case 33: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:481 + { + } + case 34: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:486 + { + } + case 35: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:488 + { + } + case 36: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:491 + { + } + case 37: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:496 + { + } + case 38: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:498 + { + } + case 39: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:502 + { + } + case 40: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:504 + { + } + case 41: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:508 + { + plpgsqllex.(*lexer).ReadSqlExpressionStr(';') + } + case 42: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:512 + { + plpgsqllex.(*lexer).ReadSqlExpressionStr(';') + } + case 45: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:527 + { + plpgsqlVAL.union.val = []plpgsqltree.PLpgSQLStatement{} + } + case 46: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:531 + { + stmts := plpgsqlDollar[1].union.plpgsqlStatements() + stmts = append(stmts, plpgsqlDollar[2].union.plpgsqlStatement()) + plpgsqlVAL.union.val = stmts + } + case 47: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:539 + { + plpgsqlVAL.union.val = plpgsqlDollar[1].union.plpgsqlStmtBlock() + } + case 48: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:543 + { + } + case 49: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:545 + { + } + case 50: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:547 + { + plpgsqlVAL.union.val = plpgsqlDollar[1].union.plpgsqlStatement() + } + case 51: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:551 + { + } + case 52: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:553 + { + } + case 53: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:555 + { + } + case 54: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:557 + { + } + case 55: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:559 + { + plpgsqlVAL.union.val = plpgsqlDollar[1].union.plpgsqlStatement() + } + case 56: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:563 + { + } + case 57: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:565 + { + } + case 58: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:567 + { + plpgsqlVAL.union.val = plpgsqlDollar[1].union.plpgsqlStatement() + } + case 59: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:571 + { + plpgsqlVAL.union.val = plpgsqlDollar[1].union.plpgsqlStatement() + } + case 60: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:575 + { + plpgsqlVAL.union.val = plpgsqlDollar[1].union.plpgsqlStatement() + } + case 61: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:579 + { + } + case 62: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:581 + { + plpgsqlVAL.union.val = plpgsqlDollar[1].union.plpgsqlStatement() + } + case 63: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:585 + { + } + case 64: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:587 + { + } + case 65: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:589 + { + } + case 66: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:591 + { + } + case 67: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:593 + { + plpgsqlVAL.union.val = plpgsqlDollar[1].union.plpgsqlStatement() + } + case 68: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:597 + { + } + case 69: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:599 + { + } + case 70: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:601 + { + } + case 71: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:605 + { + return unimplemented(plpgsqllex, "perform") + } + case 72: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:611 + { + plpgsqlVAL.union.val = &plpgsqltree.PLpgSQLStmtCall{IsCall: true} + } + case 73: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:615 + { + plpgsqlVAL.union.val = &plpgsqltree.PLpgSQLStmtCall{IsCall: false} + } + case 74: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:620 + { + plpgsqllex.(*lexer).ReadSqlExpressionStr(';') + } + case 75: + plpgsqlDollar = plpgsqlS[plpgsqlpt-4 : plpgsqlpt+1] +//line plpgsql-gen.y:626 + { + plpgsqlVAL.union.val = &plpgsqltree.PLpgSQLStmtAssign{ + Var: plpgsqlDollar[1].str, + Value: plpgsqlDollar[3].str, + } + } + case 76: + plpgsqlDollar = plpgsqlS[plpgsqlpt-5 : plpgsqlpt+1] +//line plpgsql-gen.y:635 + { + plpgsqlVAL.union.val = &plpgsqltree.PLpgSQLStmtGetDiag{ + IsStacked: plpgsqlDollar[2].union.bool(), + DiagItems: plpgsqlDollar[4].union.pLpgSQLStmtGetDiagItemList(), + } + + } + case 77: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:645 + { + plpgsqlVAL.union.val = false + } + case 78: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:649 + { + plpgsqlVAL.union.val = false + } + case 79: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:653 + { + plpgsqlVAL.union.val = true + } + case 80: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:659 + { + plpgsqlVAL.union.val = append(plpgsqlDollar[1].union.pLpgSQLStmtGetDiagItemList(), plpgsqlDollar[3].union.pLpgSQLStmtGetDiagItem()) + } + case 81: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:663 + { + plpgsqlVAL.union.val = plpgsqltree.PLpgSQLStmtGetDiagItemList{plpgsqlDollar[1].union.pLpgSQLStmtGetDiagItem()} + } + case 82: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:669 + { + plpgsqlVAL.union.val = &plpgsqltree.PLpgSQLStmtGetDiagItem{ + Kind: plpgsqlDollar[3].union.pLpgSQLGetDiagKind(), + TargetName: plpgsqlDollar[1].str, + } + } + case 83: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:678 + { + switch plpgsqlDollar[1].str { + case "row_count": + plpgsqlVAL.union.val = plpgsqltree.PlpgsqlGetdiagRowCount + case "pg_context": + plpgsqlVAL.union.val = plpgsqltree.PlpgsqlGetdiagContext + case "pg_exception_detail": + plpgsqlVAL.union.val = plpgsqltree.PlpgsqlGetdiagErrorDetail + case "pg_exception_hint": + plpgsqlVAL.union.val = plpgsqltree.PlpgsqlGetdiagErrorHint + case "pg_exception_context": + plpgsqlVAL.union.val = plpgsqltree.PlpgsqlGetdiagErrorContext + case "column_name": + plpgsqlVAL.union.val = plpgsqltree.PlpgsqlGetdiagColumnName + case "constraint_name": + plpgsqlVAL.union.val = plpgsqltree.PlpgsqlGetdiagConstraintName + case "pg_datatype_name": + plpgsqlVAL.union.val = plpgsqltree.PlpgsqlGetdiagDatatypeName + case "message_text": + plpgsqlVAL.union.val = plpgsqltree.PlpgsqlGetdiagMessageText + case "table_name": + plpgsqlVAL.union.val = plpgsqltree.PlpgsqlGetdiagTableName + case "schema_name": + plpgsqlVAL.union.val = plpgsqltree.PlpgsqlGetdiagSchemaName + case "returned_sqlstate": + plpgsqlVAL.union.val = plpgsqltree.PlpgsqlGetdiagReturnedSqlstate + default: + + setErr(plpgsqllex, errors.Newf("unrecognized GET DIAGNOSTICS item: %s", redact.Safe(plpgsqlDollar[1].str))) + } + } + case 84: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:714 + { + } + case 85: + plpgsqlDollar = plpgsqlS[plpgsqlpt-9 : plpgsqlpt+1] +//line plpgsql-gen.y:719 + { + plpgsqlVAL.union.val = &plpgsqltree.PLpgSQLStmtIf{ + Condition: plpgsqlDollar[2].str, + ThenBody: plpgsqlDollar[4].union.plpgsqlStatements(), + ElseIfList: plpgsqlDollar[5].union.pLpgSQLStmtIfElseIfArmList(), + ElseBody: plpgsqlDollar[6].union.plpgsqlStatements(), + } + } + case 86: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:730 + { + plpgsqlVAL.union.val = []*plpgsqltree.PLpgSQLStmtIfElseIfArm{} + } + case 87: + plpgsqlDollar = plpgsqlS[plpgsqlpt-5 : plpgsqlpt+1] +//line plpgsql-gen.y:734 + { + newStmt := &plpgsqltree.PLpgSQLStmtIfElseIfArm{ + Condition: plpgsqlDollar[3].str, + Stmts: plpgsqlDollar[5].union.plpgsqlStatements(), + } + plpgsqlVAL.union.val = append(plpgsqlDollar[1].union.pLpgSQLStmtIfElseIfArmList(), newStmt) + } + case 88: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:744 + { + plpgsqlVAL.union.val = []plpgsqltree.PLpgSQLStatement{} + } + case 89: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:748 + { + plpgsqlVAL.union.val = plpgsqlDollar[2].union.plpgsqlStatements() + } + case 90: + plpgsqlDollar = plpgsqlS[plpgsqlpt-7 : plpgsqlpt+1] +//line plpgsql-gen.y:754 + { + expr := &plpgsqltree.PLpgSQLStmtCase{ + TestExpr: plpgsqlDollar[2].str, + CaseWhenList: plpgsqlDollar[3].union.plpgsqlStmtCaseWhenArms(), + } + if plpgsqlDollar[4].union.val != nil { + expr.HaveElse = true + expr.ElseStmts = plpgsqlDollar[4].union.plpgsqlStatements() + } + plpgsqlVAL.union.val = expr + } + case 91: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:768 + { + expr := "" + tok := plpgsqllex.(*lexer).Peek() + if tok.id != WHEN { + expr = plpgsqllex.(*lexer).ReadSqlExpressionStr(WHEN) + } + plpgsqlVAL.str = expr + } + case 92: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:779 + { + stmts := plpgsqlDollar[1].union.plpgsqlStmtCaseWhenArms() + stmts = append(stmts, plpgsqlDollar[2].union.plpgsqlStmtCaseWhenArm()) + plpgsqlVAL.union.val = stmts + } + case 93: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:785 + { + stmts := []*plpgsqltree.PLpgSQLStmtCaseWhenArm{} + stmts = append(stmts, plpgsqlDollar[1].union.plpgsqlStmtCaseWhenArm()) + plpgsqlVAL.union.val = stmts + } + case 94: + plpgsqlDollar = plpgsqlS[plpgsqlpt-4 : plpgsqlpt+1] +//line plpgsql-gen.y:793 + { + expr := &plpgsqltree.PLpgSQLStmtCaseWhenArm{ + Expr: plpgsqlDollar[2].str, + Stmts: plpgsqlDollar[4].union.plpgsqlStatements(), + } + plpgsqlVAL.union.val = expr + } + case 95: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:803 + { + plpgsqlVAL.union.val = nil + } + case 96: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:807 + { + plpgsqlVAL.union.val = plpgsqlDollar[2].union.plpgsqlStatements() + } + case 97: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:813 + { + return unimplemented(plpgsqllex, "simple loop") + } + case 98: + plpgsqlDollar = plpgsqlS[plpgsqlpt-4 : plpgsqlpt+1] +//line plpgsql-gen.y:819 + { + return unimplemented(plpgsqllex, "while loop") + } + case 99: + plpgsqlDollar = plpgsqlS[plpgsqlpt-4 : plpgsqlpt+1] +//line plpgsql-gen.y:825 + { + return unimplemented(plpgsqllex, "for loop") + } + case 100: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:832 + { + return unimplemented(plpgsqllex, "for loop") + } + case 101: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:856 + { + return unimplemented(plpgsqllex, "for loop") + } + case 102: + plpgsqlDollar = plpgsqlS[plpgsqlpt-8 : plpgsqlpt+1] +//line plpgsql-gen.y:862 + { + return unimplemented(plpgsqllex, "for each loop") + } + case 103: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:868 + { + } + case 104: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:871 + { + } + case 105: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:876 + { + plpgsqlVAL.union.val = &plpgsqltree.PLpgSQLStmtExit{} + } + case 106: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:882 + { + } + case 107: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:885 + { + } + case 108: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:896 + { + return unimplemented(plpgsqllex, "return") + } + case 109: + plpgsqlDollar = plpgsqlS[plpgsqlpt-4 : plpgsqlpt+1] +//line plpgsql-gen.y:900 + { + return unimplemented(plpgsqllex, "return next") + } + case 110: + plpgsqlDollar = plpgsqlS[plpgsqlpt-4 : plpgsqlpt+1] +//line plpgsql-gen.y:904 + { + return unimplemented(plpgsqllex, "return query") + } + case 111: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:911 + { + _, terminator := plpgsqllex.(*lexer).ReadSqlExpressionStr2(EXECUTE, ';') + if terminator == EXECUTE { + return unimplemented(plpgsqllex, "return dynamic sql query") + } + plpgsqllex.(*lexer).ReadSqlExpressionStr(';') + } + case 112: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:922 + { + return unimplemented(plpgsqllex, "return identifier") + } + case 113: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:926 + { + return unimplemented(plpgsqllex, "return expression") + } + case 114: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:930 + { + return unimplemented(plpgsqllex, "return composite type") + } + case 115: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:936 + { + } + case 116: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:941 + { + return unimplemented(plpgsqllex, "raise") + } + case 117: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:945 + { + return unimplemented(plpgsqllex, "raise exception") + } + case 118: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:949 + { + return unimplemented(plpgsqllex, "raise debug") + } + case 119: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:953 + { + return unimplemented(plpgsqllex, "raise log") + } + case 120: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:957 + { + return unimplemented(plpgsqllex, "raise info") + } + case 121: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:961 + { + return unimplemented(plpgsqllex, "raise warning") + } + case 122: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:967 + { + } + case 123: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:969 + { + } + case 124: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:971 + { + } + case 125: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:973 + { + } + case 126: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:978 + { + } + case 127: + plpgsqlDollar = plpgsqlS[plpgsqlpt-4 : plpgsqlpt+1] +//line plpgsql-gen.y:980 + { + } + case 128: + plpgsqlDollar = plpgsqlS[plpgsqlpt-4 : plpgsqlpt+1] +//line plpgsql-gen.y:982 + { + } + case 129: + plpgsqlDollar = plpgsqlS[plpgsqlpt-4 : plpgsqlpt+1] +//line plpgsql-gen.y:984 + { + } + case 130: + plpgsqlDollar = plpgsqlS[plpgsqlpt-4 : plpgsqlpt+1] +//line plpgsql-gen.y:986 + { + } + case 131: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:989 + { + plpgsqlVAL.union.val = &plpgsqltree.PLpgSQLStmtAssert{} + } + case 132: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:995 + { + _, terminator := plpgsqllex.(*lexer).ReadSqlExpressionStr2(',', ';') + if terminator == ',' { + plpgsqllex.(*lexer).ReadSqlExpressionStr(';') + } + } + case 133: + plpgsqlDollar = plpgsqlS[plpgsqlpt-5 : plpgsqlpt+1] +//line plpgsql-gen.y:1003 + { + } + case 134: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:1009 + { + plpgsqlVAL.union.val = plpgsqllex.(*lexer).MakeExecSqlStmt(IMPORT) + } + case 135: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:1013 + { + plpgsqlVAL.union.val = plpgsqllex.(*lexer).MakeExecSqlStmt(INSERT) + } + case 136: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:1017 + { + plpgsqlVAL.union.val = plpgsqllex.(*lexer).MakeExecSqlStmt(MERGE) + } + case 137: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:1021 + { + plpgsqlVAL.union.val = plpgsqllex.(*lexer).MakeExecSqlStmt(IDENT) + } + case 138: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:1027 + { + plpgsqlVAL.union.val = plpgsqllex.(*lexer).MakeDynamicExecuteStmt() + } + case 139: + plpgsqlDollar = plpgsqlS[plpgsqlpt-4 : plpgsqlpt+1] +//line plpgsql-gen.y:1034 + { + openCursorStmt := plpgsqlDollar[3].union.pLpgSQLStmtOpen() + openCursorStmt.CursorName = plpgsqlDollar[2].str + plpgsqlVAL.union.val = openCursorStmt + } + case 140: + plpgsqlDollar = plpgsqlS[plpgsqlpt-4 : plpgsqlpt+1] +//line plpgsql-gen.y:1042 + { + return unimplemented(plpgsqllex, "fetch") + } + case 141: + plpgsqlDollar = plpgsqlS[plpgsqlpt-4 : plpgsqlpt+1] +//line plpgsql-gen.y:1048 + { + return unimplemented(plpgsqllex, "move") + } + case 142: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:1054 + { + return unimplemented(plpgsqllex, "fetch direction") + } + case 143: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:1059 + { + plpgsqlVAL.union.val = &plpgsqltree.PLpgSQLStmtClose{} + } + case 144: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:1065 + { + plpgsqlVAL.union.val = &plpgsqltree.PLpgSQLStmtNull{} + } + case 145: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:1071 + { + return unimplemented(plpgsqllex, "commit") + } + case 146: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:1077 + { + return unimplemented(plpgsqllex, "rollback") + } + case 147: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:1084 + { + } + case 148: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:1086 + { + } + case 149: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:1088 + { + } + case 150: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:1091 + { + unimplemented(plpgsqllex, "cursor variable") + } + case 151: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:1097 + { + } + case 152: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:1099 + { + return unimplemented(plpgsqllex, "exception") + } + case 153: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:1103 + { + unimplemented(plpgsqllex, "exception") + } + case 154: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:1109 + { + } + case 155: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:1112 + { + } + case 156: + plpgsqlDollar = plpgsqlS[plpgsqlpt-4 : plpgsqlpt+1] +//line plpgsql-gen.y:1117 + { + } + case 157: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:1122 + { + } + case 158: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:1125 + { + } + case 159: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:1130 + { + } + case 160: + plpgsqlDollar = plpgsqlS[plpgsqlpt-2 : plpgsqlpt+1] +//line plpgsql-gen.y:1133 + { + } + case 161: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:1138 + { + plpgsqlVAL.union.val = plpgsqllex.(*lexer).ProcessForOpenCursor(true) + } + case 162: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:1143 + { + plpgsqlVAL.str = plpgsqllex.(*lexer).ReadSqlExpressionStr(';') + } + case 163: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:1149 + { + plpgsqlVAL.str = plpgsqllex.(*lexer).ReadSqlExpressionStr(THEN) + } + case 164: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:1155 + { + return unimplemented(plpgsqllex, "loop expr") + } + case 165: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:1161 + { + plpgsqlVAL.str = plpgsqllex.(*lexer).ReadSqlExpressionStr(')') + } + case 166: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:1167 + { + plpgsqlVAL.str = "" + } + case 167: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:1171 + { + plpgsqlVAL.str = plpgsqlDollar[2].str + } + case 168: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:1177 + { + } + case 169: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:1180 + { + return unimplemented(plpgsqllex, "loop label") + } + case 170: + plpgsqlDollar = plpgsqlS[plpgsqlpt-0 : plpgsqlpt+1] +//line plpgsql-gen.y:1186 + { + } + case 171: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:1189 + { + } + case 172: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:1194 + { + } + case 173: + plpgsqlDollar = plpgsqlS[plpgsqlpt-3 : plpgsqlpt+1] +//line plpgsql-gen.y:1196 + { + } + case 174: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:1204 + { + } + case 175: + plpgsqlDollar = plpgsqlS[plpgsqlpt-1 : plpgsqlpt+1] +//line plpgsql-gen.y:1207 + { + } + } + goto plpgsqlstack /* stack new state and value */ +} diff --git a/pkg/sql/scanner/token_names_test.go b/pkg/sql/scanner/token_names_test.go new file mode 100644 index 000000000000..9b99434625cc --- /dev/null +++ b/pkg/sql/scanner/token_names_test.go @@ -0,0 +1,682 @@ +// Code generated by make. DO NOT EDIT. +// GENERATED FILE DO NOT EDIT + +package scanner + +var tokenNames = map[int]string{ +57346: "IDENT", +57347: "SCONST", +57348: "BCONST", +57349: "BITCONST", +57350: "ICONST", +57351: "FCONST", +57352: "PLACEHOLDER", +57353: "TYPECAST", +57354: "TYPEANNOTATE", +57355: "DOT_DOT", +57356: "LESS_EQUALS", +57357: "GREATER_EQUALS", +57358: "NOT_EQUALS", +57359: "NOT_REGMATCH", +57360: "REGIMATCH", +57361: "NOT_REGIMATCH", +57362: "ERROR", +57363: "ABORT", +57364: "ABSOLUTE", +57365: "ACCESS", +57366: "ACTION", +57367: "ADD", +57368: "ADMIN", +57369: "AFTER", +57370: "AGGREGATE", +57371: "ALL", +57372: "ALTER", +57373: "ALWAYS", +57374: "ANALYSE", +57375: "ANALYZE", +57376: "AND", +57377: "AND_AND", +57378: "ANY", +57379: "ANNOTATE_TYPE", +57380: "ARRAY", +57381: "AS", +57382: "ASC", +57383: "AS_JSON", +57384: "AT_AT", +57385: "ASENSITIVE", +57386: "ASYMMETRIC", +57387: "AT", +57388: "ATOMIC", +57389: "ATTRIBUTE", +57390: "AUTHORIZATION", +57391: "AUTOMATIC", +57392: "AVAILABILITY", +57393: "BACKUP", +57394: "BACKUPS", +57395: "BACKWARD", +57396: "BEFORE", +57397: "BEGIN", +57398: "BETWEEN", +57399: "BIGINT", +57400: "BIGSERIAL", +57401: "BINARY", +57402: "BIT", +57403: "BUCKET_COUNT", +57404: "BOOLEAN", +57405: "BOTH", +57406: "BOX2D", +57407: "BUNDLE", +57408: "BY", +57409: "CACHE", +57410: "CALL", +57411: "CALLED", +57412: "CANCEL", +57413: "CANCELQUERY", +57414: "CAPABILITIES", +57415: "CAPABILITY", +57416: "CASCADE", +57417: "CASE", +57418: "CAST", +57419: "CBRT", +57420: "CHANGEFEED", +57421: "CHAR", +57422: "CHARACTER", +57423: "CHARACTERISTICS", +57424: "CHECK", +57425: "CHECK_FILES", +57426: "CLOSE", +57427: "CLUSTER", +57428: "COALESCE", +57429: "COLLATE", +57430: "COLLATION", +57431: "COLUMN", +57432: "COLUMNS", +57433: "COMMENT", +57434: "COMMENTS", +57435: "COMMIT", +57436: "COMMITTED", +57437: "COMPACT", +57438: "COMPLETE", +57439: "COMPLETIONS", +57440: "CONCAT", +57441: "CONCURRENTLY", +57442: "CONFIGURATION", +57443: "CONFIGURATIONS", +57444: "CONFIGURE", +57445: "CONFLICT", +57446: "CONNECTION", +57447: "CONNECTIONS", +57448: "CONSTRAINT", +57449: "CONSTRAINTS", +57450: "CONTAINS", +57451: "CONTROLCHANGEFEED", +57452: "CONTROLJOB", +57453: "CONVERSION", +57454: "CONVERT", +57455: "COPY", +57456: "COST", +57457: "COVERING", +57458: "CREATE", +57459: "CREATEDB", +57460: "CREATELOGIN", +57461: "CREATEROLE", +57462: "CROSS", +57463: "CSV", +57464: "CUBE", +57465: "CURRENT", +57466: "CURRENT_CATALOG", +57467: "CURRENT_DATE", +57468: "CURRENT_SCHEMA", +57469: "CURRENT_ROLE", +57470: "CURRENT_TIME", +57471: "CURRENT_TIMESTAMP", +57472: "CURRENT_USER", +57473: "CURSOR", +57474: "CYCLE", +57475: "DATA", +57476: "DATABASE", +57477: "DATABASES", +57478: "DATE", +57479: "DAY", +57480: "DEBUG_IDS", +57481: "DEBUG_PAUSE_ON", +57482: "DEC", +57483: "DEBUG_DUMP_METADATA_SST", +57484: "DECIMAL", +57485: "DEFAULT", +57486: "DEFAULTS", +57487: "DEFINER", +57488: "DEALLOCATE", +57489: "DECLARE", +57490: "DEFERRABLE", +57491: "DEFERRED", +57492: "DELETE", +57493: "DELIMITER", +57494: "DEPENDS", +57495: "DESC", +57496: "DESTINATION", +57497: "DETACHED", +57498: "DETAILS", +57499: "DISCARD", +57500: "DISTINCT", +57501: "DO", +57502: "DOMAIN", +57503: "DOUBLE", +57504: "DROP", +57505: "ELSE", +57506: "ENCODING", +57507: "ENCRYPTED", +57508: "ENCRYPTION_INFO_DIR", +57509: "ENCRYPTION_PASSPHRASE", +57510: "END", +57511: "ENUM", +57512: "ENUMS", +57513: "ESCAPE", +57514: "EXCEPT", +57515: "EXCLUDE", +57516: "EXCLUDING", +57517: "EXISTS", +57518: "EXECUTE", +57519: "EXECUTION", +57520: "EXPERIMENTAL", +57521: "EXPERIMENTAL_FINGERPRINTS", +57522: "EXPERIMENTAL_REPLICA", +57523: "EXPERIMENTAL_AUDIT", +57524: "EXPERIMENTAL_RELOCATE", +57525: "EXPIRATION", +57526: "EXPLAIN", +57527: "EXPORT", +57528: "EXTENSION", +57529: "EXTERNAL", +57530: "EXTRACT", +57531: "EXTRACT_DURATION", +57532: "EXTREMES", +57533: "FAILURE", +57534: "FALSE", +57535: "FAMILY", +57536: "FETCH", +57537: "FETCHVAL", +57538: "FETCHTEXT", +57539: "FETCHVAL_PATH", +57540: "FETCHTEXT_PATH", +57541: "FILES", +57542: "FILTER", +57543: "FIRST", +57544: "FLOAT", +57545: "FLOAT4", +57546: "FLOAT8", +57547: "FLOORDIV", +57548: "FOLLOWING", +57549: "FOR", +57550: "FORCE", +57551: "FORCE_INDEX", +57552: "FORCE_NOT_NULL", +57553: "FORCE_NULL", +57554: "FORCE_QUOTE", +57555: "FORCE_ZIGZAG", +57556: "FOREIGN", +57557: "FORMAT", +57558: "FORWARD", +57559: "FREEZE", +57560: "FROM", +57561: "FULL", +57562: "FUNCTION", +57563: "FUNCTIONS", +57564: "GENERATED", +57565: "GEOGRAPHY", +57566: "GEOMETRY", +57567: "GEOMETRYM", +57568: "GEOMETRYZ", +57569: "GEOMETRYZM", +57570: "GEOMETRYCOLLECTION", +57571: "GEOMETRYCOLLECTIONM", +57572: "GEOMETRYCOLLECTIONZ", +57573: "GEOMETRYCOLLECTIONZM", +57574: "GLOBAL", +57575: "GOAL", +57576: "GRANT", +57577: "GRANTS", +57578: "GREATEST", +57579: "GROUP", +57580: "GROUPING", +57581: "GROUPS", +57582: "HAVING", +57583: "HASH", +57584: "HEADER", +57585: "HIGH", +57586: "HISTOGRAM", +57587: "HOLD", +57588: "HOUR", +57589: "IDENTITY", +57590: "IF", +57591: "IFERROR", +57592: "IFNULL", +57593: "IGNORE_FOREIGN_KEYS", +57594: "ILIKE", +57595: "IMMEDIATE", +57596: "IMMUTABLE", +57597: "IMPORT", +57598: "IN", +57599: "INCLUDE", +57600: "INCLUDING", +57601: "INCLUDE_ALL_SECONDARY_TENANTS", +57602: "INCREMENT", +57603: "INCREMENTAL", +57604: "INCREMENTAL_LOCATION", +57605: "INET", +57606: "INET_CONTAINED_BY_OR_EQUALS", +57607: "INET_CONTAINS_OR_EQUALS", +57608: "INDEX", +57609: "INDEXES", +57610: "INHERITS", +57611: "INJECT", +57612: "INITIALLY", +57613: "INDEX_BEFORE_PAREN", +57614: "INDEX_BEFORE_NAME_THEN_PAREN", +57615: "INDEX_AFTER_ORDER_BY_BEFORE_AT", +57616: "INNER", +57617: "INOUT", +57618: "INPUT", +57619: "INSENSITIVE", +57620: "INSERT", +57621: "INT", +57622: "INTEGER", +57623: "INTERSECT", +57624: "INTERVAL", +57625: "INTO", +57626: "INTO_DB", +57627: "INVERTED", +57628: "INVOKER", +57629: "IS", +57630: "ISERROR", +57631: "ISNULL", +57632: "ISOLATION", +57633: "JOB", +57634: "JOBS", +57635: "JOIN", +57636: "JSON", +57637: "JSONB", +57638: "JSON_SOME_EXISTS", +57639: "JSON_ALL_EXISTS", +57640: "KEY", +57641: "KEYS", +57642: "KMS", +57643: "KV", +57644: "LABEL", +57645: "LANGUAGE", +57646: "LAST", +57647: "LATERAL", +57648: "LATEST", +57649: "LC_CTYPE", +57650: "LC_COLLATE", +57651: "LEADING", +57652: "LEASE", +57653: "LEAST", +57654: "LEAKPROOF", +57655: "LEFT", +57656: "LESS", +57657: "LEVEL", +57658: "LIKE", +57659: "LIMIT", +57660: "LINESTRING", +57661: "LINESTRINGM", +57662: "LINESTRINGZ", +57663: "LINESTRINGZM", +57664: "LIST", +57665: "LOCAL", +57666: "LOCALITY", +57667: "LOCALTIME", +57668: "LOCALTIMESTAMP", +57669: "LOCKED", +57670: "LOGIN", +57671: "LOOKUP", +57672: "LOW", +57673: "LSHIFT", +57674: "MATCH", +57675: "MATERIALIZED", +57676: "MERGE", +57677: "MINVALUE", +57678: "MAXVALUE", +57679: "METHOD", +57680: "MINUTE", +57681: "MODIFYCLUSTERSETTING", +57682: "MODIFYSQLCLUSTERSETTING", +57683: "MONTH", +57684: "MOVE", +57685: "MULTILINESTRING", +57686: "MULTILINESTRINGM", +57687: "MULTILINESTRINGZ", +57688: "MULTILINESTRINGZM", +57689: "MULTIPOINT", +57690: "MULTIPOINTM", +57691: "MULTIPOINTZ", +57692: "MULTIPOINTZM", +57693: "MULTIPOLYGON", +57694: "MULTIPOLYGONM", +57695: "MULTIPOLYGONZ", +57696: "MULTIPOLYGONZM", +57697: "NAN", +57698: "NAME", +57699: "NAMES", +57700: "NATURAL", +57701: "NEVER", +57702: "NEW_DB_NAME", +57703: "NEW_KMS", +57704: "NEXT", +57705: "NO", +57706: "NOCANCELQUERY", +57707: "NOCONTROLCHANGEFEED", +57708: "NOCONTROLJOB", +57709: "NOCREATEDB", +57710: "NOCREATELOGIN", +57711: "NOCREATEROLE", +57712: "NOLOGIN", +57713: "NOMODIFYCLUSTERSETTING", +57714: "NOSQLLOGIN", +57715: "NO_INDEX_JOIN", +57716: "NO_ZIGZAG_JOIN", +57717: "NO_FULL_SCAN", +57718: "NONE", +57719: "NONVOTERS", +57720: "NORMAL", +57721: "NOT", +57722: "NOTHING", +57723: "NOTHING_AFTER_RETURNING", +57724: "NOTNULL", +57725: "NOVIEWACTIVITY", +57726: "NOVIEWACTIVITYREDACTED", +57727: "NOVIEWCLUSTERSETTING", +57728: "NOWAIT", +57729: "NULL", +57730: "NULLIF", +57731: "NULLS", +57732: "NUMERIC", +57733: "OF", +57734: "OFF", +57735: "OFFSET", +57736: "OID", +57737: "OIDS", +57738: "OIDVECTOR", +57739: "OLD_KMS", +57740: "ON", +57741: "ONLY", +57742: "OPT", +57743: "OPTION", +57744: "OPTIONS", +57745: "OR", +57746: "ORDER", +57747: "ORDINALITY", +57748: "OTHERS", +57749: "OUT", +57750: "OUTER", +57751: "OVER", +57752: "OVERLAPS", +57753: "OVERLAY", +57754: "OWNED", +57755: "OWNER", +57756: "OPERATOR", +57757: "PARALLEL", +57758: "PARENT", +57759: "PARTIAL", +57760: "PARTITION", +57761: "PARTITIONS", +57762: "PASSWORD", +57763: "PAUSE", +57764: "PAUSED", +57765: "PHYSICAL", +57766: "PLACEMENT", +57767: "PLACING", +57768: "PLAN", +57769: "PLANS", +57770: "POINT", +57771: "POINTM", +57772: "POINTZ", +57773: "POINTZM", +57774: "POLYGON", +57775: "POLYGONM", +57776: "POLYGONZ", +57777: "POLYGONZM", +57778: "POSITION", +57779: "PRECEDING", +57780: "PRECISION", +57781: "PREPARE", +57782: "PRESERVE", +57783: "PRIMARY", +57784: "PRIOR", +57785: "PRIORITY", +57786: "PRIVILEGES", +57787: "PROCEDURAL", +57788: "PROCEDURE", +57789: "PUBLIC", +57790: "PUBLICATION", +57791: "QUERIES", +57792: "QUERY", +57793: "QUOTE", +57794: "RANGE", +57795: "RANGES", +57796: "READ", +57797: "REAL", +57798: "REASON", +57799: "REASSIGN", +57800: "RECURSIVE", +57801: "RECURRING", +57802: "REDACT", +57803: "REF", +57804: "REFERENCES", +57805: "REFRESH", +57806: "REGCLASS", +57807: "REGION", +57808: "REGIONAL", +57809: "REGIONS", +57810: "REGNAMESPACE", +57811: "REGPROC", +57812: "REGPROCEDURE", +57813: "REGROLE", +57814: "REGTYPE", +57815: "REINDEX", +57816: "RELATIVE", +57817: "RELOCATE", +57818: "REMOVE_PATH", +57819: "RENAME", +57820: "REPEATABLE", +57821: "REPLACE", +57822: "REPLICATION", +57823: "RELEASE", +57824: "RESET", +57825: "RESTART", +57826: "RESTORE", +57827: "RESTRICT", +57828: "RESTRICTED", +57829: "RESUME", +57830: "RETENTION", +57831: "RETURNING", +57832: "RETURN", +57833: "RETURNS", +57834: "RETRY", +57835: "REVISION_HISTORY", +57836: "REVOKE", +57837: "RIGHT", +57838: "ROLE", +57839: "ROLES", +57840: "ROLLBACK", +57841: "ROLLUP", +57842: "ROUTINES", +57843: "ROW", +57844: "ROWS", +57845: "RSHIFT", +57846: "RULE", +57847: "RUNNING", +57848: "SAVEPOINT", +57849: "SCANS", +57850: "SCATTER", +57851: "SCHEDULE", +57852: "SCHEDULES", +57853: "SCROLL", +57854: "SCHEMA", +57855: "SCHEMA_ONLY", +57856: "SCHEMAS", +57857: "SCRUB", +57858: "SEARCH", +57859: "SECOND", +57860: "SECONDARY", +57861: "SECURITY", +57862: "SELECT", +57863: "SEQUENCE", +57864: "SEQUENCES", +57865: "SERIALIZABLE", +57866: "SERVER", +57867: "SERVICE", +57868: "SESSION", +57869: "SESSIONS", +57870: "SESSION_USER", +57871: "SET", +57872: "SETOF", +57873: "SETS", +57874: "SETTING", +57875: "SETTINGS", +57876: "SHARE", +57877: "SHARED", +57878: "SHOW", +57879: "SIMILAR", +57880: "SIMPLE", +57881: "SKIP", +57882: "SKIP_LOCALITIES_CHECK", +57883: "SKIP_MISSING_FOREIGN_KEYS", +57884: "SKIP_MISSING_SEQUENCES", +57885: "SKIP_MISSING_SEQUENCE_OWNERS", +57886: "SKIP_MISSING_VIEWS", +57887: "SKIP_MISSING_UDFS", +57888: "SMALLINT", +57889: "SMALLSERIAL", +57890: "SNAPSHOT", +57891: "SOME", +57892: "SPLIT", +57893: "SQL", +57894: "SQLLOGIN", +57895: "STABLE", +57896: "START", +57897: "STATE", +57898: "STATISTICS", +57899: "STATUS", +57900: "STDIN", +57901: "STDOUT", +57902: "STOP", +57903: "STREAM", +57904: "STRICT", +57905: "STRING", +57906: "STORAGE", +57907: "STORE", +57908: "STORED", +57909: "STORING", +57910: "SUBSTRING", +57911: "SUPER", +57912: "SUPPORT", +57913: "SURVIVE", +57914: "SURVIVAL", +57915: "SYMMETRIC", +57916: "SYNTAX", +57917: "SYSTEM", +57918: "SQRT", +57919: "SUBSCRIPTION", +57920: "STATEMENTS", +57921: "TABLE", +57922: "TABLES", +57923: "TABLESPACE", +57924: "TEMP", +57925: "TEMPLATE", +57926: "TEMPORARY", +57927: "TENANT", +57928: "TENANT_NAME", +57929: "TENANTS", +57930: "TESTING_RELOCATE", +57931: "TEXT", +57932: "THEN", +57933: "TIES", +57934: "TIME", +57935: "TIMETZ", +57936: "TIMESTAMP", +57937: "TIMESTAMPTZ", +57938: "TO", +57939: "THROTTLING", +57940: "TRAILING", +57941: "TRACE", +57942: "TRANSACTION", +57943: "TRANSACTIONS", +57944: "TRANSFER", +57945: "TRANSFORM", +57946: "TREAT", +57947: "TRIGGER", +57948: "TRIM", +57949: "TRUE", +57950: "TRUNCATE", +57951: "TRUSTED", +57952: "TYPE", +57953: "TYPES", +57954: "TRACING", +57955: "UNBOUNDED", +57956: "UNCOMMITTED", +57957: "UNION", +57958: "UNIQUE", +57959: "UNKNOWN", +57960: "UNLISTEN", +57961: "UNLOGGED", +57962: "UNSAFE_RESTORE_INCOMPATIBLE_VERSION", +57963: "UNSPLIT", +57964: "UPDATE", +57965: "UPSERT", +57966: "UNSET", +57967: "UNTIL", +57968: "USE", +57969: "USER", +57970: "USERS", +57971: "USING", +57972: "UUID", +57973: "VALID", +57974: "VALIDATE", +57975: "VALUE", +57976: "VALUES", +57977: "VARBIT", +57978: "VARCHAR", +57979: "VARIADIC", +57980: "VERIFY_BACKUP_TABLE_DATA", +57981: "VIEW", +57982: "VARYING", +57983: "VIEWACTIVITY", +57984: "VIEWACTIVITYREDACTED", +57985: "VIEWDEBUG", +57986: "VIEWCLUSTERMETADATA", +57987: "VIEWCLUSTERSETTING", +57988: "VIRTUAL", +57989: "VISIBLE", +57990: "INVISIBLE", +57991: "VISIBILITY", +57992: "VOLATILE", +57993: "VOTERS", +57994: "WHEN", +57995: "WHERE", +57996: "WINDOW", +57997: "WITH", +57998: "WITHIN", +57999: "WITHOUT", +58000: "WORK", +58001: "WRITE", +58002: "YEAR", +58003: "ZONE", +58004: "NOT_LA", +58005: "NULLS_LA", +58006: "WITH_LA", +58007: "AS_LA", +58008: "GENERATED_ALWAYS", +58009: "GENERATED_BY_DEFAULT", +58010: "RESET_ALL", +58011: "ROLE_ALL", +58012: "USER_ALL", +58013: "ON_LA", +58014: "TENANT_ALL", +58015: "SET_TRACING", +58016: "CONTAINED_BY", +58017: "POSTFIXOP", +58018: "INTERVAL_SIMPLE", +58019: "UMINUS", +58020: "HELPTOKEN", +}