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 1go7Ix-0001lF-JO for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Jan 2019 13:50:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1go7Iw-00020a-FF for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Jan 2019 13:50:26 +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 1go7Iw-00020B-2p for pgsql-hackers@lists.postgresql.org; Mon, 28 Jan 2019 13:50:26 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1go7Is-0004Ne-JA for pgsql-hackers@postgresql.org; Mon, 28 Jan 2019 13:50:25 +0000 Received: by mail-wm1-x333.google.com with SMTP id y8so13941740wmi.4 for ; Mon, 28 Jan 2019 05:50:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=tKV4pSJD+Mqy+nof0z8awdLyRlqlKW/rp1gwW4e/g8g=; b=K0AVsleb7Zg6VZ3Vnr1h1guUljECdWGqKNBcEBwEiVSIeUnqwYsY2TOwl9bJGsCqAg 67BiFmOjvBsdeMSp6n3yR36iI545cSgwQvMZYYMBFlF/iQfqV7lI8pGDT/bNPSvfvj5v /IAHcUD3jzSRktbz2daFJ5a6zZcsOylVMh95XMCW0CMbbiY2mASPRKdO0B4PibEmsy+W 6f0ZdsVhhwwESD1ApN3qkru5ilIcHw8jNiRU+1nw3zUUxS8ryeDvSNpofsw9dAnf1SpN VA1/DK1ZhwbVEpGn70ODuW7vrZoZF/RXG6GPwC6xA1X5yRzjOA4mwrYXwx2wZRDUWU9p X1IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tKV4pSJD+Mqy+nof0z8awdLyRlqlKW/rp1gwW4e/g8g=; b=b75HPv8vYuftWyRovpE/a20hzsrXeDhJLe/KzeQ4A8TvkdiZldewtf182tDg5eLNop 4MLr5IxNQbiQzA8FSFvw6SI6OM5AuTBjKzPhEwy94Oe7EbGRaUGi3VgYXL73qta8DzDt KfUreGTpytv9TNWmyy1+El1SfL+i1cLXqf5Qw/V70XxsrCQAA4u4YLwU2GdPhc68qWTK fc42yNFt07/n3HxcFMu5LY3dswm+aiz+q7mrQz80ytZZKcEkgs9rBHYm8DnNC5u8VANH w+cbylBxyaqJKleB4SpsadI2q5NZkUlj9JytsltigB72RfS5Cw4gMMdqDOB8MKeGOEzw N26Q== X-Gm-Message-State: AJcUukfIreY+fcrGCvMk+f3zgZ0eMJKCvp0RUA4iP1GbMErPf3Pn+r4k OIe0BjoLDJJXVv/Ln5vJAzJOFg== X-Google-Smtp-Source: ALg8bN5P6qU6JKluwWEgtQ6INMfOjBmuU4w3+CRsJ9jWTVfoPRkQy8RwKksCv5hrmqmEFVaQ4lezoA== X-Received: by 2002:a1c:1d8e:: with SMTP id d136mr16780897wmd.98.1548683420462; Mon, 28 Jan 2019 05:50:20 -0800 (PST) Received: from [10.137.2.21] (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id j33sm186240799wre.91.2019.01.28.05.50.17 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jan 2019 05:50:19 -0800 (PST) Subject: Re: jsonpath To: Alexander Korotkov , Nikita Glukhov Cc: Oleg Bartunov , Michael Paquier , Stas Kelvich , PostgreSQL-development , Thomas Munro , David Steele , Tom Lane , Andrew Dunstan , Robert Haas , Pavel Stehule References: <264a6413-7175-9680-b976-d50392c001c0@postgrespro.ru> From: Tomas Vondra Message-ID: Date: Mon, 28 Jan 2019 14:50:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 1/28/19 1:22 AM, Alexander Korotkov wrote: > On Sun, Jan 27, 2019 at 1:50 PM Alexander Korotkov > wrote: >> On Sat, Jan 26, 2019 at 4:27 AM Alexander Korotkov >> wrote: >>> >>> On Wed, Jan 23, 2019 at 8:01 AM Alexander Korotkov >>> wrote: >>>> Finally, I'm going to commit this if no objections. >>> >>> BTW, I decided to postpone commit for few days. Nikita and me are >>> still working on better error messages. >> >> Updated patchset is attached. This patchset includes: >> >> * Improved error handling by Nikita, revised by me, >> * Code beautification. >> >> So, I'm going to commit this again. This time seriously :) > > I'm really sorry for confusing people, but I've one more revision. > This is my first time attempting to commit such a large patch. > I'm not sure what you're apologizing for, it simply shows how careful you are when polishing such a large patch. > Major changes are following: > * We find it ridiculous to save ErrorData for possible latter throw. > Now, we either throw an error immediately or return jperError. That > also allows to get rid of unwanted changes in elog.c/elog.h. OK. > * I decided to change behavior of jsonb_path_match() to throw as less > errors as possible. The reason is that it's used to implement > potentially (patch is pending) indexable operator. Index scan is not > always capable to throw as many errors and sequential scan. So, it's > better to not introduce extra possible index scan and sequential scan > results divergence. > Hmmm, can you elaborate a bit more? Which errors were thrown before and are not thrown with the current patch version? regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services