@ -1198,6 +1198,19 @@ Alter_procedure_options, "COST", "IMMUTABLE", "LEAKPROOF", "NOT LEAKPROOF", \
Alter_routine_options , " CALLED ON NULL INPUT " , " RETURNS NULL ON NULL INPUT " , \
Alter_routine_options , " CALLED ON NULL INPUT " , " RETURNS NULL ON NULL INPUT " , \
" STRICT " , " SUPPORT "
" STRICT " , " SUPPORT "
/* COPY options shared between FROM and TO */
# define Copy_common_options \
" DELIMITER " , " ENCODING " , " ESCAPE " , " FORMAT " , " HEADER " , " NULL " , " QUOTE "
/* COPY FROM options */
# define Copy_from_options \
Copy_common_options , " DEFAULT " , " FORCE_NOT_NULL " , " FORCE_NULL " , " FREEZE " , \
" LOG_VERBOSITY " , " ON_ERROR " , " REJECT_LIMIT "
/* COPY TO options */
# define Copy_to_options \
Copy_common_options , " FORCE_QUOTE "
/*
/*
* These object types were introduced later than our support cutoff of
* These object types were introduced later than our support cutoff of
* server version 9.2 . We use the VersionedQuery infrastructure so that
* server version 9.2 . We use the VersionedQuery infrastructure so that
@ -3299,23 +3312,24 @@ match_previous_words(int pattern_id,
else if ( Matches ( " COPY| \\ copy " , MatchAny , " FROM " , MatchAny ) )
else if ( Matches ( " COPY| \\ copy " , MatchAny , " FROM " , MatchAny ) )
COMPLETE_WITH ( " WITH ( " , " WHERE " ) ;
COMPLETE_WITH ( " WITH ( " , " WHERE " ) ;
/* Complete COPY <sth> FROM|TO filename WITH ( */
/* Complete COPY <sth> FROM filename WITH ( */
else if ( Matches ( " COPY| \\ copy " , MatchAny , " FROM|TO " , MatchAny , " WITH " , " ( " ) )
else if ( Matches ( " COPY| \\ copy " , MatchAny , " FROM " , MatchAny , " WITH " , " ( " ) )
COMPLETE_WITH ( " FORMAT " , " FREEZE " , " DELIMITER " , " NULL " ,
COMPLETE_WITH ( Copy_from_options ) ;
" HEADER " , " QUOTE " , " ESCAPE " , " FORCE_QUOTE " ,
" FORCE_NOT_NULL " , " FORCE_NULL " , " ENCODING " , " DEFAULT " ,
/* Complete COPY <sth> TO filename WITH ( */
" ON_ERROR " , " LOG_VERBOSITY " , " REJECT_LIMIT " ) ;
else if ( Matches ( " COPY| \\ copy " , MatchAny , " TO " , MatchAny , " WITH " , " ( " ) )
COMPLETE_WITH ( Copy_to_options ) ;
/* Complete COPY <sth> FROM|TO filename WITH (FORMAT */
/* Complete COPY <sth> FROM|TO filename WITH (FORMAT */
else if ( Matches ( " COPY| \\ copy " , MatchAny , " FROM|TO " , MatchAny , " WITH " , " ( " , " FORMAT " ) )
else if ( Matches ( " COPY| \\ copy " , MatchAny , " FROM|TO " , MatchAny , " WITH " , " ( " , " FORMAT " ) )
COMPLETE_WITH ( " binary " , " csv " , " text " ) ;
COMPLETE_WITH ( " binary " , " csv " , " text " ) ;
/* Complete COPY <sth> FROM filename WITH (ON_ERROR */
/* Complete COPY <sth> FROM filename WITH (ON_ERROR */
else if ( Matches ( " COPY| \\ copy " , MatchAny , " FROM|TO " , MatchAny , " WITH " , " ( " , " ON_ERROR " ) )
else if ( Matches ( " COPY| \\ copy " , MatchAny , " FROM " , MatchAny , " WITH " , " ( " , " ON_ERROR " ) )
COMPLETE_WITH ( " stop " , " ignore " ) ;
COMPLETE_WITH ( " stop " , " ignore " ) ;
/* Complete COPY <sth> FROM filename WITH (LOG_VERBOSITY */
/* Complete COPY <sth> FROM filename WITH (LOG_VERBOSITY */
else if ( Matches ( " COPY| \\ copy " , MatchAny , " FROM|TO " , MatchAny , " WITH " , " ( " , " LOG_VERBOSITY " ) )
else if ( Matches ( " COPY| \\ copy " , MatchAny , " FROM " , MatchAny , " WITH " , " ( " , " LOG_VERBOSITY " ) )
COMPLETE_WITH ( " silent " , " default " , " verbose " ) ;
COMPLETE_WITH ( " silent " , " default " , " verbose " ) ;
/* Complete COPY <sth> FROM <sth> WITH (<options>) */
/* Complete COPY <sth> FROM <sth> WITH (<options>) */