Hi!

I agree that it would be good to see these, but it doesn't solve the problem of display. Storing a UUID or an IPV6 as a string is not healthy for indexes.

Even if you had a 16 byte int for them, would you want the display to just be the raw number?

As far as a patch for expressions as column defaults, I would be happy to see someone contribute one.

Cheers,
        -Brian

On Dec 19, 2008, at 12:55 AM, Roland Bouman wrote:

Expressions for column defaults - give this man a beer!

Seriously - this would be a very, very useful feature. Should have
been in MySQL ages ago....but...well...

On Fri, Dec 19, 2008 at 9:07 AM, Eric Bergen <[email protected]> wrote:
I may be missing something here but why can't UUID be handled by
allowing function calls or expressions for default values?

On Wed, Dec 17, 2008 at 11:58 AM, Roy Lyseng <[email protected]> wrote:


Monty Taylor wrote:

Brian Aker wrote:

Hi!

On Dec 17, 2008, at 12:50 AM, Roy Lyseng wrote:

IMHO, the data type should not implicitly define any insert/ update semantics around it, unless it makes no sense to support user- level
operations (which may be the case for UUID?).

Having a column which is UUID that generates one as default is my
interest. Whether that is by pass NULL in or just not listing it in
VALUES.... that is the open question to me.

From a purist perspective, I would say that just not listing it in
values is better. However, from a practical perspective, if you have a table with 10 columns and the _only_ one you aren't providing is the auto-gen uuid column, it would be great if you could skip giving the column list and just do the insert into table values (NULL, 1,2,3); form

I saw mention somewhere of a DEFAULT keyword that I've never used
before... if we used that ... insert into table values (DEFAULT, 1,2,3);
it would do the same thing and also be clear.

Yepp. And if you define semantics corresponding to an ON INSERT trigger, you can specify anything in the INSERT statement, and still have the UUID
generator create the column value.

And referring to Roland's recent mail, if you want to use a UUID column in a
foreign key reference, it must be possible to turn off the ON INSERT
trigger.

Thanks,
Roy

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp




--
Eric Bergen
[email protected]
http://www.provenscaling.com

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp




--
Roland Bouman
http://rpbouman.blogspot.com/

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

--
_______________________________________________________
Brian "Krow" Aker, brian at tangent.org
Seattle, Washington
http://krow.net/                     <-- Me
http://tangent.org/                <-- Software
_______________________________________________________
You can't grep a dead tree.




_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to