From 48cd7f55dc0d41ca08226ad4da53ac3010bca768 Mon Sep 17 00:00:00 2001 From: John DeSoi Date: Sat, 21 Dec 2013 20:42:48 -0600 Subject: [PATCH] Updated keywords and functions for PostgreSQL 9.3. Added sub-mode support for JavaScript and Json. --- demo/kitchen-sink/docs/pgsql.pgsql | 22 +- lib/ace/mode/pgsql_highlight_rules.js | 567 ++++++++++++++------------ 2 files changed, 328 insertions(+), 261 deletions(-) diff --git a/demo/kitchen-sink/docs/pgsql.pgsql b/demo/kitchen-sink/docs/pgsql.pgsql index 67be9882..ef265cdc 100644 --- a/demo/kitchen-sink/docs/pgsql.pgsql +++ b/demo/kitchen-sink/docs/pgsql.pgsql @@ -41,8 +41,8 @@ SELECT city, temp_lo, temp_hi, prcp, "date", location /** * Dollar quotes starting at the end of the line are colored as SQL unless -* a special language tag is used. Pearl and Python are currently implemented -* but lots of others are possible. +* a special language tag is used. Dollar quote syntax coloring is implemented +* for Perl, Python, JavaScript, and Json. */ create or replace function blob_content_chunked( in p_data bytea, @@ -82,6 +82,24 @@ CREATE FUNCTION usesavedplan() RETURNS trigger AS $python$ SD["plan"] = plan $python$ LANGUAGE plpythonu; +-- pl/v8 (javascript) +CREATE FUNCTION plv8_test(keys text[], vals text[]) RETURNS text AS $javascript$ +var o = {}; +for(var i=0; i