Re: BUG #16325: Assert failure on partitioning by int for a text value with a collation

Dmitry Dolgov <9erthalion6@gmail.com>

From: Dmitry Dolgov <9erthalion6@gmail.com>
To: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2020-03-28T12:53:03Z
Lists: pgsql-bugs

Attachments

> On Sat, Mar 28, 2020 at 05:43:05AM +0000, PG Bug reporting form wrote:
>
>
> The following query:
> create table parted (i int) partition by list (i);
> create table part_coll partition of parted for values in ('1' collate
> "POSIX");
>
> leads to an assert failure with the following stack trace:

Thanks for reporting! Looks like transformPartitionBoundValue needs to
check that the source collumn is collatable, then we get more expected
result:

    =# create table part_coll partition of parted for values in ('1' collate "POSIX");
    ERROR:  42804: collations are not supported by type integer

Commits

  1. Fix crash when using COLLATE in partition bound expressions