2022-09-20 11:43:28 -04:00
/*! `pgsql` grammar compiled for Highlight.js 11.6.0 */
( ( ) => { var E = ( ( ) => { "use strict" ; return E => {
2021-03-10 11:35:00 -05:00
const T = E . COMMENT ( "--" , "$" ) , N = "\\$([a-zA-Z_]?|[a-zA-Z_][a-zA-Z_0-9]*)\\$" , A = "BIGINT INT8 BIGSERIAL SERIAL8 BIT VARYING VARBIT BOOLEAN BOOL BOX BYTEA CHARACTER CHAR VARCHAR CIDR CIRCLE DATE DOUBLE PRECISION FLOAT8 FLOAT INET INTEGER INT INT4 INTERVAL JSON JSONB LINE LSEG|10 MACADDR MACADDR8 MONEY NUMERIC DEC DECIMAL PATH POINT POLYGON REAL FLOAT4 SMALLINT INT2 SMALLSERIAL|10 SERIAL2|10 SERIAL|10 SERIAL4|10 TEXT TIME ZONE TIMETZ|10 TIMESTAMP TIMESTAMPTZ|10 TSQUERY|10 TSVECTOR|10 TXID_SNAPSHOT|10 UUID XML NATIONAL NCHAR INT4RANGE|10 INT8RANGE|10 NUMRANGE|10 TSRANGE|10 TSTZRANGE|10 DATERANGE|10 ANYELEMENT ANYARRAY ANYNONARRAY ANYENUM ANYRANGE CSTRING INTERNAL RECORD PG_DDL_COMMAND VOID UNKNOWN OPAQUE REFCURSOR NAME OID REGPROC|10 REGPROCEDURE|10 REGOPER|10 REGOPERATOR|10 REGCLASS|10 REGTYPE|10 REGROLE|10 REGNAMESPACE|10 REGCONFIG|10 REGDICTIONARY|10 " , R = A . trim ( ) . split ( " " ) . map ( ( E => E . split ( "|" ) [ 0 ] ) ) . join ( "|" ) , I = " ARRAY _AGG AVG BIT _AND BIT _OR BOOL _AND BOOL _OR COUNT EVERY JSON _AGG JSONB _AGG JSON _OBJECT _AGG JSONB _OBJECT _AGG MAX MIN MODE STRING _AGG SUM XMLAGG CORR COVAR _POP COVAR _SAMP REGR _AVGX REGR _AVGY REGR _COUNT REGR _INTERCEPT REGR _R2 REGR _SLOPE REGR _SXX REGR _SXY REGR _SYY STDDEV STDDEV _POP STDDEV _SAMP VARIANCE VAR _POP VAR _SAMP PERCENTILE _CONT PERCENTILE _DISC ROW _NUMBER RANK DENSE _RANK PERCENT _RANK CUME _DIST NTILE LAG LEAD FIRST _VALUE LAST _VALUE NTH _VALUE NUM _NONNULLS NUM _NULLS ABS CBRT CEIL CEILING DEGREES DIV EXP FLOOR LN LOG MOD PI POWER RADIANS ROUND SCALE SIGN SQRT TRUNC WIDTH _BUCKET RANDOM SETSEED ACOS ACOSD ASIN ASIND ATAN ATAND ATAN2 ATAN2D COS COSD COT COTD SIN SIND TAN TAND BIT _LENGTH CHAR _LENGTH CHARACTER _LENGTH LOWER OCTET _LENGTH OVERLAY POSITION SUBSTRING TREAT TRIM UPPER ASCII BTRIM CHR CONCAT CONCAT _WS CONVERT CONVERT _FROM CONVERT _TO DECODE ENCODE INITCAP LEFT LENGTH LPAD LTRIM MD5 PARSE _IDENT PG _CLIENT _ENCODING QUOTE _IDENT | 10 QUOTE _LITERAL | 10 QUOTE _NULLABLE | 10 REGEXP _MATCH REGEXP _MATCHES REGEXP _REPLACE REGEXP _SPLIT _TO _ARRAY REGEXP _SPLIT _TO _TABLE REPEAT REPLACE REVERSE RIGHT RPAD RTRIM SPLIT _PART STRPOS SUBSTR TO _ASCII TO _HEX TRANSLATE OCTET _LENGTH GET _BIT GET _BYTE SET _BIT SET _BYTE TO _CHAR TO _DATE TO _NUMBER TO _TIMESTAMP AGE CLOCK _TIMESTAMP | 10 DATE _PART DATE _TRUNC ISFINITE JUSTIFY _DAYS JUSTIFY _HOURS JUSTIFY _INTERVAL MAKE _DATE MAKE _INTERVAL | 10 MAKE _TIME MAKE _TIMESTAMP | 10 MAKE _TIMESTAMPTZ | 10 NOW STATEMENT _TIMESTAMP | 10 TIMEOFDAY TRANSACTION _TIMESTAMP | 10 ENUM _FIRST ENUM _LAST ENUM _RANGE AREA CENTER DIAMETER HEIGHT ISCLOSED ISOPEN NPOINTS PCLOSE POPEN RADIUS WIDTH BOX BOUND _BOX CIRCLE LINE LSEG PATH POLYGON ABBREV BROADCAST HOST HOSTMASK MASKLEN NETMASK NETWORK SET _MASKLEN TEXT INET _SAME _FAMILY INET _MERGE MACADDR8 _SET7BIT ARRAY _TO _TSVECTOR GET _CURRENT _TS _CONFIG NUMNODE PLAINTO _TSQUERY PHRASETO _TSQUERY WEBSEARCH _TO _TSQUERY QUERYTREE SETWEIGHT STRIP TO _TSQUERY TO _TSVECTOR JSON _TO _TSVECTOR JSONB _TO _TSVECTOR TS _DELETE TS _FILTER TS _HEADLINE TS _RANK TS _RANK _CD TS _REWRITE TSQUERY _PHRASE TSVECTOR _TO _ARRAY TSVECTOR _UPDATE _TRIGGER TSVECTOR _UPDATE _TRIGGER _COLUMN XMLCOMMENT XMLCONCAT XMLELEMENT XMLFOREST XMLPI XMLROOT XMLEXISTS XML _IS _WELL _FORMED XML _IS _WELL _FORMED _DOCUMENT XML _IS _WELL _FORMED _CONTENT XPATH XPATH _EXISTS XMLTABLE XMLNAMESPACES TABLE _TO _XML TABLE _TO _XMLSCHEMA TABLE _TO _XML _AND _XMLSCHEMA QUERY _TO _XML QUERY _TO _XMLSCHEMA QUERY _TO _XML _AND _XMLSCHEMA CURSOR _TO _XML CURSOR _TO _XMLSCHEMA SCHEMA _TO _XML SCHEMA _TO _XMLSCHEMA SCHEMA _TO _XML _AND _XMLSCHEMA DATABASE _TO _XML DATABASE _TO _XMLSCHEMA DATABASE _TO _XML _AND _XMLSCHEMA XMLATTRIBUTES TO _JSON TO _JSONB ARRAY _TO _JSON ROW _TO _JSON JSON _BUILD _ARRAY JSONB _BUILD _ARRAY JSON _BUILD _OBJECT JSONB _BUILD _OBJECT JSON _OBJECT JSONB _OBJECT JSON _ARRAY _LENGTH JSONB _ARRAY _LENGTH JSON _EACH JSONB _EACH JSON _EACH _TEXT JSONB _EACH _TEXT JSON _EXTRACT _PATH JSONB _EXTRACT _PATH JSON _OBJECT _KEYS JSONB _OBJECT _KEYS JSON _POPULATE _RECORD JSONB _POPULATE _RECORD JSON _POPULATE _RECORDSET JSONB _POPULATE _RECORDSET JSON _ARRAY _ELEMENTS JSONB _ARRAY _ELEMENTS JSON _ARRAY _ELEMENTS _TEXT JSONB _ARRAY _ELEMENTS _TEXT JSON _TYPEOF JSONB _TYPEOF JSON _TO _RECORD JSONB _TO _RECORD JSON _TO _RECORDSET JSONB _TO _RECORDSET JSON _STRIP _NULLS JSONB _STRIP _NULL
2022-09-20 11:43:28 -04:00
; return { name : "PostgreSQL" , aliases : [ "postgres" , "postgresql" ] , supersetOf : "sql" ,
case _insensitive : ! 0 , keywords : {
2021-03-10 11:35:00 -05:00
keyword : "ABORT ALTER ANALYZE BEGIN CALL CHECKPOINT|10 CLOSE CLUSTER COMMENT COMMIT COPY CREATE DEALLOCATE DECLARE DELETE DISCARD DO DROP END EXECUTE EXPLAIN FETCH GRANT IMPORT INSERT LISTEN LOAD LOCK MOVE NOTIFY PREPARE REASSIGN|10 REFRESH REINDEX RELEASE RESET REVOKE ROLLBACK SAVEPOINT SECURITY SELECT SET SHOW START TRUNCATE UNLISTEN|10 UPDATE VACUUM|10 VALUES AGGREGATE COLLATION CONVERSION|10 DATABASE DEFAULT PRIVILEGES DOMAIN TRIGGER EXTENSION FOREIGN WRAPPER|10 TABLE FUNCTION GROUP LANGUAGE LARGE OBJECT MATERIALIZED VIEW OPERATOR CLASS FAMILY POLICY PUBLICATION|10 ROLE RULE SCHEMA SEQUENCE SERVER STATISTICS SUBSCRIPTION SYSTEM TABLESPACE CONFIGURATION DICTIONARY PARSER TEMPLATE TYPE USER MAPPING PREPARED ACCESS METHOD CAST AS TRANSFORM TRANSACTION OWNED TO INTO SESSION AUTHORIZATION INDEX PROCEDURE ASSERTION ALL ANALYSE AND ANY ARRAY ASC ASYMMETRIC|10 BOTH CASE CHECK COLLATE COLUMN CONCURRENTLY|10 CONSTRAINT CROSS DEFERRABLE RANGE DESC DISTINCT ELSE EXCEPT FOR FREEZE|10 FROM FULL HAVING ILIKE IN INITIALLY INNER INTERSECT IS ISNULL JOIN LATERAL LEADING LIKE LIMIT NATURAL NOT NOTNULL NULL OFFSET ON ONLY OR ORDER OUTER OVERLAPS PLACING PRIMARY REFERENCES RETURNING SIMILAR SOME SYMMETRIC TABLESAMPLE THEN TRAILING UNION UNIQUE USING VARIADIC|10 VERBOSE WHEN WHERE WINDOW WITH BY RETURNS INOUT OUT SETOF|10 IF STRICT CURRENT CONTINUE OWNER LOCATION OVER PARTITION WITHIN BETWEEN ESCAPE EXTERNAL INVOKER DEFINER WORK RENAME VERSION CONNECTION CONNECT TABLES TEMP TEMPORARY FUNCTIONS SEQUENCES TYPES SCHEMAS OPTION CASCADE RESTRICT ADD ADMIN EXISTS VALID VALIDATE ENABLE DISABLE REPLICA|10 ALWAYS PASSING COLUMNS PATH REF VALUE OVERRIDING IMMUTABLE STABLE VOLATILE BEFORE AFTER EACH ROW PROCEDURAL ROUTINE NO HANDLER VALIDATOR OPTIONS STORAGE OIDS|10 WITHOUT INHERIT DEPENDS CALLED INPUT LEAKPROOF|10 COST ROWS NOWAIT SEARCH UNTIL ENCRYPTED|10 PASSWORD CONFLICT|10 INSTEAD INHERITS CHARACTERISTICS WRITE CURSOR ALSO STATEMENT SHARE EXCLUSIVE INLINE ISOLATION REPEATABLE READ COMMITTED SERIALIZABLE UNCOMMITTED LOCAL GLOBAL SQL PROCEDURES RECURSIVE SNAPSHOT ROLLUP CUBE TRUSTED|10 INCLUDE FOLLOWING PRECEDING UNBOUNDED RANGE GROUPS UNENCRYPTED|10 SYSID FORMAT DELIMITER HEADER QUOTE ENCODING FILTER OFF FORCE_QUOTE FORCE_NOT_NULL FORCE_NULL COSTS BUFFERS TIMING SUMMARY DISABLE_PAGE_SKIPPING RESTART CYCLE GENERATED IDENTITY DEFERRED IMMEDIATE LEVEL LOGGED UNLOGGED OF NOTHING NONE EXCLUDE ATTRIBUTE USAGE ROUTINES TRUE FALSE NAN INFINITY ALIAS BEGIN CONSTANT DECLARE END EXCEPTION RETURN PERFORM|10 RAISE GET DIAGNOSTICS STACKED|10 FOREACH LOOP ELSIF EXIT WHILE REVERSE SLICE DEBUG LOG INFO NOTICE WARNING ASSERT OPEN SUPERUSER NOSUPERUSER CREATEDB NOCREATEDB CREATEROLE NOCREATEROLE INHERIT NOINHERIT LOGIN NOLOGIN REPLICATION NOREPLICATION BYPASSRLS NOBYPASSRLS " ,
built _in : " CURRENT _TIME CURRENT _TIMESTAMP CURRENT _USER CURRENT _CATALOG | 10 CURRENT _DATE LOCALTIME LOCALTIMESTAMP CURRENT _ROLE | 10 CURRENT _SCHEMA | 10 SESSION _USER PUBLIC FOUND NEW OLD TG _NAME | 10 TG _WHEN | 10 TG _LEVEL | 10 TG _OP | 10 TG _RELID | 10 TG _RELNAME | 10 TG _TABLE _NAME | 10 TG _TABLE _SCHEMA | 10 TG _NARGS | 10 TG _ARGV | 10 TG _EVENT | 10 TG _TAG | 10 ROW _COUNT RESULT _OID | 10 PG _CONTEXT | 10 RETURNED _SQLSTATE COLUMN _NAME CONSTRAINT _NAME PG _DATATYPE _NAME | 10 MESSAGE _TEXT TABLE _NAME SCHEMA _NAME PG _EXCEPTION _DETAIL | 10 PG _EXCEPTION _HINT | 10 PG _EXCEPTION _CONTEXT | 10 SQLSTATE SQLERRM | 10 SUCCESSFUL _COMPLETION WARNING DYNAMIC _RESULT _SETS _RETURNED IMPLICIT _ZERO _BIT _PADDING NULL _VALUE _ELIMINATED _IN _SET _FUNCTION PRIVILEGE _NOT _GRANTED PRIVILEGE _NOT _REVOKED STRING _DATA _RIGHT _TRUNCATION DEPRECATED _FEATURE NO _DATA NO _ADDITIONAL _DYNAMIC _RESULT _SETS _RETURNED SQL _STATEMENT _NOT _YET _COMPLETE CONNECTION _EXCEPTION CONNECTION _DOES _NOT _EXIST CONNECTION _FAILURE SQLCLIENT _UNABLE _TO _ESTABLISH _SQLCONNECTION SQLSERVER _REJECTED _ESTABLISHMENT _OF _SQLCONNECTION TRANSACTION _RESOLUTION _UNKNOWN PROTOCOL _VIOLATION TRIGGERED _ACTION _EXCEPTION FEATURE _NOT _SUPPORTED INVALID _TRANSACTION _INITIATION LOCATOR _EXCEPTION INVALID _LOCATOR _SPECIFICATION INVALID _GRANTOR INVALID _GRANT _OPERATION INVALID _ROLE _SPECIFICATION DIAGNOSTICS _EXCEPTION STACKED _DIAGNOSTICS _ACCESSED _WITHOUT _ACTIVE _HANDLER CASE _NOT _FOUND CARDINALITY _VIOLATION DATA _EXCEPTION ARRAY _SUBSCRIPT _ERROR CHARACTER _NOT _IN _REPERTOIRE DATETIME _FIELD _OVERFLOW DIVISION _BY _ZERO ERROR _IN _ASSIGNMENT ESCAPE _CHARACTER _CONFLICT INDICATOR _OVERFLOW INTERVAL _FIELD _OVERFLOW INVALID _ARGUMENT _FOR _LOGARITHM INVALID _ARGUMENT _FOR _NTILE _FUNCTION INVALID _ARGUMENT _FOR _NTH _VALUE _FUNCTION INVALID _ARGUMENT _FOR _POWER _FUNCTION INVALID _ARGUMENT _FOR _WIDTH _BUCKET _FUNCTION INVALID _CHARACTER _VALUE _FOR _CAST INVALID _DATETIME _FORMAT INVALID _ESCAPE _CHARACTER INVALID _ESCAPE _OCTET INVALID _ESCAPE _SEQUENCE NONSTANDARD _USE _OF _ESCAPE _CHARACTER INVALID _INDICATOR _PARAMETER _VALUE INVALID _PARAMETER _VALUE INVALID _REGULAR _EXPRESSION INVALID _ROW _COUNT _IN _LIMIT _CLAUSE INVALID _ROW _COUNT _IN _RESULT _OFFSET _CLAUSE INVALID _TABLESAMPLE _ARGUMENT INVALID _TABLESAMPLE _REPEAT INVALID _TIME _ZONE _DISPLACEMENT _VALUE INVALID _USE _OF _ESCAPE _CHARACTER MOST _SPECIFIC _TYPE _MISMATCH NULL _VALUE _NOT _ALLOWED NULL _VALUE _NO _INDICATOR _PARAMETER NUMERIC _VALUE _OUT _OF _RANGE SEQUENCE _GENERATOR _LIMIT _EXCEEDED STRING _DATA _LENGTH _MISMATCH STRING _DATA _RIGHT _TRUNCATION SUBSTRING _ERROR TRIM _ERROR UNTERMINATED _C _STRING ZERO _LENGTH _CHARACTER _STRING FLOATING _POINT _EXCEPTION INVALID _TEXT _REPRESENTATION INVALID _BINARY _REPRESENTATION BAD _COPY _FILE _FORMAT UNTRANSLATABLE _CHARACTER NOT _AN _XML _DOCUMENT INVALID _XML _DOCUMENT INVALID _XML _CONTENT INVALID _XML _COMMENT INVALID _XML _PROCESSING _INSTRUCTION INTEGRITY _CONSTRAINT _VIOLATION RESTRICT _VIOLATION NOT _NULL _VIOLATION FOREIGN _KEY _VIOLATION UNIQUE _VIOLATION CHECK _VIOLATION EXCLUSION _VIOLATION INVALID _CURSOR _STATE INVALID _TRANSACTION _STATE ACTIVE _SQL _TRANSACTION BRANCH _TRANSACTION _ALREADY _ACTIVE HELD _CURSOR _REQUIRES _SAME _ISOLATION _LEVEL INAPPROPRIATE _ACCESS _MODE _FOR _BRANCH _TRANSACTION INAPPROPRIATE _ISOLATION _LEVEL _FOR _BRANCH _TRANSACTION NO _ACTIVE _SQL _TRANSACTION _FOR _BRANCH _TRANSACTION READ _ONLY _SQL _TRANSACTION SCHEMA _AND _DATA _STATEMENT _MIXING _NOT _SUPPORTED NO _ACTIVE _SQL _TRANSACTION IN _FAILED _SQL _TRANSACTION IDLE _IN _TRANSACTION _SESSION _TIMEOUT INVALID _SQL _STATEMENT _NAME TRIGGERED _DATA _CHANGE _VIOLATION INVALID _AUTHORIZATION _SPECIFICATION INVALID _PASSWORD DEPENDENT _PRIVILEGE _DESCRIPTORS _STILL _EXIST DEPENDENT _OBJECTS _STILL _EXIST INVALID _TRANSACTION _TERMINATION SQL _ROUTINE _EXCEPTION FUNCTION _EXECUTED _NO _RETURN _STATEMENT MODIFYING _SQL _DATA _NOT _PERMITTED PROHIBITED _SQL _STATEMENT _ATTEMPTED READING _SQL _DATA _NOT _PERMITTED INVALID _CURSOR _NAME EXTERNAL _ROUTINE _EXCEPTION CONTAINING _SQL _NOT _PERMITTED MODIFYING _SQL _DATA _NOT _PERMITTED PROHIBITED _SQL _STATEMENT _ATTEMPTED READING _SQL _DATA _NOT _PERMITTED EXTERNAL _ROUTINE _INVOCATION _EXCEPTION INVALID _SQLSTATE _RETURNED NULL _VALUE _NOT _ALLOWED TRIGGER _PROTOCOL _VIOLATED SRF _PROTOCOL _VIOLATED EVENT _TRIGGER _PROTOCOL _VIOLATED SAVEPOINT _EXCEPTION INVALID _SAVEPOINT _SPECIFICAT
} , illegal : /:==|\W\s*\(\*|(^|\s)\$[a-z]|\{\{|[a-z]:\s*$|\.\.\.|TO:|DO:/ ,
contains : [ { className : "keyword" , variants : [ { begin : /\bTEXT\s*SEARCH\b/ } , {
begin : /\b(PRIMARY|FOREIGN|FOR(\s+NO)?)\s+KEY\b/ } , {
begin : /\bPARALLEL\s+(UNSAFE|RESTRICTED|SAFE)\b/ } , {
begin : /\bSTORAGE\s+(PLAIN|EXTERNAL|EXTENDED|MAIN)\b/ } , {
begin : /\bMATCH\s+(FULL|PARTIAL|SIMPLE)\b/ } , { begin : /\bNULLS\s+(FIRST|LAST)\b/ } , {
begin : /\bEVENT\s+TRIGGER\b/ } , { begin : /\b(MAPPING|OR)\s+REPLACE\b/ } , {
begin : /\b(FROM|TO)\s+(PROGRAM|STDIN|STDOUT)\b/ } , {
begin : /\b(SHARE|EXCLUSIVE)\s+MODE\b/ } , {
begin : /\b(LEFT|RIGHT)\s+(OUTER\s+)?JOIN\b/ } , {
begin : /\b(FETCH|MOVE)\s+(NEXT|PRIOR|FIRST|LAST|ABSOLUTE|RELATIVE|FORWARD|BACKWARD)\b/
} , { begin : /\bPRESERVE\s+ROWS\b/ } , { begin : /\bDISCARD\s+PLANS\b/ } , {
begin : /\bREFERENCING\s+(OLD|NEW)\b/ } , { begin : /\bSKIP\s+LOCKED\b/ } , {
begin : /\bGROUPING\s+SETS\b/ } , {
begin : /\b(BINARY|INSENSITIVE|SCROLL|NO\s+SCROLL)\s+(CURSOR|FOR)\b/ } , {
begin : /\b(WITH|WITHOUT)\s+HOLD\b/ } , {
begin : /\bWITH\s+(CASCADED|LOCAL)\s+CHECK\s+OPTION\b/ } , {
begin : /\bEXCLUDE\s+(TIES|NO\s+OTHERS)\b/ } , {
begin : /\bFORMAT\s+(TEXT|XML|JSON|YAML)\b/ } , {
begin : /\bSET\s+((SESSION|LOCAL)\s+)?NAMES\b/ } , { begin : /\bIS\s+(NOT\s+)?UNKNOWN\b/
} , { begin : /\bSECURITY\s+LABEL\b/ } , { begin : /\bSTANDALONE\s+(YES|NO|NO\s+VALUE)\b/
} , { begin : /\bWITH\s+(NO\s+)?DATA\b/ } , { begin : /\b(FOREIGN|SET)\s+DATA\b/ } , {
begin : /\bSET\s+(CATALOG|CONSTRAINTS)\b/ } , { begin : /\b(WITH|FOR)\s+ORDINALITY\b/ } , {
begin : /\bIS\s+(NOT\s+)?DOCUMENT\b/ } , {
begin : /\bXML\s+OPTION\s+(DOCUMENT|CONTENT)\b/ } , {
begin : /\b(STRIP|PRESERVE)\s+WHITESPACE\b/ } , {
begin : /\bNO\s+(ACTION|MAXVALUE|MINVALUE)\b/ } , {
begin : /\bPARTITION\s+BY\s+(RANGE|LIST|HASH)\b/ } , { begin : /\bAT\s+TIME\s+ZONE\b/ } , {
begin : /\bGRANTED\s+BY\b/ } , { begin : /\bRETURN\s+(QUERY|NEXT)\b/ } , {
begin : /\b(ATTACH|DETACH)\s+PARTITION\b/ } , {
begin : /\bFORCE\s+ROW\s+LEVEL\s+SECURITY\b/ } , {
begin : /\b(INCLUDING|EXCLUDING)\s+(COMMENTS|CONSTRAINTS|DEFAULTS|IDENTITY|INDEXES|STATISTICS|STORAGE|ALL)\b/
} , { begin : /\bAS\s+(ASSIGNMENT|IMPLICIT|PERMISSIVE|RESTRICTIVE|ENUM|RANGE)\b/ } ] } , {
begin : /\b(FORMAT|FAMILY|VERSION)\s*\(/ } , { begin : /\bINCLUDE\s*\(/ ,
keywords : "INCLUDE" } , { begin : /\bRANGE(?!\s*(BETWEEN|UNBOUNDED|CURRENT|[-0-9]+))/
} , {
begin : /\b(VERSION|OWNER|TEMPLATE|TABLESPACE|CONNECTION\s+LIMIT|PROCEDURE|RESTRICT|JOIN|PARSER|COPY|START|END|COLLATION|INPUT|ANALYZE|STORAGE|LIKE|DEFAULT|DELIMITER|ENCODING|COLUMN|CONSTRAINT|TABLE|SCHEMA)\s*=/
} , { begin : /\b(PG_\w+?|HAS_[A-Z_]+_PRIVILEGE)\b/ , relevance : 10 } , {
begin : /\bEXTRACT\s*\(/ , end : /\bFROM\b/ , returnEnd : ! 0 , keywords : {
type : "CENTURY DAY DECADE DOW DOY EPOCH HOUR ISODOW ISOYEAR MICROSECONDS MILLENNIUM MILLISECONDS MINUTE MONTH QUARTER SECOND TIMEZONE TIMEZONE_HOUR TIMEZONE_MINUTE WEEK YEAR"
} } , { begin : /\b(XMLELEMENT|XMLPI)\s*\(\s*NAME/ , keywords : { keyword : "NAME" } } , {
begin : /\b(XMLPARSE|XMLSERIALIZE)\s*\(\s*(DOCUMENT|CONTENT)/ , keywords : {
keyword : "DOCUMENT CONTENT" } } , { beginKeywords : "CACHE INCREMENT MAXVALUE MINVALUE" ,
end : E . C _NUMBER _RE , returnEnd : ! 0 , keywords : "BY CACHE INCREMENT MAXVALUE MINVALUE"
} , { className : "type" , begin : /\b(WITH|WITHOUT)\s+TIME\s+ZONE\b/ } , { className : "type" ,
begin : /\bINTERVAL\s+(YEAR|MONTH|DAY|HOUR|MINUTE|SECOND)(\s+TO\s+(MONTH|HOUR|MINUTE|SECOND))?\b/
} , {
begin : /\bRETURNS\s+(LANGUAGE_HANDLER|TRIGGER|EVENT_TRIGGER|FDW_HANDLER|INDEX_AM_HANDLER|TSM_HANDLER)\b/ ,
keywords : { keyword : "RETURNS" ,
type : "LANGUAGE_HANDLER TRIGGER EVENT_TRIGGER FDW_HANDLER INDEX_AM_HANDLER TSM_HANDLER"
} } , { begin : "\\b(" + I + ")\\s*\\(" } , { begin : "\\.(" + R + ")\\b" } , {
begin : "\\b(" + R + ")\\s+PATH\\b" , keywords : { keyword : "PATH" ,
type : A . replace ( "PATH " , "" ) } } , { className : "type" , begin : "\\b(" + R + ")\\b" } , {
className : "string" , begin : "'" , end : "'" , contains : [ { begin : "''" } ] } , {
className : "string" , begin : "(e|E|u&|U&)'" , end : "'" , contains : [ { begin : "\\\\." } ] ,
relevance : 10 } , E . END _SAME _AS _BEGIN ( { begin : N , end : N , contains : [ {
subLanguage : [ "pgsql" , "perl" , "python" , "tcl" , "r" , "lua" , "java" , "php" , "ruby" , "bash" , "scheme" , "xml" , "json" ] ,
endsWithParent : ! 0 } ] } ) , { begin : '"' , end : '"' , contains : [ { begin : '""' } ]
} , E . C _NUMBER _MODE , E . C _BLOCK _COMMENT _MODE , T , { className : "meta" , variants : [ {
begin : "%(ROW)?TYPE" , relevance : 10 } , { begin : "\\$\\d+" } , { begin : "^#\\w" , end : "$" } ] } , {
className : "symbol" , begin : "<<\\s*[a-zA-Z_][a-zA-Z_0-9$]*\\s*>>" , relevance : 10 } ] } }
2022-09-20 11:43:28 -04:00
} ) ( ) ; hljs . registerLanguage ( "pgsql" , E ) } ) ( ) ;