On 2019-04-15 07:44, Jeevan Chalke wrote:
> The root cause is that the same code match_pattern_prefix() is being
> used for text and bytea, but bytea does not use collations, so having
> the collation 0 is expected, and we shouldn't call
> get_collation_isdeterministic() in that cas
On Fri, Apr 12, 2019 at 1:26 PM Peter Eisentraut <
peter.eisentr...@2ndquadrant.com> wrote:
> On 2019-04-11 17:04, Jeevan Chalke wrote:
> > The error is coming from get_collation_isdeterministic() when colloid
> > passed is 0. I think like we do in get_collation_name(), we should
> > return false
On 2019-04-11 17:04, Jeevan Chalke wrote:
> The error is coming from get_collation_isdeterministic() when colloid
> passed is 0. I think like we do in get_collation_name(), we should
> return false here when such collation oid does not exist.
I'm not in favor of doing that. It would risk papering
On Thu, Apr 11, 2019 at 10:50 PM Tom Lane wrote:
> Jeevan Chalke writes:
> > Do you mean, the code in get_collation_isdeterministic() should look like
> > something like below?
>
> > If colloid = InvalidOid then
> > return TRUE
> > ELSE IF tuple is valid then
> > return collisdeterministic f
Jeevan Chalke writes:
> Do you mean, the code in get_collation_isdeterministic() should look like
> something like below?
> If colloid = InvalidOid then
> return TRUE
> ELSE IF tuple is valid then
> return collisdeterministic from the tuple
> ELSE
> return FALSE
I think it's appropriate to
On Thu, Apr 11, 2019 at 9:07 PM Tom Lane wrote:
> Jeevan Chalke writes:
> > Following test-sequence causing an error "cache lookup failed for
> collation 0";
> > postgres:5432 [42106]=# create table foobar(a bytea primary key, b int);
> > CREATE TABLE
>
Jeevan Chalke writes:
> Following test-sequence causing an error "cache lookup failed for collation
> 0";
> postgres:5432 [42106]=# create table foobar(a bytea primary key, b int);
> CREATE TABLE
> postgres:5432 [42106]=# insert into foobar
> values('\x4c8
Hello hackers,
Following test-sequence causing an error "cache lookup failed for collation
0";
postgres:5432 [42106]=# create table foobar(a bytea primary key, b int);
CREATE TABLE
postgres:5432 [42106]=# insert into foobar
values('\x4c835521685c46ee827ab83d376cf028', 1);