diff --git a/database/009-create-keyword-and-category.sql b/database/009-create-keyword-and-category.sql index 85414358a..1204f38db 100644 --- a/database/009-create-keyword-and-category.sql +++ b/database/009-create-keyword-and-category.sql @@ -2,6 +2,7 @@ -- SPDX-FileCopyrightText: 2022 - 2024 Netherlands eScience Center -- SPDX-FileCopyrightText: 2023 - 2024 Felix Mühlbauer (GFZ) -- SPDX-FileCopyrightText: 2023 - 2024 Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences +-- SPDX-FileCopyrightText: 2024 Christian Meeßen (GFZ) -- -- SPDX-License-Identifier: Apache-2.0 @@ -185,7 +186,15 @@ CREATE TRIGGER zzz_check_cycle_categories -- triggers are executed in alphabeti -- helper functions CREATE FUNCTION category_path(category_id UUID) -RETURNS TABLE (LIKE category) +RETURNS TABLE ( + id UUID, + parent UUID, + community UUID, + short_name VARCHAR, + name VARCHAR, + properties JSONB, + provenance_iri VARCHAR +) LANGUAGE SQL STABLE AS $$ WITH RECURSIVE cat_path AS (