Minor difference in behavior between +/-

From: Ryan Murphy <ryanmurf(at)gmail(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Minor difference in behavior between +/-
Date: 2023-01-25 05:34:18
Message-ID: CAATxnCxffW3w8oV3zCZg8jcvL=KAhewVV0gk2x0CSfDVy5FDLw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

SELECT NULL - date '2023-01-05';
-> result is null
SELECT NULL + date '2023-01-05';
-> result is [42725] ERROR: operator is not unique: unknown + date Hint:
Could not choose a best candidate operator. You might need to add explicit
type casts. Position: 13

I would expect both of those to be null.

Thanks,
Ryan

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2023-01-25 05:37:57 BUG #17759: MERGE UPDATE statements do not cause generated columns to update
Previous Message Stephen Frost 2023-01-24 20:57:13 Re: [OT] Microsoft: Kubernetes clusters hacked in malware campaign via PostgreSQL