Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i5GtE-0004RF-Tg for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Sep 2019 22:03:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i5GtC-0006WB-MY for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Sep 2019 22:03:02 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1i5GtC-0006QF-BQ for pgsql-hackers@lists.postgresql.org; Tue, 03 Sep 2019 22:03:02 +0000 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i5Gt9-0002m6-0I for pgsql-hackers@lists.postgresql.org; Tue, 03 Sep 2019 22:03:01 +0000 Received: by mail-qk1-x743.google.com with SMTP id z67so4759414qkb.12 for ; Tue, 03 Sep 2019 15:02:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=t2bjHAsmWWjW+m7O4AoRflEz5jjadpZ/pJGA3y6JMl8=; b=ix+prjSaedigaCuAyZDlaMgDXuuRvh99zmTqJnRVF6dlLzsh5JMkqn0Oaio0e31xoH 4buMjYKU0fytg0gSJwoseNMht/54g30S/2Vk5UnmDx4OsPxIvQCBHQRsbxyXDhA9DKhh UE7+UUvSpQjtLQYQePPDG9QXMA2tco3gQgDiWfBMRDztxc+srX5eypw9zI8E/4CcoSnc 73h78K2OgwC4kb80LJg5LH4cfBlId9Gdq/VYnSCi08Z8xIOtbXkEzCbiWDgTfnIVoauU mlIj6RqBDqRY6HbB/jtRk5WEsSE4uEqnv4W44J4iig1AxoTYOZfGdUwtsP/WKrvEgefO bb+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=t2bjHAsmWWjW+m7O4AoRflEz5jjadpZ/pJGA3y6JMl8=; b=P73bEjI1IQ7bGHFwhmUYEfscm91VgIA1HHAzTyaP6IKPf3r+4Priwpa315pH9p3B0E pivSGHu73Vmkc31UCDU+1Ji2XQ+aPAh6rmVRq8af9eUFE+ialp5vhvz0OTnWWlk4K7I/ bOz8WnHSQn1YqM8lJtmaJ8CSFpQTKz2QmMHlpgvdD67+vDlKIP3O+ZW96jh4qfVvCn8G lz2njXwxM+RD2PD7f5OXf9L5lS8X5W0FvhQ6ejt0ZXBfAR9W+J0Nf3Y9JZED90gxxbai WRf2c6IP1TRQPW+noeAemWCA7mW9L1/E9WD2dKQLIfSohsWvTa0b7bCNwHMNcI+4yNmi aF+g== X-Gm-Message-State: APjAAAUfpWjylRmP3J0KTllzvl73xJvl12U5MBkDVovv/mNl8fHzoPVY AAmX4rKonepUBMWI8EtgweK9Lg== X-Google-Smtp-Source: APXvYqy1Lx0Y46Tvv0Vyfbwcr/uW3EKW4nclIO9O5D43DvsTDwj/pywkn3brOB9kMJtoPaEqGZBUGw== X-Received: by 2002:ae9:f506:: with SMTP id o6mr20475622qkg.368.1567548177075; Tue, 03 Sep 2019 15:02:57 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id x5sm3881137qkn.102.2019.09.03.15.02.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 15:02:56 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id EDFB0120E47; Tue, 3 Sep 2019 18:02:54 -0400 (-04) Date: Tue, 3 Sep 2019 18:02:54 -0400 From: Alvaro Herrera To: Tomas Vondra Cc: Robert Haas , Tom Lane , Nikita Glukhov , Nikolay Shaplov , PostgreSQL Hackers , "pgsql-hackers@postgresql.org" , Oleg Bartunov Subject: Re: [PATCH] Opclass parameters Message-ID: <20190903220254.GA22389@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190611175745.wwb6jywbch2pz23f@development> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Jun-11, Tomas Vondra wrote: > 1) We need a better infrastructure to parse opclass parameters. For > example the gtsvector_options does this: I think this is part of what Nikolay's patch series was supposed to address. But that one has been going way too slow. I agree we need something better. > 2) The 0001 part does this in index_opclass_options_generic: > > get_opclass_name(opclass, InvalidOid, &str); > > ereport(ERROR, > (errcode(ERRCODE_INVALID_PARAMETER_VALUE), > errmsg("operator class \"%s\" has no options", > opclassname.data))); > > But that's a bit broken, because get_opclass_name() appends the opclass > name to 'str', but with a space at the beginning. Yeah, I think just exporting get_opclass_name from ruleutils.c is a bad idea. Sounds like we need a (very small) new function in lsyscache.c that does the job of extracting the opclass name, and then the ruleutils function can call that one to avoid duplicated code. Anyway, this patchset doesn't apply anymore. Somebody (maybe its author this time?) please rebase. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services