Re: psql: Greatly speed up "\d tablename" when not using regexes

From: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql: Greatly speed up "\d tablename" when not using regexes
Date: 2024-04-10 18:36:57
Message-ID: CAGECzQT70CNxDm+ZWJXL_f_=Q0Sr04YtaUo9PZMmEmxPjHh+DA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 10 Apr 2024 at 20:21, Kirill Reshke <reshkekirill(at)gmail(dot)com> wrote:
> Do we need to force Collaction here like in other branches?
> if (PQserverVersion(conn) >= 120000)
> appendPQExpBufferStr(buf, " COLLATE pg_catalog.default");

According to the commit and codecomment that introduced the COLLATE,
it was specifically added for correct regex matching (e.g. \w). So I
don't think it's necessary, and I'm pretty sure adding it will cause
the index scan not to be used anymore.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kirill Reshke 2024-04-10 18:39:48 Re: psql: Greatly speed up "\d tablename" when not using regexes
Previous Message Daniel Gustafsson 2024-04-10 18:33:03 Re: Fix resource leak (src/backend/libpq/be-secure-common.c)