From dbbd06cf859cf784d3341057bf586d339e63b118 Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Thu, 14 Mar 2024 22:28:46 +0100 Subject: [PATCH] Change the verify for season_calendar_season_id_fkey It failed in build.opensuse.org; possibly the view in information_scheme is different. --- verify/season_calendar_season_id_fkey.sql | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/verify/season_calendar_season_id_fkey.sql b/verify/season_calendar_season_id_fkey.sql index c8c04fe..81f32f3 100644 --- a/verify/season_calendar_season_id_fkey.sql +++ b/verify/season_calendar_season_id_fkey.sql @@ -3,14 +3,12 @@ begin; select 1/count(*) -from information_schema.constraint_column_usage -where table_catalog = 'camper' - and table_schema = 'camper' - and table_name = 'season' - and column_name = 'season_id' - and constraint_catalog = 'camper' - and constraint_schema = 'camper' - and constraint_name = 'season_calendar_season_id_fkey' +from pg_constraint +where conrelid = 'camper.season_calendar'::regclass + and conname = 'season_calendar_season_id_fkey' + and contype = 'f' + and connamespace = 'camper'::regnamespace + and pg_get_constraintdef(oid) = 'FOREIGN KEY (season_id) REFERENCES camper.season(season_id)' ; rollback;