Skip to content

Commit bd401ea

Browse files
authored
Isolate failing tests on pg17 and OrioleDB (#1402)
* separate pg17 and oriole test diffs * ignore minor diffs in float value * update pgmq after-create script for pg 17 * all tests fixed except interface * sync tests * move postgis_tiger_geocoder to ext_interface * align pg 17 extension interface tests
1 parent 7ec67a7 commit bd401ea

25 files changed

+5775
-135
lines changed

ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,41 @@ do $$
22
declare
33
extoid oid := (select oid from pg_extension where extname = 'pgmq');
44
r record;
5+
cls pg_class%rowtype;
56
begin
7+
68
set local search_path = '';
79
update pg_extension set extowner = 'postgres'::regrole where extname = 'pgmq';
10+
811
for r in (select * from pg_depend where refobjid = extoid) loop
12+
13+
914
if r.classid = 'pg_type'::regclass then
10-
execute(format('alter type %s owner to postgres;', r.objid::regtype));
15+
16+
-- store the type's relkind
17+
select * into cls from pg_class c where c.reltype = r.objid;
18+
19+
if r.objid::regtype::text like '%[]' then
20+
-- do nothing (skipping array type)
21+
22+
elsif cls.relkind in ('r', 'p', 'f', 'm') then
23+
-- table-like objects (regular table, partitioned, foreign, materialized view)
24+
execute format('alter table pgmq.%I owner to postgres;', cls.relname);
25+
26+
else
27+
execute(format('alter type %s owner to postgres;', r.objid::regtype));
28+
29+
end if;
30+
1131
elsif r.classid = 'pg_proc'::regclass then
1232
execute(format('alter function %s(%s) owner to postgres;', r.objid::regproc, pg_get_function_identity_arguments(r.objid)));
33+
1334
elsif r.classid = 'pg_class'::regclass then
1435
execute(format('alter table %s owner to postgres;', r.objid::regclass));
36+
1537
else
1638
raise exception 'error on pgmq after-create script: unexpected object type %', r.classid;
39+
1740
end if;
1841
end loop;
1942
end $$;

flake.nix

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,7 @@
146146
x:
147147
x != ./nix/ext/timescaledb.nix &&
148148
x != ./nix/ext/timescaledb-2.9.1.nix &&
149-
x != ./nix/ext/plv8.nix &&
150-
x != ./nix/ext/postgis.nix &&
151-
x != ./nix/ext/pgrouting.nix &&
152-
x != ./nix/ext/pg_jsonschema.nix &&
153-
x != ./nix/ext/pg_graphql.nix
149+
x != ./nix/ext/plv8.nix
154150
) ourExtensions;
155151

156152
orioledbExtensions = orioleFilteredExtensions ++ [ ./nix/ext/orioledb.nix ];

nix/tests/expected/pg_tle.out

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
set client_min_messages = warning;
12
select
23
pgtle.install_extension(
34
'pg_distance',
@@ -29,16 +30,16 @@ select
2930
(1 row)
3031

3132
create extension pg_distance;
32-
select manhattan_dist(1, 1, 5, 5);
33+
select manhattan_dist(1, 1, 5, 5)::numeric(10,2);
3334
manhattan_dist
3435
----------------
35-
8
36+
8.00
3637
(1 row)
3738

38-
select euclidean_dist(1, 1, 5, 5);
39-
euclidean_dist
40-
-------------------
41-
5.656854249492381
39+
select euclidean_dist(1, 1, 5, 5)::numeric(10,2);
40+
euclidean_dist
41+
----------------
42+
5.66
4243
(1 row)
4344

4445
SELECT pgtle.install_update_path(

nix/tests/expected/extensions_sql_interface.out renamed to nix/tests/expected/z_15_ext_interface.out

Lines changed: 125 additions & 107 deletions
Large diffs are not rendered by default.
File renamed without changes.
File renamed without changes.
File renamed without changes.

nix/tests/expected/plv8.out renamed to nix/tests/expected/z_15_plv8.out

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
This test is excluded from the Postgres 17 suite because it does not ship
3+
with the Supabase PG17 image
4+
*/
5+
create extension if not exists plv8;
6+
NOTICE: extension "plv8" already exists, skipping
17
create schema v;
28
-- create a function to perform some JavaScript operations
39
create function v.multiply_numbers(a integer, b integer)

nix/tests/expected/rum.out renamed to nix/tests/expected/z_15_rum.out

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/*
2+
This extension is excluded from oriole-17 because it uses an unsupported index type
3+
*/
14
create schema v;
25
create table v.test_rum(
36
t text,
@@ -20,18 +23,18 @@ values
2023
create index rumidx on v.test_rum using rum (a rum_tsvector_ops);
2124
select
2225
t,
23-
a <=> to_tsquery('english', 'beautiful | place') as rank
26+
round(a <=> to_tsquery('english', 'beautiful | place')) as rank
2427
from
2528
v.test_rum
2629
where
2730
a @@ to_tsquery('english', 'beautiful | place')
2831
order by
2932
a <=> to_tsquery('english', 'beautiful | place');
30-
t | rank
31-
---------------------------------+----------
32-
it looks like a beautiful place | 8.22467
33-
the situation is most beautiful | 16.44934
34-
it is a beautiful | 16.44934
33+
t | rank
34+
---------------------------------+------
35+
it looks like a beautiful place | 8
36+
the situation is most beautiful | 16
37+
it is a beautiful | 16
3538
(3 rows)
3639

3740
drop schema v cascade;

nix/tests/expected/timescale.out renamed to nix/tests/expected/z_15_timescale.out

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
This test is excluded from the Postgres 17 suite because it does not ship
3+
with the Supabase PG17 image
4+
*/
5+
create extension if not exists timescaledb;
6+
NOTICE: extension "timescaledb" already exists, skipping
17
-- Confirm we're running the apache version
28
show timescaledb.license;
39
timescaledb.license

0 commit comments

Comments
 (0)