From: | Enrico Pirozzi <e(dot)pirozzi(at)nbsgroup(dot)it> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Fixed chars |
Date: | 2018-03-28 09:11:53 |
Message-ID: | 94af194d-9614-781d-9458-dfda05c86449@nbsgroup.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Kretschmer | 2018-03-28 09:32:39 | Re: Fixed chars |
Previous Message | Alessandro Aste | 2018-03-28 08:30:14 | Re: Postgresql 10.3 , query never completes if LIMIT clause is specified and paralle processing is on |