Obsolete advocacy for E-style strings in regexp documentation
Obsolete advocacy for E-style strings in regexp documentation
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
func.sgml has this bit near line 4660:
Keep in mind that an escape's leading \</> will need to be
doubled when entering the pattern as an SQL string constant. For example:
'123' ~ E'^\\d{3}' true
This advice was surely helpful when it was written, but nowadays it's just
advocating use of gratuitously non-SQL-standard string literal syntax.
I propose just deleting the whole in HEAD, and maybe 9.5 too.
A more aggressive approach would be to get rid of use of E-style literals
in all/most of the documentation examples. I'm *not* advocating that,
at least not yet. But this particular bit seems to be going out of its
way to give obsolete advice.
Thoughts?
regards, tom lane