Re: [BUGS] Problems with ENUM type manipulation in 9.1

2011-09-29 Thread depstein
Thanks everyone for the explanations. I posted a feature request for improved enum manipulation in psql-general. Dmitry Epstein | Developer Allied Testing www.alliedtesting.com We Deliver Quality. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscr

Re: [BUGS] Problems with ENUM type manipulation in 9.1

2011-09-28 Thread Tom Lane
Josh Kupershmidt writes: >> Excerpts from depstein's message of mié sep 28 07:21:17 -0300 2011: >>> Anyway, the procedure that we used (based on >>> http://en.dklab.ru/lib/dklab_postgresql_enum/) does the necessary >>> checks before removing enum values. > Not exactly; that code is rife with race

Re: [BUGS] Problems with ENUM type manipulation in 9.1

2011-09-28 Thread Merlin Moncure
On Wed, Sep 28, 2011 at 10:40 AM, Tom Lane wrote: > Alvaro Herrera writes: >> Excerpts from depstein's message of mié sep 28 07:21:17 -0300 2011: >>> ALTER TYPE ... ADD VALUE does not work inside transaction blocks, period, >>> whether they are executed as a multi-command string or one query at

Re: [BUGS] Problems with ENUM type manipulation in 9.1

2011-09-28 Thread Josh Kupershmidt
On Wed, Sep 28, 2011 at 10:51 AM, Alvaro Herrera wrote: > Excerpts from depstein's message of mié sep 28 07:21:17 -0300 2011: >> Anyway, the procedure that we used (based on >> http://en.dklab.ru/lib/dklab_postgresql_enum/) does the necessary >> checks before removing enum values. Not exactly; th

Re: [BUGS] Problems with ENUM type manipulation in 9.1

2011-09-28 Thread Tom Lane
Alvaro Herrera writes: > Excerpts from depstein's message of mié sep 28 07:21:17 -0300 2011: >> ALTER TYPE ... ADD VALUE does not work inside transaction blocks, period, >> whether they are executed as a multi-command string or one query at a time. >> Try it: > The reason it is not allowed is

Re: [BUGS] Problems with ENUM type manipulation in 9.1

2011-09-28 Thread Alvaro Herrera
Excerpts from depstein's message of mié sep 28 07:21:17 -0300 2011: > > -Original Message- > > From: Merlin Moncure [mailto:mmonc...@gmail.com] > > Sent: Tuesday, September 27, 2011 10:31 PM > > > 1. We can use ALTER TYPE to add enum values, but there is no matching > > command to remove v

Re: [BUGS] Problems with ENUM type manipulation in 9.1

2011-09-28 Thread Merlin Moncure
On Wed, Sep 28, 2011 at 5:21 AM, wrote: >> -Original Message- >> From: Merlin Moncure [mailto:mmonc...@gmail.com] >> Sent: Tuesday, September 27, 2011 10:31 PM >> > 1. We can use ALTER TYPE to add enum values, but there is no matching >> command to remove values, which makes this an incom

Re: [BUGS] Problems with ENUM type manipulation in 9.1

2011-09-28 Thread depstein
> -Original Message- > From: Merlin Moncure [mailto:mmonc...@gmail.com] > Sent: Tuesday, September 27, 2011 10:31 PM > > 1. We can use ALTER TYPE to add enum values, but there is no matching > command to remove values, which makes this an incomplete solution. > > you can manually delete fr

Re: [BUGS] Problems with ENUM type manipulation in 9.1

2011-09-27 Thread Merlin Moncure
On Tue, Sep 27, 2011 at 5:06 AM, wrote: > Hello, > > I've encountered some problems with the updated ENUM in PosgreSQL 9.1: > > 1. We can use ALTER TYPE to add enum values, but there is no matching command > to remove values, which makes this an incomplete solution. you can manually delete from

Re: [BUGS] Problems with ENUM type manipulation in 9.1

2011-09-27 Thread Kevin Grittner
wrote: > I've encountered some problems with the updated ENUM in PosgreSQL > 9.1: No matter how I tilt my head, I can't see any of those issues as bugs. You have two feature requests and a question about how to work around problems you're having with direct modifications to the system tables.

[BUGS] Problems with ENUM type manipulation in 9.1

2011-09-27 Thread depstein
Hello, I've encountered some problems with the updated ENUM in PosgreSQL 9.1: 1. We can use ALTER TYPE to add enum values, but there is no matching command to remove values, which makes this an incomplete solution. 2. "ALTER TYPE ... ADD cannot be executed from a function or multi-command stri