dbTalk Databases Forums  

[BUGS] decode function

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


Discuss [BUGS] decode function in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
gerard manvu
 
Posts: n/a

Default [BUGS] decode function - 12-09-2003 , 01:09 PM






Hi
I don't know if it is really a bug or a missuse of postgresql but when I is=
sue the following request
select decode(encode('=B5'::bytea, 'escape'), 'escape');
, the result is \346, not '=B5'.
Any help or a forum link ?

Thanks in advance
Gerard.
PS: PostGreSQL 7.4, Red Hat 8, Base under SQL_ASCII or UNICODE (doesn't wor=
k either)

Les noms de domaine les moins chers du march=E9 : 6,49 euros HT sur http://=
www.lycos.fr/pro .


---------------------------(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
  #2  
Old   
Peter Eisentraut
 
Posts: n/a

Default Re: [BUGS] decode function - 12-09-2003 , 01:30 PM






gerard manvu wrote:
Quote:
I don't know if it is really a bug or a missuse of postgresql but
when I issue the following request select decode(encode('µ'::bytea,
'escape'), 'escape');
, the result is \346, not 'µ'.
That's the same thing. bytea stores bytes, not characters, so we expect
that you are primarily interested in the byte value.


---------------------------(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.