Google Cloud
Read post

Automating Postgres translations with Database Migration Service

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.

    #database#postgresql#gcp#microsoft-sql-server
Aug 04•8m read time•From cloud.google.com
Post cover image
Table of contents
Automating Multi-Result Set Conversions: Inside DMS
129 Impressions
Google Cloud's image
Google Cloud

Google Cloud Platform provides a suite of cloud computing services for building, deploying, and mana...

831 Followers

•

1.4K Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard