type aliases

From: James Harper <james(dot)harper(at)bendigoit(dot)com(dot)au>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: type aliases
Date: 2014-02-15 07:23:50
Message-ID: 6035A0D088A63A46850C3988ED045A4B6F3A5466@BITCOM1.int.sbss.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I can create an alias of a type like:

CREATE DOMAIN myvarchar varchar;

But I can't declare a myvarchar with a variable size, eg "mycolumn myvarchar(42)" and from what I've read this is the way it DOMAIN is supposed to work so I can't do it that way.

Is there a way to define myvarchar the way I want to? Can I use CREATE TYPE and just mirror the declaration of the underlying type?

Thanks

James

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Behrang Saeedzadeh 2014-02-15 09:20:16 Re: type aliases
Previous Message Pavel Stehule 2014-02-15 05:02:06 Re: Is it reasonable to store double[] arrays of 30K elements