feat: support pgsql code completion (#205)
* feat: pgsql: complete sql, upgrade syntax file and complete autoImprove * feat: pgsql: complete unit test * feat: pgsql: update unit test for autocomplete * feat(pgsql: update split's context type ): pgsql: update split's context type * feat(pgsql: update schema, table, procedure, tablespace, function, view,database's rule name): pgsql * feat: pgsql: update usualName's rule realize * feat: pgsql:update funcName's using --------- Co-authored-by: zhaoge <>
This commit is contained in:
		@ -33,7 +33,7 @@
 | 
			
		||||
lexer grammar PostgreSQLLexer;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Reference Doc: https://www.postgresql.org/docs/9.3/sql-commands.html
 | 
			
		||||
 * Reference Doc: https://www.postgresql.org/docs/16.1/sql-commands.html
 | 
			
		||||
 */
 | 
			
		||||
// SPECIAL CHARACTERS (4.1.4)
 | 
			
		||||
 | 
			
		||||
@ -647,6 +647,28 @@ KW_PEFERENCES: 'PEFERENCES';
 | 
			
		||||
KW_USAGE: 'USAGE';
 | 
			
		||||
KW_CONNECT: 'CONNECT';
 | 
			
		||||
KW_PUBLIC: 'PUBLIC';
 | 
			
		||||
KW_MERGE: 'MERGE';
 | 
			
		||||
KW_MATCHED: 'MATCHED';
 | 
			
		||||
KW_BREADTH: 'BREADTH';
 | 
			
		||||
KW_DEPTH: 'DEPTH';
 | 
			
		||||
KW_UNSAFE: 'UNSAFE';
 | 
			
		||||
KW_RESTRICTED: 'RESTRICTED';
 | 
			
		||||
KW_SAFE: 'SAFE';
 | 
			
		||||
KW_FINALIZE: 'FINALIZE';
 | 
			
		||||
KW_MODULUS: 'MODULUS';
 | 
			
		||||
KW_REMAINDER: 'REMAINDER';
 | 
			
		||||
KW_LOGIN: 'LOGIN';
 | 
			
		||||
KW_NOLOGIN: 'NOLOGIN';
 | 
			
		||||
KW_REPLICATION: 'REPLICATION';
 | 
			
		||||
KW_NOREPLICATION: 'NOREPLICATION';
 | 
			
		||||
KW_BYPASSRLS: 'BYPASSRLS';
 | 
			
		||||
KW_NOBYPASSRLS: 'NOBYPASSRLS';
 | 
			
		||||
KW_PERMISSIVE: 'PERMISSIVE';
 | 
			
		||||
KW_RESTRICTIVE: 'RESTRICTIVE';
 | 
			
		||||
KW_COMPRESSION: 'COMPRESSION';
 | 
			
		||||
KW_PLAIN: 'PLAIN';
 | 
			
		||||
KW_EXTENDED: 'EXTENDED';
 | 
			
		||||
KW_MAIN: 'MAIN';
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
// IDENTIFIERS (4.1.1)
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -522,48 +522,70 @@ KW_PEFERENCES=521
 | 
			
		||||
KW_USAGE=522
 | 
			
		||||
KW_CONNECT=523
 | 
			
		||||
KW_PUBLIC=524
 | 
			
		||||
Identifier=525
 | 
			
		||||
QuotedIdentifier=526
 | 
			
		||||
UnterminatedQuotedIdentifier=527
 | 
			
		||||
InvalidQuotedIdentifier=528
 | 
			
		||||
InvalidUnterminatedQuotedIdentifier=529
 | 
			
		||||
UnicodeQuotedIdentifier=530
 | 
			
		||||
UnterminatedUnicodeQuotedIdentifier=531
 | 
			
		||||
InvalidUnicodeQuotedIdentifier=532
 | 
			
		||||
InvalidUnterminatedUnicodeQuotedIdentifier=533
 | 
			
		||||
StringConstant=534
 | 
			
		||||
UnterminatedStringConstant=535
 | 
			
		||||
UnicodeEscapeStringConstant=536
 | 
			
		||||
UnterminatedUnicodeEscapeStringConstant=537
 | 
			
		||||
BeginDollarStringConstant=538
 | 
			
		||||
BinaryStringConstant=539
 | 
			
		||||
UnterminatedBinaryStringConstant=540
 | 
			
		||||
InvalidBinaryStringConstant=541
 | 
			
		||||
InvalidUnterminatedBinaryStringConstant=542
 | 
			
		||||
HexadecimalStringConstant=543
 | 
			
		||||
UnterminatedHexadecimalStringConstant=544
 | 
			
		||||
InvalidHexadecimalStringConstant=545
 | 
			
		||||
InvalidUnterminatedHexadecimalStringConstant=546
 | 
			
		||||
Integral=547
 | 
			
		||||
NumericFail=548
 | 
			
		||||
Numeric=549
 | 
			
		||||
PLSQLVARIABLENAME=550
 | 
			
		||||
PLSQLIDENTIFIER=551
 | 
			
		||||
Whitespace=552
 | 
			
		||||
Newline=553
 | 
			
		||||
LineComment=554
 | 
			
		||||
BlockComment=555
 | 
			
		||||
UnterminatedBlockComment=556
 | 
			
		||||
MetaCommand=557
 | 
			
		||||
EndMetaCommand=558
 | 
			
		||||
ErrorCharacter=559
 | 
			
		||||
EscapeStringConstant=560
 | 
			
		||||
UnterminatedEscapeStringConstant=561
 | 
			
		||||
InvalidEscapeStringConstant=562
 | 
			
		||||
InvalidUnterminatedEscapeStringConstant=563
 | 
			
		||||
DollarText=564
 | 
			
		||||
EndDollarStringConstant=565
 | 
			
		||||
AfterEscapeStringConstantWithNewlineMode_Continued=566
 | 
			
		||||
KW_MERGE=525
 | 
			
		||||
KW_MATCHED=526
 | 
			
		||||
KW_BREADTH=527
 | 
			
		||||
KW_DEPTH=528
 | 
			
		||||
KW_UNSAFE=529
 | 
			
		||||
KW_RESTRICTED=530
 | 
			
		||||
KW_SAFE=531
 | 
			
		||||
KW_FINALIZE=532
 | 
			
		||||
KW_MODULUS=533
 | 
			
		||||
KW_REMAINDER=534
 | 
			
		||||
KW_LOGIN=535
 | 
			
		||||
KW_NOLOGIN=536
 | 
			
		||||
KW_REPLICATION=537
 | 
			
		||||
KW_NOREPLICATION=538
 | 
			
		||||
KW_BYPASSRLS=539
 | 
			
		||||
KW_NOBYPASSRLS=540
 | 
			
		||||
KW_PERMISSIVE=541
 | 
			
		||||
KW_RESTRICTIVE=542
 | 
			
		||||
KW_COMPRESSION=543
 | 
			
		||||
KW_PLAIN=544
 | 
			
		||||
KW_EXTENDED=545
 | 
			
		||||
KW_MAIN=546
 | 
			
		||||
Identifier=547
 | 
			
		||||
QuotedIdentifier=548
 | 
			
		||||
UnterminatedQuotedIdentifier=549
 | 
			
		||||
InvalidQuotedIdentifier=550
 | 
			
		||||
InvalidUnterminatedQuotedIdentifier=551
 | 
			
		||||
UnicodeQuotedIdentifier=552
 | 
			
		||||
UnterminatedUnicodeQuotedIdentifier=553
 | 
			
		||||
InvalidUnicodeQuotedIdentifier=554
 | 
			
		||||
InvalidUnterminatedUnicodeQuotedIdentifier=555
 | 
			
		||||
StringConstant=556
 | 
			
		||||
UnterminatedStringConstant=557
 | 
			
		||||
UnicodeEscapeStringConstant=558
 | 
			
		||||
UnterminatedUnicodeEscapeStringConstant=559
 | 
			
		||||
BeginDollarStringConstant=560
 | 
			
		||||
BinaryStringConstant=561
 | 
			
		||||
UnterminatedBinaryStringConstant=562
 | 
			
		||||
InvalidBinaryStringConstant=563
 | 
			
		||||
InvalidUnterminatedBinaryStringConstant=564
 | 
			
		||||
HexadecimalStringConstant=565
 | 
			
		||||
UnterminatedHexadecimalStringConstant=566
 | 
			
		||||
InvalidHexadecimalStringConstant=567
 | 
			
		||||
InvalidUnterminatedHexadecimalStringConstant=568
 | 
			
		||||
Integral=569
 | 
			
		||||
NumericFail=570
 | 
			
		||||
Numeric=571
 | 
			
		||||
PLSQLVARIABLENAME=572
 | 
			
		||||
PLSQLIDENTIFIER=573
 | 
			
		||||
Whitespace=574
 | 
			
		||||
Newline=575
 | 
			
		||||
LineComment=576
 | 
			
		||||
BlockComment=577
 | 
			
		||||
UnterminatedBlockComment=578
 | 
			
		||||
MetaCommand=579
 | 
			
		||||
EndMetaCommand=580
 | 
			
		||||
ErrorCharacter=581
 | 
			
		||||
EscapeStringConstant=582
 | 
			
		||||
UnterminatedEscapeStringConstant=583
 | 
			
		||||
InvalidEscapeStringConstant=584
 | 
			
		||||
InvalidUnterminatedEscapeStringConstant=585
 | 
			
		||||
DollarText=586
 | 
			
		||||
EndDollarStringConstant=587
 | 
			
		||||
AfterEscapeStringConstantWithNewlineMode_Continued=588
 | 
			
		||||
'$'=1
 | 
			
		||||
'('=2
 | 
			
		||||
')'=3
 | 
			
		||||
@ -1086,5 +1108,27 @@ AfterEscapeStringConstantWithNewlineMode_Continued=566
 | 
			
		||||
'USAGE'=522
 | 
			
		||||
'CONNECT'=523
 | 
			
		||||
'PUBLIC'=524
 | 
			
		||||
'\\\\'=558
 | 
			
		||||
'\''=566
 | 
			
		||||
'MERGE'=525
 | 
			
		||||
'MATCHED'=526
 | 
			
		||||
'BREADTH'=527
 | 
			
		||||
'DEPTH'=528
 | 
			
		||||
'UNSAFE'=529
 | 
			
		||||
'RESTRICTED'=530
 | 
			
		||||
'SAFE'=531
 | 
			
		||||
'FINALIZE'=532
 | 
			
		||||
'MODULUS'=533
 | 
			
		||||
'REMAINDER'=534
 | 
			
		||||
'LOGIN'=535
 | 
			
		||||
'NOLOGIN'=536
 | 
			
		||||
'REPLICATION'=537
 | 
			
		||||
'NOREPLICATION'=538
 | 
			
		||||
'BYPASSRLS'=539
 | 
			
		||||
'NOBYPASSRLS'=540
 | 
			
		||||
'PERMISSIVE'=541
 | 
			
		||||
'RESTRICTIVE'=542
 | 
			
		||||
'COMPRESSION'=543
 | 
			
		||||
'PLAIN'=544
 | 
			
		||||
'EXTENDED'=545
 | 
			
		||||
'MAIN'=546
 | 
			
		||||
'\\\\'=580
 | 
			
		||||
'\''=588
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -522,48 +522,70 @@ KW_PEFERENCES=521
 | 
			
		||||
KW_USAGE=522
 | 
			
		||||
KW_CONNECT=523
 | 
			
		||||
KW_PUBLIC=524
 | 
			
		||||
Identifier=525
 | 
			
		||||
QuotedIdentifier=526
 | 
			
		||||
UnterminatedQuotedIdentifier=527
 | 
			
		||||
InvalidQuotedIdentifier=528
 | 
			
		||||
InvalidUnterminatedQuotedIdentifier=529
 | 
			
		||||
UnicodeQuotedIdentifier=530
 | 
			
		||||
UnterminatedUnicodeQuotedIdentifier=531
 | 
			
		||||
InvalidUnicodeQuotedIdentifier=532
 | 
			
		||||
InvalidUnterminatedUnicodeQuotedIdentifier=533
 | 
			
		||||
StringConstant=534
 | 
			
		||||
UnterminatedStringConstant=535
 | 
			
		||||
UnicodeEscapeStringConstant=536
 | 
			
		||||
UnterminatedUnicodeEscapeStringConstant=537
 | 
			
		||||
BeginDollarStringConstant=538
 | 
			
		||||
BinaryStringConstant=539
 | 
			
		||||
UnterminatedBinaryStringConstant=540
 | 
			
		||||
InvalidBinaryStringConstant=541
 | 
			
		||||
InvalidUnterminatedBinaryStringConstant=542
 | 
			
		||||
HexadecimalStringConstant=543
 | 
			
		||||
UnterminatedHexadecimalStringConstant=544
 | 
			
		||||
InvalidHexadecimalStringConstant=545
 | 
			
		||||
InvalidUnterminatedHexadecimalStringConstant=546
 | 
			
		||||
Integral=547
 | 
			
		||||
NumericFail=548
 | 
			
		||||
Numeric=549
 | 
			
		||||
PLSQLVARIABLENAME=550
 | 
			
		||||
PLSQLIDENTIFIER=551
 | 
			
		||||
Whitespace=552
 | 
			
		||||
Newline=553
 | 
			
		||||
LineComment=554
 | 
			
		||||
BlockComment=555
 | 
			
		||||
UnterminatedBlockComment=556
 | 
			
		||||
MetaCommand=557
 | 
			
		||||
EndMetaCommand=558
 | 
			
		||||
ErrorCharacter=559
 | 
			
		||||
EscapeStringConstant=560
 | 
			
		||||
UnterminatedEscapeStringConstant=561
 | 
			
		||||
InvalidEscapeStringConstant=562
 | 
			
		||||
InvalidUnterminatedEscapeStringConstant=563
 | 
			
		||||
DollarText=564
 | 
			
		||||
EndDollarStringConstant=565
 | 
			
		||||
AfterEscapeStringConstantWithNewlineMode_Continued=566
 | 
			
		||||
KW_MERGE=525
 | 
			
		||||
KW_MATCHED=526
 | 
			
		||||
KW_BREADTH=527
 | 
			
		||||
KW_DEPTH=528
 | 
			
		||||
KW_UNSAFE=529
 | 
			
		||||
KW_RESTRICTED=530
 | 
			
		||||
KW_SAFE=531
 | 
			
		||||
KW_FINALIZE=532
 | 
			
		||||
KW_MODULUS=533
 | 
			
		||||
KW_REMAINDER=534
 | 
			
		||||
KW_LOGIN=535
 | 
			
		||||
KW_NOLOGIN=536
 | 
			
		||||
KW_REPLICATION=537
 | 
			
		||||
KW_NOREPLICATION=538
 | 
			
		||||
KW_BYPASSRLS=539
 | 
			
		||||
KW_NOBYPASSRLS=540
 | 
			
		||||
KW_PERMISSIVE=541
 | 
			
		||||
KW_RESTRICTIVE=542
 | 
			
		||||
KW_COMPRESSION=543
 | 
			
		||||
KW_PLAIN=544
 | 
			
		||||
KW_EXTENDED=545
 | 
			
		||||
KW_MAIN=546
 | 
			
		||||
Identifier=547
 | 
			
		||||
QuotedIdentifier=548
 | 
			
		||||
UnterminatedQuotedIdentifier=549
 | 
			
		||||
InvalidQuotedIdentifier=550
 | 
			
		||||
InvalidUnterminatedQuotedIdentifier=551
 | 
			
		||||
UnicodeQuotedIdentifier=552
 | 
			
		||||
UnterminatedUnicodeQuotedIdentifier=553
 | 
			
		||||
InvalidUnicodeQuotedIdentifier=554
 | 
			
		||||
InvalidUnterminatedUnicodeQuotedIdentifier=555
 | 
			
		||||
StringConstant=556
 | 
			
		||||
UnterminatedStringConstant=557
 | 
			
		||||
UnicodeEscapeStringConstant=558
 | 
			
		||||
UnterminatedUnicodeEscapeStringConstant=559
 | 
			
		||||
BeginDollarStringConstant=560
 | 
			
		||||
BinaryStringConstant=561
 | 
			
		||||
UnterminatedBinaryStringConstant=562
 | 
			
		||||
InvalidBinaryStringConstant=563
 | 
			
		||||
InvalidUnterminatedBinaryStringConstant=564
 | 
			
		||||
HexadecimalStringConstant=565
 | 
			
		||||
UnterminatedHexadecimalStringConstant=566
 | 
			
		||||
InvalidHexadecimalStringConstant=567
 | 
			
		||||
InvalidUnterminatedHexadecimalStringConstant=568
 | 
			
		||||
Integral=569
 | 
			
		||||
NumericFail=570
 | 
			
		||||
Numeric=571
 | 
			
		||||
PLSQLVARIABLENAME=572
 | 
			
		||||
PLSQLIDENTIFIER=573
 | 
			
		||||
Whitespace=574
 | 
			
		||||
Newline=575
 | 
			
		||||
LineComment=576
 | 
			
		||||
BlockComment=577
 | 
			
		||||
UnterminatedBlockComment=578
 | 
			
		||||
MetaCommand=579
 | 
			
		||||
EndMetaCommand=580
 | 
			
		||||
ErrorCharacter=581
 | 
			
		||||
EscapeStringConstant=582
 | 
			
		||||
UnterminatedEscapeStringConstant=583
 | 
			
		||||
InvalidEscapeStringConstant=584
 | 
			
		||||
InvalidUnterminatedEscapeStringConstant=585
 | 
			
		||||
DollarText=586
 | 
			
		||||
EndDollarStringConstant=587
 | 
			
		||||
AfterEscapeStringConstantWithNewlineMode_Continued=588
 | 
			
		||||
'$'=1
 | 
			
		||||
'('=2
 | 
			
		||||
')'=3
 | 
			
		||||
@ -1086,5 +1108,27 @@ AfterEscapeStringConstantWithNewlineMode_Continued=566
 | 
			
		||||
'USAGE'=522
 | 
			
		||||
'CONNECT'=523
 | 
			
		||||
'PUBLIC'=524
 | 
			
		||||
'\\\\'=558
 | 
			
		||||
'\''=566
 | 
			
		||||
'MERGE'=525
 | 
			
		||||
'MATCHED'=526
 | 
			
		||||
'BREADTH'=527
 | 
			
		||||
'DEPTH'=528
 | 
			
		||||
'UNSAFE'=529
 | 
			
		||||
'RESTRICTED'=530
 | 
			
		||||
'SAFE'=531
 | 
			
		||||
'FINALIZE'=532
 | 
			
		||||
'MODULUS'=533
 | 
			
		||||
'REMAINDER'=534
 | 
			
		||||
'LOGIN'=535
 | 
			
		||||
'NOLOGIN'=536
 | 
			
		||||
'REPLICATION'=537
 | 
			
		||||
'NOREPLICATION'=538
 | 
			
		||||
'BYPASSRLS'=539
 | 
			
		||||
'NOBYPASSRLS'=540
 | 
			
		||||
'PERMISSIVE'=541
 | 
			
		||||
'RESTRICTIVE'=542
 | 
			
		||||
'COMPRESSION'=543
 | 
			
		||||
'PLAIN'=544
 | 
			
		||||
'EXTENDED'=545
 | 
			
		||||
'MAIN'=546
 | 
			
		||||
'\\\\'=580
 | 
			
		||||
'\''=588
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -29,12 +29,16 @@ import { CreateuserstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { AlterrolestmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Opt_in_databaseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { AlterrolesetstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { AlterroutinestmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Alter_routine_cluaseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { RoutineActionListContext } from "./PostgreSQLParser";
 | 
			
		||||
import { RoutineActionContext } from "./PostgreSQLParser";
 | 
			
		||||
import { DroprolestmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { CreategroupstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { AltergroupstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Add_dropContext } from "./PostgreSQLParser";
 | 
			
		||||
import { CreateschemastmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { OptschemanameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { CreateSchemaNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { OptschemaeltlistContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Schema_stmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { VariablesetstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
@ -62,6 +66,10 @@ import { CheckpointstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { DiscardstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { AltertablestmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Alter_table_cmdsContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Partition_bound_specContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Partition_bound_cluaseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Partition_bound_chooseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Partition_with_cluaseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Partition_cmdContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Index_partition_cmdContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Alter_table_cmdContext } from "./PostgreSQLParser";
 | 
			
		||||
@ -108,10 +116,13 @@ import { TypedtableelementlistContext } from "./PostgreSQLParser";
 | 
			
		||||
import { TableelementContext } from "./PostgreSQLParser";
 | 
			
		||||
import { TypedtableelementContext } from "./PostgreSQLParser";
 | 
			
		||||
import { ColumnDefContext } from "./PostgreSQLParser";
 | 
			
		||||
import { CompressionCluaseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { StorageCluaseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { ColumnOptionsContext } from "./PostgreSQLParser";
 | 
			
		||||
import { ColquallistContext } from "./PostgreSQLParser";
 | 
			
		||||
import { ColconstraintContext } from "./PostgreSQLParser";
 | 
			
		||||
import { ColconstraintelemContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Nulls_distinctContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Generated_whenContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Deferrable_triggerContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Initially_triggerContext } from "./PostgreSQLParser";
 | 
			
		||||
@ -142,6 +153,7 @@ import { Table_access_method_clauseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { OptwithContext } from "./PostgreSQLParser";
 | 
			
		||||
import { OncommitoptionContext } from "./PostgreSQLParser";
 | 
			
		||||
import { OpttablespaceContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Index_paramenters_createContext } from "./PostgreSQLParser";
 | 
			
		||||
import { OptconstablespaceContext } from "./PostgreSQLParser";
 | 
			
		||||
import { ExistingindexContext } from "./PostgreSQLParser";
 | 
			
		||||
import { CreatestatsstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
@ -207,6 +219,9 @@ import { DropusermappingstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { AlterusermappingstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { CreatepolicystmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { AlterpolicystmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { AlterprocedurestmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Procedure_cluaseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Procedure_actionContext } from "./PostgreSQLParser";
 | 
			
		||||
import { RowsecurityoptionalexprContext } from "./PostgreSQLParser";
 | 
			
		||||
import { RowsecurityoptionalwithcheckContext } from "./PostgreSQLParser";
 | 
			
		||||
import { RowsecuritydefaulttoroleContext } from "./PostgreSQLParser";
 | 
			
		||||
@ -273,8 +288,13 @@ import { DropopfamilystmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { DropownedstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { ReassignownedstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { DropstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { DropviewstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { ViewNameListContext } from "./PostgreSQLParser";
 | 
			
		||||
import { DropschemastmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Object_type_any_name_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Object_type_any_nameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Object_type_nameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Drop_typeContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Drop_type_nameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Object_type_name_on_any_nameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Any_name_listContext } from "./PostgreSQLParser";
 | 
			
		||||
@ -331,6 +351,10 @@ import { AttrilistContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Opt_or_replaceContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Func_argsContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Func_args_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Usual_with_argtypes_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Usual_with_argtypesContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Procedure_with_argtypes_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Procedure_with_argtypesContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Function_with_argtypes_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Function_with_argtypesContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Func_args_with_defaultsContext } from "./PostgreSQLParser";
 | 
			
		||||
@ -355,6 +379,7 @@ import { Opt_definitionContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Table_func_columnContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Table_func_column_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { AlterfunctionstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { AlterFunctionTypeClauseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Alterfunc_opt_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Opt_restrictContext } from "./PostgreSQLParser";
 | 
			
		||||
import { RemovefuncstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
@ -442,6 +467,7 @@ import { AltertsconfigurationstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Any_withContext } from "./PostgreSQLParser";
 | 
			
		||||
import { CreateconversionstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { ClusterstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Opt_verbose_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Cluster_index_specificationContext } from "./PostgreSQLParser";
 | 
			
		||||
import { VacuumstmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { AnalyzestmtContext } from "./PostgreSQLParser";
 | 
			
		||||
@ -505,6 +531,8 @@ import { Set_operator_with_all_or_distinctContext } from "./PostgreSQLParser";
 | 
			
		||||
import { With_clauseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Cte_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Common_table_exprContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Search_cluaseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Cycle_cluaseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Opt_materializedContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Opt_with_clauseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Into_clauseContext } from "./PostgreSQLParser";
 | 
			
		||||
@ -552,7 +580,9 @@ import { Func_alias_clauseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Join_typeContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Join_qualContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Relation_exprContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Publication_relation_exprContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Relation_expr_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Publication_relation_expr_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Relation_expr_opt_aliasContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Tablesample_clauseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Opt_repeatable_clauseContext } from "./PostgreSQLParser";
 | 
			
		||||
@ -654,6 +684,8 @@ import { Qual_opContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Qual_all_opContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Subquery_OpContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Expr_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Column_expr_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Column_exprContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Func_arg_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Func_arg_exprContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Type_listContext } from "./PostgreSQLParser";
 | 
			
		||||
@ -681,13 +713,32 @@ import { Opt_target_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Target_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Target_elContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Qualified_name_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Table_qualified_nameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { TableNameListContext } from "./PostgreSQLParser";
 | 
			
		||||
import { SchemaNameListContext } from "./PostgreSQLParser";
 | 
			
		||||
import { DatabaseNameListContext } from "./PostgreSQLParser";
 | 
			
		||||
import { ProcedureNameListContext } from "./PostgreSQLParser";
 | 
			
		||||
import { CreateTablespaceNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { TablespaceNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { CreateTableNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { TableNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { CreateViewNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { ViewNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Qualified_nameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Tablespace_name_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Name_listContext } from "./PostgreSQLParser";
 | 
			
		||||
import { CreateDatabaseNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { DatabaseNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { SchemaNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { CreateRoutineNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { RoutineNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { ProcedureNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { CreateProcedureNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { NameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Attr_nameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { File_nameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Func_nameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { CreateFuncNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { FuncNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { UsualNameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { AexprconstContext } from "./PostgreSQLParser";
 | 
			
		||||
import { XconstContext } from "./PostgreSQLParser";
 | 
			
		||||
import { BconstContext } from "./PostgreSQLParser";
 | 
			
		||||
@ -707,6 +758,7 @@ import { Exclude_elementContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Index_paramentersContext } from "./PostgreSQLParser";
 | 
			
		||||
import { WherePredicateContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Type_function_nameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Type_usual_nameContext } from "./PostgreSQLParser";
 | 
			
		||||
import { NonreservedwordContext } from "./PostgreSQLParser";
 | 
			
		||||
import { CollabelContext } from "./PostgreSQLParser";
 | 
			
		||||
import { IdentifierContext } from "./PostgreSQLParser";
 | 
			
		||||
@ -804,6 +856,14 @@ import { Into_targetContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Opt_cursor_fromContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Opt_fetch_directionContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Stmt_moveContext } from "./PostgreSQLParser";
 | 
			
		||||
import { MergestmtContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Data_sourceContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Join_conditionContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Merge_when_clauseContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Merge_insertContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Merge_updateContext } from "./PostgreSQLParser";
 | 
			
		||||
import { ExprofdefaultlistContext } from "./PostgreSQLParser";
 | 
			
		||||
import { ExprofdefaultContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Stmt_closeContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Stmt_nullContext } from "./PostgreSQLParser";
 | 
			
		||||
import { Stmt_commitContext } from "./PostgreSQLParser";
 | 
			
		||||
@ -1031,6 +1091,34 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitAlterrolesetstmt?: (ctx: AlterrolesetstmtContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.alterroutinestmt`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitAlterroutinestmt?: (ctx: AlterroutinestmtContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.alter_routine_cluase`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitAlter_routine_cluase?: (ctx: Alter_routine_cluaseContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.routineActionList`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitRoutineActionList?: (ctx: RoutineActionListContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.routineAction`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitRoutineAction?: (ctx: RoutineActionContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.droprolestmt`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -1067,11 +1155,11 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	visitCreateschemastmt?: (ctx: CreateschemastmtContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.optschemaname`.
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.createSchemaName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitOptschemaname?: (ctx: OptschemanameContext) => Result;
 | 
			
		||||
	visitCreateSchemaName?: (ctx: CreateSchemaNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.optschemaeltlist`.
 | 
			
		||||
@ -1262,6 +1350,34 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitAlter_table_cmds?: (ctx: Alter_table_cmdsContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.partition_bound_spec`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitPartition_bound_spec?: (ctx: Partition_bound_specContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.partition_bound_cluase`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitPartition_bound_cluase?: (ctx: Partition_bound_cluaseContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.partition_bound_choose`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitPartition_bound_choose?: (ctx: Partition_bound_chooseContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.partition_with_cluase`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitPartition_with_cluase?: (ctx: Partition_with_cluaseContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.partition_cmd`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -1584,6 +1700,20 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitColumnDef?: (ctx: ColumnDefContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.compressionCluase`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitCompressionCluase?: (ctx: CompressionCluaseContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.storageCluase`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitStorageCluase?: (ctx: StorageCluaseContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.columnOptions`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -1612,6 +1742,13 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitColconstraintelem?: (ctx: ColconstraintelemContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.nulls_distinct`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitNulls_distinct?: (ctx: Nulls_distinctContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.generated_when`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -1822,6 +1959,13 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitOpttablespace?: (ctx: OpttablespaceContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.index_paramenters_create`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitIndex_paramenters_create?: (ctx: Index_paramenters_createContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.optconstablespace`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -2277,6 +2421,27 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitAlterpolicystmt?: (ctx: AlterpolicystmtContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.alterprocedurestmt`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitAlterprocedurestmt?: (ctx: AlterprocedurestmtContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.procedure_cluase`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitProcedure_cluase?: (ctx: Procedure_cluaseContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.procedure_action`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitProcedure_action?: (ctx: Procedure_actionContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.rowsecurityoptionalexpr`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -2739,6 +2904,34 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitDropstmt?: (ctx: DropstmtContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.dropviewstmt`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitDropviewstmt?: (ctx: DropviewstmtContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.viewNameList`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitViewNameList?: (ctx: ViewNameListContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.dropschemastmt`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitDropschemastmt?: (ctx: DropschemastmtContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.object_type_any_name_list`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitObject_type_any_name_list?: (ctx: Object_type_any_name_listContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.object_type_any_name`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -2753,6 +2946,13 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitObject_type_name?: (ctx: Object_type_nameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.drop_type`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitDrop_type?: (ctx: Drop_typeContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.drop_type_name`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -3145,6 +3345,34 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitFunc_args_list?: (ctx: Func_args_listContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.usual_with_argtypes_list`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitUsual_with_argtypes_list?: (ctx: Usual_with_argtypes_listContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.usual_with_argtypes`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitUsual_with_argtypes?: (ctx: Usual_with_argtypesContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.procedure_with_argtypes_list`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitProcedure_with_argtypes_list?: (ctx: Procedure_with_argtypes_listContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.procedure_with_argtypes`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitProcedure_with_argtypes?: (ctx: Procedure_with_argtypesContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.function_with_argtypes_list`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -3313,6 +3541,13 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitAlterfunctionstmt?: (ctx: AlterfunctionstmtContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.alterFunctionTypeClause`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitAlterFunctionTypeClause?: (ctx: AlterFunctionTypeClauseContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.alterfunc_opt_list`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -3922,6 +4157,13 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitClusterstmt?: (ctx: ClusterstmtContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.opt_verbose_list`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitOpt_verbose_list?: (ctx: Opt_verbose_listContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.cluster_index_specification`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -4363,6 +4605,20 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitCommon_table_expr?: (ctx: Common_table_exprContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.search_cluase`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitSearch_cluase?: (ctx: Search_cluaseContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.cycle_cluase`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitCycle_cluase?: (ctx: Cycle_cluaseContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.opt_materialized`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -4692,6 +4948,13 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitRelation_expr?: (ctx: Relation_exprContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.publication_relation_expr`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitPublication_relation_expr?: (ctx: Publication_relation_exprContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.relation_expr_list`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -4699,6 +4962,13 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitRelation_expr_list?: (ctx: Relation_expr_listContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.publication_relation_expr_list`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitPublication_relation_expr_list?: (ctx: Publication_relation_expr_listContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.relation_expr_opt_alias`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -5406,6 +5676,20 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitExpr_list?: (ctx: Expr_listContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.column_expr_list`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitColumn_expr_list?: (ctx: Column_expr_listContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.column_expr`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitColumn_expr?: (ctx: Column_exprContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.func_arg_list`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -5596,11 +5880,74 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	visitQualified_name_list?: (ctx: Qualified_name_listContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.table_qualified_name`.
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.tableNameList`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitTable_qualified_name?: (ctx: Table_qualified_nameContext) => Result;
 | 
			
		||||
	visitTableNameList?: (ctx: TableNameListContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.schemaNameList`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitSchemaNameList?: (ctx: SchemaNameListContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.databaseNameList`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitDatabaseNameList?: (ctx: DatabaseNameListContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.procedureNameList`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitProcedureNameList?: (ctx: ProcedureNameListContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.createTablespaceName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitCreateTablespaceName?: (ctx: CreateTablespaceNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.tablespaceName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitTablespaceName?: (ctx: TablespaceNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.createTableName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitCreateTableName?: (ctx: CreateTableNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.tableName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitTableName?: (ctx: TableNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.createViewName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitCreateViewName?: (ctx: CreateViewNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.viewName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitViewName?: (ctx: ViewNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.qualified_name`.
 | 
			
		||||
@ -5609,6 +5956,13 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitQualified_name?: (ctx: Qualified_nameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.tablespace_name_list`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitTablespace_name_list?: (ctx: Tablespace_name_listContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.name_list`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -5616,6 +5970,55 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitName_list?: (ctx: Name_listContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.createDatabaseName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitCreateDatabaseName?: (ctx: CreateDatabaseNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.databaseName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitDatabaseName?: (ctx: DatabaseNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.schemaName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitSchemaName?: (ctx: SchemaNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.createRoutineName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitCreateRoutineName?: (ctx: CreateRoutineNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.routineName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitRoutineName?: (ctx: RoutineNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.procedureName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitProcedureName?: (ctx: ProcedureNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.createProcedureName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitCreateProcedureName?: (ctx: CreateProcedureNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.name`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -5638,11 +6041,25 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	visitFile_name?: (ctx: File_nameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.func_name`.
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.createFuncName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitFunc_name?: (ctx: Func_nameContext) => Result;
 | 
			
		||||
	visitCreateFuncName?: (ctx: CreateFuncNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.funcName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitFuncName?: (ctx: FuncNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.usualName`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitUsualName?: (ctx: UsualNameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.aexprconst`.
 | 
			
		||||
@ -5777,6 +6194,13 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitType_function_name?: (ctx: Type_function_nameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.type_usual_name`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitType_usual_name?: (ctx: Type_usual_nameContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.nonreservedword`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
@ -6456,6 +6880,62 @@ export interface PostgreSQLParserVisitor<Result> extends ParseTreeVisitor<Result
 | 
			
		||||
	 */
 | 
			
		||||
	visitStmt_move?: (ctx: Stmt_moveContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.mergestmt`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitMergestmt?: (ctx: MergestmtContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.data_source`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitData_source?: (ctx: Data_sourceContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.join_condition`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitJoin_condition?: (ctx: Join_conditionContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.merge_when_clause`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitMerge_when_clause?: (ctx: Merge_when_clauseContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.merge_insert`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitMerge_insert?: (ctx: Merge_insertContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.merge_update`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitMerge_update?: (ctx: Merge_updateContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.exprofdefaultlist`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitExprofdefaultlist?: (ctx: ExprofdefaultlistContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.exprofdefault`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
	 * @return the visitor result
 | 
			
		||||
	 */
 | 
			
		||||
	visitExprofdefault?: (ctx: ExprofdefaultContext) => Result;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Visit a parse tree produced by `PostgreSQLParser.stmt_close`.
 | 
			
		||||
	 * @param ctx the parse tree
 | 
			
		||||
 | 
			
		||||
@ -33,6 +33,10 @@ export enum SyntaxContextType {
 | 
			
		||||
    FUNCTION = 'function',
 | 
			
		||||
    /** function name that will be created */
 | 
			
		||||
    FUNCTION_CREATE = 'functionCreate',
 | 
			
		||||
    /** procedure name */
 | 
			
		||||
    PROCEDURE = 'procedure',
 | 
			
		||||
    /** procedure name that will be created */
 | 
			
		||||
    PROCEDURE_CREATE = 'procedureCreate',
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface WordRange {
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,10 @@
 | 
			
		||||
import { Token } from 'antlr4ts';
 | 
			
		||||
import { CandidatesCollection } from 'antlr4-c3';
 | 
			
		||||
import { PostgreSQLLexer } from '../lib/pgsql/PostgreSQLLexer';
 | 
			
		||||
import { PostgreSQLParser, ProgramContext } from '../lib/pgsql/PostgreSQLParser';
 | 
			
		||||
import { PostgreSQLParser, ProgramContext, StmtContext } from '../lib/pgsql/PostgreSQLParser';
 | 
			
		||||
import BasicParser from './common/basicParser';
 | 
			
		||||
import { Suggestions } from './common/basic-parser-types';
 | 
			
		||||
import { PostgreSQLParserListener } from '../lib/pgsql/PostgreSQLParserListener';
 | 
			
		||||
import { SyntaxContextType, Suggestions, SyntaxSuggestion } from './common/basic-parser-types';
 | 
			
		||||
 | 
			
		||||
export default class PostgresSQL extends BasicParser<
 | 
			
		||||
    PostgreSQLLexer,
 | 
			
		||||
@ -19,20 +20,131 @@ export default class PostgresSQL extends BasicParser<
 | 
			
		||||
        return new PostgreSQLParser(tokenStream);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected preferredRules: Set<number> = new Set();
 | 
			
		||||
    protected preferredRules: Set<number> = new Set([
 | 
			
		||||
        PostgreSQLParser.RULE_createTableName, // table name
 | 
			
		||||
        PostgreSQLParser.RULE_tableName, // table name that will be created
 | 
			
		||||
        PostgreSQLParser.RULE_funcName, // function name
 | 
			
		||||
        PostgreSQLParser.RULE_createFuncName, // function name that will be created
 | 
			
		||||
        PostgreSQLParser.RULE_createSchemaName, // schema name that will be created
 | 
			
		||||
        PostgreSQLParser.RULE_schemaName, // schema name
 | 
			
		||||
        PostgreSQLParser.RULE_createViewName, // view name that will be created
 | 
			
		||||
        PostgreSQLParser.RULE_viewName, // view name
 | 
			
		||||
        PostgreSQLParser.RULE_createDatabaseName, // database name that will be created
 | 
			
		||||
        PostgreSQLParser.RULE_databaseName, // database name
 | 
			
		||||
        PostgreSQLParser.RULE_createProcedureName, // procedure name that will be created
 | 
			
		||||
        PostgreSQLParser.RULE_procedureName, // procedure name
 | 
			
		||||
    ]);
 | 
			
		||||
 | 
			
		||||
    protected get splitListener() {
 | 
			
		||||
        return null as any;
 | 
			
		||||
        return new PgSqlSplitListener();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected processCandidates(
 | 
			
		||||
        candidates: CandidatesCollection,
 | 
			
		||||
        allTokens: Token[],
 | 
			
		||||
        caretTokenIndex: number
 | 
			
		||||
        caretTokenIndex: number,
 | 
			
		||||
        tokenIndexOffset: number
 | 
			
		||||
    ): Suggestions<Token> {
 | 
			
		||||
        const originalSyntaxSuggestions: SyntaxSuggestion<Token>[] = [];
 | 
			
		||||
        const keywords: string[] = [];
 | 
			
		||||
        for (let candidate of candidates.rules) {
 | 
			
		||||
            const [ruleType, candidateRule] = candidate;
 | 
			
		||||
            const startTokenIndex = candidateRule.startTokenIndex + tokenIndexOffset;
 | 
			
		||||
            const tokenRanges = allTokens.slice(
 | 
			
		||||
                startTokenIndex,
 | 
			
		||||
                caretTokenIndex + tokenIndexOffset + 1
 | 
			
		||||
            );
 | 
			
		||||
 | 
			
		||||
            let syntaxContextType: SyntaxContextType;
 | 
			
		||||
            switch (ruleType) {
 | 
			
		||||
                case PostgreSQLParser.RULE_createTableName: {
 | 
			
		||||
                    syntaxContextType = SyntaxContextType.TABLE_CREATE;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case PostgreSQLParser.RULE_tableName: {
 | 
			
		||||
                    syntaxContextType = SyntaxContextType.TABLE;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case PostgreSQLParser.RULE_createFuncName: {
 | 
			
		||||
                    syntaxContextType = SyntaxContextType.FUNCTION_CREATE;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case PostgreSQLParser.RULE_funcName: {
 | 
			
		||||
                    syntaxContextType = SyntaxContextType.FUNCTION;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case PostgreSQLParser.RULE_createSchemaName: {
 | 
			
		||||
                    syntaxContextType = SyntaxContextType.DATABASE_CREATE;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case PostgreSQLParser.RULE_schemaName: {
 | 
			
		||||
                    syntaxContextType = SyntaxContextType.DATABASE;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case PostgreSQLParser.RULE_createViewName: {
 | 
			
		||||
                    syntaxContextType = SyntaxContextType.VIEW_CREATE;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case PostgreSQLParser.RULE_viewName: {
 | 
			
		||||
                    syntaxContextType = SyntaxContextType.VIEW;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case PostgreSQLParser.RULE_createDatabaseName: {
 | 
			
		||||
                    syntaxContextType = SyntaxContextType.DATABASE_CREATE;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case PostgreSQLParser.RULE_databaseName: {
 | 
			
		||||
                    syntaxContextType = SyntaxContextType.DATABASE;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case PostgreSQLParser.RULE_createProcedureName: {
 | 
			
		||||
                    syntaxContextType = SyntaxContextType.PROCEDURE_CREATE;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                case PostgreSQLParser.RULE_procedureName: {
 | 
			
		||||
                    syntaxContextType = SyntaxContextType.PROCEDURE;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                default:
 | 
			
		||||
                    break;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (syntaxContextType) {
 | 
			
		||||
                originalSyntaxSuggestions.push({
 | 
			
		||||
                    syntaxContextType,
 | 
			
		||||
                    wordRanges: tokenRanges,
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (let candidate of candidates.tokens) {
 | 
			
		||||
            const symbolicName = this._parser.vocabulary.getSymbolicName(candidate[0]);
 | 
			
		||||
            const displayName = this._parser.vocabulary.getDisplayName(candidate[0]);
 | 
			
		||||
            if (symbolicName && symbolicName.startsWith('KW_')) {
 | 
			
		||||
                const keyword =
 | 
			
		||||
                    displayName.startsWith("'") && displayName.endsWith("'")
 | 
			
		||||
                        ? displayName.slice(1, -1)
 | 
			
		||||
                        : displayName;
 | 
			
		||||
                keywords.push(keyword);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return {
 | 
			
		||||
            syntax: [],
 | 
			
		||||
            keywords: [],
 | 
			
		||||
            syntax: originalSyntaxSuggestions,
 | 
			
		||||
            keywords,
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export class PgSqlSplitListener implements PostgreSQLParserListener {
 | 
			
		||||
    private _statementContext: ProgramContext[] = [];
 | 
			
		||||
 | 
			
		||||
    enterProgram = (ctx: ProgramContext) => {
 | 
			
		||||
        this._statementContext.push(ctx);
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    exitProgram = (ctx: ProgramContext) => {};
 | 
			
		||||
 | 
			
		||||
    get statementsContext() {
 | 
			
		||||
        return this._statementContext;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user