Re: With Function 'Chr', is it a bug? - Mailing list pgsql-hackers

From Wang Haiyong
Subject Re: With Function 'Chr', is it a bug?
Date
Msg-id 005301c73a12$463db520$bc1da8c0@wanghy
Whole thread Raw
In response to Autovacuum improvements  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: With Function 'Chr', is it a bug?
List pgsql-hackers
There are two select statement  with using Function chr(0), I don't know, are they both right ? I think that they are
inconsistent.

Thanks 

[postgres@db2 ~]$ psql
Welcome to psql 8.1.3, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms      \h for help with SQL commands      \? for help with psql commands      \g
orterminate with semicolon to execute query      \q to quit
 

postgres=# select 'abc' || chr(0) || 'abc'  as col;col 
-----abc
(1 row)

postgres=# select length('abc' || chr(0) || 'abc')  as col; col 
-----  7
(1 row)


----------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only
forthe use of the intended recipient and may be confidential and/or privileged of Neusoft Group Ltd., its subsidiaries
and/orits affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding,
printing,storing, disclosure or copying is strictly prohibited, and may be unlawful. If you have received this
communicationin error, please immediately notify the sender by return e-mail, and delete the original message and all
copiesfrom your system. Thank you. 
 
-----------------------------------------------------------------------------------------------



pgsql-hackers by date:

Previous
From: Enrico
Date:
Subject: Re: Index for similarity search
Next
From: "Takayuki Tsunakawa"
Date:
Subject: Re: Idea for fixing the Windows fsync problem