I set up the postgresql with motion trunkREV557.
DB works fine, i am sure i have correct motion.conf, but motion cant insert
the data (i manually inserted data below, it worked fine), i get such error
in debug mode:
 [ERR] [DBL] event_sqlnewfile: PGSQL query [sql_query insert into
security(camera, filename, frame, file_type, time_stamp, event_time_stamp)
values('1', '/usr/local/motion/output/01-20121212164158-00.jpg', '00', '1',
'2012-12-12 16:41:58', '20121212164144')] failed: Success
It would be very nice to have more informative debug message. Now it is
even misleading - "failed: Success"