Re: Slow tab completion w/ lots of tables

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Slow tab completion w/ lots of tables
Дата
Msg-id 20120821182352.GM1267@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Slow tab completion w/ lots of tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom,

* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Um, I don't believe we do any case-insensitive search now, do we?

No, I don't suppose we do..  I was thinking we ran quote_ident() on the
search-string side, but apparently we don't, meaning:

select * from TE<tab>

doesn't find 'test'.  I suppose it's alright to keep it that way.

> > We'd essentially do: LIKE 'xx%', and then run quote_ident() on the
> > result (I assume we can replace the whole word, right?).  I'd also
> > strip off any ", for the purposes of searching with tab-completion.
>
> I think you might be saying the same thing I said in my prior message,
> but not quite sure.

You added the distinction that we have to watch out for embedded quotes.
Otherwise, I believe we had the same approach, which is to strip off a
leading quote, if there is one, and then compare the raw string directly
to relname using: LIKE 'xxx%';  If there is an embedded quote, go back
to using quote_ident and matching the whole string.
Thanks,
    Stephen

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Slow tab completion w/ lots of tables
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: sha1, sha2 functions into core?