GNU bug report logs -
#22596
25.1.50; Broken prompt-regexp for sql-postgres
Previous Next
Reported by: Steve <steve <at> sanityinc.com>
Date: Mon, 8 Feb 2016 07:43:02 UTC
Severity: normal
Tags: fixed, patch
Found in version 25.1.50
Fixed in version 26.1
Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Steve Purcell <steve <at> sanityinc.com> writes:
> Fixes issue 22596, whereby "_" is now not considered a word constituent
> character in sql-interactive-mode, so prompts like "foo_dev# " are not
> correctly detected. Rather than piggy-back on the symbol table, we
> explicitly match against alphanumeric chars or "_".
>
> In the general case, almost any characters are valid in a PostgreSQL
> database name, so we must choose between matching .reasonable. database
> names with a tight regexp, or matching all allowable names with a
> permissive regexp which would likely match all sorts of other buffer
> text. This commit follows the former approach.
[...]
> - :prompt-regexp "^\\w*=[#>] "
> + :prompt-regexp "^[[:alnum:]_]*=[#>] "
> :prompt-length 5
> - :prompt-cont-regexp "^\\w*[-(][#>] "
> + :prompt-cont-regexp "^[[:alnum:]_]*[-(][#>] "
This looks reasonable to me, but I'm not an SQL mode user, so I can't
really test it. Does anybody have an objection to this change?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 8 years and 174 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.