django-postgres-composite-types
django-postgres-composite-types copied to clipboard
Postgres composite types support for Django
It should be possible to do a lookup on a composite type: ``` python Person.objects.filter(address__suburb="Preston") ```
```python Model.objects.annotate(composite=Func(1, 2, 3, function="construct_composite", output_field=CompositeField())) ``` results in ```python model.composite == '(1,2,3)' ``` i.e. a `str` rather than the expected (hoped for) `CompositeType`.
When running a test suite in a project that uses `django-postgres-composite-types` I observed some unexpected behavior. The test suite succeeded on the first run (as expected). However, when re-running the...
The current implementation of `CompositeType.Operation` will create the type as it is when the migration is run, not as the type was when the migration was created. This can lead...
It's possible to create an index on an attribute in a composite type. http://stackoverflow.com/questions/15040135/postgresql-create-an-index-for-fields-within-a-composite-type
This branch is an experiment, and it's currently broken. I mentioned this in #8: > My theory is that a composite type is similar to a model; so, it should...
Django 4.2+ support `psycopg` (which is psycopg 3.x). If psycopg2 is installed this creates weird conflicts such as `TypeError: Connection.cursor() got an unexpected keyword argument 'cursor_factory'`. This library should support...