Hi, Then we must know what is your collation… What is the collation of your database? select datname, pg_catalog.pg_encoding_to_char(encoding) "encoding", datcollate, datctype from pg_database; It is also possible to define an explicit collation for the column. You can have it when you describe the table… But I think like others have already said that this is perhaps not the right choice. Michel SALAIS De : Nagaraj Raj <nagaraj.sf@xxxxxxxxx> sorry, forgot to attach the test cases.
On Friday, May 21, 2021, 03:59:18 PM PDT, Nagaraj Raj <nagaraj.sf@xxxxxxxxx> wrote: Hi, This is also not working, create table mytable_z partition of mytable for values from ('Z') to ('[') partition by range(id); ERROR: empty range bound specified for partition "mytable_z" DETAIL: Specified lower bound ('Z') is greater than or equal to upper bound ('['). SQL state: 42P17 DB running on version PostgreSQL 11.6, compiled by Visual C++ build 1800, 64-bit On Friday, May 21, 2021, 02:00:38 PM PDT, Michel SALAIS <msalais@xxxxxxx> wrote: Hi I don’t discuss here the choice itself but this is not correct: create table mytable_z of mytable for values from ('Z') to ('Z['); It should be create table mytable_z of mytable for values from ('Z') to ('[') Michel SALAIS De : Nagaraj Raj <nagaraj.sf@xxxxxxxxx> Hi David, Hi, I am trying to create partitions on the table which have around 2BIL records and users will always look for the "name", its not possible to create a partition with a list, so we are trying to create a partition-based first letter of the name column. name column has a combination of alpha numeric values. > postgres=# select chr(ascii('z')+1) ; I tried as below, I'm able to create a partition table for 'Z', but it's not identifying partition table. postgres=# select chr(ascii('Z')+1) ; create table mytable_z of mytable for values from ('Z') to ('Z['); CREATE TABLE insert into mytable values(4,'ZAR83NB'); ERROR: no partition of relation "mytable" found for row DETAIL: Partition key of the failing row contains (name) = (ZAR83NB). SQL state: 23514 On Friday, May 21, 2021, 01:24:13 AM PDT, David Rowley <dgrowleyml@xxxxxxxxx> wrote: On Fri, 21 May 2021 at 19:02, Nagaraj Raj <nagaraj.sf@xxxxxxxxx> wrote:
|