From: | Behrang Saeedzadeh <behrangsa(at)gmail(dot)com> |
---|---|
To: | James Harper <james(dot)harper(at)bendigoit(dot)com(dot)au> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: type aliases |
Date: | 2014-02-15 09:20:16 |
Message-ID: | CAERAJ+-S32yxS0yROo6ME+D4kwGhF3JktpigynvK=wnpViB5gQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
You probably should define your domain like this:
CREATE DOMAIN myvarchar varchar(42);
Best regards,
Behrang
http://www.behrang.org
On Sat, Feb 15, 2014 at 6:23 PM, James Harper <james(dot)harper(at)bendigoit(dot)com(dot)au
> wrote:
> 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
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
From | Date | Subject | |
---|---|---|---|
Next Message | James Harper | 2014-02-15 09:50:08 | Re: type aliases |
Previous Message | James Harper | 2014-02-15 07:23:50 | type aliases |