Create Queue with PostgreSQL backend fails

Hi, I am currently (among other things) evaluating the PostgreSQL backend for OTRS (mainly because I don't really like MySQL, but also because of restrictions a customer of mine makes with respect to the database engine - if something other than PostgreSQL is required, there must be very good reasons for it). So far, everything is fine. However, when I want to create a new queue from the GUI, I get the following error message: ERROR: invalid input syntax for integer: "", SQL: 'INSERT INTO queue (name, group_id, unlock_timeout, system_address_id, calendar_name, default_sign_key, salutation_id, signature_id, first_response_time, first_response_notify, update_time, update_notify, solution_time, solution_notify, follow_up_id, follow_up_lock, valid_id, comments, create_time, create_by, change_time, change_by) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, current_timestamp, ?, current_timestamp, ?)' Versions are: OTRS 3.0.5, CentOS 5.5, PostgreSQL 8.1.22 (also tried 8.4.5, same result). This is a completely new installation, all required perl modules are present according to otrs.CheckModules.pl. DBI originally (CentOS package) was version 1.52, DBD::Pg 1.49. Tried to upgrade to 1.616/2.17.2 during debugging, but that didn't change anything. Probably anyone has seen that before, since there are some PostgreSQL installations around, as far as I can see. What am I missing? Thanks in advance, Peter.

On 02/17/2011 01:23 PM, Peter Eckel wrote:
Hi, Greetings, I am currently (among other things) evaluating the PostgreSQL backend for OTRS (mainly because I don't really like MySQL, but also because of restrictions a customer of mine makes with respect to the database engine - if something other than PostgreSQL is required, there must be very good reasons for it). [...] Probably anyone has seen that before, since there are some PostgreSQL installations around, as far as I can see. What am I missing? I have reported this bug just today, if you're interested you can follow it here: http://bugs.otrs.org/show_bug.cgi?id=6921 The description includes a simple fix, in no way definitive, but still working on my system.
Bye Alessandro -- Alessandro Grassi - System manager @ Devise.IT alessandro.grassi@devise.it | http://www.devise.it

Hi Allessandro, thanks for your kind reply. I did some research as well, and created a slightly different fix that will also make it possible to add new queues: [pete@otrs1 postgres]$ diff /opt/otrs/Kernel/System/Queue.pm /opt/otrs/Custom/Kernel/System/Queue.pm 671a672,677
foreach my $key (qw(UnlockTimeout FirstResponseTime FirstResponseNotify UpdateTime UpdateNotify SolutionTime SolutionNotify) ) { $Param{$key} eq '' and $Param{$key} = undef; } $Param{'FollowUpLock'} eq '' and $Param{'FollowUpLock'} = 0;
Though I have to agree that your solution is more elegant. However, I am a bit concerned that the same misconception (essentially the - wrong, by ANSI standard - assumption that an empty string will be accepted as a NULL value by the database) might also show up at other, not so obvious, places in the code. I'll watch the database logs, just in case. Thanks and best regards, Peter.

On 02/17/2011 03:03 PM, Peter Eckel wrote:
Hi Allessandro, Hello Peter,
I did some research as well, and created a slightly different fix that will also make it possible to add new queues: Not more than a few moments ago a kind developer replied to my bug report, informing me that the issue was already fixed in the CVS (shame on me for not noticing it despite having searched). The best thing you can do now is probably to replace your AdminQueue.pm with this: http://source.otrs.org/viewvc.cgi/otrs/Kernel/Modules/AdminQueue.pm?revision... Same thing would go for AdminQueue.dtl: http://source.otrs.org/viewvc.cgi/otrs/Kernel/Output/HTML/Standard/AdminQueu...
Good luck with your patching Alessandro -- Alessandro Grassi - System manager @ Devise.IT alessandro.grassi@devise.it | http://www.devise.it

Hi Allessandro,
Not more than a few moments ago a kind developer replied to my bug report, informing me that the issue was already fixed in the CVS (shame on me for not noticing it despite having searched).
thanks for pointing it out - I was just in the process of creating a Bugzila account for OTRS and adding a watch entry to it :-) Good to know it already has been fixed. I really appreciate the excellent job the OTRS developers are doing - it's fun to use tools that are so well supporte. Thanks again and cheers, Peter.

You took my think from my mind ...
Big LIKE to you & to OTRS
On Thu, Feb 17, 2011 at 3:25 PM, Peter Eckel
Hi Allessandro,
Not more than a few moments ago a kind developer replied to my bug report, informing me that the issue was already fixed in the CVS (shame on me for not noticing it despite having searched).
thanks for pointing it out - I was just in the process of creating a Bugzila account for OTRS and adding a watch entry to it :-)
Good to know it already has been fixed. I really appreciate the excellent job the OTRS developers are doing - it's fun to use tools that are so well supporte.
Thanks again and cheers,
Peter. --------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
participants (3)
-
Alessandro Grassi
-
Marco Vannini
-
Peter Eckel