pgsql: Add tsearch tab completion support: * adds a few missing words

Поиск
Список
Период
Сортировка
От momjian@postgresql.org (Bruce Momjian)
Тема pgsql: Add tsearch tab completion support: * adds a few missing words
Дата
Msg-id 20070914042524.19593753DF9@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Add tsearch tab completion support:

* adds a few missing words to some commands (like adding GIN as a valid
index type or OWNED BY for ALTER SEQUENCE,...)

* support for ALTER TABLE foo ENABLE/DISABLE REPLICA TRIGGER/RULE

* autocomplete CREATE DATABASE foo TEMPLATE (mostly done to prevent
conflicts with the TEMPLATE keyword for text search)

* support for ALTER/CREATE/DROP TEXT SEARCH as well as COMMENT ON TEXT
SEARCH and the corresponding psql backslash commands.
This proved a little more difficult than expected due to the fact that
words_after_create[] is used for two purposes - one is to provide a list
of words that follow immediatly after CREATE (or DROP) and the other
purpose is to use it for autocompleting anywhere in the statement if the
word in that struct is found with a query.
Since TEXT SEARCH CONFIGURATION|DICTIONARY|TEMPLATE|PARSER results in 3
words instead of one (as all the other words in that list are) I added a
flag to the struct to tell create_command_generator() to skip that entry
 for autocompleting immediatly after CREATE which feels like a dirty
hack (but that holds true for a lot of code in tab-complete.c).


Stefan Kaltenbrunner

Modified Files:
--------------
    pgsql/src/bin/psql:
        tab-complete.c (r1.166 -> r1.167)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/tab-complete.c?r1=1.166&r2=1.167)

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

Предыдущее
От: momjian@postgresql.org (Bruce Momjian)
Дата:
Сообщение: pgsql: This is small patch fixes a spi example (PG_MODULE_MAGIC is
Следующее
От: momjian@postgresql.org (Bruce Momjian)
Дата:
Сообщение: pgsql: Update tsearch include location in example.