pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Veikko Mäkinen <veikko.makinen@ecom.fi>
Cc: pgsql-sql@postgresql.org
Subject: Re: Alias to a type
Date: Wed, 22 Jun 2005 13:07:01 +0100
Message-ID: <42B95465.2060708@archonet.com> (raw)
In-Reply-To: <42B94B32.5040707@ecom.fi>
References: <42B94B32.5040707@ecom.fi>

Veikko Mäkinen wrote:
> Hey,
> 
> Is it possible to create a new type as an alias to a pre-defined type? I 
> use "USERID varchar(20)" in almost every table I have I'd like to make 
> an alias for that type eg.

CREATE DOMAIN username_string AS varchar(20);

Test it with your client applications though, make sure they cope. Some 
don't cope well with user-defined types.
-- 
   Richard Huxton
   Archonet Ltd




view thread (8+ messages)  latest in thread

Message-ID: <42B95465.2060708@archonet.com>
Permalink:  ../42B95465.2060708@archonet.com/
Also on:    postgresql.org/message-id/42B95465.2060708@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, veikko.makinen@ecom.fi
  Subject: Re: Alias to a type
  In-Reply-To: <42B95465.2060708@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox