Hi!
On Wed, Dec 17, 2008 at 9:39 AM, Brian Aker <[email protected]> wrote:
>> AUTOINCREMENT is much like a trigger, so this is acceptable because it is
>> a clearly defined rule for the column.
>
> Should the same hold true for UUID? How about TIMESTAMP?
Is UUID a data type in drizzle? Or is it a 'flag' in the column definition?
If it is a data type, it seems clear to me that you should be able to
shove in your own value. Why? Well, I might want to create a foreign
key constraint referencing another UUID column. Currently InnoDB won't
let you do that unless the data types are the same (which is IMO a
good thing). In case of a flag, the matter does not come into play -
the user can then always pick the appropriate data type to create the
referencing column.
The SQL standard defines GENERATED ALWAYS and GENERATED BY DEFAULT for
'identity' colums (an identity column is kinda like an auto_increment
column, with some more bells and whistles). You could use such clauses
to control the behaviour of these columns.
<column definition> ::=
<column name> [ <data type or domain name> ]
[ <default clause> | <identity column specification> | <generation clause> ]
[ <column constraint definition>... ]
[ <collate clause> ]
....
<identity column specification> ::=
GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY
[ <left paren> <common sequence generator options> <right paren> ]
Hope this helps.
kind regards,
ROland
>
> Cheers,
> -Brian
>
> --
> _______________________________________________________
> 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
>
--
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