diff --git a/syntax/pgsql.vim b/syntax/pgsql.vim index 35c01e6..9815642 100644 --- a/syntax/pgsql.vim +++ b/syntax/pgsql.vim @@ -29,11 +29,11 @@ syn keyword pgsqlKeyword abort alter after aggregate analyze and as alias add syn keyword pgsqlKeyword begin by before syn keyword pgsqlKeyword conversion cascade current_date current_time current_timestamp class close syn keyword pgsqlKeyword cluster checkpoint check comment -syn keyword pgsqlKeyword cast check commit column columns constraint create copy +syn keyword pgsqlKeyword cast check commit column columns constraint create syn keyword pgsqlKeyword database domain databases default delete distinct drop declare deallocate desc syn keyword pgsqlKeyword deferrable deferred defaults do diagnostics syn keyword pgsqlKeyword explain elsif end exists execute exclusion found exception except each exit extension -syn keyword pgsqlKeyword function foreign from full fetch force for +syn keyword pgsqlKeyword function foreign full fetch force for syn keyword pgsqlKeyword group grant global get syn keyword pgsqlKeyword having syn keyword pgsqlKeyword index into immutable inner initially immediate inherits instead insert in if intersect @@ -54,6 +54,8 @@ syn keyword pgsqlKeyword verbose view values vacuum volatile syn keyword pgsqlKeyword where " Use match instead of keyword to lower priority and allow data types bits to " match too +syn match pgsqlKeyword "\" +syn match pgsqlKeyword "\" syn match pgsqlKeyword "\" syn match pgsqlKeyword "\<\(row\)\?type\>" syn match pgsqlKeyword "\" @@ -189,6 +191,10 @@ syn region pgsqlOperator start="array\s*\[" end="\]" contains=ALL syn match pgsqlKeyword "\" " }}} +" Section: Copy {{{1 +syn region pgsqlCopy start="\= 508 || !exists("did_pgsql_syn_inits") HiLink pgsqlExtschema Special HiLink pgsqlTodo Todo HiLink pgsqlIdentifier Normal + HiLink pgsqlCopy Normal delcommand HiLink endif " }}} diff --git a/test/test.pgsql b/test/test.pgsql index e848560..f99beb3 100644 --- a/test/test.pgsql +++ b/test/test.pgsql @@ -110,11 +110,22 @@ any(x), any (x) all(x), all (x) array[10,20], array [10] - -- false positive constant not null +-- Copy support +copy django_content_type (id, app_label, model) from stdin +with (format csv); +1,admin,logentry +2,auth,permission +3,auth,group +4,auth,user +5,contenttypes,contenttype +6,sessions,session +\. + + -- Identifiers a_table_or_field "a table or field too"