Skip to content

Commit 1f99886

Browse files
committed
Fix psql tab-completion for identifiers containing dollars.
Dollar ($) is a legit character for identifiers, except as the first character, since commit 1bd22f5 in version 7.4. Update the tab-completion code accordingly. Author: Mikhail Gribkov Reviewed-by: Vik Fearing Discussion: https://www.postgresql.org/message-id/CAMEv5_sTAvPvhye%2Bu4jkWDe5UGDiQ1ZkQomnKCboM08zDzOe%3Dg%40mail.gmail.com
1 parent c5b0582 commit 1f99886

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/psql/tab-complete.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
#endif
7777

7878
/* word break characters */
79-
#define WORD_BREAKS "\t\n@$><=;|&{() "
79+
#define WORD_BREAKS "\t\n@><=;|&{() "
8080

8181
/*
8282
* Since readline doesn't let us pass any state through to the tab completion
@@ -6061,7 +6061,7 @@ identifier_needs_quotes(const char *ident)
60616061
/* Check syntax. */
60626062
if (!((ident[0] >= 'a' && ident[0] <= 'z') || ident[0] == '_'))
60636063
return true;
6064-
if (strspn(ident, "abcdefghijklmnopqrstuvwxyz0123456789_") != strlen(ident))
6064+
if (strspn(ident, "abcdefghijklmnopqrstuvwxyz0123456789_$") != strlen(ident))
60656065
return true;
60666066

60676067
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy