Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MySQL: SqlDayTimeZoned uses Text (#78)

  • Loading branch information...
commit d0eb56db5908cc748363f37d87d70313460cc128 1 parent 757049b
@snoyberg snoyberg authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  persistent-mysql/Database/Persist/MySQL.hs
View
2  persistent-mysql/Database/Persist/MySQL.hs
@@ -590,7 +590,7 @@ showSqlType SqlBlob (Just i) = "VARBINARY(" ++ show i ++ ")"
showSqlType SqlBool _ = "TINYINT(1)"
showSqlType SqlDay _ = "DATE"
showSqlType SqlDayTime _ = "DATETIME"
-showSqlType SqlDayTimeZoned _ = "DATETIME"
+showSqlType SqlDayTimeZoned _ = "TEXT CHARACTER SET utf8"
@meteficha Owner

It would be better to use VARCHAR(???) CHARACTER SET utf8 where ??? is large enough to accomodate any ZonedTime (since TEXT has quite an overhead on MySQL, "Each BLOB or TEXT value is represented internally by a separately allocated object."). On my single test it took 30 characters, how about putting VARCHAR(50) CHARACTER SET utf8 here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
showSqlType SqlInt32 _ = "INT"
showSqlType SqlInt64 _ = "BIGINT"
showSqlType SqlReal _ = "DOUBLE PRECISION"
@meteficha

It would be better to use VARCHAR(???) CHARACTER SET utf8 where ??? is large enough to accomodate any ZonedTime (since TEXT has quite an overhead on MySQL, "Each BLOB or TEXT value is represented internally by a separately allocated object."). On my single test it took 30 characters, how about putting VARCHAR(50) CHARACTER SET utf8 here?

Please sign in to comment.
Something went wrong with that request. Please try again.