Question 1,245 of 1,446
PCDE Migrate data solutions Practice Question
An engineer is migrating an Oracle database to Cloud SQL for PostgreSQL. They use Ora2Pg to convert the schema. One source table uses a column with data type NUMBER(10,2). What is the appropriate PostgreSQL data type after conversion, and which tool should the engineer use to verify the correctness of converted stored procedures?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use NUMERIC(10,2) and pgTAP to write unit tests for stored procedures.
NUMBER(10,2) maps to NUMERIC(10,2) as it is a fixed-point number. Stored procedures converted from PL/SQL to PL/pgSQL should be tested with unit tests, and pgTAP is a popular PostgreSQL testing framework for this purpose. PL/pgSQL is the procedural language, not a testing tool. Ora2Pg handles conversion but does not provide unit tests.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use VARCHAR2 and test with pgTAP.
Why it's wrong here
VARCHAR2 is Oracle-specific; PostgreSQL uses VARCHAR. Data type mismatch.
- ✓
Use NUMERIC(10,2) and pgTAP to write unit tests for stored procedures.
Why this is correct
NUMERIC(10,2) is the correct mapping. pgTAP is a testing framework for PostgreSQL, suitable for verifying stored procedures.
- ✗
Use FLOAT and rely on Ora2Pg's built-in validation.
Why it's wrong here
FLOAT is approximate; NUMBER(10,2) is exact. Ora2Pg does not validate logic, it converts syntax.
- ✗
Use INTEGER for the data type and PL/pgSQL for testing stored procedures.
Why it's wrong here
INTEGER cannot hold decimal places; NUMBER(10,2) must use NUMERIC. PL/pgSQL is a language, not a testing tool.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
6 more ways this is tested on PCDE
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. An organization is migrating an Oracle database to PostgreSQL on Compute Engine. They used Ora2Pg to migrate schema and data. After migration, they want to validate that stored procedures produce correct results. Which tool should they use for unit testing the migrated PL/pgSQL code?
hard- ✓ A.pgTAP
- B.gcloud sql export
- C.pg_dump
- D.pglogical
Why A: pgTAP is a popular unit testing framework for PostgreSQL that allows writing tests for stored procedures, functions, and other database objects. It is commonly used to validate migrated code.
Variation 2. A company is migrating a PostgreSQL database to AlloyDB using DMS. They need to test the converted stored procedures. Which tool should they use to write and run unit tests for PL/pgSQL functions?
medium- A.Cloud SQL Insights
- B.pgAdmin
- C.pg_stat_statements
- ✓ D.pgTAP
Why D: pgTAP is a unit testing framework for PostgreSQL that allows writing tests in SQL/PL/pgSQL. It is suitable for testing stored procedures.
Variation 3. A migration from Oracle to PostgreSQL using Ora2Pg is complete. The team wants to run unit tests on the converted stored procedures to ensure they produce correct results. Which tool is most suitable for this purpose?
hard- ✓ A.pgTAP
- B.pgAdmin
- C.pg_dump
- D.pg_stat_statements
Why A: pgTAP is a unit testing framework for PostgreSQL that allows writing tests for functions, procedures, and other database objects. It is commonly used to validate converted PL/pgSQL code.
Variation 4. A company is migrating an Oracle database to Cloud SQL for PostgreSQL using Ora2Pg for schema conversion. After conversion, they want to test the correctness of converted stored procedures. Which tool should they use?
hard- A.Database Migration Service validation
- B.Ora2Pg --test flag
- ✓ C.pgTAP
- D.Cloud SQL Insights
Why C: pgTAP is a unit testing framework for PostgreSQL that allows writing tests for functions, procedures, and other database objects.
Variation 5. A company is migrating their on-premises Oracle database to Cloud SQL for PostgreSQL. They want to test the converted stored procedures using unit tests. Which framework should they use?
medium- A.pgAdmin
- B.SQL Developer
- ✓ C.pgTAP
- D.Ora2Pg
Why C: pgTAP is a unit testing framework for PostgreSQL that can test stored procedures and functions.
Variation 6. An organization is migrating an Oracle database to Cloud SQL for PostgreSQL. They have numerous stored procedures written in PL/SQL. Which tool should they use to automatically convert these procedures to PL/pgSQL?
medium- ✓ A.Ora2Pg
- B.BigQuery Data Transfer Service
- C.Database Migration Service (DMS)
- D.gcloud sql import
Why A: Ora2Pg is a schema conversion tool that translates Oracle PL/SQL code to PostgreSQL PL/pgSQL, handling data type mappings and object conversions.
Last reviewed: Jul 4, 2026
This PCDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCDE exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.