Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTQRV-0001bP-AV for pgadmin-hackers@arkaria.postgresql.org; Tue, 17 Jan 2017 09:52:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cTQRU-0006Bw-Nd for pgadmin-hackers@arkaria.postgresql.org; Tue, 17 Jan 2017 09:52:40 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cTQRT-0006Bn-QC for pgadmin-hackers@postgresql.org; Tue, 17 Jan 2017 09:52:40 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cTQRO-0005m3-NE for pgadmin-hackers@postgresql.org; Tue, 17 Jan 2017 09:52:38 +0000 Received: by mail-wm0-x22e.google.com with SMTP id r144so214078228wme.1 for ; Tue, 17 Jan 2017 01:52:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=R5PYc0jb29KDi8gvCyYx51ura11ABdbiqH2tjMpoGdA=; b=qgNsmfr8c11w0IxKOMm2BI1j2ti63A+CoSD6VLj/HaFGk0MqF70CcPrD/WfJ41yGR8 enfx16v/skX9qY+qSyNzE9ieFkKULsViXVruX5fNyoI+FIowR8d7y7S62ObfVWXIcrxn /pSKtdUy9Xps3Mg+6tZmthiL51W2c4WHAaTlhIvG6BhQ94Pgvy3bs7dNMvQX1w+M2+s0 rgvRxxmLwUq6rMRCm5wmLLOgGyX90H1uKSmHoWhIiFUWAOou+z9Cd9B0SC51vEmjaDUH JRwMf36She2zLNV0oB5DP4s4pPNPfSMj/LVaOmBbpNjJzj50CgCOYhEXliJWgbvQjF8A 1RNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=R5PYc0jb29KDi8gvCyYx51ura11ABdbiqH2tjMpoGdA=; b=YPNQO61ZgP8CfkLNhOih42luRdln+vFJr2I+SHs+zna0d5CQvCCWUWzV03R/IpukaD Js5e8PVzgCRfeAN/7R1XtkxAjPMezjLXC2mnKadShp1t1NGERHvQ/8qyy+LevacOOVw+ 2Eg2xIIK++dLi8M3ntvDOYALfZP8lhX2zK8yZBSMQXxedenJyamz8d/Jw6rAqKAoW8SF oA8pCD9qVxSMpysdvgKVuH15MfmUnVFupI9jOBCwKOsAGA/4VZtgfLbfrp1jmcBrG7K6 zgUFuSwh7aVkfvGONqnqif2bGM0CQVR+RFtfooRBtzJsnpKa6etl1oJH23DP7najLfbx GmTQ== X-Gm-Message-State: AIkVDXJqp3KFVGPyW/JVJzN6SINDqmZKxSLom8SARTP+OdA5nmJ2SDCnk1W52aAyGmCEe8MX6WQhJo0f0ED++AA7 X-Received: by 10.28.103.3 with SMTP id b3mr14791934wmc.24.1484646751738; Tue, 17 Jan 2017 01:52:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.10.18 with HTTP; Tue, 17 Jan 2017 01:52:01 -0800 (PST) In-Reply-To: References: From: Surinder Kumar Date: Tue, 17 Jan 2017 15:22:01 +0530 Message-ID: Subject: Re: [pgAdmin4][Patch]: RM1840 - cannot create gist index due to enforced ASC, DESC options in generated SQL To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=001a114a91b241351205464742d9 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --001a114a91b241351205464742d9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi On Tue, Jan 17, 2017 at 3:08 PM, Dave Page wrote: > Hi > > On Fri, Jan 13, 2017 at 6:50 AM, Surinder Kumar > wrote: > > Hi > > > > Please find updated patch following changes: > > 1) Keep field 'opclass' combo box enabled. > > That doesn't seem to be working. =E2=80=8BIs the field 'opclass' is not enabled for you?. Can you please tell in which scenario it doesn't gets enabled? so that I can fix it.=E2=80=8B > > > 2) Keep ASC/DESC and NULLs FIRST/LAST options disable for access method= s > > other than 'btree'. > > 3) Add validation for name field. > > Those bits do though :-) > > Please fix 1). > > Thanks! > > > On Fri, Nov 25, 2016 at 5:16 PM, Dave Page wrote: > >> > >> On Thu, Nov 24, 2016 at 12:13 PM, Surinder Kumar > >> wrote: > >> > Hi > >> > > >> > Please find updated patch with change. > >> > > >> > On Fri, Oct 21, 2016 at 9:16 PM, Dave Page wrote= : > >> >> > >> >> On Fri, Oct 21, 2016 at 4:42 PM, Surinder Kumar > >> >> wrote: > >> >> > On Fri, Oct 21, 2016 at 8:52 PM, Dave Page > wrote: > >> >> >> > >> >> >> Hi > >> >> >> > >> >> >> On Fri, Oct 21, 2016 at 4:16 PM, Surinder Kumar > >> >> >> wrote: > >> >> >> > Hi > >> >> >> > > >> >> >> > This fix is for exclusion constraint. > >> >> >> > The options like "order" and "nulls" must be conditional. i.e. > >> >> >> > include > >> >> >> > only > >> >> >> > when access method type is other than "gist". > >> >> >> > >> >> >> When creating an index, the asc/desc options are disabled if > >> >> >> gist/gin > >> >> >> used. I think they also should be here. > >> >> >> > >> >> >> Also, what about gin indexes in this case? > >> >> > > >> >> > As per documentation, > >> >> > The access method must support amgettuple (see Chapter 52); at > >> >> > present > >> >> > this > >> >> > means GIN cannot be used > >> >> > >> >> OK, but this patch (unlike the last one) only seems to check for > gist. > >> > > >> > I have modified the code so It will check for 'gist' and 'spgist' > >> > >> Hi, > >> > >> This still doesn't seem right to me. For example, if I choose an > >> access method that doesn't have a default operator class for the > >> selected data type, Postgres asks me to explicitly choose one, which I > >> now can't because the combo box is disabled. Conversely, whilst the > >> opclass should probably not be disabled, the ASC/DESC and NULLs > >> FIRST/LAST options probably should be disabled (right now, they're > >> just ignored). > >> > >> Thoughts? > >> > >> -- > >> Dave Page > >> Blog: http://pgsnake.blogspot.com > >> Twitter: @pgsnake > >> > >> EnterpriseDB UK: http://www.enterprisedb.com > >> The Enterprise PostgreSQL Company > > > > > > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > --001a114a91b241351205464742d9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi<= /div>
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
<su= rinder.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.
=E2=80=8BIs the field 'opclass'= is not enabled for you?.
Can you please tell in which scenario it doesn't gets enable= d? so that I can fix it.=E2=80=8B

> 2) Keep ASC/DESC and NULLs FIRST/LAST options disable for access metho= ds
> other than 'btree'.
> 3) Add validation for name field.

Those bits do though :-)

Please fix 1).

Thanks!

> On Fri, Nov 25, 2016 at 5:16 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> On Thu, Nov 24, 2016 at 12:13 PM, Surinder Kumar
>> <surinder.kumar@enterprisedb.com> wrote:
>> > Hi
>> >
>> > Please find updated patch with change.
>> >
>> > On Fri, Oct 21, 2016 at 9:16 PM, Dave Page <dpage@pgadmin.org> wrote: >> >>
>> >> On Fri, Oct 21, 2016 at 4:42 PM, Surinder Kumar
>> >> <surinder.kumar@enterprisedb.com> wrote:
>> >> > On Fri, Oct 21, 2016 at 8:52 PM, Dave Page <dpage@pgadmin.org>= wrote:
>> >> >>
>> >> >> Hi
>> >> >>
>> >> >> On Fri, Oct 21, 2016 at 4:16 PM, Surinder Kumar<= br> >> >> >> <surinder.kumar@enterprisedb.com> wrote= :
>> >> >> > Hi
>> >> >> >
>> >> >> > This fix is for exclusion constraint.
>> >> >> > The options like "order" and &quo= t;nulls" must be conditional. i.e.
>> >> >> > include
>> >> >> > only
>> >> >> > when access method type is other than "= ;gist".
>> >> >>
>> >> >> When creating an index, the asc/desc options are= disabled if
>> >> >> gist/gin
>> >> >> used. I think they also should be here.
>> >> >>
>> >> >> Also, what about gin indexes in this case?
>> >> >
>> >> > As per documentation,
>> >> > The access method must support amgettuple (see Chapt= er 52); at
>> >> > present
>> >> > this
>> >> > means GIN cannot be used
>> >>
>> >> OK, but this patch (unlike the last one) only seems to ch= eck for gist.
>> >
>> > I have modified the code so It will check for 'gist' = and 'spgist'
>>
>> Hi,
>>
>> This still doesn't seem right to me. For example, if I choose = an
>> access method that doesn't have a default operator class for t= he
>> selected data type, Postgres asks me to explicitly choose one, whi= ch I
>> now can't because the combo box is disabled. Conversely, whils= t the
>> opclass should probably not be disabled, the ASC/DESC and NULLs >> FIRST/LAST options probably should be disabled (right now, they= 9;re
>> just ignored).
>>
>> Thoughts?
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>



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

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

--001a114a91b241351205464742d9--