this if we can find a rough syntax! I've made
>> a proof of concept in Postgres, and there are two outstanding limitations
>> to address:
>>
>> - The generated field value is not set until the model is reloaded from
>> the database
>> - The `GENERATED ALWAYS` ex
elp implement this if we can find a rough syntax! I've made a
> proof of concept in Postgres, and there are two outstanding limitations to
> address:
>
> - The generated field value is not set until the model is reloaded from
> the database
> - The `GENERATED ALWAYS` expression
I'd love to help implement this if we can find a rough syntax! I've made a
proof of concept in Postgres, and there are two outstanding limitations to
address:
- The generated field value is not set until the model is reloaded from the
database
- The `GENERATED ALWAYS` expression requires
+1
On Wed, Apr 13, 2022 at 7:01 AM 'Adam Johnson' via Django developers
(Contributions to Django itself) wrote:
> I'd be interested in seeing this. Generated columns are a useful SQL
> feature that are missing from Django.
>
> Nice initial research on backend coverage - it looks like they're
the reported case the user would have to do
> `GeneratedField(SearchVector('title'))` which would actually result in
> `tsvector GENERATED ALWAYS AS *to_tsvector*(title)` STORED which is not
> exactly the same. It's not an issue here but I wouldn't be surprised that
> not being able
dn't be surprised that
not being able to configured a generated field to generate a particular SQL
output might be problematic in some cases.
What about we make the expected signature `GeneratedField(expression,
base_field=None)` where a missing `base_field` defaults to
`expression.output_f
I’d love to see this!
Kye
On 13 Apr 2022, 7:05 PM +0800, Mariusz Felisiak ,
wrote:
> Related tickets:
>
> - https://code.djangoproject.com/ticket/31300: Add function-based virtual
> fields on PostgreSQL and Oracle.
> - https://code.djangoproject.com/ticket/31565: Support GENERATED ALWAYS
>
Related tickets:
- https://code.djangoproject.com/ticket/31300: Add function-based virtual
fields on PostgreSQL and Oracle.
- https://code.djangoproject.com/ticket/31565: Support GENERATED ALWAYS
columns for MySQL and PostgreSQ
Related DEP:
- https://github.com/django/deps/pull/39 - Refactor
I'd be interested in seeing this. Generated columns are a useful SQL
feature that are missing from Django.
Nice initial research on backend coverage - it looks like they're widely
supported.
Some ideas...
Is it necessary to take a base field? Can we not determine the output field
type for some
Hi all,
I am at PyCon DE 2022 in Berlin with Markus and I shared with him this
idea that I have been thinking about for a few months, given his
interest I also share it with you.
I figured we could add in Django a "GeneratedField" which accepts a
"base_field" attribute in a similar way to
10 matches
Mail list logo