dbTalk Databases Forums  

Re: [BUGS] [HACKERS] split_part bug

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] [HACKERS] split_part bug in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] [HACKERS] split_part bug - 11-17-2004 , 04:06 PM






John Hansen <john (AT) geeknet (DOT) com.au> writes:
Quote:
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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] [HACKERS] split_part bug - 11-17-2004 , 04:32 PM






John Hansen <john (AT) geeknet (DOT) com.au> writes:
Quote:
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

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org


Reply With Quote
  #3  
Old   
John Hansen
 
Posts: n/a

Default Re: [BUGS] [HACKERS] split_part bug - 11-21-2004 , 12:58 AM



Quote:
Works fine for me. What encoding/locale are you using?
unicode / c


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


Reply With Quote
  #4  
Old   
John Hansen
 
Posts: n/a

Default Re: [BUGS] [HACKERS] split_part bug - 11-21-2004 , 01:00 AM



Quote:
[ shrug... ] Works fine for me in unicode, too.
never mind me,. I broke it.....

seems my assumption that UCS2 == UTF16 was way off....

.... john


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.