Skip to content

Commit

Permalink
Merge pull request #1299 from research-software-directory/1297-catego…
Browse files Browse the repository at this point in the history
…ry_path-fix

fix: specify return types in category_path
  • Loading branch information
ewan-escience authored Sep 16, 2024
2 parents c51e07c + b76135e commit a794933
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion database/009-create-keyword-and-category.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
-- SPDX-FileCopyrightText: 2022 - 2024 Netherlands eScience Center
-- SPDX-FileCopyrightText: 2023 - 2024 Felix Mühlbauer (GFZ) <felix.muehlbauer@gfz-potsdam.de>
-- SPDX-FileCopyrightText: 2023 - 2024 Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences
-- SPDX-FileCopyrightText: 2024 Christian Meeßen (GFZ) <christian.meessen@gfz-potsdam.de>
--
-- SPDX-License-Identifier: Apache-2.0

Expand Down Expand Up @@ -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 (
Expand Down

0 comments on commit a794933

Please sign in to comment.