Hi, Peter!
What about instead of trying to follow exactly what manual says, we
instead fix ENUM to be more like other types (and change the manual, of
course) ?
On May 21, Peter Gulutzan wrote:
> Sergey Glukhov wrote:
> >
> > Could you comment this ENUM field vagueness(see below)?
> >
> > Which way would you recommend? or maybe you have another idea about
> > this?
>
> 1. Remove "Field .... doesn't have a default value" warning/error.
...
> What about strict mode?
> The manual says a variety of things.
...
> So I suggest:
> * The remarks about "implicit" do not apply for this case,
> it was not anticipated. It is in any case difficult for
> users to notice whether a default is implicit or explicit.
> * The assignment of DEFAULT to an ENUM is okay in strict mode,
> because there's always an implicit default.
> * The assignment of NULL to an ENUM is okay in strict mode,
> even for a NOT NULL column, because we treat it like DEFAULT.
Regards / Mit vielen Grüßen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect
/_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028
<___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Häring