Skip to Main Content

Oracle Database Free

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

enum domain support in PL/SQL

Plamen PetrovMay 9 2025

Hi,

What is the latest on basic PL/SQL support for the 23ai domains? I do this and I get an error “PLS-00905: object PP.TENANT_OPERATIONS is invalid” when compiling the stored procedure. Or maybe I am doing something wrong…

Oracle is 23.5 Enterprise for Cloud and Engineered Systems

CREATE DOMAIN tenant_operations AS ENUM (
   ins, upd, del
);
CREATE TABLE x_domain (
   id NUMBER,
   op tenant_operations
);
CREATE OR REPLACE PROCEDURE x_dom AS
BEGIN
   FOR c_rec IN (
       SELECT id, op
         FROM x_domain
   )
   LOOP
       CASE c_rec.op
           WHEN tenant_operations.del THEN
               NULL;
           WHEN tenant_operations.upd THEN
               NULL;
           WHEN tenant_operations.ins THEN
               NULL;
       END CASE;
   END LOOP;
END;
/
Comments
Post Details
Added on May 9 2025
6 comments
173 views