Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1riEM6-00FrYP-Mn for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Mar 2024 14:04:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1riEM4-005cpi-LV for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Mar 2024 14:04:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1riEM4-005cpa-C5 for pgsql-hackers@lists.postgresql.org; Thu, 07 Mar 2024 14:04:16 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1riELz-003GqO-55 for pgsql-hackers@postgresql.org; Thu, 07 Mar 2024 14:04:15 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-412e96284b9so7560345e9.3 for ; Thu, 07 Mar 2024 06:04:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1709820249; x=1710425049; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=lIFbGg+LzMdq1uOy4NN+wBZzOEI86j7KAzBMf4r0qCU=; b=ixUy4x8Cx9ZSUfUu2Hq4+eW94XLGeRF8ZIdqQAxde+UAKxNmphNTl/L47O772o1k9f f5qI+prSjjWFWcdLIi4btxyPfAdHGeykdbtudwz1RBP2En9aEDfzhTDBqzXVa3HpZDST v3u4Xlu+8vIQ/KeGGkZwGqfOM5bS6HOMWgq0DwKb+0YYfheYB2wOjM3aLq08vDVbTqfZ cNXq2twjxecO2W8dD4Zi/jRL06OPUxloN8Lf0/ypL4f2h7cCgQlJuBFrYEwT1s6Vvbdr hZhUnLzPXWNNU6lohFgkYVlcgx3bJ05zpb9RuXGENR1YR7p3kPS+GX/5nAY9Yu56oBi+ HPWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709820249; x=1710425049; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lIFbGg+LzMdq1uOy4NN+wBZzOEI86j7KAzBMf4r0qCU=; b=LxhbFXYuxmyarfo0/6FFVgeWqlYyDvEXygP8R9MN+0GBBvJLvgVF14/DREDOmg3v33 YnRv7rlb9fH79JWlxX+hASe21w/NebKGs+/Wh2kRSE+4aCnwoEazFMK0Zs5waEkcp0su 3+BhdTDREoJJ+4jysqnOKQBiCe4YzFInX9Mlc6//R4x55U12cQwaGYq7Q9XIkYPkcJuq qXJmrT2DD1Ptc5cog8Aqq6ZJQx9YSLjUE06I4a2WR9XX+jsl6ThfOraer3UhUPHujJfx dfoBKPeiXa9sg8A2wgs/7HF+DBDSrY+c21v+aVvX7izFy9ZMVRVDBwyrSDFnZPYnPmJJ dM9w== X-Forwarded-Encrypted: i=1; AJvYcCW5pfYwktaLHqq/4EFDbNBF+2PjpBFtrq9snnabik+mzXPE4bsS4apH7TSrAdyi2jxTpy5GeoCmrby+z69agUbvennuvjFOEROvMeeT X-Gm-Message-State: AOJu0YxQYYh2H89rz5JIHPTzCyewbyHlP/nHhB0J5kV7FaNI5/t1CWRU D+5E7KIN8MuG4g/u+/gfqpqzFTilHwQrHC0g4DmoWiZBMiAfUielEcnexiGevg== X-Google-Smtp-Source: AGHT+IHPT1/BTupkbGRy+vrLVcT5pGe/7hbBlChj7hNrAl4qpaUj09h8+KEzMqM1NhTnqyU2de45WA== X-Received: by 2002:a05:600c:4586:b0:412:f8cd:cda4 with SMTP id r6-20020a05600c458600b00412f8cdcda4mr3132159wmo.14.1709820248954; Thu, 07 Mar 2024 06:04:08 -0800 (PST) Received: from [10.137.0.18] (ip-86-49-229-30.bb.vodafone.cz. [86.49.229.30]) by smtp.gmail.com with ESMTPSA id fa27-20020a05600c519b00b0041315f222c3sm85134wmb.31.2024.03.07.06.04.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Mar 2024 06:04:08 -0800 (PST) Message-ID: Date: Thu, 7 Mar 2024 15:04:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: remaining sql/json patches Content-Language: en-US To: Amit Langote Cc: Alvaro Herrera , Erik Rijkers , jian he , Andres Freund , Andrew Dunstan , PostgreSQL-development References: <1cee81f3-312f-30e3-0282-c4df7ee72f93@xs4all.nl> <202403041503.5momp6knupgo@alvherre.pgsql> <1e0e5800-965e-42ed-8caa-362294604243@enterprisedb.com> From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, I was experimenting with the v42 patches, and I think the handling of ON EMPTY / ON ERROR clauses may need some improvement. The grammar is currently defined like this: | json_behavior ON EMPTY_P json_behavior ON ERROR_P This means the clauses have to be defined exactly in this order, and if someone does NULL ON ERROR NULL ON EMPTY it results in syntax error. I'm not sure what the SQL standard says about this, but it seems other databases don't agree on the order. Is there a particular reason to not allow both orderings? regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company