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

From: Kirill Reshke <reshkekirill(at)gmail(dot)com>
To: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
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:39:48
Message-ID: CALdSSPjcUmVLidTTb+CANyd2TEq0tkOCe=r+xYbuhpuOePKHag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 10 Apr 2024, 23:37 Jelte Fennema-Nio, <postgres(at)jeltef(dot)nl> wrote:

> 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.
>

Ok, thanks for the clarification. If all of this is actually true, and
patch is really does speedup, maybe we need to state this in the comments?

>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2024-04-10 18:54:46 Re: broken JIT support on Fedora 40
Previous Message Jelte Fennema-Nio 2024-04-10 18:36:57 Re: psql: Greatly speed up "\d tablename" when not using regexes