#35969: Changing output_field for GeneratedField leads to ProgrammingError with
Postgres 16.5+
-----------------------------+------------------------------------
Reporter: Ryan Schave | Owner: (none)
Type: Bug | Status: new
Component: Migrations | Version: 5.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------
Comment (by Ryan Schave):
Replying to [comment:2 Simon Charette]:
> Just to make sure before we commit to a solution.
>
> Does Posgres still allows for generated field alterations but disallow
that `USING` is not used? If that's the case it seems like a better
solution would be to have generated field alteration continue to be
supported simply not specify `USING` (which is effectively redundant with
the column type) instead of disabling the feature?
I found that I can rename the GeneratedField without any issues.
Renaming a field within the expression throws the ValueError:
{{{
ValueError: Modifying GeneratedFields is not supported - the field
sales.Order.total_cost must be removed and re-added with the new
definition.
}}}
This error appears to be raised by Django, so it's not even getting to
Postgres.
--
Ticket URL: <https://code.djangoproject.com/ticket/35969#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070193929674b9-c5623d92-bf84-48c6-b2de-1132b27a7079-000000%40eu-central-1.amazonses.com.