Skip to content

Commit

Permalink
Merge pull request #221 from dbmdz/sql-quick-fix
Browse files Browse the repository at this point in the history
SQL: Fix subjects' unique check function
  • Loading branch information
daforster authored Jan 22, 2025
2 parents 7a7cf1c + 125e0c6 commit 733983e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ declare
tuple_exists boolean;
begin
if ids is null or cardinality(ids) = 0 then
execute 'select exists(select 1 from public.subjects where $1 = type and $2 = label and coalesce(identifiers, array[]::dbidentifier[]) = array[]::dbidentifier[] and $3 <> uuid)'
execute 'select exists(select 1 from public.subjects where $1 = type and $2 = label and coalesce(identifiers, array[]::public.dbidentifier[]) = array[]::public.dbidentifier[] and $3 <> uuid)'
into tuple_exists
using ptype, plabel, puuid;
if tuple_exists then
Expand Down

0 comments on commit 733983e

Please sign in to comment.