CREATE TYPE similar CHAR type - Mailing list pgsql-hackers

From Mohsen SM
Subject CREATE TYPE similar CHAR type
Date
Msg-id CAGT6x6d=ii58MK039R2s2BNJuh2Nv57hwgM53Cj_Nm+bbq6Yog@mail.gmail.com
Whole thread Raw
Responses Re: CREATE TYPE similar CHAR type  (Thom Brown <thom@linux.com>)
Re: CREATE TYPE similar CHAR type  (David Johnston <polobo@yahoo.com>)
List pgsql-hackers
I want use CREATE TYPE to create one type similar to char.
I want to when I create type, then my type behave similar to char:

CREATE TABLE test (oneChar char);

when I want insert one column with length>1 to it, so it gets this error:
ERROR:  value too long for type character(1)

I want my type behave similar this but it behaves similar varchar type.

pgsql-hackers by date:

Previous
From: Kohei KaiGai
Date:
Subject: Re: contrib/cache_scan (Re: What's needed for cache-only table scan?)
Next
From: Thom Brown
Date:
Subject: Re: CREATE TYPE similar CHAR type