Re: With Function 'Chr', is it a bug?

From: Wang Haiyong <wanghaiyong(at)neusoft(dot)com>
To: tomas(at)tuxteam(dot)de, "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: With Function 'Chr', is it a bug?
Date: 2007-01-17 08:34:16
Message-ID: 005301c73a12$463db520$bc1da8c0@wanghy
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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(at)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 or terminate 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 for the use of the intended recipient and may be confidential and/or privileged of Neusoft Group Ltd., its subsidiaries and/or its 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 communication in error, please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you.
-----------------------------------------------------------------------------------------------

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hubert FONGARNAND 2007-01-17 08:36:49 Re: Temparary disable constraint
Previous Message Magnus Hagander 2007-01-17 08:09:48 Re: Idea for fixing the Windows fsync problem

Browse pgsql-patches by date

  From Date Subject
Next Message Gregory Stark 2007-01-17 13:20:36 Re: Recalculating OldestXmin in a long-running vacuum
Previous Message Magnus Hagander 2007-01-17 07:56:28 Re: O_DIRECT support for Windows