<@U02874JL5D3> <@U02D2JSV745> - random question......
# help
j
@Charith (Cerbos) @Dennis (Cerbos) - random question... why are you not storing the policy definition as JSON in DB?
c
Internally we work exclusively with protobufs so it was naturally easier to serialize it in that form rather than going through JSON conversion back and forth. Also, different databases have different levels of support for JSON data types so it's rather painful to deal with that in a generic way as well.
j
fair enough
we're using postgres, and I think it might be a nice postgres configuration option to allow the user to opt into JSON storage
easy to serialize / deserialize JSON to proto
and while in theory I think you shouldnt be going into the DB to run random queries, it would be nice to be able to query a row and read the definition inline
just a random idea - feel free to disregard
c
Fair enough. We'll definitely consider it for a future release. Right now, it's not very practical for us to maintain different drivers for different databases. Also, the storage layer is still evolving so we want people to go through the API rather than through the the DB. Hyrum's law and all that :)
👍 1