Opened 16 years ago

Closed 13 years ago

#10837 closed Cleanup/optimization (fixed)

postgresql missing field type codes in data_types_reverse

Reported by: trbs Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords: bpchar, data_types_reverse, introspection inspectdb
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I've created a patch to add 'char' field support to data_types_reverse in the PostgreSQL.
As a char(50) is basically the same (CharField) as a varchar(50) for Django.

Also created a second patch which also adds 'int8' to the list as an 'IntegerField'.

This would make inspectdb and other (third-party code?) that uses data_type_reverse a bit more complete for PG.

Attachments (3)

10837-bpchar.diff (454 bytes ) - added by trbs 16 years ago.
10837-bpchar-int8.diff (675 bytes ) - added by trbs 16 years ago.
10837-3.diff (577 bytes ) - added by Claude Paroz 13 years ago.
Updated to current trunk

Download all attachments as: .zip

Change History (10)

by trbs, 16 years ago

Attachment: 10837-bpchar.diff added

by trbs, 16 years ago

Attachment: 10837-bpchar-int8.diff added

comment:1 by Alex Gaynor, 15 years ago

Triage Stage: UnreviewedAccepted

comment:2 by trbs, 15 years ago

Alex do you want to apply the patch like it is, Or should we broaden this ticket to make the (reversed) type list as complete as possible ?

comment:3 by Chris Beaven, 14 years ago

Severity: Normal
Type: Cleanup/optimization

comment:4 by patchhammer, 14 years ago

Easy pickings: unset
Patch needs improvement: set

10837-bpchar-int8.diff fails to apply cleanly on to trunk

comment:5 by Ramiro Morales, 13 years ago

Keywords: inspectdb added
UI/UX: unset

by Claude Paroz, 13 years ago

Attachment: 10837-3.diff added

Updated to current trunk

comment:6 by Claude Paroz, 13 years ago

Patch needs improvement: unset
Version: 1.0SVN

20/int8 is now present in Django code.

comment:7 by Ramiro Morales, 13 years ago

Resolution: fixed
Status: newclosed

In [17511]:

Fixed #10837 -- Added CHAR(X)->CharField to mapping used in Postgres DB introspection.

Thanks trbs for the report and initial patch and to Claude Paroz for
updating it.

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