Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#282 stored procedure print option

open
Fred Toussi
engine (144)
5
2012-11-30
2012-11-05
Anonymous
No

It were very helpful for stored procedure development to have something like Oracle DBMS_OUPUT.PUT_LINE or Postgres PRINT command. A simple version of the command would always send output to system logs / console. In a advanced version the output could be enabled / disabled session wise and sent to console / a specific file / into a pipe.

Discussion

  • Fred Toussi
    Fred Toussi
    2012-11-30

    You can define a static Java function to print the comment to System.out or a log.

    You then create a function such as this and call the function within your SQL procedures and functions where necessary;

    CREATE FUNCTION DUMP(STR VARCHAR(100) RETURNS INT NOT DETERMINISTIC LANGUAGE JAVA EXTRNAL NAME 'classpath and name of your java method'

     
  • Fred Toussi
    Fred Toussi
    2012-11-30

    • assigned_to: nobody --> fredt