add a value to an ENUM type

From: Edoardo Panfili <edoardo(at)aspix(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: add a value to an ENUM type
Date: 2009-09-03 16:52:09
Message-ID: 4A9FF439.8050109@aspix.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have an enum type
CREATE TYPE shapeName AS ENUM('rectangle','circle');

now I need another value: 'square'

the pg_type.oid of 'shapename is 16458

It works, but Is it safe to use this?
insert into pg_enum (enumtypid,enumlabel) VALUES('16458','square');

thank you
Edoardo

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Willy-Bas Loos 2009-09-03 17:03:07 Re: auto-increment in a view
Previous Message Adam Rich 2009-09-03 16:44:12 Re: auto-increment in a view