From: Veikko Mäkinen <veikko.makinen@ecom.fi>
To: pgsql-sql@postgresql.org
Subject: Alias to a type
Date: Wed, 22 Jun 2005 14:27:46 +0300
Message-ID: <42B94B32.5040707@ecom.fi> (raw)
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.
<pseudo-sql>
create type myschema.useridtype as varchar(20);
</pseudo-sql>
I might have to alter the type some day and this way I'd have to just
re-define the alias. Can this be achieved by creating a new type with
CREATE TYPE? What are the input/output functions in the CREATE TYPE
definition?
Thanks.
-veikko
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: veikko.makinen@ecom.fi
Subject: Re: Alias to a type
In-Reply-To: <42B94B32.5040707@ecom.fi>
* 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