aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2023-09-19 19:26:29 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2023-09-19 19:26:29 +0300
commit1f998863b0bc6fc8ef3d971d9c6d2c29b52d8ba2 (patch)
treeb676f6143246928c6eaa00f160f48aadfb7c4a9c /src
parentc5b0582841a5785aaf20fa77b507f7041e119d68 (diff)
downloadpostgresql-1f998863b0bc6fc8ef3d971d9c6d2c29b52d8ba2.tar.gz
postgresql-1f998863b0bc6fc8ef3d971d9c6d2c29b52d8ba2.zip
Fix psql tab-completion for identifiers containing dollars.
Dollar ($) is a legit character for identifiers, except as the first character, since commit 1bd22f55cf 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
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/tab-complete.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 779fdc90cbc..d30d719a1f8 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
@@ -6061,7 +6061,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;
/*