syntax: sql: add more missing keywords, like INNER and OUTER JOIN

Also, fold two other regexes together, for conciseness.
master
Benno Schulenberg 2021-12-02 16:35:41 +01:00
parent 41975265bf
commit 5dc48d54f2
1 changed files with 8 additions and 7 deletions

View File

@ -6,23 +6,24 @@ comment "-- "
# Types.
color green "\<(integer|int[248]|(big|small)?(int|serial)|decimal|numeric|real|double precision)\>"
color green "\<(bit( varying)?|boolean|bytea|enum|money|tsquery|tsvector|uuid|xml)\>"
color green "\<(char|varchar|character( varying)?|text)\>"
color green "\<(char|varchar|character( varying)?|text|cidr|inet|macaddr8?)\>"
color green "\<(date|interval|time(stamp)?( with(out)? time zone)?)\>"
color green "\<(box|circle|line|lseg|path|point|polygon)\>"
color green "\<(cidr|inet|macaddr8?)\>"
color green "\<(date|int[48]|num|ts|tstz)range\>"
# SQL keywords.
color lagoon "\<(ABORT|AGGREGATE|ALL|ALTER|ANALYZE|AND|ANY|AS|BEGIN|CAST|CHECKPOINT|CLOSE)\>"
color lagoon "\<(CLUSTER|COLLATION|COMMENT|COMMIT|CONSTRAINTS|CONVERSION|COPY|CREATE)\>"
color lagoon "\<(ABORT|AGGREGATE|ALL|ALTER|ANALYZE|AND|ANY|AS|BEGIN|BETWEEN|CAST|CHECKPOINT)\>"
color lagoon "\<(CLOSE|CLUSTER|COLLATION|COMMENT|COMMIT|CONSTRAINTS?|CONVERSION|COPY|CREATE)\>"
color lagoon "\<(DATABASE|DEALLOCATE|DECLARE|DEFAULT|DELETE|DISCARD|DISTINCT|DO|DOMAIN|DROP)\>"
color lagoon "\<(END|EXECUTE|EXISTS|EXPLAIN|EXTENSION|FETCH|FOREIGN (DATA WRAPPER|SCHEMA|TABLE))\>"
color lagoon "\<(FROM|FUNCTION|GRANT|GROUP|IN|INDEX|INSERT|INTO|LANGUAGE|LOAD|LOCK|MOVE)\>"
color lagoon "\<(NOT|NOTIFY|ONLY|OPERATOR( CLASS| FAMILY)?|OR|ORDER BY|PREPARED?|PRIVILEGES)\>"
color lagoon "\<(FROM|FUNCTION|GRANT|GROUP( BY)?|HAVING|IN|INDEX|INSERT|INTO)\>"
color lagoon "\<(NATURAL )?(INNER |OUTER |CROSS |(LEFT|RIGHT|FULL)( OUTER)? )?JOIN\>"
color lagoon "\<((PRIMARY|FOREIGN) KEY|LANGUAGE|LOAD|LOCK|MOVE|NOT|NOTIFY)\>"
color lagoon "\<(ON|ONLY|OPERATOR( CLASS| FAMILY)?|OR|ORDER BY|PREPARED?|PRIVILEGES)\>"
color lagoon "\<(RELEASE|RESET|RETURNING|REVOKE|ROLE|ROLLBACK|RULE|SAVEPOINT|SCHEMA)\>"
color lagoon "\<(SELECT|SEQUENCE|SERVER|SESSION AUTHORIZATION|SET|SHOW|START|SYSTEM)\>"
color lagoon "\<(TABLE(SPACE)?|TEXT SEARCH (CONFIGURATION|DICTIONARY|PARSER|TEMPLATE))\>"
color lagoon "\<(TO|TRANSACTION|(EVENT )?TRIGGER|TYPE|UPDATE|USER( MAPPING)?)\>"
color lagoon "\<(TO|TRANSACTION|(EVENT )?TRIGGER|TYPE|UPDATE|USER( MAPPING)?|USING)\>"
color lagoon "\<(VACUUM|VALUES|((REFRESH )?MATERIALIZED )?VIEW|WHERE|WITH)\>"
# Flow control.