Re: why do i get 2 as answer for select length('aa '::char(6));

From: Andrej <andrej(dot)groups(at)gmail(dot)com>
To: john snow <ofbizfanster(at)gmail(dot)com>
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: why do i get 2 as answer for select length('aa '::char(6));
Date: 2018-01-17 02:14:48
Message-ID: CACMx3pP_6rX1YLJCDC4UR7d4JWtbuBZa=D47o16E9=aABpLLSQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 17 January 2018 at 14:59, john snow <ofbizfanster(at)gmail(dot)com> wrote:
> as well as select length('aa'::char(6));
>
> i thought if the string to be stored is shorter than specified length , it
> will be padded with spaces?

What made you think that?

--
Please don't top post, and don't use HTML e-Mail :} Make your quotes concise.

http://www.georgedillon.com/web/html_email_is_evil.shtml
http://www.catb.org/jargon/html/email-style.html

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message john snow 2018-01-17 02:40:50 Re: why do i get 2 as answer for select length('aa '::char(6));
Previous Message john snow 2018-01-17 01:59:57 why do i get 2 as answer for select length('aa '::char(6));