Re: CREATE CAST allows creation of binary-coercible cast to range over domain

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: CREATE CAST allows creation of binary-coercible cast to range over domain
Date: 2024-08-21 07:55:30
Message-ID: CAMbWs4_NfUheqvfnjgM9DatOB9sO0==a5js=QUfF9Z_0OxhPLA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Aug 21, 2024 at 2:14 PM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> On 20.08.24 19:30, Tom Lane wrote:
> > In short, more or less as attached. (I didn't bother with a
> > regression test, since none of the adjacent error checks are
> > covered either.)
>
> This patch looks right.

This patch also looks good to me. To nitpick:

- * We know that composite, enum and array types are never binary-
- * compatible with each other. They all have OIDs embedded in them.
+ * We know that composite, array, range and enum types are never
+ * binary-compatible with each other. They all have OIDs embedded in
+ * them.

I wonder if it would be better for readability to list these types in
the order we check them in the code, as we did previously, i.e.:

* We know that composite, range, enum and array types are never
* ...

Thanks
Richard

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2024-08-21 11:53:29 BUG #18586: Process (and transaction) is stuck in IPC when the DB is under high load
Previous Message Peter Eisentraut 2024-08-21 06:14:23 Re: CREATE CAST allows creation of binary-coercible cast to range over domain