From 54d74f29f53d667a471031a55f095ee9f97eb074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Casta=C3=B1o=20Arteaga?= Date: Mon, 18 Nov 2024 09:21:08 +0100 Subject: [PATCH] Update semver db functions to use 64 bits integers (#4154) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #4146 Signed-off-by: Sergio CastaƱo Arteaga --- database/migrations/functions/packages/semver_gt.sql | 4 ++-- database/migrations/functions/packages/semver_gte.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/database/migrations/functions/packages/semver_gt.sql b/database/migrations/functions/packages/semver_gt.sql index 9ef3735c81..b8eb8014c5 100644 --- a/database/migrations/functions/packages/semver_gt.sql +++ b/database/migrations/functions/packages/semver_gt.sql @@ -5,8 +5,8 @@ declare semver_regexp text := '(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?'; v1_parts text[] = regexp_match(p_v1, semver_regexp); v2_parts text[] = regexp_match(p_v2, semver_regexp); - v1 int[] := v1_parts[1:3]::int[]; - v2 int[] := v2_parts[1:3]::int[]; + v1 bigint[] := v1_parts[1:3]::bigint[]; + v2 bigint[] := v2_parts[1:3]::bigint[]; v1_prerelease text := v1_parts[4]; v2_prerelease text := v2_parts[4]; begin diff --git a/database/migrations/functions/packages/semver_gte.sql b/database/migrations/functions/packages/semver_gte.sql index 4f4a67e754..4da5a376df 100644 --- a/database/migrations/functions/packages/semver_gte.sql +++ b/database/migrations/functions/packages/semver_gte.sql @@ -6,8 +6,8 @@ declare semver_regexp text := '(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?'; v1_parts text[] = regexp_match(p_v1, semver_regexp); v2_parts text[] = regexp_match(p_v2, semver_regexp); - v1 int[] := v1_parts[1:3]::int[]; - v2 int[] := v2_parts[1:3]::int[]; + v1 bigint[] := v1_parts[1:3]::bigint[]; + v2 bigint[] := v2_parts[1:3]::bigint[]; v1_prerelease text := v1_parts[4]; v2_prerelease text := v2_parts[4]; begin