Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cAExt-0003lr-9v for pgadmin-hackers@arkaria.postgresql.org; Fri, 25 Nov 2016 11:46:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cAExs-0006br-8l for pgadmin-hackers@arkaria.postgresql.org; Fri, 25 Nov 2016 11:46:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cAExq-0006bi-O4 for pgadmin-hackers@postgresql.org; Fri, 25 Nov 2016 11:46:46 +0000 Received: from mail-qk0-x235.google.com ([2607:f8b0:400d:c09::235]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cAExk-0007ap-Jd for pgadmin-hackers@postgresql.org; Fri, 25 Nov 2016 11:46:45 +0000 Received: by mail-qk0-x235.google.com with SMTP id n21so75688958qka.3 for ; Fri, 25 Nov 2016 03:46:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dQRAzh2E2FRMSv0Rj0z2F5MDwFPFk/sMfMul04E6x1M=; b=hz3eTXclEUjxHgJWu35Xu8GAnbedTAzJTqaX8kaizp6lKaAA+NfurQof5PkMo+v7z4 7YO8+K1Fg7oIIDLpvwAi92u3jGvAy871mFpmlFGPGKDoreBe3VgV0X3zH8h+UIHqbUaB /KNOrKCFpfiHjXUAoTvFKF1yyTW4Kw1GsotYSnPx+U1exBrQ6s4UXNecLE3eaeWmkplp NS9xypbDm537UMI8JZ/EQSwO7R4Gw7NlAZyHUWsZX00IBvkpj8S0NKxT4q5NNOsUALSa ga8KiJFmv1hXxLq4dypoMVD4A9A55oTwbG2jFu0CEypkh3jfpvc4kO+N2nqfy77rsjdw tOzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dQRAzh2E2FRMSv0Rj0z2F5MDwFPFk/sMfMul04E6x1M=; b=ihNqza9PbRxp/U+iDuLu9Rm4QWSe/OaBXXOF2WCNzVstDpgQ46HHFwZDwdWRfXZsxQ xgJvSN+P34B3Z2JvsTn0BwCKJOxgtaqvv17opeJnmYAh/H1BnlwDJ9G/BBz4vwUqM52w 0aAOo92EZrCBCZMpWMWnjnZvfctBVaX2f25IE4sGjcFtYGF+F7dxI/DieWx3whEH408o Y/PJx4gVEw6mbnVPN/3Lq23bff3HVl2aXcaMZS1wYQ5Np30nw712oG2+mZX6aD1nJ0cU 1hRk2iRKaQ+dcFdTlMpWO3EeYYs2io4bcqk86SIiRfZsRl3i9VuUxMTY4TpSjPM4QbJF nPjg== X-Gm-Message-State: AKaTC035sFveGLDoEWHdZwVl3/3/M2NsDWRi0sxIBkAslrOLii9CIwflB1sYTw8oPJCpvBaK3LHaznHLXhbZ1g== X-Received: by 10.55.160.194 with SMTP id j185mr6184997qke.315.1480074398950; Fri, 25 Nov 2016 03:46:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.55.200.1 with HTTP; Fri, 25 Nov 2016 03:46:38 -0800 (PST) In-Reply-To: References: From: Dave Page Date: Fri, 25 Nov 2016 11:46:38 +0000 Message-ID: Subject: Re: [pgAdmin4][Patch]: RM1840 - cannot create gist index due to enforced ASC, DESC options in generated SQL To: Surinder Kumar Cc: pgadmin-hackers Content-Type: text/plain; charset=UTF-8 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 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 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers