Re: [BUG] Index operator class + collation = bad SQL

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Thom Brown <thom(at)linux(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [BUG] Index operator class + collation = bad SQL
Date: 2011-07-04 19:53:03
Message-ID: 1309809183.2202.0.camel@laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Sun, 2011-07-03 at 15:10 +0100, Thom Brown wrote:
> 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.
>

You're right. Thanks for your patch. It's now available.

--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2011-07-04 21:23:47 Re: Fwd: Discussion - Search Objects
Previous Message Guillaume Lelarge 2011-07-04 19:52:26 pgAdmin III commit: Fix SQL when creating index with collation and oper