Actions
Bug #5807
closedPGError: "value too long for type character varying(255)" for INSERT INTO "audits" when overriding "smart variable" in hostgroup with >255 characters value.
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Description
After upgrading to foreman 1.5.0-1.el6, when overriding smart class variable in hostgroup, setting the value to something long, >255 characters, upon clicking "submit" button, instead of setting said variable, an error is thrown.
The following is the failing SQL statement in the postgres db:
PGError: ERROR: value too long for type character varying(255) : INSERT INTO "audits" ("action", "associated_id", "associated_name", "associated_type", "auditable_id", "auditable_name", "auditable_type", "audited_changes", "comment", "created_at", "remote_address", "user_id", "user_type", "username", "version") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15) RETURNING "id" (0.2ms) ROLLBACK
Both the fields "auditable_name" and "audited_changes" exceed 255 chars.
Instead, I would prefer it to accept these changes, and add said row to the database. It should either truncate too long values, or else permit longer texts to be inserted into these fields.
Updated by Dominic Cleal over 10 years ago
- Is duplicate of Bug #5671: Stack trace due to audit table field being too short added
Updated by Dominic Cleal over 10 years ago
- Status changed from New to Duplicate
- Translation missing: en.field_release deleted (
16)
Thanks for the report, a patch is being tracked in #5671.
Actions