[Obm] error using postgres on production

Bruno Depero bruno.depero@digicar.com
Thu, 05 Aug 2004 16:43:47 +0200


This is a multi-part message in MIME format.
--------------070507010406010005040808
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Really usefull !
I'm using it on postgresl 7.4.3. All works fine except an error entering 
on the production tab about a cast and others. Follow the full error.
The one regards a missing field (project_company_id) I'll check if I 
forget to execute some script upgrading from earlier releases.

Thank you in advance for any kind of suggestion.
Best Regards

Bruno Depero

*Warning*: pg_exec(): Query failed: ERROR: function 
unix_timestamp(timestamp without time zone) does not exist HINT: No 
function matches the given name and argument types. You may need to add 
explicit type casts. in 
*/opt/httpd/html/obm/obminclude/phplib/db_pgsql.inc* on line *82*
*Database error:* Invalid SQL: select timetask_id, 
UNIX_TIMESTAMP(timetask_date) as date_task, 
UNIX_TIMESTAMP(timetask_timeupdate) as date_timeupdate, 
UNIX_TIMESTAMP(timetask_timecreate) as date_timecreate, 
concat(timetask_length,concat('/', 8)) as timetask_length, 
tasktype_label, project_name as timetask_project_name, timetask_label, 
projecttask_label, company_name as timetask_company_name, 
timetask_status, (if (timetask_status != 2, 1, 0)) as test_status, 
SUBSTRING(timetask_date,8,1) as date_parity from ((TimeTask left join 
ProjectTask on timetask_projecttask_id = projecttask_id) left join 
Project on projecttask_project_id = project_id) left join Company on 
project_company_id = company_id, TaskType where timetask_tasktype_id = 
tasktype_id and timetask_date >='20040802' and timetask_date <'20040808' 
and timetask_user_id = 10 order by timetask_date
*PostgreSQL Error*: 1 (ERROR: function unix_timestamp(timestamp without 
time zone) does not exist HINT: No function matches the given name and 
argument types. You may need to add explicit type casts.)

*Warning*: pg_numrows(): supplied argument is not a valid PostgreSQL 
result resource in */opt/httpd/html/obm/obminclude/phplib/db_pgsql.inc* 
on line *201*

*Warning*: pg_exec(): Query failed: ERROR: column 
"timetask.timetask_status" must appear in the GROUP BY clause or be used 
in an aggregate function in 
*/opt/httpd/html/obm/obminclude/phplib/db_pgsql.inc* on line *82*
*Database error:* Invalid SQL: select timetask_date, timetask_status 
from TimeTask where timetask_status != 0 and timetask_date >= '20040802' 
and timetask_date <= '20040808' and timetask_user_id = 10 group by 
timetask_date
*PostgreSQL Error*: 1 (ERROR: column "timetask.timetask_status" must 
appear in the GROUP BY clause or be used in an aggregate function)

*Warning*: pg_exec(): Query failed: ERROR: column "project_company_id" 
does not exist in */opt/httpd/html/obm/obminclude/phplib/db_pgsql.inc* 
on line *82*
*Database error:* Invalid SQL: select distinct project_id, project_name, 
company_name, project_tasktype_id from Project, ProjectTask, ProjectUser 
left join Company on company_id = project_company_id where 
project_archive='0' and projectuser_projecttask_id = projecttask_id and 
projecttask_project_id = project_id and projectuser_user_id = '10' and 
projectuser_projectedtime != '0' order by project_tasktype_id, 
company_name, project_name
*PostgreSQL Error*: 1 (ERROR: column "project_company_id" does not exist)

*Warning*: pg_numrows(): supplied argument is not a valid PostgreSQL 
result resource in */opt/httpd/html/obm/obminclude/phplib/db_pgsql.inc* 
on line *201

*

--------------070507010406010005040808
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-15"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Really usefull !<br>
I'm using it on postgresl 7.4.3. All works fine except an error
entering on the production tab about a cast and others. Follow the full
error.<br>
The one regards a missing field (project_company_id) I'll check if I
forget to execute some script upgrading from earlier releases.<br>
<br>
Thank you in advance for any kind of suggestion.<br>
Best Regards<br>
<br>
Bruno Depero<br>
<br>
<b>Warning</b>: pg_exec(): Query failed: ERROR: function
unix_timestamp(timestamp without time zone) does not exist
HINT: No function matches the given name and argument types. You may
need to add explicit type casts. in <b>/opt/httpd/html/obm/obminclude/phplib/db_pgsql.inc</b>
on line <b>82</b><br>
<b>Database error:</b> Invalid SQL: select timetask_id,
UNIX_TIMESTAMP(timetask_date) as date_task,
UNIX_TIMESTAMP(timetask_timeupdate) as date_timeupdate,
UNIX_TIMESTAMP(timetask_timecreate) as date_timecreate,
concat(timetask_length,concat('/', 8)) as timetask_length,
tasktype_label, project_name as timetask_project_name, timetask_label,
projecttask_label, company_name as timetask_company_name,
timetask_status, (if (timetask_status != 2, 1, 0)) as test_status,
SUBSTRING(timetask_date,8,1) as date_parity from ((TimeTask left join
ProjectTask on timetask_projecttask_id = projecttask_id) left join
Project on projecttask_project_id = project_id) left join Company on
project_company_id = company_id, TaskType where timetask_tasktype_id =
tasktype_id and timetask_date &gt;='20040802' and timetask_date
&lt;'20040808' and timetask_user_id = 10 order by timetask_date <br>
<b>PostgreSQL Error</b>: 1 (ERROR: function unix_timestamp(timestamp
without time zone) does not exist
HINT: No function matches the given name and argument types. You may
need to add explicit type casts.)<br>
<br>
<b>Warning</b>: pg_numrows(): supplied argument is not a valid
PostgreSQL result resource in <b>/opt/httpd/html/obm/obminclude/phplib/db_pgsql.inc</b>
on line <b>201</b><br>
<br>
<b>Warning</b>: pg_exec(): Query failed: ERROR: column
"timetask.timetask_status" must appear in the GROUP BY clause or be
used in an aggregate function in <b>/opt/httpd/html/obm/obminclude/phplib/db_pgsql.inc</b>
on line <b>82</b><br>
<b>Database error:</b> Invalid SQL: select timetask_date,
timetask_status from TimeTask where timetask_status != 0 and
timetask_date &gt;= '20040802' and timetask_date &lt;= '20040808' and
timetask_user_id = 10 group by timetask_date <br>
<b>PostgreSQL Error</b>: 1 (ERROR: column "timetask.timetask_status"
must appear in the GROUP BY clause or be used in an aggregate function)<br>
<br>
<b>Warning</b>: pg_exec(): Query failed: ERROR: column
"project_company_id" does not exist in <b>/opt/httpd/html/obm/obminclude/phplib/db_pgsql.inc</b>
on line <b>82</b><br>
<b>Database error:</b> Invalid SQL: select distinct project_id,
project_name, company_name, project_tasktype_id from Project,
ProjectTask, ProjectUser left join Company on company_id =
project_company_id where project_archive='0' and
projectuser_projecttask_id = projecttask_id and projecttask_project_id
= project_id and projectuser_user_id = '10' and
projectuser_projectedtime != '0' order by project_tasktype_id,
company_name, project_name<br>
<b>PostgreSQL Error</b>: 1 (ERROR: column "project_company_id" does not
exist)<br>
<br>
<b>Warning</b>: pg_numrows(): supplied argument is not a valid
PostgreSQL result resource in <b>/opt/httpd/html/obm/obminclude/phplib/db_pgsql.inc</b>
on line <b>201<br>
<br>
</b>
</body>
</html>

--------------070507010406010005040808--