[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] default values for localtime column, better-fitting types


Greetings xfnw,

Thanks for writing back. As we spoke over on IRC, I think your proposed
solution is the best -- to store the data as epochtime and then generate
a column to display the ISO date.

-- 
jrmu
IRCNow (https://ircnow.org)

On Sun, Jun 18, 2023 at 04:32:37PM +0200, freeirc support wrote:
> please use consistent capitalization and put an explicit datatype
> affinity on the datetime column.
> 
> 
> for example:
> 
> datetime VARCHAR(25) DEFAULT current_timestamp,
> 
> instead of
> 
> datetime default current_timestamp,
> 
> 
> although if you only care about a human readable date when SELECT'ed,
> this probably would be better-fitted as a generated column[0],
> however i assume IanJ (as with views) would object to this.
> 
> [0]: https://www.sqlite.org/gencol.html
> 

Attachment: signature.asc
Description: PGP signature


Follow-Ups:
[PATCH] add generated column for iso8601 datefreeirc support <support@xxxxxxxxxxx>