[Django] #30346: InspectDB doesn't test for UUID (at least) on PostgreSQL

26 views
Skip to first unread message

Django

unread,
Apr 10, 2019, 6:41:54 PM4/10/19
to django-...@googlegroups.com
#30346: InspectDB doesn't test for UUID (at least) on PostgreSQL
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
guipedreira |
Type: Bug | Status: new
Component: Database | Version: 2.2
layer (models, ORM) | Keywords: inspectdb,
Severity: Normal | postgresql, uuid
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
I was trying to do some reverse stuff...
Importing models from a "Legacy" Database,
as it turns out, inspectdb doesn't seem to go nicely with UUIDs,
At least on PostgreSQL.

{{{
\d resource

------------+--------------------------+-----------+----------+---------
id | uuid | | not null |
name | character varying(255) | | not null |
code | character varying(255) | | not null |

}}}

I've tried adding djago.contrib.postgres to installed apps, without luck.

Am I missing something? Already tried --include-views and --include-
partitions too.

--
Ticket URL: <https://code.djangoproject.com/ticket/30346>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 10, 2019, 6:43:01 PM4/10/19
to django-...@googlegroups.com
#30346: InspectDB doesn't test for UUID (at least) on PostgreSQL
-------------------------------------+-------------------------------------
Reporter: guipedreira | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 2.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: inspectdb, | Triage Stage:
postgresql, uuid | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by guipedreira:

Old description:

> I was trying to do some reverse stuff...
> Importing models from a "Legacy" Database,
> as it turns out, inspectdb doesn't seem to go nicely with UUIDs,
> At least on PostgreSQL.
>
> {{{
> \d resource
>
> ------------+--------------------------+-----------+----------+---------
> id | uuid | | not null |
> name | character varying(255) | | not null |
> code | character varying(255) | | not null |
>
> }}}
>
> I've tried adding djago.contrib.postgres to installed apps, without luck.
>
> Am I missing something? Already tried --include-views and --include-
> partitions too.

New description:

I was trying to do some reverse stuff...
Importing models from a "Legacy" Database,
as it turns out, inspectdb doesn't seem to go nicely with UUIDs,
At least on PostgreSQL.

{{{
\d resource

------------+--------------------------+-----------+----------+---------
id | uuid | | not null |
name | character varying(255) | | not null |
code | character varying(255) | | not null |

}}}

I've tried adding djago.contrib.postgres to installed apps, without luck.

Am I missing something? Already tried --include-views and --include-
partitions too.

The error:
{{
# The error was: sequence index must be integer, not 'slice'
}}

--

--
Ticket URL: <https://code.djangoproject.com/ticket/30346#comment:1>

Django

unread,
Apr 10, 2019, 6:43:45 PM4/10/19
to django-...@googlegroups.com
#30346: InspectDB doesn't test for UUID (at least) on PostgreSQL
-------------------------------------+-------------------------------------
Reporter: guipedreira | Owner: nobody
Type: Bug | Status: new

Component: Database layer | Version: 2.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: inspectdb, | Triage Stage:
postgresql, uuid | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by guipedreira:

Old description:

> I was trying to do some reverse stuff...


> Importing models from a "Legacy" Database,
> as it turns out, inspectdb doesn't seem to go nicely with UUIDs,
> At least on PostgreSQL.
>
> {{{
> \d resource
>
> ------------+--------------------------+-----------+----------+---------
> id | uuid | | not null |
> name | character varying(255) | | not null |
> code | character varying(255) | | not null |
>
> }}}
>
> I've tried adding djago.contrib.postgres to installed apps, without luck.
>
> Am I missing something? Already tried --include-views and --include-
> partitions too.
>

> The error:
> {{
> # The error was: sequence index must be integer, not 'slice'
> }}

New description:

I was trying to do some reverse stuff...
Importing models from a "Legacy" Database,
as it turns out, inspectdb doesn't seem to go nicely with UUIDs,
At least on PostgreSQL.

{{{
\d resource

------------+--------------------------+-----------+----------+---------
id | uuid | | not null |
name | character varying(255) | | not null |
code | character varying(255) | | not null |

}}}

I've tried adding djago.contrib.postgres to installed apps, without luck.

Am I missing something? Already tried --include-views and --include-
partitions too.

The error:

{{{
# The error was: sequence index must be integer, not 'slice'
}}}

--

--
Ticket URL: <https://code.djangoproject.com/ticket/30346#comment:2>

Django

unread,
Apr 11, 2019, 2:25:34 AM4/11/19
to django-...@googlegroups.com
#30346: InspectDB doesn't test for UUID (at least) on PostgreSQL
-------------------------------------+-------------------------------------
Reporter: guipedreira | Owner: nobody
Type: Bug | Status: closed

Component: Database layer | Version: 2.2
(models, ORM) |
Severity: Normal | Resolution: duplicate

Keywords: inspectdb, | Triage Stage:
postgresql, uuid | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: new => closed
* resolution: => duplicate
* easy: 1 => 0


Comment:

This issue is not related with an UUID field. Django 2.2 doesn't support
`psycopg 2.8+`, it will be fixed in 2.2.1 release.

Duplicate of #30331.

--
Ticket URL: <https://code.djangoproject.com/ticket/30346#comment:3>

Reply all
Reply to author
Forward
0 new messages