doc bug: SELECT SUBSTRING example is missing keyword FROM

Started by Arley Lewisalmost 17 years ago2 messagesdocs
Jump to latest
#1Arley Lewis
arleylewis@gmail.com

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
arleylewis@gmail.com

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Arley Lewis (#1)
Re: doc bug: SELECT SUBSTRING example is missing keyword FROM

Arley Lewis <arleylewis@gmail.com> writes:

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

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