Thanks Neophytos, but I made a mistake.
The actual result of the query writing procedure above is actually just the string:
product__new(NULL,
:mfg_id,
:name,
:short_description,
:long_description,
:product_state,
'product',
now(),
null,
null,
null);
So the additional benefit of this method is that if the pg function changes, you may only have to change the call to the qd_add_* procedures.