mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Set raise error to DbError
Thanks! Much more user-friendly. Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
This commit is contained in:
parent
92fcb86be6
commit
45d40ad071
@ -1018,7 +1018,7 @@ class PostGisDBConnector(DBConnector):
|
||||
|
||||
if len(view_name_parts) > 2:
|
||||
# Raise an error when more than one period is used.
|
||||
raise ValueError("Invalid view name: Please use the format 'schema.viewname', or enter only the viewname for the public schema.")
|
||||
raise DbError("Invalid view name: Please use the format 'schema.viewname', or enter only the viewname for the public schema.")
|
||||
elif len(view_name_parts) == 2: # To allow view creation into specified schema
|
||||
schema, view_name = view_name_parts
|
||||
sql = "CREATE VIEW %s AS %s" % (self.quoteId([schema, view_name]), query)
|
||||
|
Loading…
x
Reference in New Issue
Block a user