-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathTODO
23 lines (20 loc) · 1.34 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
* See if we can get rid of -XConstraintKinds (ShowIntegral and ShowReal).
* Bail when standard_conforming_string is off (can be seen in connection details returned from server).
* Handle bounds for integers better (automatically allow anything smaller through, but block bigger values).
* Add support for returning records (instead of tuples).
* Make insertIgnore useable in transactions.
* On disconnect, send a close message?
* Figure out how to make withTransaction useable in other monads.
* Add support for enumerated types (look in pg_enum with unknown types).
* Support IS NULL insertion for = Nothing.
* Add explicit casts to all values going in:
$(execute
"UPDATE link_to_review \
\SET target_time = {reviewedAt} + {diff} \
\WHERE member_no = {memberNumber member} AND link_no = {linkNo}") h
reviewedAt is a UTCTime and diff is a DiffTime, but to PostgreSQL it's ambigious (PGException "42725" "operator is not unique: unknown + unknown"). To fix it:
$(execute
"UPDATE link_to_review \
\SET target_time = {reviewedAt}::timestamp with time zone + {diff}::interval \
\WHERE member_no = {memberNumber member} AND link_no = {linkNo}") h
But easier for the programmer would be to have TemplatePG add explicit casts to all values it sends in. This is probably safer in the long run as well, although possibly less flexible.