[MDEV-12093] Column type for unix_timestamp Created: 2017-02-20 Updated: 2017-10-12 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Olaf van der Spek | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I'd like to have a proper type for unix_timestamp columns. Currently I'm (ab)using int. |
| Comments |
| Comment by Sergei Golubchik [ 2017-05-25 ] | ||||
|
What do you mean by that? How should it differ from TIMESTAMP column? | ||||
| Comment by Olaf van der Spek [ 2017-05-26 ] | ||||
|
It should behave like an int column, but the type would allow GUI tools to format the timestamp for humans. The problem with timestamp is the formatting/parsing on every query and perhaps timezone issues. Yet another option would be to allow meta-data to be stored for fields (and tables / databases) such that tools can attach their meta-data to it | ||||
| Comment by Sergei Golubchik [ 2017-05-26 ] | ||||
|
By "behave like an int column, but allow GUI to format for humans", you mean something like
right? That is, arithmetical operations work on integers, but the client shows as a datetime value? | ||||
| Comment by Olaf van der Spek [ 2017-05-26 ] | ||||
|
Yep | ||||
| Comment by Olaf van der Spek [ 2017-10-12 ] | ||||
|
To clarify, the formatting should be done by the client, not by the server. In C and PHP clients, I still want to traffic in ints.. |