CREATE TYPE similar CHAR type

From: Mohsen SM <mohsensoodkhah(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: CREATE TYPE similar CHAR type
Date: 2014-03-06 11:24:01
Message-ID: CAGT6x6d=ii58MK039R2s2BNJuh2Nv57hwgM53Cj_Nm+bbq6Yog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2014-03-06 12:02:45 Re: CREATE TYPE similar CHAR type
Previous Message Kohei KaiGai 2014-03-06 11:15:59 Re: contrib/cache_scan (Re: What's needed for cache-only table scan?)