On Jan 16, 2:09 pm, Iñaki Baz Castillo <[email protected]> wrote: > Hi,in case I try to insert a document bigger than 64K in a MySQL BLOB column > the doc is truncated to 64K, but there is no error notification. > > I suppose that this is the expected behavior under pure MySQL (not sure if > Postgre behaves similar).
PostgreSQL will raise an error, as would most sane databases. You might be able to emulate the behavior in MySQL by changing a setting (if there is one) or writing a trigger. > I could check the field size before inserting in the dabatase but it's not > very cool as it involves different checks depending on the underlying > database. > > Does Sequel provide some mechanism for it? Or, is it possible to configure > MySQL/Postgres to notify error in case the field is bigger than the allowed > space for the corresponfing column? Models have validations that can be used before saving. Nothing similar exists for datasets. Jeremy
-- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
