Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vL2h9-001dmS-2x for pgsql-docs@arkaria.postgresql.org; Mon, 17 Nov 2025 17:07:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vL2h8-00166P-1L for pgsql-docs@arkaria.postgresql.org; Mon, 17 Nov 2025 17:07:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vL2h8-00166H-0D for pgsql-docs@lists.postgresql.org; Mon, 17 Nov 2025 17:07:14 +0000 Received: from mail-il1-x130.google.com ([2607:f8b0:4864:20::130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vL2h5-0001uB-36 for pgsql-docs@lists.postgresql.org; Mon, 17 Nov 2025 17:07:14 +0000 Received: by mail-il1-x130.google.com with SMTP id e9e14a558f8ab-4332381ba9bso35987505ab.1 for ; Mon, 17 Nov 2025 09:07:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=illuminatedcomputing-com.20230601.gappssmtp.com; s=20230601; t=1763399229; x=1764004029; darn=lists.postgresql.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nXtkvC5CUw21I80Qna15DSRDLCWMHpUyZEvy+KKHL6M=; b=pwi02eKrn2M8hxa82COYiAo62mkCsV1eDgyI+JWiWampF8L6eQ4ialJBrGpvs3stRI jh+FVp6Ki8KhiVv0KvnjzHgZoEApcytNzte3GNnpasPKyayanoKFoc4UMwJW8rPtCAL9 r10ekPuwL8IODvxVHYMzfC7YXSBwRc+rnKxized3h3ZsaA3Xr0dAf2ZuBPqFG68oGqGt AFJnDedSZVTAp8orKmG9Kxz3QXtMvZH67L3PtjiWrgB/PuQ5inhcoag6bF9Ax046oy3y YjkAC8BBMlkuEOruyeSYOjznsvHzE2EQptbFIIlLTk+TyuilRa7HVTEi+0RjvB/crTuh 4qzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763399229; x=1764004029; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=nXtkvC5CUw21I80Qna15DSRDLCWMHpUyZEvy+KKHL6M=; b=fw7FGzdOMLbM5dupjhsUw5DMGPURCiowHIwOo+LRXOeRJyn6pNrNvFg6iddXgCc44a VjCeoEF+QPVsFTAiAhNfu8I4LiBSqxq0a3us3AJs6UbTUnx7uFS3jCEzl54FT5u/drv/ p0fncNgx+EbbovKwcI4ureBiL8Le4am1LWt2mvNauU/bs9R8c/lyqcSKc4nxzDZhVoBg MEJUmW4V5yKNFRnZiNPkOLEzFFSpfRKpjwOolX5Sz/gl+ExgtbtdbiprwfCA4bM01An6 rwplqWmdpfx6pdpO1DS921oQ5q+zXvIEsN6GCM7eEjUap9t1asFPYQiyGbTjX9/ZQSH+ JxOA== X-Forwarded-Encrypted: i=1; AJvYcCWYSY6TKUXpK9LYCM3UXQY+OA3kY6YsiKXrTrJLJk3s2rOqqRfYQUzBXDZqluw+NGNYWpAQCHf0eJDC@lists.postgresql.org X-Gm-Message-State: AOJu0YybEbMAlkKvdBb5Tmk1B2XQ+O5UU4y9LGsFoFEmW2bT+uHaMOKT yncBkMPU7OYLgkszgsBn2sQ3geCLrjue09gyl49voZm8aPPZvL0P4d93gmw6PRZyBOv5O1HQppi GQ58tu6b8OMgGllCLO/YQ0PqZAsiVbRasFLYvapvNfg== X-Gm-Gg: ASbGnctMsgPMLHBuk2/0hnkKQAjog7fCU3IH7M82amKK2LggbB+l9aVf9g9HnjByMsI HWtp06OyL5XDToXRBSh7CfkE0gQkaafDUor4HGwZPWX1pRT08ZmNO+BLXWg2MCxbe9cuwaEPXuE NMIknWm704jyvHT7aSO/lLj3IyoUXDjfbijGKi47gUav+FIIlsrSQCd5Lo6/N7gU3V7RgxdrP+g y21BXZNgzAk10pnHuGou4+Fc6zDLkB3Wqd5tTM8drosq+2o717ysEXpRLCiSzHttaQfPsntAPya N0vwlf2ieR8wwwkg3Q== X-Google-Smtp-Source: AGHT+IF+viL67uYfgU8GYj9OloETN+pDv67KQOHVJwyWhH2Ae1jFKpNDiaWhAWKhV4De4VlER9DLbBt5wt4YVgMGtNo= X-Received: by 2002:a05:6e02:33a0:b0:433:3487:ea1d with SMTP id e9e14a558f8ab-4348c86dbfbmr182704695ab.7.1763399229248; Mon, 17 Nov 2025 09:07:09 -0800 (PST) MIME-Version: 1.0 References: <176338523296.768.15170481907256908191@wrigleys.postgresql.org> In-Reply-To: <176338523296.768.15170481907256908191@wrigleys.postgresql.org> From: Paul A Jungwirth Date: Mon, 17 Nov 2025 09:06:58 -0800 X-Gm-Features: AWmQ_bnKQGaq9U5A_PzzzaFHA1dk0HHSwm1ehwQ0EsyvKvIAhbfvSMKJbkSt20Y Message-ID: Subject: Re: Typo in range types documentation To: aine@deepminer.co.uk, pgsql-docs@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Nov 17, 2025 at 8:34=E2=80=AFAM PG Doc comments form wrote: > It looks to me as if there is an error in the sample associated with > documentation on date ranges on page: > https://www.postgresql.org/docs/current/rangetypes.html > If you scroll to the last few examples on the page, the values inserted a= re > in [) brackets rather than [] brackets. Do you mean the room_reservation table? A tsrange uses [) syntax, signifying closed/open endpoints. So it includes the start time but not the end time. This is the most common way to use ranges, since it lets adjacent ranges "lock together" without any overlap. You can input tsranges with whatever endpoints you like, but they will use [) syntax when they draw themselves. You can define new range types with different behavior though. See https://www.postgresql.org/docs/18/rangetypes.html#RANGETYPES-DISCRETE Yours, --=20 Paul ~{:-) pj@illuminatedcomputing.com