#18258 closed Bug (wontfix)
Too aggressive statements spliting in custom sql
Reported by: | scibi | Owned by: | nobody |
---|---|---|---|
Component: | Core (Management commands) | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Currently django.core.management.sql.custom_sql_for_model splits statements using r";[ \t]*$"
Unfortunately it doesn't work for statements which include ; like PL/PgSQL functions.
Change History (3)
comment:1 by , 13 years ago
Summary: | To aggressive statements spliting in custom sql → Too aggressive statements spliting in custom sql |
---|
comment:2 by , 13 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:3 by , 13 years ago
I'd still like to commit #4680, but I also admit that it is probably the most we can do without resorting to a full parser.
Note:
See TracTickets
for help on using tickets.
We need a better way to run custom SQL. I don't believe there is any way to split the SQL correctly, apart of having full parsers for each of the different backends.
For example reliable pre_model_created, post_model_created signals could be useful here. post_syncdb is also issued after flush which makes it unusable.
I am going to mark this wontfix as there isn't much we can do about it.