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 1oT3Ua-0003WG-Lh for pgsql-admin@arkaria.postgresql.org; Tue, 30 Aug 2022 15:49:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oT3UZ-0002UZ-4n for pgsql-admin@arkaria.postgresql.org; Tue, 30 Aug 2022 15:49:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oT3UY-0002Tx-PW for pgsql-admin@lists.postgresql.org; Tue, 30 Aug 2022 15:49:30 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oT3UQ-0003Hy-TG for pgsql-admin@lists.postgresql.org; Tue, 30 Aug 2022 15:49:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Reply-To:Message-ID:Subject:Cc:To:Sender:From:Date: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Utf2UunP2JJhjCu6rvy3gy3zGrJtaxf9h7YF388KAtU=; b=f9GqeRGVCWwysuzZcZfR3gCNEr mcjmWzaTpWet0AC1rwnccVXu5asW0Lf8UdJCtZIvucpFHfFTgK8hbzYu/0AZXWZnHIPk849WnbDQh jxHDIon0JOm5B/8OXyns5OmP3eo5Z4kR4lqvcOEsvFvynQGVzDIdhzqXvt4/KU0sHrgQ=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1oT3UM-0002hn-Hc; Tue, 30 Aug 2022 17:49:18 +0200 Date: Tue, 30 Aug 2022 17:49:18 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: John Scalia Cc: Pgsql-admin Subject: Re: Two PostgreSQL instances returning different output for same query Message-ID: <20220830154918.GA3610@depesz.com> Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Aug 30, 2022 at 11:21:26AM -0400, John Scalia wrote: > I’m a bit stumped on this one. For one of my application teams both their DEV instance and UAT instance are running pg version 12.3 in AWS RDS, and I’ve used the same psql version 13.4. > > The query is a simple: SELECT to_jsonb(geom) FROM addresses LIMIT 1; > > On both databases the geom field is of data type geometry from postgis, but the two dbs are running different versions of Postgis. DEV is 3.0.2 while UAT is 2.5.2, but I don’t think this is causing the issue. > > Running the query on the DEV instance produces > to_jsonb > ———————————- > {“type”: “Point”, “coordinates”: [-106.54569, 31.82908]} > > While running it on the UAT instance produces > to_jsonb > ————————————— > “0101000020E610009000000000000000“ Check installed extensions, and their versions in both dbs. Best regards, depesz