pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: etulsky@gmail.com
Cc: pgsql-docs@postgresql.org
Subject: Re: Example for intersection operator is wrong
Date: Thu, 14 Jul 2016 13:36:54 -0400
Message-ID: <8266.1468517814@sss.pgh.pa.us> (raw)
In-Reply-To: <20160714162812.1425.65054@wrigleys.postgresql.org>
References: <20160714162812.1425.65054@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>

etulsky@gmail.com writes:
> The following documentation comment has been logged on the website:
> Page: https://www.postgresql.org/docs/9.2/static/functions-range.html
> Description:

> On the page https://www.postgresql.org/docs/9.2/static/functions-range.html
> it gives an example for the intersection of range (5,15) and range (10,20)
> as [10,15). But 10 isn&#39;t included in the second range; the actual output of
> this operator is [11,15).

Uh, no, it isn't:

regression=# select int8range(5,15) * int8range(10,20);
 ?column? 
----------
 [10,15)
(1 row)

You'd be correct if int8range(10,20) produced '(10,20)', but it produces
'[10,20)'.

			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: <8266.1468517814@sss.pgh.pa.us>
Permalink:  ../8266.1468517814@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8266.1468517814@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, etulsky@gmail.com
  Subject: Re: Example for intersection operator is wrong
  In-Reply-To: <8266.1468517814@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