@@ -897,14 +897,16 @@ psql_completion(const char *text, int start, int end)
897897
898898static const char * const backslash_commands []= {
899899"\\a" ,"\\connect" ,"\\conninfo" ,"\\C" ,"\\cd" ,"\\copy" ,"\\copyright" ,
900- "\\d" ,"\\da" ,"\\db" ,"\\dc" ,"\\dC" ,"\\dd" ,"\\dD" ,"\\des" ,"\\det" ,"\\deu" ,"\\dew" ,"\\df" ,
900+ "\\d" ,"\\da" ,"\\db" ,"\\dc" ,"\\dC" ,"\\dd" ,"\\ddp" ,"\\dD" ,
901+ "\\des" ,"\\det" ,"\\deu" ,"\\dew" ,"\\dE" ,"\\df" ,
901902"\\dF" ,"\\dFd" ,"\\dFp" ,"\\dFt" ,"\\dg" ,"\\di" ,"\\dl" ,"\\dL" ,
902- "\\dn" ,"\\do" ,"\\dp" ,"\\drds" ,"\\ds" ,"\\dS" ,"\\dt" ,"\\dT" ,"\\dv" ,"\\du" ,"\\dx" ,
903+ "\\dm" ,"\\dn" ,"\\do" ,"\\dO" ,"\\dp" ,"\\drds" ,"\\ds" ,"\\dS" ,
904+ "\\dt" ,"\\dT" ,"\\dv" ,"\\du" ,"\\dx" ,"\\dy" ,
903905"\\e" ,"\\echo" ,"\\ef" ,"\\encoding" ,"\\ev" ,
904906"\\f" ,"\\g" ,"\\gset" ,"\\h" ,"\\help" ,"\\H" ,"\\i" ,"\\ir" ,"\\l" ,
905907"\\lo_import" ,"\\lo_export" ,"\\lo_list" ,"\\lo_unlink" ,
906908"\\o" ,"\\p" ,"\\password" ,"\\prompt" ,"\\pset" ,"\\q" ,"\\qecho" ,"\\r" ,
907- "\\set" ,"\\sf" ,"\\sv" ,"\\t" ,"\\T" ,
909+ "\\s" , "\\ set" , "\\setenv " ,"\\sf" ,"\\sv" ,"\\t" ,"\\T" ,
908910"\\timing" ,"\\unset" ,"\\x" ,"\\w" ,"\\watch" ,"\\z" ,"\\!" ,NULL
909911};
910912
@@ -3791,6 +3793,10 @@ psql_completion(const char *text, int start, int end)
37913793COMPLETE_WITH_QUERY (Query_for_list_of_extensions );
37923794else if (strncmp (prev_wd ,"\\dm" ,strlen ("\\dm" ))== 0 )
37933795COMPLETE_WITH_SCHEMA_QUERY (Query_for_list_of_matviews ,NULL );
3796+ else if (strncmp (prev_wd ,"\\dE" ,strlen ("\\dE" ))== 0 )
3797+ COMPLETE_WITH_SCHEMA_QUERY (Query_for_list_of_foreign_tables ,NULL );
3798+ else if (strncmp (prev_wd ,"\\dy" ,strlen ("\\dy" ))== 0 )
3799+ COMPLETE_WITH_QUERY (Query_for_list_of_event_triggers );
37943800
37953801/* must be at end of \d list */
37963802else if (strncmp (prev_wd ,"\\d" ,strlen ("\\d" ))== 0 )