[BUG] Index operator class + collation = bad SQL

Поиск
Список
Период
Сортировка
От Thom Brown
Тема [BUG] Index operator class + collation = bad SQL
Дата
Msg-id CAA-aLv6_gbV54MJ0iFRBjsKqeOLFH=Z7x=quBONHeurhPG8QLg@mail.gmail.com
обсуждение исходный текст
Ответы Re: [BUG] Index operator class + collation = bad SQL
Список pgadmin-hackers
Hi,

I noticed that when using PostgreSQL 9.1 and PgAdmin III 1.14 beta 2,
the operator class, sort order and whether nulls are first or last
appears before collation on a column when showing the index definition
in the SQL pane, but this is invalid syntax.

Test case:

CREATE TABLE dictionary (word text);

CREATE INDEX idx_test
  ON dictionary
  USING btree
  (word COLLATE pg_catalog."zh_CN.utf8" text_pattern_ops DESC NULLS LAST);

Look at the SQL pane for that index and it will produce the following
invalid syntax:

CREATE INDEX idx_test
  ON dictionary
  USING btree
  (word text_pattern_ops DESC NULLS LAST COLLATE pg_catalog."zh_CN.utf8");

Attached a patch to fix.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Вложения

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

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: [FEATURE] OIDs check box to enable OIDs
Следующее
От: Thom Brown
Дата:
Сообщение: Updated sequence syntax