Yulin PEI 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
ists.postgresql.org
主旨: Re: 回复: Core dump happens when execute sql CREATE VIEW v1(c1) AS (SELECT
('4' COLLATE "C")::INT FROM generate_series(1, 10));
Yulin PEI writes:
> After several tests, I found that this patch do not fix the bug well.
What do you think is wrong with it?
&
After several tests, I found that this patch do not fix the bug well.
I think we should use the same logic to treat parent CollateExpr and child
CollateExpr. In your patch, if the parent node is CollateExpr and the target
type is non-collatable, we coerce CollateExpr->arg. If the child
Yulin PEI writes:
> After several tests, I found that this patch do not fix the bug well.
What do you think is wrong with it?
> So the attachment is my patch and it works well as far as I tested.
This seems equivalent to the already-committed patch [1] except that
it wastes a makeNode call
I think it is better to add this test case to regress.
发件人: Tom Lane
发送时间: 2021年4月13日 0:59
收件人: Yulin PEI
抄送: pgsql-hackers@lists.postgresql.org
主题: Re: Core dump happens when execute sql CREATE VIEW v1(c1) AS (SELECT ('4'
COLLATE "C")::INT FROM
After reading the code and the patch, I think the patch is good. If the
type is non-collatable, we do not add a CollateExpr node as a 'parent' node to
the coerced node.
发件人: Tom Lane
发送时间: 2021年4月13日 0:59
收件人: Yulin PEI
抄送: