Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#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


Currently splits statements using r";[ \t]*$"

Unfortunately it doesn't work for statements which include ; like PL/PgSQL functions.

Change History (3)

comment:1 Changed 6 years ago by scibi

Summary: To aggressive statements spliting in custom sqlToo aggressive statements spliting in custom sql

comment:2 Changed 6 years ago by Anssi Kääriäinen

Resolution: wontfix
Status: newclosed

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.

comment:3 Changed 6 years ago by Claude Paroz

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.
Back to Top