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 1qcFOi-00ESJT-KJ for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Sep 2023 01:26:00 +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 1qcFOf-001iGg-D0 for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Sep 2023 01:25:57 +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 1qcFOf-001iGF-0t for pgsql-hackers@lists.postgresql.org; Sat, 02 Sep 2023 01:25:56 +0000 Received: from mail-oo1-xc2b.google.com ([2607:f8b0:4864:20::c2b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qcFOb-002FZd-Qq for pgsql-hackers@postgresql.org; Sat, 02 Sep 2023 01:25:55 +0000 Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-573ac2fa37aso1579812eaf.3 for ; Fri, 01 Sep 2023 18:25:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693617953; x=1694222753; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=k9rATSpOHVhh91S5BeQ6RauXJuJIov5pGEAa8dW0sDo=; b=VeOzqGGCxyRcOGw/n4a9tCzO0YC+gtBvZtob77a9YtTicz6T906dXf72sQy2YXW5Rb HvxRCdgftMcVzNdIvEjTmJoFRiiIMHYikq4XKr6e6IwEkhfgIuv+w8UOgp8ruVr+G7UC gFC+KlrgTWphvS5H7/6P42j1ST+vJRIisS3UUzj4hWsw5Dcsw9zg3s+TH7LuW1IDNPwJ zFWzTGTzi3L60KHXYGluMYngBKywQXqHkjGeSrxQGVj+7CDlPgeK4J5CCROI9QjtuU6u /C7Z7NZtbTEhRPGBq7yEKiq69X5QNwFE2mKE21I5ieKmtYMxrUZcw+bFPAllXUEvOeEZ XtHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693617953; x=1694222753; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=k9rATSpOHVhh91S5BeQ6RauXJuJIov5pGEAa8dW0sDo=; b=BIlOlPY4zrlfTK9Wo2XsFF9cyNqwHV21zLQECM39KHjTS0CiAk48by/+0aBhAWa+Zo Oe/PuqJ+MMXOoIEOCYkNMFVHrioazCWziGGGIJX7QA84hfW6m/S2uRDWrYw4gG62RaIO Pp4E1QSXZqtx//LsU0vJ9oUVEAoW0TTDH5OlEVbNCF7WptREfOSOKNeXokFKsaS5hCP0 chgrCpk9QJlYLvvU0QML8CGmQYKRzKyVoRSbQiuW+tZPsdabnj+OwychG8cBfcyZi/5O gVyzQ7/MLCxmQvgSIourmw8kDNzJc+Hq4Mdh3wKZ4Yz75mkExatLlfl2O/xIFIkNvcJo KCfQ== X-Gm-Message-State: AOJu0YyolEZGdTSg4nGiBcb3bIz6JKYCwtsnP3a8BBGQYxTjFfl9seAu xuQxEJ7P9xQYSvh/hk3YbUsMiNHKDxyVJkH7+wI= X-Google-Smtp-Source: AGHT+IHtATZkhN+Brrt8712hDwBQLGeszjO/YROGk7V6rcLN7TgV9yNLngDnYYo7IoLBLVEaDQdybv0bHpxXxUPxxEk= X-Received: by 2002:a05:6358:3401:b0:13a:db5c:e618 with SMTP id h1-20020a056358340100b0013adb5ce618mr3346123rwd.4.1693617952889; Fri, 01 Sep 2023 18:25:52 -0700 (PDT) MIME-Version: 1.0 References: <3507485.1691090027@sss.pgh.pa.us> <900892914fdc3f477b101d699efb40e0@anastigmatix.net> <903341.1692022214@sss.pgh.pa.us> <4b97f1a1dd9b6e45443d24870d3be698@anastigmatix.net> <111272f2dc112c7becdd35ad89f6b935@anastigmatix.net> <5138c6b5fd239e7ce4e1a4e63826ac27@anastigmatix.net> <369543439e988ae43f0a6307500b27c4@anastigmatix.net> <5955e93347a7e3b1612cf7e129ae6d04@anastigmatix.net> In-Reply-To: From: jian he Date: Sat, 2 Sep 2023 09:25:37 +0800 Message-ID: Subject: Re: Extract numeric filed in JSONB more effectively To: Andy Fan Cc: Chapman Flack , Pavel Stehule , Tom Lane , pgsql-hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I think the last patch failed. I am not 100% sure. https://cirrus-ci.com/task/5464366154252288 says "Created 21 hours ago", I assume the latest patch. the diff in Artifacts section. you can go to testrun/build/testrun/regress/regress/regression.diffs diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/jsonb.out /tmp/cirrus-ci-build/build/testrun/regress/regress/results/jsonb.out --- /tmp/cirrus-ci-build/src/test/regress/expected/jsonb.out 2023-09-01 03:34:43.585036700 +0000 +++ /tmp/cirrus-ci-build/build/testrun/regress/regress/results/jsonb.out 2023-09-01 03:39:05.800452844 +0000 @@ -528,7 +528,7 @@ (3 rows) SELECT (test_json -> 'field1')::int4 FROM test_jsonb WHERE json_type = 'object'; -ERROR: cannot cast jsonb string to type integer +ERROR: unknown jsonb type: 1125096840 SELECT (test_json -> 'field1')::bool FROM test_jsonb WHERE json_type = 'object'; ERROR: cannot cast jsonb string to type boolean \pset null ''