IT Brief New Zealand - Technology news for CIOs & IT decision-makers
New Zealand
Google adds Gemini code conversion for PostgreSQL migrations

Google adds Gemini code conversion for PostgreSQL migrations

Wed, 12th Aug 2026 (Today)
Sean Mitchell
SEAN MITCHELL Publisher

Google has added Gemini-based, AI-assisted code conversion to its Database Migration Service, aimed at PostgreSQL migrations from commercial databases.

The feature addresses a common obstacle in database projects: converting stored procedures, triggers and custom functions written in proprietary languages such as Oracle PL/SQL and Microsoft T-SQL. While schema conversion and bulk data transfer are often automated, teams still face delays when they must rewrite years of embedded business logic by hand.

Within Database Migration Service, the code conversion workflow sits in the console. Users can view source code and suggested PostgreSQL PL/pgSQL output side by side, inspect inline explanations of changes, edit the generated code and validate it before deployment to a target database.

The system analyses schema context across an entire migration project rather than handling isolated snippets of code. That includes table relationships, data types, dependent views and references between procedures, all of which matter when translating database logic from one engine to another.

Migration bottleneck

Database migration has become a priority for organisations seeking to move away from older commercial platforms to open source PostgreSQL or managed PostgreSQL services such as AlloyDB. Yet the procedural layer often remains the hardest part of the process because it requires knowledge of both the source database language and PostgreSQL's PL/pgSQL dialect.

The challenge is especially acute in large estates with hundreds of procedures and functions. Teams often must remap vendor-specific syntax, convert built-in functions, rework exception handling and check whether data types and control flow behave the same way on the target platform.

Database Migration Service combines rule-based conversion for standard transformations with Gemini-generated suggestions for more complex procedural code. It then applies PostgreSQL syntax validation and flags objects by status, including converted items, warnings and routines that require further action.

How it works

When a conversion workspace is set up, the service automatically parses source database metadata, including schema definitions, foreign key constraints and dependencies across procedures. That allows it to use project-wide context during code generation.

Google gave an example based on an Oracle stored procedure used to calculate customer order totals and apply tier-based discounts. In that case, Oracle-specific functions such as NVL and DECODE were translated into PostgreSQL equivalents including COALESCE and CASE expressions, while the routine itself was rewritten in PL/pgSQL.

The service also supports an interactive review process before any changes are applied. Database teams can inspect differences between original and converted code, review the explanation attached to each conversion and modify the output directly in the workspace before moving it to a staging database for testing.

Security focus

Code conversion remains within a customer's own Google Cloud project and identity and access management controls. That addresses a concern for businesses reluctant to place proprietary business logic into general-purpose AI tools outside established cloud governance settings.

Google also argued that integrating conversion into the migration environment reduces the need to copy and paste code across separate tools. In practice, that means database administrators and developers can assess, edit and validate converted routines in one workspace rather than shifting between migration software, code editors and external AI systems.

PostgreSQL push

The launch reflects wider competition among cloud providers to make database migrations less costly and less risky, especially for Oracle and SQL Server users considering a move to PostgreSQL. The procedural layer has long been one of the main reasons migration programmes overrun, because business rules embedded in stored code are difficult to reproduce without introducing errors.

Google said AI-assisted conversion could reduce that work from months to days in some cases, though teams would still need to review the generated output and run functional and performance testing before production cutover. The company positioned the feature as a way to let database specialists spend less time on repetitive rewriting and more time on verification and application changes.

The update also underlines how generative AI is being embedded into core cloud administration tools rather than offered only as standalone chat interfaces. In this case, the immediate use is narrow but commercially relevant: helping enterprises move established workloads to PostgreSQL without manually translating every routine line by line.

Once converted code passes workspace validation, it can be applied to target staging systems including Cloud SQL or AlloyDB for execution and testing before a live migration.