BUG #13934: wrong result of split_part with char value - Mailing list pgsql-bugs

From dominik.kosiorek@infobright.com
Subject BUG #13934: wrong result of split_part with char value
Date
Msg-id 20160208151107.2662.82302@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #13934: wrong result of split_part with char value  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      13934
Logged by:          Dominik Kosiorek
Email address:      dominik.kosiorek@infobright.com
PostgreSQL version: 9.2.2
Operating system:   Ubuntu 14
Description:

create table string1postgres(
a1 int,
a2 char(65),
a3pattern char(15),
a4field int
)
insert into string1postgres values(72,'abcd defg poir abcde m ert g d c v b
gthb',' ',1);

select split_part(a2,a3pattern,a4field) from string1postgres;

-------------------
the result of split part is:
-------------------
abcd defg poir abcde m ert g d c v b gthb

-------------------
instead of:
-------------------
abcd

-------------------
This defect is only with char type. On varchar result is correct.

pgsql-bugs by date:

Previous
From: mail@eaden.net
Date:
Subject: BUG #13919: Cast error when table is empty.
Next
From: Peter Geoghegan
Date:
Subject: Re: BUG #13917: "upsert" construct doesn't work with partial index