execute prepared statement passing parameter expression with COLLATE clause - Mailing list pgsql-hackers

From jian he
Subject execute prepared statement passing parameter expression with COLLATE clause
Date
Msg-id CACJufxEtPBWAk7nEn69ww2LKi9w1i4dLwd5gnjD1DQ2vaYoi2g@mail.gmail.com
Whole thread Raw
Responses Re: execute prepared statement passing parameter expression with COLLATE clause
Re: execute prepared statement passing parameter expression with COLLATE clause
List pgsql-hackers
hi.

$Subject setup

CREATE COLLATION case_insensitive (provider = icu, locale =
'@colStrength=secondary', deterministic = false);
CREATE COLLATION ignore_accents (provider = icu, locale =
'@colStrength=primary;colCaseLevel=yes', deterministic = false);
DROP TABLE IF EXISTS pktable cascade;
CREATE TABLE pktable (x text COLLATE case_insensitive);
INSERT INTO pktable VALUES ('A');
DEALLOCATE q6;
PREPARE q6 AS SELECT * FROM pktable WHERE x = $1;


select * from pktable where x = 'Å' collate ignore_accents;
--return one row

execute q6('Å' collate ignore_accents);
--return zero rows

not sure return zero rows is desired.



pgsql-hackers by date:

Previous
From: Tender Wang
Date:
Subject: Re: Wrong result when enable_partitionwise_join is on if collation of PartitionKey and Column is different.
Next
From: Steven Niu
Date:
Subject: Re: Use function smgrclose() to replace the loop