Code

Opened 5 years ago

Closed 2 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: master
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 5 years ago.
10837-bpchar-int8.diff (675 bytes) - added by trbs 5 years ago.
10837-3.diff (577 bytes) - added by claudep 2 years ago.
Updated to current trunk

Download all attachments as: .zip

Change History (10)

Changed 5 years ago by trbs

Changed 5 years ago by trbs

comment:1 Changed 5 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 5 years ago by trbs

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 Changed 3 years ago by SmileyChris

  • Severity set to Normal
  • Type set to Cleanup/optimization

comment:4 Changed 3 years ago by patchhammer

  • Easy pickings unset
  • Patch needs improvement set

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

comment:5 Changed 3 years ago by ramiro

  • Keywords inspectdb added
  • UI/UX unset

Changed 2 years ago by claudep

Updated to current trunk

comment:6 Changed 2 years ago by claudep

  • Patch needs improvement unset
  • Version changed from 1.0 to SVN

20/int8 is now present in Django code.

comment:7 Changed 2 years ago by ramiro

  • Resolution set to fixed
  • Status changed from new to closed

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.