On Thu, Feb 07, 2019 at 10:10:32AM +0900, Michael Paquier wrote: > On Wed, Feb 06, 2019 at 03:41:20PM +0100, Daniel Gustafsson wrote: > > Correct. One could argue that the regex is still suboptimal since “COMMENT > > ON > > DATABASE postgres IS ;” will be matched as well, but there I think the > > tradeoff > > for readability wins. > > Okay, that looks like an improvement anyway, so committed after going > over the tests for similar problems, and there was one for CREATE > DATABASE and DROP ROLE. It is possible to have a regex which tells as > at least one non-whitespace character, but from what I can see these > don't really improve the readability.
Are you talking about \w+, or [^[:space:]]+, [^[:blank:]]+, or...? Best, David. -- David Fetter <david(at)fetter(dot)org> http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate