Re: psql: Greatly speed up "\d tablename" when not using regexes - Mailing list pgsql-hackers

From Greg Sabino Mullane
Subject Re: psql: Greatly speed up "\d tablename" when not using regexes
Date
Msg-id CAKAnmmK3Y=pv3ZimxmMT8RGBicBaJVfcmhh6u1rc5Y11kZhiFw@mail.gmail.com
Whole thread Raw
In response to [MASSMAIL]psql: Greatly speed up "\d tablename" when not using regexes  (Jelte Fennema-Nio <postgres@jeltef.nl>)
List pgsql-hackers
Patch looks good to me. Great idea overall, that forced regex has always bugged me.

+       char       *regexChars = "|*+?()[]{}.^$\\";

One super minor optimization is that we technically do not need to scan for ')' and ']'. If they appear without their partner, the query will fail anyway. :)
Cheers,
Greg

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Table AM Interface Enhancements
Next
From: Andres Freund
Date:
Subject: Re: Issue with the PRNG used by Postgres