v001_fix_dollar_names_tab_complete.patch

application/octet-stream

Filename: v001_fix_dollar_names_tab_complete.patch
Type: application/octet-stream
Part: 0
Message: Fixing tab-complete for dollar-names

Patch

Format: unified
Series: patch v1
File+
src/bin/psql/tab-complete.c 2 2
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 677847e434..6de3a2a6af 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -76,7 +76,7 @@
 #endif
 
 /* word break characters */
-#define WORD_BREAKS		"\t\n@$><=;|&{() "
+#define WORD_BREAKS		"\t\n@><=;|&{() "
 
 /*
  * Since readline doesn't let us pass any state through to the tab completion
@@ -6030,7 +6030,7 @@ identifier_needs_quotes(const char *ident)
 	/* Check syntax. */
 	if (!((ident[0] >= 'a' && ident[0] <= 'z') || ident[0] == '_'))
 		return true;
-	if (strspn(ident, "abcdefghijklmnopqrstuvwxyz0123456789_") != strlen(ident))
+	if (strspn(ident, "abcdefghijklmnopqrstuvwxyz0123456789_$") != strlen(ident))
 		return true;
 
 	/*