Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f177m-0000Jh-QQ for pgsql-general@arkaria.postgresql.org; Wed, 28 Mar 2018 09:12:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f177k-0004Gg-5K for pgsql-general@arkaria.postgresql.org; Wed, 28 Mar 2018 09:12:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f177j-0004GX-Sv for pgsql-general@lists.postgresql.org; Wed, 28 Mar 2018 09:12:03 +0000 Received: from mta1.ilger.com ([77.81.238.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f177a-0007Ti-8h for pgsql-general@lists.postgresql.org; Wed, 28 Mar 2018 09:12:00 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mta1.ilger.com (Postfix) with ESMTP id A4A1D42585 for ; Wed, 28 Mar 2018 11:11:51 +0200 (CEST) X-Virus-Scanned: amavisd-new at mta1.ilger.com Received: from mta1.ilger.com ([127.0.0.1]) by localhost (mta1.ilger.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id twzU_Z8gSUrp for ; Wed, 28 Mar 2018 11:11:51 +0200 (CEST) Received: from [172.18.4.138] (37-186-245-150.ip271.fastwebnet.it [37.186.245.150]) by mta1.ilger.com (Postfix) with ESMTPSA id 81143407AA for ; Wed, 28 Mar 2018 11:11:51 +0200 (CEST) To: pgsql-general@lists.postgresql.org From: Enrico Pirozzi Subject: Fixed chars Message-ID: <94af194d-9614-781d-9458-dfda05c86449@nbsgroup.it> Date: Wed, 28 Mar 2018 11:11:53 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi , I've seen this strange thing. sitedb=# create table test_tb(codice char(7)); CREATE TABLE sitedb=# insert into test_tb values('pippo'); INSERT 0 1 sitedb=# select codice || 'a'::char(1),length(codice) from test_tb ?column? | length ----------+-------- pippoa | 5 (1 row) On the official documentation |character(/|n|/)|,|char(/|n|/)| fixed-length, blank padded https://www.postgresql.org/docs/10/static/datatype-character.html Can anyone help me? Enrico -- Enrico Pirozzi NBS Group S.r.l. via Val Tiberina 23/A 63074, San Benedetto del Tronto (AP) Tel. 0735-7626201