-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DB Manager: SET DEFAULT syntax wrong #21879
Comments
Author Name: Sebastian Dietrich (Sebastian Dietrich) I would say this is intended behaviour. You are not entering a value, but an expression.
works, because @current_user@ is a (PostgreSQL-)function and therefore a valid expression. |
Author Name: Paolo Cavallini (@pcav) If the user is required to add '', this should be made clear, it is not obvious. Perhaps adding a note to the error message would suffice. |
Author Name: Sebastian Dietrich (Sebastian Dietrich) Adding quotes always works, but is not always the correct solution. E.g. if I enter @currentuser@ the solution would be to correct the function name, not to add quotes. So the errormessage could be misleading. Would a hint to the user when entering the default (e.g. a tooltip or a label) also suffice? |
Author Name: Paolo Cavallini (@pcav)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Paolo Cavallini (@pcav) Unchanged in QGIS 3.
ALTER TABLE "pippo"."comuni" ALTER "nomemin" SET DEFAULT test123 instead of ALTER TABLE "pippo"."comuni" ALTER "nomemin" SET DEFAULT 'test123' therefore the commnad fails. to When setting the default for a column value, DB Manager fails to quote the value, e.g. ALTER TABLE "pippo"."comuni" ALTER "nomemin" SET DEFAULT test123 instead of ALTER TABLE "pippo"."comuni" ALTER "nomemin" SET DEFAULT 'test123' therefore the command fails. |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Paolo Cavallini (@pcav)
Original Redmine Issue: 13856
Affected QGIS version: 3.0.0
Redmine category:db_manager
When setting the default for a column value, DB Manager fails to quote the value, e.g.
instead of
therefore the command fails.
The text was updated successfully, but these errors were encountered: