Forum OpenACS Development: Response to Porting pl/pgsql using PERFORM and SELECT to call functions

I need the resulting object_id from one object.new query to use in a following query. From psql the following works:

select product__new(NULL,
'4734',
'CDRW15',
'Some Description',
'Some Longer Description',
'1',
'product',
now(),
null,
null,
null) as product_id from dual

The above query is generated by the query processor, just pasted into psql.

The select my_func() into product_id method suggested in a previous post doesn't return any rows in psql, or in the db_* procedures.

Is there a method of doing this so that I can get the product_id defined for the next db_exec_plsql procedure?