Project:
UbercartCategory:
bug reportVersion:
Ubercart 1.3Priority:
normalStatus:
fixedAn error started popping up when cron started running on our new postgres site.
Message query: uc_credit_cron DELETE FROM uc_payment_credit AS upc USING uc_orders AS o WHERE o.order_id = upc.order_id AND o.modified <= 1218235502 AND o.order_status = 'completed' on line 144.
Severity error
PG error: Query failed: ERROR: syntax error at or near "AS" at character 31
The problem is the query above starting on line 148 in uc_credit.module. It should be rewritten as follows:
db_query("DELETE FROM {uc_payment_credit}"
." WHERE order_id IN (SELECT order_id FROM {uc_orders}"
." WHERE modified <= %d"
." AND order_status = '%s')",
$time, variable_get('uc_credit_clear_status', uc_order_state_default('completed')));



Re: postgres fix: uc_credit.module --> Error when deleting CC in
also needs to be updated for line 130:
db_query("DELETE FROM {uc_payment_credit}" ." WHERE order_id IN (SELECT order_id FROM {uc_orders}" ." WHERE modified <= %d" ." AND order_status = '%s')", $time, uc_order_state_default('in_checkout'));Re: Re: postgres fix: uc_credit.module --> Error when deleting C
Awesome! Thanks for the fixes.
I saw you had some gig out in the NW related to Postgres work and your patches for UC. These the fruit of some of that time or just the fruit of a new site?