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 1wglaM-006NyG-0w for pgsql-docs@arkaria.postgresql.org; Mon, 06 Jul 2026 15:50:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wglaL-001YZj-0j for pgsql-docs@arkaria.postgresql.org; Mon, 06 Jul 2026 15:50:17 +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 1wglaK-001YZb-38 for pgsql-docs@lists.postgresql.org; Mon, 06 Jul 2026 15:50:17 +0000 Received: from mail-yx1-xb135.google.com ([2607:f8b0:4864:20::b135]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wglaI-000000025Kt-35IY for pgsql-docs@lists.postgresql.org; Mon, 06 Jul 2026 15:50:16 +0000 Received: by mail-yx1-xb135.google.com with SMTP id 956f58d0204a3-6649ffb1d01so5338682d50.1 for ; Mon, 06 Jul 2026 08:50:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1783353013; cv=none; d=google.com; s=arc-20260327; b=E/oIHMU5wB8ZjQNMZ21ZMqZUFM0RqJydnXsSXkeKzVHwdygqQyMttxBHjwAVZp++5r E7md20o+V4hC2EwupL49b+hVOcT1BfM7ZzNxYIbJISLUwWRaeWpNMkJQZg84aJG0AHAA s1u3VXO1ul/tnn753xa7NQMoicY9I5rCM253EXRDVm3jKWxzLXn8Aq/dUAViRD7buiyN O1OQwR51GS9tXSLOqB7398KwwfpbNMtsOsUbQGNc1PrHyNAUlyHx97zPhtiiZh9hL3bt culTMzgLxhnUkrNxoDwOG55R58iyjdkIJEJ4M47+XiNgMrsrHcs+Gvt6VoylMs7NWURF mRbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=KIEad94q8qlUOguyAUvuCOSnZ7ADjlXdMba/G/t39KI=; fh=5Fd1OXkg9/B/nRFHevga9u+f+PQPOgiH5Wb7n5WJjds=; b=UjhPkIl3OhUCyqhA7cZhr0ZTh3nCtsfAJe220a6k4WElpoCQ5PSb2i2rrP5gXX9xSu 6dnXZXNZ8QCbMcJ7rd0oXlTdrkEiIIbDA4ysTy2qiQvbyyS9nNO+gChSpfuf5pXyotDt Fk8vCXxYlcB07fPHMednUq82RFyRHZu1ERhxuRI56ZWOtzoRqv88fiW8TLD+POvTGA79 T+U5czVBip5mcoGE/GzRZiOgi+9CqcyqcibMOz9sLBx4ZnCa7HzoCMjxeARLw3En+4hm HomIS7Dld7ypkfz/pqZjehTUyKdz4Uh597ErTjjBe+ZxY7y2HfwegRoVjNWTlBb58Dlr c9CA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783353013; x=1783957813; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=KIEad94q8qlUOguyAUvuCOSnZ7ADjlXdMba/G/t39KI=; b=EiN1VLzJLbEbzPpiRvDIj5oHBXONLnbE7eM27UCowo8yRtgHGwha7edZuXk/MCLSMD 301E/l8Ll3p1apcXoymY4A4FudgQKjDW5bP0+HcyBddjVlqr+nmHNGoOx/r6IcdloqHm bIJ4MaQoHp+H0+O8usaMTGuO3d2VMOi6JYjw8GxoKOM1CVPs5ASS8Q9XU3wVpyNJC9Q2 91xtgNBkUEKCIqX221drKfIIz6Zgopgt9ACgqrUAsowQhp+RxswBrQMpKG8Eq7QeqrVe 8qalEfe+pcCjCxNzPGtSnpJ/kwr5b3IqiL+9q/y+qwH3T17cm6nj3pcCzghTWSfuwDIb 5xQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783353013; x=1783957813; h=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=KIEad94q8qlUOguyAUvuCOSnZ7ADjlXdMba/G/t39KI=; b=YTO9MXfv9G+LGr+CKwJE+dqeoS9JSI+JhmTl0t284+VpLGF2aGLPMF8yQw5WOPouIQ 7UZMMldOdX4pdVnjtpuqN6KcQY1Dgr2qqPaBd/lvOEI/tej8wrk/ZJpn/pVytFLf7WpA qRX6SgLzjZ+0lmMNvIk+agDsWr3XbpYqA+A1W+i6+kWKofMybaPoNQdR2B9O3KZ4X7Nq NwLk4WZ4D890/9FynDpRhp4YHhziOVdDlX2yQpvnD0ahNoxBe03CUSi0MAh2T/XB0lR+ KTroyvD5rk9GeH+JwAxD2NTNZHtJiGrJgKLNS/RMWbk7sTNKV4RZxtkP/tx0n3Qwp2Wq etTg== X-Forwarded-Encrypted: i=1; AHgh+RpfMGHoLKaN3pMjNiAlPV+5507qkZkS3LaHZhTb4XAcjJkfbom0C63RSg+ANYOB0DO8QOsQUf++Q3OR@lists.postgresql.org X-Gm-Message-State: AOJu0YzHSO5/eK+2qw7FeIDWduhQakRejYS/BPSV2TTF/2dQEa68mJ1Y BzIJ1moIL8nr8mFauA5rYKwgDCq85WYOljb89SqkPbeSN0JB+ky3bql9jrto7OflDpXf6GyH2uD Z0KnZvwoI9Oz4TiF9UTJtrCS+NSRukT8= X-Gm-Gg: AfdE7cmDLUTh5uwMFXSPCOvnyyW4fk08zVvucgYNFG2gmtfLiLdH0X8/zPDWdMKiaRh eGAef8Brvbhc97tr5KbESS/CqOiKCVBfQyxk2F2LPBLOIPhmLG45gclz8M9S6mxuyk4vOzJSZZ3 Tsd+HMsRvACXAVtYyBVLYzhxdaUbMcz30JVvIH0KLDqhiwnLbu9USmSgZo1oAYb1q/PY/Dy6xAo fDVfne4BIF0Ahrf5G7hpmOfKei2tPmj9kNVWLy3U0N67e+furzQoaqwFDZsdEuceWkHCemlwKRL 03U0OgQhmYrDOCEA10ACrzJI9t0Z X-Received: by 2002:a05:690e:4594:20b0:664:ba0b:a199 with SMTP id 956f58d0204a3-66780370430mr720619d50.5.1783353012783; Mon, 06 Jul 2026 08:50:12 -0700 (PDT) MIME-Version: 1.0 References: <178323411931.108997.17879075456450926050@wrigleys.postgresql.org> In-Reply-To: <178323411931.108997.17879075456450926050@wrigleys.postgresql.org> From: "David G. Johnston" Date: Mon, 6 Jul 2026 08:49:36 -0700 X-Gm-Features: AVVi8CdU7BojcfvO9j8MzQ90AEb2C6Eu5Iz2DxfPSv6NaoxfDlXDe5J6CBIuL2M Message-ID: Subject: Re: Index Only Scans with functions To: jb@jbitc.de, pgsql-docs@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000d60ed10655f33a4e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d60ed10655f33a4e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jul 6, 2026 at 8:44=E2=80=AFAM PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/18/indexes-index-only-scans.html > > and concludes that an index-only scan is not possible." > > I tried to reproduce the behavior, but it used the index (which is good): > You haven't demonstrated it using an index ONLY scan which is what that section is talking about. > QUERY PLAN > > -------------------------------------------------------------------------= ---------------------------------- > Index Scan using t_i1 on t (cost=3D0.42..8.69 rows=3D1 width=3D4) (actu= al > time=3D0.034..0.035 rows=3D1.00 loops=3D1) > > David J. --000000000000d60ed10655f33a4e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Jul 6, 2026 at 8:44= =E2=80=AFAM PG Doc comments form <noreply@postgresql.org> wrote:
The following documentation comment has been logged on the websi= te:

Page: https://www.postgresql.org/doc= s/18/indexes-index-only-scans.html
=C2=A0
and concludes that an index-= only scan is not possible."

I tried to reproduce the behavior, but it used the index (which is good):

You haven't demonstrated it using an i= ndex ONLY scan which is what that section is talking about.


=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 QUERY PLAN
---------------------------------------------------------------------------= --------------------------------
=C2=A0Index Scan using t_i1 on t=C2=A0 (cost=3D0.42..8.69 rows=3D1 width=3D= 4) (actual
time=3D0.034..0.035 rows=3D1.00 loops=3D1)
=C2=A0 =C2=A0=C2=A0

David J.

--000000000000d60ed10655f33a4e--