pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: james.inform@pharmapp.de
Subject: BUG #17584: SQL crashes PostgreSQL when using ICU collation
Date: Fri, 12 Aug 2022 14:18:44 +0000
Message-ID: <17584-95c79b4a7d771f44@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      17584
Logged by:          James Inform
Email address:      james.inform@pharmapp.de
PostgreSQL version: 14.5
Operating system:   Linux / Mac
Description:        

This bug appears in PG up to 14.5.

I have attached a data file in 7z format. Please extract the "data..csv"
from it and run the following statements in a newly created database on
PostgreSQL 14.x.

-- 1. Create collation and implizit cast
create collation mycol from "de-DE-x-icu";
create cast (varchar as integer) with inout as implicit;

-- 2. Create table
create table testtab (
    a1  text not null collate "mycol",
    b2  text not null collate "mycol",
    c3  text not null collate "mycol",
    d4  varchar(6) null collate "mycol",
    e5  varchar(2) null collate "mycol",
    f6  varchar(3) null collate "mycol",
    g7  varchar(10) null collate "mycol",
    h8  varchar(10) null collate "mycol",
    i9  text null collate "mycol",
    j10  text null collate "mycol",
    k11  varchar(10) null collate "mycol",
    l12  text null collate "mycol",
    m13  varchar(10) null collate "mycol",
    n14  varchar(500) null collate "mycol",
    o15  varchar(80) null collate "mycol",
    p16  varchar(80) null collate "mycol",
    q17  varchar(10) null collate "mycol",
    r18  varchar(60) null collate "mycol",
    s19  varchar(10) null collate "mycol",
    t20  varchar(10) null collate "mycol",
    u21  text null collate "mycol",
    v22  varchar(1) null collate "mycol",
    w23  varchar(250) null collate "mycol",
    x24  varchar(1000) null collate "mycol",
    y25  varchar(1000) null collate "mycol",
    z26  varchar(1000) null collate "mycol",
    a27  varchar(1000) null collate "mycol",
    b28  varchar(1000) null collate "mycol",
    c29  varchar(1000) null collate "mycol",
    d30  varchar(1000) null collate "mycol",
    e31  varchar(1000) null collate "mycol",
    f32  varchar(1000) null collate "mycol",
    g33  int8 null,
    h34  varchar(2) null collate "mycol",
    i35  varchar(2) null collate "mycol",
    j36  varchar(2) null collate "mycol",
    k37  varchar(250) null collate "mycol",
    l38  varchar(250) null collate "mycol",
    m39  varchar(2) null collate "mycol",
    n40  timestamptz null,
    o41  timestamptz null,
    p42  int8 null,
    q43  int8 null,
    r44  int8 not null,
    constraint ak_1 unique (r44),
    constraint pk_1 primary key (a1)
)
;

-- 3. Load data into table
copy testtab from '{PATH_TO_YOUR_FILE}/data.csv' csv header;

-- 4. Create index and analyze table
create index on testtab using btree (i9);
analyze testtab;

-- ERROR
-- 5. This is where the error occurs
-- ERROR:  could not find block containing chunk 0x
select count(*) from
(
    select vou_d.* from
    (
            select
                r44,
                i9,
                j10,
                n14
            from
                testtab
    ) vou_d 
    order by i9 asc, j10 asc
) a
;



view thread (14+ messages)  latest in thread

Message-ID: <17584-95c79b4a7d771f44@postgresql.org>
Permalink:  ../17584-95c79b4a7d771f44@postgresql.org/
Also on:    postgresql.org/message-id/17584-95c79b4a7d771f44@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, james.inform@pharmapp.de
  Subject: Re: BUG #17584: SQL crashes PostgreSQL when using ICU collation
  In-Reply-To: <17584-95c79b4a7d771f44@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox