Skip to content

Would there ever be a case where we would have to limit the allowed db types of a mathesar type on the client? #935

Closed Answered by mathemancer
pavish asked this question in Developer Q&A
Discussion options

You must be logged in to vote

If something isn't listed by valid_target_types, and the front end is funneling users into casting to that type, that's a bug. We cannot cast a column to any DB type not listed in valid_target_types, as this lists every target type for which a casting function is implemented. Thus, the scenario should not be possible, and if it occurs, we should submit a bug and fix it.

A scenario that could theoretically happen would be where only some subset of the Mathesar type is available as a target for a given type. I can't see any that makes logical sense with our current types, but it's feasible. For a contrived example, suppose have both emails and URLs under some "address" type in the future, a…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kgodey
Comment options

Answer selected by kgodey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants