Project

General

Profile

Actions

Bug #1964

closed

Postgresql: Field length for smart variables too small

Added by Florian Sachs over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Parameters
Target version:
Difficulty:
Triaged:
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

Actions #1

Updated by Florian Sachs over 11 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.

Actions #2

Updated by Joseph Magen over 11 years ago

  • Assignee set to Joseph Magen

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

Actions #3

Updated by Joseph Magen over 11 years ago

  • Status changed from New to Ready For Testing
Actions #4

Updated by Ohad Levy over 11 years ago

  • Category set to Parameters
  • Target version set to 1.1
Actions #5

Updated by Anonymous over 11 years ago

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

Also available in: Atom PDF