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?
&
ent is all
digits.
So the attachment is my patch and it works well as far as I tested.
发件人: 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'
COLL
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 gener
@lists.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:
> I found it could cause a crash when executing sql statement: `CREATE VIEW
> v1(c1) AS (SELECT ('4' COLLATE "C")::
Yulin PEI writes:
> I found it could cause a crash when executing sql statement: `CREATE VIEW
> v1(c1) AS (SELECT ('4' COLLATE "C")::INT FROM generate_series(1, 10)); ` in
> postgres 13.2 release.
Nice catch. I don't think the code in DefineVirtualRelation is wrong:
exprCollation
HI hackers,
I found it could cause a crash when executing sql statement: `CREATE VIEW
v1(c1) AS (SELECT ('4' COLLATE "C")::INT FROM generate_series(1, 10)); ` in
postgres 13.2 release.
The crash happens at view.c:89 and I did some analysis:
```
ColumnDef *def =