Project

General

Profile

Bug #1964

Postgresql: Field length for smart variables too small

Added by Florian Sachs almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Parameters
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Hi,

I have a smart-parameter of type hash. I want to insert a default value that is longer than 255 characters. On submit, I get an error from the postgresdb, that lookup_keys.default_value is of type varying(255) and the value is too long. (The message is on german, so I can't give you the exact wording)

The same setup works, when I use sqlite as backend. It seems, as if the sqlite fields are defined as text, whereas the postgresql fields are defined as varying(255), which is definitely too short for me as I have right now hashes as parameters as long as 12996 characters.

BTW: Foreman is an absolutely astonishing piece of work!

Thanx,
florian

ForemanVersion: 1.0.1-7 - RPM Package from 2012-11-21, devel-yum repository - everything installed via rpm
Platform: RedHat 6.3 x86_64
Postgresql: 9.2
Puppet: 3.0.1

Associated revisions

Revision 45a7a196 (diff)
Added by Joseph Magen almost 9 years ago

fixes #1964 lookup_keys.default_value can hold > 255 characters

History

#1 Updated by Florian Sachs almost 9 years ago

I altered the column from "character varying(255)" to "text" and it worked. (didn't know about the text type until my dbadmin told me) I don't know exactly which columns are affected, but will keep track of them as I change them, so I will be able to provide information if the need arises.

#2 Updated by Joseph Magen almost 9 years ago

  • Assignee set to Joseph Magen

I submitted a pull request for this fix
https://github.com/theforeman/foreman/pull/313

#3 Updated by Joseph Magen almost 9 years ago

  • Status changed from New to Ready For Testing

#4 Updated by Ohad Levy almost 9 years ago

  • Category set to Parameters
  • Target version set to 1.1

#5 Updated by Anonymous almost 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF