Re: Why length(to_char(1::integer, '9')) = 2 ? - Mailing list pgsql-general

From Pavel Stehule
Subject Re: Why length(to_char(1::integer, '9')) = 2 ?
Date
Msg-id AANLkTi=+JLX_dUo30_BJ8kfK0tg3G3OFYyb0i=2XbAiz@mail.gmail.com
Whole thread Raw
In response to Why length(to_char(1::integer, '9')) = 2 ?  (Dmitriy Igrishin <dmitigr@gmail.com>)
Responses Re: Why length(to_char(1::integer, '9')) = 2 ?
Re: Why length(to_char(1::integer, '9')) = 2 ?
List pgsql-general
2011/3/9 Dmitriy Igrishin <dmitigr@gmail.com>:
> Hey all,
>
> dmitigr=> select to_char(1, '9');
>  to_char
> ---------
>   1
>
> dmitigr=> select length(to_char(1, '9'));
>  length
> --------
>       2
>
> Why to_char() includes preceding blank space in the result ?

it is compatibility with Oracle?

Regards

Pavel

>
> --
> // Dmitriy.
>
>
>

pgsql-general by date:

Previous
From: Dmitriy Igrishin
Date:
Subject: Why length(to_char(1::integer, '9')) = 2 ?
Next
From: Raymond O'Donnell
Date:
Subject: Re: Why length(to_char(1::integer, '9')) = 2 ?