-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
C: operatorContext: OperatorContext: OperatorD2: mediumDifficulty: Medium to implementDifficulty: Medium to implementT: bugType: Bug fixType: Bug fixW: confirmWaiting: Needs confirmationWaiting: Needs confirmation
Description
We have installed the extension in a schema called utils:
CREATE SCHEMA utils;
CREATE EXTENSION ULID SCHEMA utils;The function utils.gen_monotonic_ulid() works fine.
If I run the following query in postgresql 16.1:
SELECT CAST('01HTHV582X9B5YBFP7GRBWXRHX' AS utils.ulid) = CAST('01HTHV582X9B5YBFP7GRBWXRHX' AS utils.ulid)Same result if we do:
SELECT utils.gen_monotonic_ulid() = utils.gen_monotonic_ulid();I am getting the following error:
[2024-05-22 16:28:51] [42725] ERROR: operator is not unique: utils.ulid = utils.ulid
[2024-05-22 16:28:51] Hint: Could not choose a best candidate operator. You might need to add explicit type casts.
I have checked and I have the = operator defined in the DB for ulid types:
SELECT
n.nspname,
o.oprname,
o.oprleft,
o.oprright,
o.oprresult,
p.proname
FROM
pg_operator o
JOIN
pg_namespace n ON o.oprnamespace = n.oid
JOIN
pg_proc p ON o.oprcode = p.oid
WHERE
n.nspname = 'utils' AND oprname = '=';Returns:
| nspname | oprname | oprleft | oprright | oprresult | proname |
|---|---|---|---|---|---|
| utils | = | 1403350 | 1403350 | 16 | ulid_eq |
| utils | = | 1403766 | 1403766 | 16 | geometry_eq |
| utils | = | 1404472 | 1404472 | 16 | geography_eq |
We are having that same error I reported when joining tables by ULID ids.
Thank you!
Metadata
Metadata
Assignees
Labels
C: operatorContext: OperatorContext: OperatorD2: mediumDifficulty: Medium to implementDifficulty: Medium to implementT: bugType: Bug fixType: Bug fixW: confirmWaiting: Needs confirmationWaiting: Needs confirmation