Lists: | pgsql-bugspgsql-hackers |
---|
From: | John Hansen <john(at)geeknet(dot)com(dot)au> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | split_part bug |
Date: | 2004-11-17 21:40:50 |
Message-ID: | 1100727650.32413.4.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs pgsql-hackers |
PostgreSQL 8.0b4 as released.
select split_part('a b c d e f g h i j k l m n o p q r s t u v w x y
z',' ',1);
select split_part('a b c d e f g h i j k l m n o p q r s t u v w x y
z',' ',2);
select split_part('a b c d e f g h i j k l m n o p q r s t u v w x y
z',' ',3);
select split_part('a b c d e f g h i j k l m n o p q r s t u v w x y
z',' ',4);
should return a b c, and d
returns a, null, null, null
select split_part('a b c d e f g h i j k l m n o p q r s t u v w x y
z',' ',2);
select split_part('a b c d e f g h i j k l m n o p q r s t u v w x y
z',' ',3);
select split_part('a b c d e f g h i j k l m n o p q r s t u v w x y
z',' ',4);
should return b c, and d
returns b, c, null
... John
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | John Hansen <john(at)geeknet(dot)com(dot)au> |
Cc: | pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] split_part bug |
Date: | 2004-11-17 21:58:27 |
Message-ID: | 4413.1100728707@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs pgsql-hackers |
John Hansen <john(at)geeknet(dot)com(dot)au> writes:
> PostgreSQL 8.0b4 as released.
> select split_part('a b c d e f g h i j k l m n o p q r s t u v w x y
> z',' ',1);
> select split_part('a b c d e f g h i j k l m n o p q r s t u v w x y
> z',' ',2);
> select split_part('a b c d e f g h i j k l m n o p q r s t u v w x y
> z',' ',3);
> select split_part('a b c d e f g h i j k l m n o p q r s t u v w x y
> z',' ',4);
> should return a b c, and d
> returns a, null, null, null
Works fine for me. What encoding/locale are you using?
regards, tom lane
From: | John Hansen <john(at)geeknet(dot)com(dot)au> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] split_part bug |
Date: | 2004-11-17 22:12:48 |
Message-ID: | 1100729568.32413.8.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs pgsql-hackers |
> Works fine for me. What encoding/locale are you using?
unicode / c
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | John Hansen <john(at)geeknet(dot)com(dot)au> |
Cc: | pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] split_part bug |
Date: | 2004-11-17 22:27:41 |
Message-ID: | 4756.1100730461@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs pgsql-hackers |
John Hansen <john(at)geeknet(dot)com(dot)au> writes:
>> Works fine for me. What encoding/locale are you using?
> unicode / c
[ shrug... ] Works fine for me in unicode, too.
u=# select split_part('a b c d e f g h i j k l m n o p q r s t u v w x y z',' ',1);
split_part
------------
a
(1 row)
u=# select split_part('a b c d e f g h i j k l m n o p q r s t u v w x y z',' ',2);
split_part
------------
b
(1 row)
u=# select split_part('a b c d e f g h i j k l m n o p q r s t u v w x y z',' ',3);
split_part
------------
c
(1 row)
u=# select split_part('a b c d e f g h i j k l m n o p q r s t u v w x y z',' ',4);
split_part
------------
d
(1 row)
regards, tom lane
From: | John Hansen <john(at)geeknet(dot)com(dot)au> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] split_part bug |
Date: | 2004-11-17 22:34:18 |
Message-ID: | 1100730858.32413.11.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs pgsql-hackers |
> [ shrug... ] Works fine for me in unicode, too.
never mind me,. I broke it.....
seems my assumption that UCS2 == UTF16 was way off....
... john