Forum OpenACS Q&A: Response to Query problem after upgrade of PG and driver.

Collapse
Posted by Tom Jackson on

Here is the NOTICE from the pg driver and the error:


NOTICE:  Adding missing FROM-clause entry in subquery for table "ec_orders"
[31/Dec/2001:10:16:07][28943.437262][-conn23-] Error: Ns_PgExec: result status: 7 message: ERROR:  Relation 'o' does not exist
 
[31/Dec/2001:10:16:07][28943.437262][-conn23-] Error: dbinit: error(localhost::acspg3,ERROR:  Relation 'o' does not exist
): '
(select o.order_id, o.confirmed_date, o.order_state, ec_total_price(o.order_id) as price_to_display, o.user_id, u.first_names, u.last_name, count(*) as n_items
from ec_orders o, users u, ec_items i
where o.user_id=u.user_id
and o.order_id=i.order_id
and trunc((sysdate()-o.confirmed_date)) <= 7 and o.order_state='confirmed'
group by o.order_id, o.confirmed_date, o.order_state, ec_total_price(o.order_id), o.user_id, u.first_names, u.last_name)
union
(select o.order_id, o.confirmed_date, o.order_state, ec_total_price(o.order_id) as price_to_display, o.user_id, ''::char as first_names, ''::char as last_name, count(*) as n_items
from ec_orders o, ec_items i
where 0=(select count(*) from users where user_id= ec_orders.user_id)
and o.order_id=i.order_id
and trunc((sysdate()-o.confirmed_date)) <= 7 and o.order_state='confirmed'
group by o.order_id, o.confirmed_date, o.order_state, ec_total_price(o.order_id), o.user_id, first_names, last_name)
order by o.order_id
'