Comment 22 for bug 1174498

Revision history for this message
Galen Charlton (gmc) wrote :

Because of at least two issues where the update can break, I'm going to revert this:

[1] bug 1921523
[2] If there are multiple money.bnm_payment rows where the same ID, it can fail like this:

ERROR: more than one row returned by a subquery used as an expression
CONTEXT: SQL statement "SELECT home_ou FROM actor.usr WHERE id = (SELECT accepting_usr FROM money.bnm_payment WHERE id = current_payment.id)"
PL/pgSQL function money.payment_by_billing_type(bigint) line 62 at SQL statement
SQL statement "INSERT INTO money.materialized_payment_by_billing_type (
            xact, payment, billing, payment_ts, billing_ts,
            payment_type, billing_type, amount, billing_ou, payment_ou
        ) SELECT xact, payment, billing, payment_ts, billing_ts,
                    payment_type, billing_type, amount, billing_ou, payment_ou
          FROM money.payment_by_billing_type( p.xact )"
PL/pgSQL function tmp_populate_p_b_bt() line 10 at SQL statement

The second issue is arguably the result of pathological data in the test database where I encountered the problem, but this close to 3.7-beta, it's looking to me like more baking is required.