Skip to content
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

Deleting data list cause error when using PostgreSQL as backend #2913

Closed
afeefghannam89 opened this issue Sep 10, 2024 · 1 comment · Fixed by #2916
Closed

Deleting data list cause error when using PostgreSQL as backend #2913

afeefghannam89 opened this issue Sep 10, 2024 · 1 comment · Fixed by #2916
Assignees
Milestone

Comments

@afeefghannam89
Copy link
Member

Current Behavior

image

PostgreSQL is strict and does not do any magic typecasting. SQLServer does typecasting automagically. https://dev.mysql.com/doc/refman/8.4/en/type-conversion.html#:~:text=For%20example%2C%20MySQL%20automatically%20converts,as%20necessary%2C%20and%20vice%20versa.&text=It%20is%20also%20possible%20to,using%20the%20CAST()%20function.

That is why the Problem does not appear by MySQL users.

Possible Solution

change this

'l.id = dfs.setting_value',

to this

'CAST(l.id AS text) = dfs.setting_value',

in this file /usr/share/icingaweb2/modules/director/library/Director/Objects/DirectorDatalist.php (line 106):

Steps to Reproduce (for bugs)

create data list and use it. You should use PostgreSQL as backend. Try to delete the data list, you will get the same error above in the screenshot.

Your Environment

  • Director version: 1.11.
@raviks789
Copy link
Collaborator

ref/IP/55374

@raviks789 raviks789 added this to the v1.11.2 milestone Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants