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

Поиск
Список
Период
Сортировка
От Kirill Reshke
Тема Re: psql: Greatly speed up "\d tablename" when not using regexes
Дата
Msg-id CALdSSPjTUo=L+qGYW5_zy+DNT+fGCxWQWEcbM6NDOauApn=TMg@mail.gmail.com
обсуждение исходный текст
Ответ на [MASSMAIL]psql: Greatly speed up "\d tablename" when not using regexes  (Jelte Fennema-Nio <postgres@jeltef.nl>)
Ответы Re: psql: Greatly speed up "\d tablename" when not using regexes  (Jelte Fennema-Nio <postgres@jeltef.nl>)
Список pgsql-hackers
Hi


> Regex matching is obviously unnecessary when we're looking for an exact
> match. This checks for this (common) case and starts using plain
> equality in that case.

+1

> + appendPQExpBuffer(buf, "(%s OPERATOR(pg_catalog.=) ", namevar);
> + appendStringLiteralConn(buf, &namebuf.data[2], conn);
> + appendPQExpBuffer(buf, "\n        OR %s OPERATOR(pg_catalog.=) ",
> +  altnamevar);
> + appendStringLiteralConn(buf, &namebuf.data[2], conn);
> + appendPQExpBufferStr(buf, ")\n");

Do we need to force Collaction here like in other branches?
if (PQserverVersion(conn) >= 120000)
   appendPQExpBufferStr(buf, " COLLATE pg_catalog.default");



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Issue with the PRNG used by Postgres
Следующее
От: Ranier Vilela
Дата:
Сообщение: Re: Fix resource leak (src/backend/libpq/be-secure-common.c)