From: Simon Bateman <batemans_25@hotmail.com>
To: POSTGRES SQL User GROUP <pgsql-sql@postgresql.org>
Subject: Adding ENUM Type
Date: Fri, 4 Sep 2009 05:36:10 +0000
Message-ID: <SNT122-W1123CD6395C821293C0AC694EE0@phx.gbl> (raw)
I have:
CREATE TYPE status AS ('NEW','ACTIVE','DESPATCH','COMPLETE');
and included field in my modified version of dellstore2.sql data
CREATE TABLE pg_orders
(
orderid serial NOT NULL,
customerid integer NOT NULL,
orderdate date NOT NULL,
orderstatus status,
CONSTRAINT pg_orders_pkey PRIMARY KEY (orderid)
)
WITH (OIDS=FALSE)
TABLESPACE datadisk;
Now I have populated table, I have decided I really need a 'CANCEL' status and append it to emum.list!
Without creating status2 and swapping table fields/data I cannot find an ALTER TYPE - APPEND TO ENUM command -- would response be different if I wanted to reorder values?
Regards
Simon Bateman
_________________________________________________________________
View your other email accounts from your Hotmail inbox. Add them now.
http://clk.atdmt.com/UKM/go/167688463/direct/01/=
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: batemans_25@hotmail.com
Subject: Re: Adding ENUM Type
In-Reply-To: <SNT122-W1123CD6395C821293C0AC694EE0@phx.gbl>
* 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