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 1m3NnS-0002oq-B4 for pgsql-general@arkaria.postgresql.org; Tue, 13 Jul 2021 19:10:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m3NnQ-0004FI-GL for pgsql-general@arkaria.postgresql.org; Tue, 13 Jul 2021 19:10:20 +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 1m3NnQ-0004FA-7N for pgsql-general@lists.postgresql.org; Tue, 13 Jul 2021 19:10:20 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3NnO-0001R6-64 for pgsql-general@lists.postgresql.org; Tue, 13 Jul 2021 19:10:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 16DJAF6C3353742; Tue, 13 Jul 2021 15:10:15 -0400 From: Tom Lane To: shaurya jain <12345shaurya@gmail.com> cc: pgsql-general@lists.postgresql.org Subject: Re: Json:- Accepting 'integer' value In-reply-to: References: Comments: In-reply-to shaurya jain <12345shaurya@gmail.com> message dated "Wed, 14 Jul 2021 00:08:07 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3353740.1626203415.1@sss.pgh.pa.us> Date: Tue, 13 Jul 2021 15:10:15 -0400 Message-ID: <3353741.1626203415@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk shaurya jain <12345shaurya@gmail.com> writes: > But while we checking the same thing in Oracle it doesn't accept this. Is > it an issue with Postgres data type? I'd call it an issue with Oracle. We follow RFC 7159, which specifies that "bare" scalars (numbers, strings, booleans) are valid JSON values. I see though that it says A JSON text is a serialized value. Note that certain previous specifications of JSON constrained a JSON text to be an object or an array. so apparently Oracle is following some obsolete version of the spec. regards, tom lane