-
-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle TIME
data type in the backend
#426
Comments
We should also consider whether the native PostgreSQL parsing suffices: https://www.postgresql.org/docs/13/datatype-datetime.html . My thinking is that:
The downside would be that we'd have to do any customization or guardrails needed in SQL, rather than python, which is less convenient to implement and much less convenient to test. |
@mathemancer I think that having the backend do parsing that is likely to fail, like parsing human-readable time-related expressions, is problematic because of the roundtrip time: when inputing a time-expression you want the parsing to happen on the frontend so that feedback isn't delayed. I see the backend providing a simple and robust interface and the frontend providing some more exotic input/formatting options that it can itself parse to the simple backend API. |
I'm surprised I missed that we're talking about bulk import 😳 Needing to parse non-standard time formats on the backend as well as the frontend is complicated, since we want the parser/s to be consistent. It might make sense to consider retreating to parsing only standard formats or finding a way to parse only on the backend or on the frontend. |
I see your point about the round-trip time, @dmos62 . My biggest concern with the front-end (or service) doing the input parsing is that the DB will have to do input parsing whenever using |
I'm good with doing parsing only on the backend at this point. Only thing to keep in mind is that we might have a hard time porting a non simple parser to frontend (if that's something we ever wanted to do), so format simplicity would still be a good priority. |
I've created a separate issue/discussion to figure out our parsing strategy since we haven't figured out what formats we want to support and how to make backend and frontend parsing consistent: #845. Ideally, someone on the frontend team and someone on the backend team will collaborate on it. cc @pavish @seancolsen |
This issue is to ensure that Mathesar can handle the Postgres
TIME
data type.As part of this issue, we need to ensure that:
TIME
(with time zone) if it's possible to do so.TIME
(without time zone) if it's possible to do so.precision
of a givenTIME
column via atype_options
field in the API.TIME
when it makes sense to do so.Additional Context
v0/databases/
's types list to show both Mathesar and DB type information. #368 for code that calculates which types are allowed for a column.The text was updated successfully, but these errors were encountered: