Re: Minor mistake in string functions docs - overlay

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Roy Tate <roy(dot)l(dot)tate(at)gmail(dot)com>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: Minor mistake in string functions docs - overlay
Date: 2014-12-12 02:10:41
Message-ID: 22820.1418350241@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Roy Tate <roy(dot)l(dot)tate(at)gmail(dot)com> writes:
> I found a minor mistake in the documentation of string functions.
> http://www.postgresql.org/docs/9.4/static/functions-string.html

> In table 9-6 examples and results columns, look at the overlay function,
> which has 4 x characters, but overlays 3 characters. Please remove an x.

Really? The example works as stated for me:

regression=# select overlay('Txxxxas' placing 'hom' from 2 for 4);
overlay
---------
Thomas
(1 row)

Removing an 'x' would give

regression=# select overlay('Txxxas' placing 'hom' from 2 for 4);
overlay
---------
Thoms
(1 row)

I think the example is trying to point out that the replacement string
need not be the same length as what is replaced.

regards, tom lane

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Peter Eisentraut 2014-12-12 04:12:27 Re: Enhance 5.8. Inheritance
Previous Message Roy Tate 2014-12-11 15:51:28 Minor mistake in string functions docs - overlay