Subject: doc bug: SELECT SUBSTRING example is missing keyword FROM

From: Arley Lewis <[email-masked]>
Date: Tue, 28 Apr 2009 11:34:37 -0700

Hello doc team,

There's a doc bug on
http://www.postgresql.org/docs/8.3/static/functions-matching.html.

Two "FROM"s are missing from this section. Where it now says:
-------------
SELECT SUBSTRING('XY1234Z', 'Y*([0-9]{1,3})');
Result: 123
SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
Result: 1
----------------

You should fix it to say:
-------------------
SELECT SUBSTRING('XY1234Z' FROM 'Y*([0-9]{1,3})');
Result: 123
SELECT SUBSTRING('XY1234Z' FROM 'Y*?([0-9]{1,3})');
Result: 1
----------------------

Thanks,
Arley Lewis
[email-masked]

---

From: Tom Lane <[email-masked]>
Date: Tue, 28 Apr 2009 17:46:46 -0400

> Two "FROM"s are missing from this section. Where it now says:

There is nothing wrong with these examples.

regression=# SELECT SUBSTRING('XY1234Z', 'Y*([0-9]{1,3})');
 substring 
-----------
 123
(1 row)

regression=# SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
 substring 
-----------
 1
(1 row)

			regards, tom lane