Re: BUG #3413: character string or multibyte character to "char" - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3413: character string or multibyte character to "char"
Date
Msg-id 18255.1182866882@sss.pgh.pa.us
Whole thread Raw
In response to BUG #3413: character string or multibyte character to "char"  ("Toru SHIMOGAKI" <shimogaki.toru@oss.ntt.co.jp>)
List pgsql-bugs
"Toru SHIMOGAKI" <shimogaki.toru@oss.ntt.co.jp> writes:
> When a character string or a multibyte character is inserted to "char"
> column, no error occurs. Is this a bug?

That's the historical behavior of the datatype, and given that it's
been like that since Berkeley days, changing it seems ill-advised.
If you want a column that behaves sanely for multibyte data, use
char(1).

            regards, tom lane

pgsql-bugs by date:

Previous
From: Zdenek Kotala
Date:
Subject: Re: REVOKE CREATE does not work on default tablespace
Next
From: Tom Lane
Date:
Subject: Re: REVOKE CREATE does not work on default tablespace