dbTalk Databases Forums  

[BUGS] Bug in concat operator for Char?

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


Discuss [BUGS] Bug in concat operator for Char? in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Josh Berkus
 
Posts: n/a

Default [BUGS] Bug in concat operator for Char? - 07-20-2004 , 01:18 PM






People,

Severity: Serious Annoyance
Reproducable on: 7.4.1, 7.4.3, 7.5devel
Summary: Concatination of CHAR() data type field seems to result in a TEXT
value instead of a CHAR value. Is there a reason for this?

Example:
webmergers=> select '"'::char(4) || ''::char(4) || '"'::char(4);
?column?
----------
""
(1 row)

Depending on the spec, it seems to me that the above should result either in a
char(4) of " " or a char(12) of " " . But we get a text value.
Is this the SQL spec? Is there another reason for this behavior?

--
-Josh Berkus
Aglio Database Solutions
San Francisco


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

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.