Opened 8 years ago

Closed 8 years ago

#10062 closed (wontfix)

inspectdb could use random field to inspect table

Reported by: phoebebright Owned by: nobody
Component: inspectdb Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Currently uses the first record SELECT * FROM %s LIMIT 1
If there is bad data in the first record it can fail
eg. Warning: Incorrect datetime value: '11437866' for function str_to_time
I know this is really a problem with the database and could potentially be confusing and slow - but how about picking a random record.


Change History (1)

comment:1 Changed 8 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

That wouldn't solve any problem, since, by the same logic, the random record could contain bad data as well. It's just as likely. You're right about this being a problem with the database (since it let the bad data in there in the first place). This isn't a problem Django should even attempt to solve.

Note: See TracTickets for help on using tickets.
Back to Top