I have quite a few bytea fields in a PostgreSQL database.
(i) Is there a way to impose a size cap on such fields (so that an error is thrown if this size is attempted to be exceeded) by using a database feature?
(ii) Alternatively, is there a good way to do this in SQLAlchemy?