Obsolete advocacy for E-style strings in regexp documentation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-docs(at)postgreSQL(dot)org
Subject: Obsolete advocacy for E-style strings in regexp documentation
Date: 2015-10-31 03:40:23
Message-ID: 18813.1446262823@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

func.sgml has this bit near line 4660:

<note>
<para>
Keep in mind that an escape's leading <literal>\</> will need to be
doubled when entering the pattern as an SQL string constant. For example:
<programlisting>
'123' ~ E'^\\d{3}' <lineannotation>true</lineannotation>
</programlisting>
</para>
</note>

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 <note> 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

Browse pgsql-docs by date

  From Date Subject
Next Message Craig Ringer 2015-11-02 01:58:33 Docs patch for REFRESH MATERIALIZED VIEW lock level
Previous Message Alexander Lakhin 2015-10-30 13:40:53 Re: Moving documentation to XML