test: add test for duplicate entries in pg_description with same OID

This commit is contained in:
Taimoor Zaeem
2025-05-14 09:31:48 -05:00
committed by Steve Chavez
parent 8390df0fa5
commit 8b63ea82ec
3 changed files with 25 additions and 2 deletions
+15
View File
@@ -3800,3 +3800,18 @@ create table factory_buildings (
factory_id int references factories(id),
inspections jsonb
);
-- collision test as occured in https://github.com/PostgREST/postgrest/issues/4052
create table test.collision_test_table (id integer);
comment on table collision_test_table is 'foobarbaz';
create function test.collision_test_func(id integer)
returns int language sql as $$
select 1;
$$;
update pg_proc
set oid = 'test.collision_test_table'::regclass::oid
where oid = 'test.collision_test_func'::regproc::oid;
comment on function test.collision_test_func(id integer) is 'fizzbuzz';