Re: 回覆: 回复: Core dump happens when execute sql CREATE VIEW v1(c1) AS (SELECT ('4' COLLATE "C")::INT FROM generate_series(1, 10));

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Yulin PEI <ypeiae(at)connect(dot)ust(dot)hk>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: 回覆: 回复: Core dump happens when execute sql CREATE VIEW v1(c1) AS (SELECT ('4' COLLATE "C")::INT FROM generate_series(1, 10));
Date: 2021-04-19 16:47:38
Message-ID: 228444.1618850858@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yulin PEI <ypeiae(at)connect(dot)ust(dot)hk> writes:
> Let's look at your patch:

> ```
> // node is ('1' COLLATE "C")
> // targetType is varbit and it is non-collatable
> if (IsA(node, CollateExpr) && type_is_collatable(targetTypeId))
> {

> // we will not reach here.

That's not the committed patch, though. I realized after posting
it that it didn't maintain the same behavior in coerce_type as
coerce_to_target_type. But the actually-committed fix does, and
as I said, what you're suggesting seems equivalent though a bit
messier.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2021-04-19 16:52:23 Re: pg_amcheck option to install extension
Previous Message Robert Haas 2021-04-19 16:46:19 Re: Commit 86dc90056 - Rework planning and execution of UPDATE and DELETE