Adding ENUM Type

Поиск
Список
Период
Сортировка
Искать

Adding ENUM Type

От:
Simon Bateman <batemans_25@hotmail.com>
Дата:
 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.
FAQ