pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Roy Tate <roy.l.tate@gmail.com>
Cc: pgsql-docs@postgresql.org
Subject: Re: Minor mistake in string functions docs - overlay
Date: Thu, 11 Dec 2014 21:10:41 -0500
Message-ID: <22820.1418350241@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+j5BiJc0k20mPH0-p5J4muCD-x7onVxmniorCPjhHzGd6A7JA@mail.gmail.com>
References: <CA+j5BiJc0k20mPH0-p5J4muCD-x7onVxmniorCPjhHzGd6A7JA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>

Roy Tate <roy.l.tate@gmail.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


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



view thread (2+ messages)

Message-ID: <22820.1418350241@sss.pgh.pa.us>
Permalink:  ../22820.1418350241@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22820.1418350241@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, roy.l.tate@gmail.com
  Subject: Re: Minor mistake in string functions docs - overlay
  In-Reply-To: <22820.1418350241@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox