Details

    • Technical task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • OTHER

    Description

      Implement a built-in package DBMS_OUTPUT for sql_mode=ORACLE.
      This feature is actively used by Oracle users, especially for debugging purposes.

      The idea:

      • A stored routine can send debug messages using DBMS_OUTPUT methods, such as DBMS_OUTPUT.PUT_LINE(), which are collected in the package internal buffers.
      • The client program e.g. SQL*Plus retrieves the collected messages using methods such as DBMS_OUTPUT.GET_LINE()

      SQL*Plus understands a special command SET SERVEROUTPUT ON; to enable displaying of the DBMS_OUTPUT messages after each statement executed.

      Example:

      DROP FUNCTION f1;
      CREATE FUNCTION f1 (a INT) RETURN INT
      AS
      BEGIN
        DBMS_OUTPUT.PUT_LINE('a IS '||TO_CHAR(a));
        RETURN a;
      END;
      /
      SET SERVEROUTPUT ON;
      SELECT f1(10) FROM DUAL;
      

          F1(10)
      ----------
      	10
       
      a IS 10
      

      Possible implementation using NOTEs

      When we have MDEV-10591 implemented, we will be able just to create a package DBMS_OUTOUT with a procedure PUT_LINE('string') which will just send 'string' to the client as a NOTE. That would not be exactly the same how Oracle works, but very close, and useful for debugging purposes.

      Attachments

        Issue Links

          Activity

            There are no comments yet on this issue.

            People

              Unassigned Unassigned
              bar Alexander Barkov
              Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.