这是indexloc提供的服务,不要输入任何密码
Skip to content

Cannot save row when only columns changed have default value and are blanked. #5934

@simon-kempster

Description

@simon-kempster

Describe the bug

I have a table where various columns have a default value, both integer and character types. If I remove the existing value from a column, it shows "[default]" in the grid display. Trying to save the changes results in an error.

To Reproduce

Steps to reproduce the behaviour:

  1. Go to Query Tool.
  2. Select some rows from a table that has some columns defined with default values.
  3. Edit a column with a default value by clearing its existing value.
  4. Try to save the changes to the table.
  5. Error shown: syntax error at or near "WHERE" LINE 2: WHERE

Expected behaviour

On saving the row, the column with the default value should be assigned the default value.

Error message

Error text as shown above. From the log, there is a UPDATE command, example:
UPDATE table SET WHERE primary_key = value;
Clearly, the column(s) to be updated are missing, hence the error.

Screenshots

Not applicable.

Desktop (please complete the following information):

  • OS: Windows Server 2019 1809 build 17763.4010
  • Version: 6.21
  • Mode: Desktop
  • Package type: Windows EXE.

Additional context

If any columns without a default value are modified at the same time, then the row is saved correctly. The generated UPDATE statement refers only to the columns without the default values.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions