pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedALTER TYPE my_enum AS ENUM ADD ('label10')
3+ messages / 2 participants
[nested] [flat]
* ALTER TYPE my_enum AS ENUM ADD ('label10')
@ 2010-03-22 14:33 Andreas Gaab <A.Gaab@scanlab.de>
2010-03-22 15:05 ` Re: ALTER TYPE my_enum AS ENUM ADD ('label10') A. Kretschmer <andreas.kretschmer@schollglas.com>
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Gaab @ 2010-03-22 14:33 UTC (permalink / raw)
To: pgsql-sql
Hi all,
I start working with enumerator types and I am wondering, if my enumerator can later be adjusted. E.g. if I would like to add another label.
Is it allowed just to add another entry to pg_enum? How is the enumerator then sorted (i.e. enum_last() )?
Is it possible to alter the labels of an enumerator later on? Can I edit pg_enum?
Thanks already,
Andreas Gaab
___________________________________________________________________________
SCANLAB AG
Dr. Andreas Simon Gaab
Entwicklung * R & D
Siemensstr. 2a * 82178 Puchheim * Germany
Tel. +49 (89) 800 746-513 * Fax +49 (89) 800 746-199
mailto:a.gaab@scanlab.de * www.scanlab.de<http://www.scanlab.de;
Amtsgericht München: HRB 124707 * USt-IdNr.: DE 129 456 351
Vorstand: Georg Hofner (Sprecher), Christian Huttenloher, Norbert Petschik
Aufsichtsrat (Vorsitz): Dr. Hans J. Langer
___________________________________________________________________________
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: ALTER TYPE my_enum AS ENUM ADD ('label10')
2010-03-22 14:33 ALTER TYPE my_enum AS ENUM ADD ('label10') Andreas Gaab <A.Gaab@scanlab.de>
@ 2010-03-22 15:05 ` A. Kretschmer <andreas.kretschmer@schollglas.com>
2010-03-23 08:31 ` Re: ALTER TYPE my_enum AS ENUM ADD ('label10') A. Kretschmer <andreas.kretschmer@schollglas.com>
0 siblings, 1 reply; 3+ messages in thread
From: A. Kretschmer @ 2010-03-22 15:05 UTC (permalink / raw)
To: pgsql-sql
In response to Andreas Gaab :
> Hi all,
>
>
>
> I start working with enumerator types and I am wondering, if my enumerator can
> later be adjusted. E.g. if I would like to add another label.
AFAIK you can't. Each enum is a own type. Use a lookup-table instead and
use enum's only for real static things.
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431 2EB0 389D 1DC2 3172 0C99
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: ALTER TYPE my_enum AS ENUM ADD ('label10')
2010-03-22 14:33 ALTER TYPE my_enum AS ENUM ADD ('label10') Andreas Gaab <A.Gaab@scanlab.de>
2010-03-22 15:05 ` Re: ALTER TYPE my_enum AS ENUM ADD ('label10') A. Kretschmer <andreas.kretschmer@schollglas.com>
@ 2010-03-23 08:31 ` A. Kretschmer <andreas.kretschmer@schollglas.com>
0 siblings, 0 replies; 3+ messages in thread
From: A. Kretschmer @ 2010-03-23 08:31 UTC (permalink / raw)
To: pgsql-sql
In response to Andreas Gaab :
> I tried successfully to directly insert a further entry into table
> pg_enum with the corresponding enumtypid. Do you think to directly
> manipulate table pg_enum is allowed?
It's maybe allowed, but not recommended. It's a system-table, not a
user-table.
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431 2EB0 389D 1DC2 3172 0C99
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2010-03-23 08:31 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-03-22 14:33 ALTER TYPE my_enum AS ENUM ADD ('label10') Andreas Gaab <A.Gaab@scanlab.de>
2010-03-22 15:05 ` A. Kretschmer <andreas.kretschmer@schollglas.com>
2010-03-23 08:31 ` A. Kretschmer <andreas.kretschmer@schollglas.com>
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