Google Cloud's Database Migration Service (DMS) automates the conversion of SQL Server stored procedures with multiple result sets into PostgreSQL equivalents. The post explains the core translation strategy: DMS analyzes how many result sets a procedure returns and whether it uses a scalar RETURN value, then maps procedures to either PostgreSQL PROCEDURE (single result set via INOUT refcursor) or FUNCTION returning SETOF refcursor (multiple/dynamic result sets). A healthcare reporting example illustrates the conversion of a master procedure and two child procedures. DMS builds a directed call graph and runs a Depth First Search to propagate result set counts across the entire procedure hierarchy. The post also covers how to execute and test migrated code within PostgreSQL transaction blocks, and how application layers must adapt to fetch data from named cursor portals instead of sequential tabular rows.