Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM1840 - cannot create gistindex due to enforced ASC, DESC options in generated SQL - Mailing list pgadmin-hackers

From Dave Page
Subject Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM1840 - cannot create gistindex due to enforced ASC, DESC options in generated SQL
Date
Msg-id CA+OCxowyX+RkvqiEQZ0BNn=iTUnyDTF3XXixEGnhsU8SwaTVCA@mail.gmail.com
Whole thread Raw
In response to Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM1840 - cannot create gistindex due to enforced ASC, DESC options in generated SQL  (Surinder Kumar <surinder.kumar@enterprisedb.com>)
Responses Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM1840 - cannot create gistindex due to enforced ASC, DESC options in generated SQL  (Surinder Kumar <surinder.kumar@enterprisedb.com>)
List pgadmin-hackers
Hi

On Tue, Jan 17, 2017 at 9:52 AM, Surinder Kumar
<surinder.kumar@enterprisedb.com> wrote:
> Hi
> On Tue, Jan 17, 2017 at 3:08 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi
>>
>> On Fri, Jan 13, 2017 at 6:50 AM, Surinder Kumar
>> <surinder.kumar@enterprisedb.com> wrote:
>> > Hi
>> >
>> > Please find updated patch following changes:
>> > 1) Keep field 'opclass' combo box enabled.
>>
>> That doesn't seem to be working.
>
> Is the field 'opclass' is not enabled for you?.

No.

> Can you please tell in which scenario it doesn't gets enabled? so that I can
> fix it.

PostgreSQL 9.4, table:

CREATE TABLE public.foo
(
    id text COLLATE pg_catalog."default" NOT NULL,
    data1 text COLLATE pg_catalog."default",
    CONSTRAINT foo_pkey1 PRIMARY KEY (id),
    CONSTRAINT gerp1 UNIQUE (id, data1)
)

1) Right-click, Create index

2) Name: xxxx

3) Access method: gist

4) Add column. Select id (note the opclass field is not enabled)

5) Add column. Select data1 (note the opclass field is not enabled).

6) Click save, and behold the following error in all it's glory :-)

ERROR: data type text has no default operator class for access method "gist"
HINT: You must specify an operator class for the index or define a
default operator class for the data type.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

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


pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: [pgadmin-hackers] Re: PATCH: RM# 1679 - Background process for "restore" not reportingstatus back to pgAdmin
Next
From: Fahar Abbas
Date:
Subject: [pgadmin-hackers] Re: PATCH: RM# 1679 - Background process for "restore" not reportingstatus back to pgAdmin