| From: | Simon Bateman <batemans_25(at)hotmail(dot)com> |
|---|---|
| To: | POSTGRES SQL User GROUP <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Adding ENUM Type |
| Date: | 2009-09-04 05:36:10 |
| Message-ID: | SNT122-W1123CD6395C821293C0AC694EE0@phx.gbl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
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/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | bilal ghayyad | 2009-09-05 00:45:10 | Substring |
| Previous Message | Christophe Pettus | 2009-09-04 01:28:16 | Re: LIMIT 1; The Integer part only |