mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
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
This commit is contained in:
parent
c5b0582841
commit
1f998863b0
@ -76,7 +76,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* word break characters */
|
/* 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
|
* 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. */
|
/* Check syntax. */
|
||||||
if (!((ident[0] >= 'a' && ident[0] <= 'z') || ident[0] == '_'))
|
if (!((ident[0] >= 'a' && ident[0] <= 'z') || ident[0] == '_'))
|
||||||
return true;
|
return true;
|
||||||
if (strspn(ident, "abcdefghijklmnopqrstuvwxyz0123456789_") != strlen(ident))
|
if (strspn(ident, "abcdefghijklmnopqrstuvwxyz0123456789_$") != strlen(ident))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user