pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ow <oneway_111@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: A simple way to Create type ...?
Date: Tue, 16 Sep 2003 14:04:36 -0700 (PDT)
Message-ID: <20030916210436.81214.qmail@web21409.mail.yahoo.com> (raw)

Hi,

I had a look at "create type" docs and it seems somewhat complex, involving
creation of functions and etc. I hope there's a simpler way for the following:

How should one declare a new custom type, say, "AddressType" that corresponds
internally to "varchar(50)". In other words, all columns that are assigned
"AddressType" would internally be "varchar(50)".

Example:
create type AddressType ... -- how to do it in a simple way?

create table ADDRESS
{
  address_id      int           not null,
  street_address1 AdressType    not null,
  street_address2 AdressType    not null,
  ....
)

Thanks







__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



view thread (6+ messages)  latest in thread

Message-ID: <20030916210436.81214.qmail@web21409.mail.yahoo.com>
Permalink:  ../20030916210436.81214.qmail@web21409.mail.yahoo.com/
Also on:    postgresql.org/message-id/20030916210436.81214.qmail@web21409.mail.yahoo.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: oneway_111@yahoo.com
  Subject: Re: A simple way to Create type ...?
  In-Reply-To: <20030916210436.81214.qmail@web21409.mail.yahoo.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