Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWNWb-0004vS-FO for pgadmin-hackers@arkaria.postgresql.org; Wed, 25 Jan 2017 13:22:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cWNWb-00087Z-2I for pgadmin-hackers@arkaria.postgresql.org; Wed, 25 Jan 2017 13:22:09 +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 1cWNWM-0007j7-Oy for pgadmin-hackers@postgresql.org; Wed, 25 Jan 2017 13:21:54 +0000 Received: from mail-it0-x232.google.com ([2607:f8b0:4001:c0b::232]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cWNWJ-0000Mf-6e for pgadmin-hackers@postgresql.org; Wed, 25 Jan 2017 13:21:53 +0000 Received: by mail-it0-x232.google.com with SMTP id r185so11862933ita.0 for ; Wed, 25 Jan 2017 05:21:50 -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=i7njGQmZjdqZhcNs9nD/vYiOQ/adalLyt2hDWxDpNZM=; b=UZOryeoyOy5t0EgELY1jhG3azv3h6U+2Z2FndJ6HUDroAtiE3jNv+CiZR3k9YEDMQV DY4lbO35bgVeyHKkAkPcQCDBTZqG+NVuZofH8DZ5kPrn0vv7cPQRF3q6faVaGafCXPHh +Z1uEzSdWXCRHtUffLypOStliNnTMMslRHtP6Wqj0moiRAbAVrW4UW5tCW4icWH0YRuQ LlLY6FbuHzbVBwqEHlgTjozTZ/LsTRQmLaMogUaKYlhsAFAH9lZHxeq9FA7cl19D5QGx 9TESbR6NHKWBYn1DQtRQCQ2IUmh4OZt3hsjp55JHUsppo+/XVESMFaACc5l/+h0ZNgG+ FINw== 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=i7njGQmZjdqZhcNs9nD/vYiOQ/adalLyt2hDWxDpNZM=; b=FLAHt94/RTzClxYHUgQp42L8oXyt3ilt8KcvpKMK+7/0Ahe3js/bF60Jeo4lbDgZP1 GEBlBIe+GN4LI0XDKbVu4PcOf+2ne207oH+AtbOnDPkWPiJsdogLnQjAtyDDKIT9uHSb YrOkI6u1tfKMYkuJwrcmj105x/yzncABB8EZ+4wMaVrMYdSfkqJGBs1my25KpwiOUqHL BNRobly+4qaD+Hol+xP/nmOeXuPbWPSYJ+odtneEyzdDlGJYwaGnHe9AhwYgLWZ/yWeK TPON3WDmcKl7oo1Q36EQhgo5e9JJTQyVsDh9LtiLQw1rV0aLnhxYBc6R62Z3ksoEIbng YEPw== X-Gm-Message-State: AIkVDXI3o3c0WczaIdobEjOyxNJIpz1271xb0LsFdalpj79XOCL7WfrcVqupHD6LPtga2KIxJ83QEUts88o2ng== X-Received: by 10.36.17.7 with SMTP id 7mr25098430itf.113.1485350510272; Wed, 25 Jan 2017 05:21:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.224.198 with HTTP; Wed, 25 Jan 2017 05:21:49 -0800 (PST) In-Reply-To: References: From: Dave Page Date: Wed, 25 Jan 2017 13:21:49 +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 Thanks, patch applied. On Fri, Jan 20, 2017 at 7:29 AM, Surinder Kumar wrote: > Hi Dave, > > The last patch was for exclusion constraint only. The same issue issue is > reported RM2061 for index. > So, this patch takes care of both issues. > > Added a flag 'is_sort_nulls_applicable' which is set to true for access > method 'btree'. > If its is true, the values for options 'ASC/DESC' and 'NULLS' are included > in 'create' sql for exclusion and index otherwise not. > > Please find updated patch and review. > > On Tue, Jan 17, 2017 at 3:43 PM, Dave Page wrote: >> >> Hi >> >> On Tue, Jan 17, 2017 at 9:52 AM, Surinder Kumar >> wrote: >> > 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. > > It is now fixed in the updated patch. >> >> > >> > 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. > > Thanks for steps. >> >> >> -- >> 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 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers