Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBj3g-00080Y-IN for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Apr 2019 16:48:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hBj3f-0004oK-Bq for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Apr 2019 16:48:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBj3f-0004oD-0j for pgsql-bugs@lists.postgresql.org; Wed, 03 Apr 2019 16:48:15 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBj3c-00060j-Jk for pgsql-bugs@lists.postgresql.org; Wed, 03 Apr 2019 16:48:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x33GmAMA019116; Wed, 3 Apr 2019 12:48:10 -0400 From: Tom Lane To: =?UTF-8?B?TWljaGHFgiBJd2HFhGN6dWs=?= cc: pgsql-bugs@lists.postgresql.org Subject: Re: Bug report - incorrect value displayed in jsonb column for large numbers In-reply-to: References: Comments: In-reply-to =?UTF-8?B?TWljaGHFgiBJd2HFhGN6dWs=?= message dated "Wed, 03 Apr 2019 15:29:46 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19114.1554310090.1@sss.pgh.pa.us> Date: Wed, 03 Apr 2019 12:48:10 -0400 Message-ID: <19115.1554310090@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?UTF-8?B?TWljaGHFgiBJd2HFhGN6dWs=?= writes: > 1) create table: > CREATE TABLE document_wrapper( > id integer NOT NULL, > document jsonb NOT NULL, > CONSTRAINT document_pkey PRIMARY KEY (id))WITH ( > OIDS = FALSE) > TABLESPACE pg_default; > 2) insert value > insert into document_wrapper(id, document) values(-8, > '{"id":101861191707868275}'); > 3) select value > SELECT document FROM document_wrapper where id = -8; > 4) Observe incorrect result (note 0 at the end): > { "id": 101861191707868270 }? Works fine for me in psql, so whatever the problem is here, it's not in the Postgres server. You should try asking in the pgadmin lists, instead. (I'm rather surprised to hear that pgadmin does anything special with jsonb values, but apparently it does ...) regards, tom lane