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 1qWGzH-002i1g-Qo for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Aug 2023 13:55:04 +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 1qWGzG-006wyq-AW for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Aug 2023 13:55:02 +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 1qWGzG-006wyi-0a for pgsql-hackers@lists.postgresql.org; Wed, 16 Aug 2023 13:55:02 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qWGzD-000Tz6-FW for pgsql-hackers@postgresql.org; Wed, 16 Aug 2023 13:55:01 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 78A555C0438 for ; Wed, 16 Aug 2023 09:54:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 16 Aug 2023 09:54:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:message-id:mime-version:reply-to :sender:subject:subject:to:to; s=fm3; t=1692194098; x= 1692280498; bh=OByTrJouT0ZqN18KJXP219YvJbD73pTqyDTG9U3+2QU=; b=B 5S/Cu5spoDeOxM/u0hfqCdDTs1eIrrAQKYwS6llieEAsEnwUTLsE6QKrRbnF9PXr 9RWCkKrBGcJQgeowrmOXPl1ikFaWVihujSAJUdXCQSRPq/6XTbJb06/w93WV+/i/ VuDlx+aZJIoaqcvzI6PXQU/HKOz8WAxOB03zU2AcIySf0Xm6FwZGKetO06cMIo6k D6rq83nYpo89pJDxaBQUfwE+FEfBD6jD0roKXSIA+NgTYqU3+tJIboIs+hYYwH6z SZx3PKkQsxBvB+NkaWgDX1Lca6/XslsoDlG09VtQMh8leMbCAFJAXDAIZrLmN4TI Ibr18Qc/H7BEye1PgadCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1692194098; x=1692280498; bh=OByTrJouT0ZqN 18KJXP219YvJbD73pTqyDTG9U3+2QU=; b=hPxuGlvPvDMbWDJ/gsgJZqgRNDyNL l3D9LGu7VHDMZ+AodksYs/B9Tlph7jIX7JaL5cHgmE8j3eOoz0CKpMf2Nmlv+HS9 l2OI0KxcwSNqSz1HCRxz8nnMSptl3zNbx+4s2buMM2TgFNuszisjrOjLswbxQ0SC JcUJENMZ9tzp4A2+7VJ3WXRge4Ri72I/q4wJKbwLBPuHGe5TvEA0oH39YHpf0/y7 EQ8Itad+jDs3F8q4O67oDqSuUZD6QDRr7YDECy7OY5jIifDQFxbgMowJRBaU8eUZ 4YGE1oYM/qt/rmAOr/aufFgkWVbmjeDBjM7sk52pNaT+qVX+vWdsWeM7w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddtledgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfhuffvtgfgsehtjeertd dtfeejnecuhfhrohhmpefrvghtvghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegv ihhsvghnthhrrghuthdrohhrgheqnecuggftrfgrthhtvghrnhepgefgieetfeeiueeike eiheehteeigfejgeejieelfeekgeffgfffgfeuhfeujeeknecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhesvghishgvnhhtrhgruh htrdhorhhg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 16 Aug 2023 09:54:57 -0400 (EDT) Message-ID: Date: Wed, 16 Aug 2023 15:54:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US From: Peter Eisentraut Subject: dubious warning: FORMAT JSON has no effect for json and jsonb types To: pgsql-hackers Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This warning comes from parse_expr.c transformJsonValueExpr() and is triggered for example by the following test case: SELECT JSON_OBJECT('foo': NULL::json FORMAT JSON); WARNING: FORMAT JSON has no effect for json and jsonb types But I don't see anything in the SQL standard that would require this warning. It seems pretty clear that FORMAT JSON in this case is implicit and otherwise without effect. Also, we don't have that warning in the output case (RETURNING json FORMAT JSON). Anyone remember why this is here? Should we remove it?