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 1tMRV4-004Fvg-1o for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Dec 2024 12:44:02 +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 1tMRV0-002wbg-AM for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Dec 2024 12:43:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tMRUz-002wbX-FA for pgsql-hackers@lists.postgresql.org; Sat, 14 Dec 2024 12:43:59 +0000 Received: from fout-b6-smtp.messagingengine.com ([202.12.124.149]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tMRUt-002n7P-Vn for pgsql-hackers@lists.postgresql.org; Sat, 14 Dec 2024 12:43:57 +0000 Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id 25D03114014E; Sat, 14 Dec 2024 07:43:50 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Sat, 14 Dec 2024 07:43:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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:subject :subject:to:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1734180229; x=1734266629; bh=nbYSCB5C/namCjlCVRTFQb3c/WX+ 1qYw+1J6lKwXNMw=; b=KA+2w03+eHT717Bphth6NpT24syIeCQ3/tfIZfIoVQEC ciXBm58PGZKjyBoOKdsZd11pBBzBJeVMoyuigX8QtHUNur1lal9JukRT/S4uKLaV A6ddHXNj31+wSPreMeBBjGmmwHVNZjumi5/HiqYuP8svgPKdbYhBu0uXcujGgqJ0 Aa3b1aI7fU2gAhHKTbG7dShJI/cSXtuSfuW+LiG4qmfti6tAkY+2/HuO+CyCLxyo 1Q4Wcq8ySBCbjc0zq8/XcOW+RJY4g5zrUVqa3izsv2oosxBzU2jvJ7A/EK0yTZlM 4TP+YWyWHp62OoRtK6HiDkQ2C+6X5GBER3q561wKRQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkeelgdegvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpeffhffvvefukfggtggugfesthekredttddtjeenucfh rhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnh hoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepleejlefggfejvdekheeludeggfdv jeelgeehfeekvdduieduiefhvdekkeekjefhnecuffhomhgrihhnpegvnhhtvghrphhrih hsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhnsggprhgtph htthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrmhhithhlrghnghho thgvtdelsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsh eslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 14 Dec 2024 07:43:49 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1734180226; bh=8UUfBi9j5mac5KEI9z038VMPDYwHqaHa/HHJp5ckItI=; h=Date:From:To:Cc:Subject:From; b=Ir3ff/1JBdOm1PiN79YDwGgFlqI4dVAmQWeCYxtCswHp/7bq6iJGmAsMUau2iFDQ8 qHkVApdfW4klV50DvrrWwVshHqDLBWr3a6t1NBoYMX8rkteekYMui+uS59UjTO4y0k 9qX0XxEt6xN5Zz/HOzKBbHYSf1ppAET5D+sHkcAQoYil+4wJS3UKpYxM3wGw3zec2U X/yMFxYIHUEmj2/3n696kZABJpvVMPoMfTL0kJTEzX38WSyGL1q9ksTLdwXs9M0r8l FaD7iMmTSg+6AFSkoZFKkb4UfjBAx35R6VsxSrI2k33ifciG95xXvw45si4QiQQLVF nzQ4vnulM7HTw== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 0EB079E; Sat, 14 Dec 2024 13:43:46 +0100 (CET) Date: Sat, 14 Dec 2024 13:43:46 +0100 From: Alvaro Herrera To: Amit Langote Cc: Pg Hackers Subject: strangely worded message Message-ID: <202412141243.efesjyyvzxsz@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello The following message introduced by commit 03734a7fed7d appears in two places: if (returning->typid != JSONOID && returning->typid != JSONBOID) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), errmsg("cannot use RETURNING type %s in %s", format_type_be(returning->typid), fname), parser_errposition(pstate, output->typeName->location))); where fname is either JSON(), JSON_SCALAR(), JSON_SERIALIZE(). The wording seems a bit off to me. What about the following? ERROR: cannot use type %s in RETURNING clause of %s DETAIL: Only types json and jsonb are allowed in the RETURNING clause. Other ideas I considered: ERROR: cannot use RETURNING %s in %s ERROR: cannot use "RETURNING %s" in %s DETAIL: The type can be json or jsonb in RETURNING. DETAIL: The RETURNING clause allows types json or jsonb. DETAIL: Types json and jsonb are allowed in RETURNING. Thanks -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/