Opened 13 years ago

Closed 13 years ago

Last modified 11 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


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/ assumes that all errors in the method are related to a non-existing test database.

Change History (5)

comment:1 Changed 13 years ago by Jacob

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:2 Changed 13 years ago by Russell Keith-Magee

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 Changed 13 years ago by jbronn

Owner: changed from nobody to jbronn

comment:4 Changed 13 years ago by jbronn

Resolution: fixed
Status: newclosed

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

comment:5 Changed 11 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

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