Repository navigation
1.15.0 — custom PostgreSQL column types
Feature release: custom PostgreSQL column types (pgvector vector, inet, citext, ...) now work end-to-end through the ORM. Highlights:
Added
yara_orm.RawText: a thinstrsubclass that binds as an untyped text parameter on PostgreSQL — the server infers the type from context (target column,<=>operand) and parses the text through the type's own input function. Custom field kinds return it fromto_db; previously every ORM INSERT/UPDATE into such a column failed with SQLSTATE 42804 unless the database installed a globalCREATE CAST (text AS ...) WITH INOUT AS IMPLICIT. On every other backend it binds like a plain string.Field.select_as_text: PostgreSQL SELECT/RETURNING projections read the column throughCAST(col AS text)andto_pythonparses the text form — previously selecting a custom-typed column raisedunsupported PostgreSQL type OID, forcing.defer()workarounds. Applied at every projection site (full-row,only()/defer(),select_related,values(), m2m prefetch, RETURNING) via the newBaseDialect.select_columnhook; comparisons and grouping keep the column's real type.- The custom-fields guide documents both on a complete pgvector
VectorFieldexample.
Full details in CHANGELOG.md.