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.