Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2346F632B8B for ; Fri, 4 Sep 2009 02:36:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 30162-08 for ; Fri, 4 Sep 2009 05:36:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from snt0-omc2-s12.snt0.hotmail.com (snt0-omc2-s12.snt0.hotmail.com [65.55.90.87]) by mail.postgresql.org (Postfix) with ESMTP id 4177863267C for ; Fri, 4 Sep 2009 02:36:11 -0300 (ADT) Received: from SNT122-W11 ([65.55.90.71]) by snt0-omc2-s12.snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 3 Sep 2009 22:36:10 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_a8601dc7-219a-4c3b-b553-0f7b4a3db040_" X-Originating-IP: [80.176.139.136] From: Simon Bateman To: POSTGRES SQL User GROUP Subject: Adding ENUM Type Date: Fri, 4 Sep 2009 05:36:10 +0000 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 04 Sep 2009 05:36:10.0250 (UTC) FILETIME=[9BADA6A0:01CA2D21] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.109 tagged_above=-10 required=5 tests=BAYES_05=-1.11, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200909/24 X-Sequence-Number: 33089 --_a8601dc7-219a-4c3b-b553-0f7b4a3db040_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have: CREATE TYPE status AS ('NEW'=2C'ACTIVE'=2C'DESPATCH'=2C'COMPLETE')=3B and included field in my modified version of dellstore2.sql data CREATE TABLE pg_orders ( orderid serial NOT NULL=2C customerid integer NOT NULL=2C orderdate date NOT NULL=2C orderstatus status=2C CONSTRAINT pg_orders_pkey PRIMARY KEY (orderid) ) WITH (OIDS=3DFALSE) TABLESPACE datadisk=3B Now I have populated table=2C I have decided I really need a 'CANCEL' statu= s and append it to emum.list! Without creating status2 and swapping table fields/data I cannot find an AL= TER TYPE - APPEND TO ENUM command -- would response be different if I wante= d 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/= --_a8601dc7-219a-4c3b-b553-0f7b4a3db040_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have:
CREATE TYPE status AS ('NEW'=2C'ACTIVE'=2C'DESPATCH'=2C'COMPLETE= ')=3B

and included field in my modified version of dellstore2.sql da= ta

CREATE TABLE pg_orders
(
 =3B orderid serial NOT NULL= =2C
 =3B customerid integer NOT NULL=2C
 =3B orderdate date N= OT NULL=2C
 =3B orderstatus status=2C
 =3B CONSTRAINT pg_orde= rs_pkey PRIMARY KEY (orderid)
)
WITH (OIDS=3DFALSE)
TABLESPACE dat= adisk=3B

Now I have populated table=2C I have decided I really need = a 'CANCEL' status and append it to emum.list!

Without creating statu= s2 and swapping table fields/data I cannot find an ALTER TYPE - APPEND TO E= NUM command -- would response be different if I wanted to reorder values?
Regards
Simon Bateman



View your other email acc= ounts from your Hotmail inbox. Add them now. = --_a8601dc7-219a-4c3b-b553-0f7b4a3db040_--