Elein Mustain
el...@varlena.com
510-637-9106
> On Mar 13, 2016, at 7:22 PM, Alvaro Herrera wrote:
>
> Elein wrote:
>
> Hi Elein,
>
>> * When an insert into an enum column fails give the person a hint as to
>> valid values
>
>> -- Lousy message. Show enum list.
Joshua D. Drake wrote:
> On 03/14/2016 08:48 AM, Alvaro Herrera wrote:
> >(*) Yes, I'm being a bit sarcastic here, sorry about that. I actually
> >learned quite a bit of database design and related topics by translating
> >the "General Bits" column she used to write, many years ago.
>
> Your
On Sun, Mar 13, 2016 at 10:20:05PM -0400, Melvin Davidson wrote:
> The point is, they are an archaic data type and it's a hell of a lot easier
> to use Foreign Keys to insure integrity.
So don't use them? Nobody, surely, is forcing you to use enums.
I recall when enums were added. I recall
On Mon, Mar 14, 2016 at 12:07 PM, Joshua D. Drake
wrote:
> On 03/14/2016 09:02 AM, David G. Johnston wrote:
>
> The one nice thing about enums is that you get two concepts in one
>> column - a human readable label and a system used ordering.
>>
>> i.e., "SELECT
On 03/14/2016 09:02 AM, David G. Johnston wrote:
The one nice thing about enums is that you get two concepts in one
column - a human readable label and a system used ordering.
i.e., "SELECT enum_value FROM tbl ORDER BY enum_value" actually
gives you a meaningful order without having to
On Mon, Mar 14, 2016 at 8:52 AM, Joshua D. Drake
wrote:
>
> If improved enough, maybe we could get to a
>> point where they could actually be used; otherwise why the heck did we
>> let the feature in the database in the first place? I think all these
>> "use a lookup
On Mon, Mar 14, 2016 at 8:48 AM, Alvaro Herrera
wrote:
> Joshua D. Drake wrote:
> > On 03/11/2016 03:19 PM, Elein wrote:
> >
> > >An unused (yet) enum type cannot display the enum ranges. An empty table
> > >containing that type cannot display enum ranges.
> > >
> >
On 03/14/2016 08:48 AM, Alvaro Herrera wrote:
Joshua D. Drake wrote:
On 03/11/2016 03:19 PM, Elein wrote:
An unused (yet) enum type cannot display the enum ranges. An empty table
containing that type cannot display enum ranges.
The example selects were what I did to figure out that
On 03/11/2016 03:19 PM, Elein wrote:
An unused (yet) enum type cannot display the enum ranges. An empty table
containing that type cannot display enum ranges.
The example selects were what I did to figure out that enum_ranges only
worked on existing data. Sorry if they were confusing. But the
Elein wrote:
Hi Elein,
>* When an insert into an enum column fails give the person a hint as to
> valid values
> -- Lousy message. Show enum list.
> insert into badinfo values ('green');
> ERROR: invalid input value for enum rainbow: "green"
> LINE 1: insert into badinfo values
The post refers to the generic unmanageability of enums in genaral, it just
uses MySQL as a reference basis.
Google evil enum and you will find several articles that all say the same
thing.
To be specific,even in PostgreSQL, there is no easy way to delete enum
values once they exist, other than
Melvin Davidson wrote:
> Enums are evil!
> http://www.lornajane.net/posts/2010/is-enum-evil
???
This post is about MySQL's enums, which aren't really related to
Postgres enums:
"In order to change the allowed values of an enum column, we
need to issue an alter table statement
Elein Mustain
el...@varlena.com
510-637-9106
> On Mar 11, 2016, at 3:45 PM, David G. Johnston
> wrote:
>
>> On Fri, Mar 11, 2016 at 4:19 PM, Elein wrote:
>
>> An unused (yet) enum type cannot display the enum ranges. An empty table
>>
On Fri, Mar 11, 2016 at 4:19 PM, Elein wrote:
> An unused (yet) enum type cannot display the enum ranges. An empty table
> containing that type cannot display enum ranges.
>
Yes, it can.
CREATE TYPE rainbow AS enum ('red','orange','yellow','blue','purple');
SELECT
The point is that enum information belongs to a type, not a column value of
that type.
This is the difference between a class and a class instance.
If you get that, you understand.
The workaround suggested only works if some non-empty row in some table has a
column defined to be that enum
On Fri, Mar 11, 2016 at 2:55 PM, Melvin Davidson
wrote:
> Enums are evil!
> http://www.lornajane.net/posts/2010/is-enum-evil
>
>
Using red background is evil :)
I'll disagree on the premise but will agree that without a better
implementation and handling of change our
On Fri, Mar 11, 2016 at 2:36 PM, Elein wrote:
>
> > Bug/Improvement:
> >
> >Enums belong to types, not to column values.
> >
> >* Create a built in function, like enum_range( type ), independent of
> tables
> > that shows a type's enum values.
> >create or
On 3/11/2016 1:36 PM, Elein wrote:
>Bug/Improvement:
>
>Enums belong to types, not to column values
I've read this post twice, and I'm still unclear on what you're saying
is a problem, and what your proposed solution is...
--
john r pierce, recycling bits in santa cruz
--
Sent
On Fri, Mar 11, 2016 at 4:36 PM, Elein wrote:
>
> > Bug/Improvement:
> >
> >Enums belong to types, not to column values.
> >
> >* Create a built in function, like enum_range( type ), independent of
> tables
> > that shows a type's enum values.
> >create or
> Bug/Improvement:
>
>Enums belong to types, not to column values.
>
>* Create a built in function, like enum_range( type ), independent of
> tables
> that shows a type's enum values.
>create or replace function enum_range( typein regtype ) returns name[]
> language sql
20 matches
Mail list logo