Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#10364 closed (fixed)

Incorrect error message given when role does not have create database privilege

Reported by: Tyler Erickson Owned by: jbronn
Component: GIS Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If a PostGIS database role does not have sufficient permissions to create a database, the testing suite returns a misleading message similar to:

"It appears the database, test_database_name, already exists. Type 'yes' to delete it, or 'no' to cancel: "

This occurs because the _create_with_cursor() method in /django/contrib/gis/db/backend/postgis/creation.py assumes that all errors in the method are related to a non-existing test database.

Change History (5)

comment:1 by Jacob, 16 years ago

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:2 by Russell Keith-Magee, 16 years ago

Component: Testing frameworkGIS

This appears to only affect GIS databases, so I'm going to punt this to Justin's bailiwick. The fix seems fairly simple - we just need to print the exception obtained so that the user gets feedback on the underlying problem. The default creation backend already does this, so it's just a matter of porting the logic to somewhere near here

comment:3 by jbronn, 16 years ago

Owner: changed from nobody to jbronn

comment:4 by jbronn, 16 years ago

Resolution: fixed
Status: newclosed

(In r10603) Fixed #10364 -- Correctly identify test spatial database creation errors to the user.

comment:5 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

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