Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o9hgU-0007q8-6q for pgsql-committers@arkaria.postgresql.org; Fri, 08 Jul 2022 06:41:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o9hgS-0001Gt-TN for pgsql-committers@arkaria.postgresql.org; Fri, 08 Jul 2022 06:41:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o9hgS-0001Gk-Kh for pgsql-committers@lists.postgresql.org; Fri, 08 Jul 2022 06:41:48 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o9hgL-0008K1-Sl for pgsql-committers@lists.postgresql.org; Fri, 08 Jul 2022 06:41:47 +0000 Received: by mail-pf1-x42d.google.com with SMTP id a15so22732979pfv.13 for ; Thu, 07 Jul 2022 23:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:message-id:to:cc:subject:from:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=2Cu7xhotAiywpe6FQqfw7wog/Ow8XiBCaM+5LTFMAfo=; b=PzhzMyKzdNZlfwcCqjkqMgWE7Knb6BKb1toAXZgWPRsHrAZKUYHyvOGgV8vOqJ8uTa 41bn0x8H2H2F0afZEmUN9MWWikl0EixgTHvpF2IRQ0ubBwks09JWfjug0dVlCiKX/HV4 PrEZOfeNsVWqHVd1Jttg87qIfpa6XOBIhYsObp1eswLb4NHWrvl1kPtMaMYkQObar7Oq t410/RbDPa0fuauFiegoXFOb4M/YNMWD5EZcwUwHvOB/wCN4p11kUHdiOqaYeYd5+xMU 9ka8TEjPGp8FbtKWdJaJYzBMUlh3guZRKfX7k4Yhlc54Ujy5Abr4lRkds6OmPUEHckGa WZSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:to:cc:subject:from:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=2Cu7xhotAiywpe6FQqfw7wog/Ow8XiBCaM+5LTFMAfo=; b=ZFOqrA4bvzfk6gy0nyG5fH+kLmEGiwinhGDJmKjZBs15O0mi4pJoN8M1mMWSpwihlB b91PNzaF+cbKd60DriV6QVEIXONbDkEpYoQ2ds1IIffjLxOMjwDDUdYRb48HCNqQDHJZ A9R9GKWgAEAsVlTWkFQeqAr5Vlh+K7lbuiz8n7pf0THNduSdKa+QWmasFUHSglgcVwxE h2cUcSw9vu7F+L5OKXm4w+TrAzx5xIA+Rxz0kBULQLzOaGtGJFFii3D2gFrtJbJQ8fxM oOzPlfK3Jni9AkUs17YMANhMcdLxIiTr1NPG3kzc5v9HDPczQaoKbGlAjBQOqGPMll4k EroA== X-Gm-Message-State: AJIora/Xdd/xg+RUJyZ+EU+HwPAbj4B14qWq/8RjqfULRIqa/fvDbW+r cf/jXxtpWRXD/x/rbgZPRJ4= X-Google-Smtp-Source: AGRyM1v349LhCYO49Jeoz8IHayYrTbEMgAQl/4gwwMKEHFGCaZZziPDw8Tup8QB4zl3cAE6/EI9lMg== X-Received: by 2002:a63:86c7:0:b0:40d:af99:608 with SMTP id x190-20020a6386c7000000b0040daf990608mr1952184pgd.515.1657262500167; Thu, 07 Jul 2022 23:41:40 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id a74-20020a621a4d000000b00528d4f647f2sm2184700pfa.91.2022.07.07.23.41.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 07 Jul 2022 23:41:37 -0700 (PDT) Date: Fri, 08 Jul 2022 15:41:35 +0900 (JST) Message-Id: <20220708.154135.2123613118233840495.horikyota.ntt@gmail.com> To: andrew@dunslane.net Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Only allow returning string types or bytea from json_serialize From: Kyotaro Horiguchi In-Reply-To: References: User-Agent: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Fri_Jul__8_15_41_35_2022_928)--" Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ----Next_Part(Fri_Jul__8_15_41_35_2022_928)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit At Thu, 07 Jul 2022 21:46:12 +0000, Andrew Dunstan wrote in > Only allow returning string types or bytea from json_serialize I noticed that this introcues the following error message. + errmsg("cannot use RETURNING type %s in JSON_SERIALIZE" + format_type_be(returning->typid)), However, the same file has the following error message. > errmsg("cannot use RETURNING type %s in %s", > format_type_be(returning->typid), fname), So, couldn't we share the format string to reduce translatable messages? And, the other messages are cannot use RETURNING type %s in JSON_SCALAR(), and cannot use RETURNING type %s in JSON() So, I think this should not be cannot use RETURNING type %s in JSON_SERIALIZE , but should be cannot use RETURNING type %s in JSON_SERIALIZE() regards. -- Kyotaro Horiguchi NTT Open Source Software Center ----Next_Part(Fri_Jul__8_15_41_35_2022_928)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Fix-an-error-message.patch"