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.96) (envelope-from ) id 1w0fDL-0026Pf-2M for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Mar 2026 12:32:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w0fDK-00EqxP-0j for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Mar 2026 12:32:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w0etd-00EhvL-0o for pgsql-bugs@lists.postgresql.org; Thu, 12 Mar 2026 12:12:09 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w0eta-00000002IPo-3u4J for pgsql-bugs@lists.postgresql.org; Thu, 12 Mar 2026 12:12:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=zxRmnZgHb9wK1CMSfvTb/PQ8M6hcxvbhDfsRgxj+fhk=; b=SwQpgvNKEm4wPr8fDYIRhOmPOi 5cHJp3A0FVboRz8WIJ/VJW/6DXzas6CKu6gXndQSLdKSBhLRPciECMEgH4wZG+6HRMXeawjrZuvrb N88jkUggR1tp8RsSh30sVz8dZIL8INAe2ozABa5id1mV6c+fwvxVVecNbKaL9ubwXg5naUYJXY9B9 C7Wxv0uqgOkrY48MUPJnO7/AKQDOxUVIndzEK6v7YJy6GhYU/0bwNScgVOB0SxnHUsHLumjZ8uJ+D vip1B5Sis/XKo71KzbvLQNRBYc1tfzz4BlbcXeVNcm02gItzJcMh1JWhOFS91PGRmjGRF+oreDjw5 XK1uJC8w==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w0etY-004Ny1-1h for pgsql-bugs@lists.postgresql.org; Thu, 12 Mar 2026 12:12:05 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w0etV-008xWc-2y for pgsql-bugs@lists.postgresql.org; Thu, 12 Mar 2026 12:12:03 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19431: limitation of the data type jsonb equals 8Kb To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: perovaa@sbermarketing.ru Reply-To: perovaa@sbermarketing.ru, pgsql-bugs@lists.postgresql.org Date: Thu, 12 Mar 2026 12:11:06 +0000 Message-ID: <19431-0a33306c00df939f@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following bug has been logged on the website: Bug reference: 19431 Logged by: Alex Perov Email address: perovaa@sbermarketing.ru PostgreSQL version: 18.3 Operating system: Windows 10 Description: =20 Hello. I have a type: CREATE TYPE public.t_dict AS ( id bigint, name text, gid uuid, alias text, bgcolor text, disabled boolean, checked boolean, options jsonb, "order" integer ); and function CREATE OR REPLACE FUNCTION public.f_func(data jsonb, uid bigint, context text =3D null, ext text =3D null, pid bigint =3D null, pgid uuid =3D null) returns setof rd.t_dict language plpgsql AS $$ begin context :=3D coalesce(context, data->>'context', ''); ext =3D coalesce(ext, ''); create temp table tmp_f_table of public.t_dict; if dict =3D 'dict1' then insert into tmp_f_table (id, name) select 1, name from public.tbl1 a; elsif dict =3D 'dict2' then insert into tmp_f_table (id, name, alias) select t.objecttypeid, t.objecttype, t.alias from public.tbl2 t where (t.objecttypeid <> 0) and t.active; elsif dict =3D 'dict3' then insert into tmp_f_table (id, name, options) select t.linktypeid, t.linktype, json_object( 'rev': t.reftypeid =3D (data->'objecttype')::bigint, 'items': t.options ) from public.tbl3 t; end if; return query select * from tmp_f_cpdictionary; drop table tmp_f_cpdictionary; end $$; when calling a function for dict3, I have an error "could not open relation with OID 196327". As far as I know, this is due to a limitation of the data type jsonb equals 8Kb. Is it possible to fix this error without changing the logic of the code?