! Syntax highlighting patterns for PostgreSQL
!
! INSTALLATION
!
! Load this pattern by starting nedit with:
!
!       nedit -import <name of this file>
!
! Then, check that the patterns were loaded correctly, and choose Save Defaults
! from the Preferences menu.  The new patterns will now be incorporated into
! your own .nedit file, so the next time you start NEdit, you will no longer
! need to use -import.
!
! These comments will not appear in your ~/.nedit
!
nedit.highlightPatterns: PostgreSQL:1:0{\n\
		multi-line comment:"/\\*":"\\*/"::Comment::\n\
		one-line comment:"--":"$"::Comment::\n\
		types:"<(CHAR|CHARACTER|DECIMAL|FLOAT|VARCHAR|BIT|DEC|NCHAR|FLOAT|NCHAR|VARCHAR|BOOLEAN|DOUBLE|FLOAT|INT|INTEGER|INTERVAL|REAL|SMALLINT|DATETIME|TIMESPAN|DATE|SERIAL|BOOL|BOX|CHAR|CIDR|CIRCLE|DATE|DECIMAL|FLOAT4|FLOAT8|INET|INT2|INT4|INT8|INTERVAL|LINE|LSEG|MONEY|NUMERIC|PATH|POINT|POLYGON|SERIAL|TIME|TIMETZ|TIMESTAMP|VARCHAR|NAME|TEXT)>":::Storage Type::\n\
		semi-reserved keywords:"<(ABORT|ANALYZE|BINARY|CLUSTER|CONSTRAINT|COPY|DO|EXPLAIN|EXTEND|LISTEN|LOAD|LOCK|MOVE|NEW|NONE|NOTIFY|OFFSET|RESET|SETOF|SHOW|UNLISTEN|UNTIL|VACUUM|VERBOSE)>":::Keyword::\n\
		semi-reserved keywords 2:"<(ALL|ANY|ASC|BETWEEN|BOTH|CASE|CAST|CHECK|COALESCE|COLLATE|COLUMN|CONSTRAINT|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|DEFAULT|DESC|DISTINCT|ELSE|END|EXCEPT|EXISTS|EXTRACT|FALSE|FOR|FOREIGN|FROM|FULL|GLOBAL|GROUP|HAVING|IN|INNER|INTERSECT|INTO|IS|JOIN|LEADING|LEFT|LIKE|LOCAL|NATURAL|NOT|NULL|NULLIF|ON|OR|ORDER|OUTER|OVERLAPS|POSITION|PRECISION|PRIMARY|PUBLIC|REFERENCES|RIGHT|SELECT|SESSION_USER|SOME|SUBSTRING|TABLE|THEN|TO|TRANSACTION|TRIM|TRUE|UNION|UNIQUE|USER|WHEN|WHERE)>":::Keyword::\n\
		reserved keywords:"<(ADD|ALTER|AND|AS|BEGIN|BY|CASCADE|CLOSE|COMMIT|CREATE|CURSOR|DECLARE|DEFAULT|DELETE|DESC|DISTINCT|DROP|EXECUTE|EXISTS|EXTRACT|FETCH|FOR|FROM|FULL|GRANT|HAVING|IN|INNER|INSERT|INTO|IS|JOIN|LEADING|LEFT|LIKE|LOCAL|NAMES|NATIONAL|NATURAL|NO|NOT|NULL|ON|OR|OUTER|PARTIAL|PRIMARY|PRIVILEGES|PROCEDURE|PUBLIC|REFERENCES|REVOKE|RIGHT|ROLLBACK|SELECT|SET|SUBSTRING|TO|TRAILING|TRIM|UNION|UNIQUE|UPDATE|USING|VALUES|VARYING|VIEW|WHERE|WITH|WORK)>":::Keyword::\n\
		future-reserved keywords:"<(ALLOCATE|ARE|ASSERTION|AT|AUTHORIZATION|AVG|BIT_LENGTH|CASCADED|CATALOG|CHAR_LENGTH|CHARACTER_LENGTH|COLLATION|CONNECT|CONNECTION|CONTINUE|CONVERT|CORRESPONDING|COUNT|CURRENT_SESSION|DEALLOCATE|DESCRIBE|DESCRIPTOR|DIAGNOSTICS|DISCONNECT|DOMAIN|ESCAPE|EXCEPT|EXCEPTION|EXEC|EXTERNAL|FIRST|FOUND|GET|GO|GOTO|IDENTITY|INDICATOR|INPUT|INTERSECT|LAST|LOWER|MAX|MIN|MODULE|OCTET_LENGTH|OPEN|OUTPUT|OVERLAPS|PREPARE|PRESERVE|ROWS|SCHEMA|SECTION|SESSION|SIZE|SOME|SQL|SQLCODE|SQLERROR|SQLSTATE|SUM|SYSTEM_USER|TEMPORARY|TRANSLATE|TRANSLATION|UNKNOWN|UPPER|USAGE|VALUE|WHENEVER|WRITE)>":::Keyword::\n\
		non-reserved keywords:"<(ACCESS|AFTER|AGGREGATE|BACKWARD|BEFORE|CACHE|COMMENT|CREATEDB|CREATEUSER|CYCLE|DATABASE|DELIMITERS|EACH|ENCODING|EXCLUSIVE|FORCE|FORWARD|FUNCTION|HANDLER|INCREMENT|INDEX|INHERITS|INSENSITIVE|INSTEAD|ISNULL|LANCOMPILER|LOCATION|MAXVALUE|MINVALUE|MODE|NOCREATEDB|NOCREATEUSER|NOTHING|NOTIFY|NOTNULL|OIDS|OPERATOR|PASSWORD|PROCEDURAL|RECIPE|REINDEX|RENAME|RETURNS|ROW|RULE|SEQUENCE|SHARE|START|STATEMENT|STDIN|STDOUT|TEMP|TRUSTED|UNLISTEN|UNTIL|VALID|VERSION)>":::Keyword::\n\
		non-reserved keywords 2:"<(ABSOLUTE|ACTION|CONSTRAINTS|DAY|DEFERRABLE|DEFERRED|HOUR|IMMEDIATE|INITIALLY|INSENSITIVE|ISOLATION|KEY|LANGUAGE|LEVEL|MATCH|MINUTE|MONTH|NEXT|OF|ONLY|OPTION|PENDANT|PRIOR|PRIVILEGES|READ|RELATIVE|RESTRICT|SCROLL|SECOND|TIMEZONE_HOUR|TIMEZONE_MINUTE|TRIGGER|YEAR|ZONE)>":::Keyword::\n\
		non-reserved keywords 3:"<(COMMITTED|SERIALIZABLE|TYPE)>":::Keyword::\n\
		floating point constant:"<(-?\\d*\\.\\d*(e[+-]?\\d+)?)>":::Numeric Const::\n\
		integer constant:"<(-?\\d+)>":::Numeric Const::\n\
		quoted sql name:"<(""(\\\\.|[^""\\\\])*"")>":::Storage Type::\n\
		string constant:"<(')(\\\\.|[^'\\\\]|'')*(')>":::String::\n\
		string constant quotes:"\\1\\3":""::Keyword:string constant:C\n\
		statement terminator:";":::Keyword::\n\
		parens and braces:"[][()]":::Keyword::\n\
		standard functions:"<(abs|degrees|exp|ln|log|pi|pow|radians|round|sqrt|cbrt|trunc|float|float4|integer|acos|asin|atan|atan2|cos|cot|sin|tan|abstime|age|date_part|date_trunc|interval|isfinite|reltime|timestamp|to_char|area|box|center|diameter|height|isclosed|isopen|length|pclose|npoint|popen|radius|width|circle|lseg|path|point|polygon|isoldpath|revertpoly|upgradepath|upgradepoly|broadcast|host|masklen|netmask|nextval|currval)[ \\t]*(\\()":::Plain::\n\
		standard functs fname hl:"\\1":""::Subroutine:standard functions:C\n\
		standard funcs parens hl:"\\2":""::Keyword:standard functions:C\n\
		sql name:"<([a-zA-Z_][a-zA-Z0-9_]*)>":::Identifier1::\n\
		operators:">[<=>|!~*%+/:@^#&?,.-]<":::Keyword::\n\
		anything else:".":::Flag::\n\
	}
nedit.languageModes:	PostgreSQL:.sql:::::2:".,/\\`'!|@#%^&*()-=+{}[]"":;<>?~"
