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

This commit is contained in:
Taimoor Zaeem
2025-05-14 21:44:23 +02:00
committed by Wolfgang Walther
parent e0e60fa433
commit 0230a844b2
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';