PostgreSQL Recursive 運用遞迴,取得多階層BOM原料ID
-- FUNCTION: adempiere.get_subbom_id(numeric) -- DROP FUNCTION adempiere.get_subbom_id(numeric); CREATE OR REPLACE FUNCTION adempiere.get_subbom_id( id numeric) RETURNS TABLE(m_product_id numeric) LANGUAGE 'plpgsql' COST 100 VOLATILE PARALLEL UNSAFE ROWS 1000 AS $BODY$ BEGIN RETURN…