Skip to content

Commit b2e00fc

Browse files
committed
Add DBMS_OUTPUT package with Oracle-compatible buffering API
Implements ENABLE, DISABLE, PUT, PUT_LINE, NEW_LINE, GET_LINE, and GET_LINES procedures in the plisql extension. Supports buffer size limits (2000-1000000 bytes) and ORU-10027 overflow error.
1 parent b1caefd commit b2e00fc

File tree

7 files changed

+1671
-6
lines changed

7 files changed

+1671
-6
lines changed

src/bin/initdb/initdb.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2091,7 +2091,10 @@ load_plpgsql(FILE *cmdfd)
20912091
static void
20922092
load_plisql(FILE *cmdfd)
20932093
{
2094+
/* Switch to oracle mode to allow CREATE PACKAGE in extension SQL */
2095+
PG_CMD_PUTS("set ivorysql.compatible_mode to oracle;\n\n");
20942096
PG_CMD_PUTS("CREATE EXTENSION plisql;\n\n");
2097+
PG_CMD_PUTS("set ivorysql.compatible_mode to pg;\n\n");
20952098
}
20962099

20972100
static void

src/pl/plisql/src/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ rpath =
4040
OBJS = \
4141
$(WIN32RES) \
4242
pl_comp.o \
43+
pl_dbms_output.o \
4344
pl_exec.o \
4445
pl_funcs.o \
4546
pl_gram.o \
@@ -58,7 +59,7 @@ REGRESS = plisql_array plisql_call plisql_control plisql_copy plisql_domain \
5859
plisql_record plisql_cache plisql_simple plisql_transaction \
5960
plisql_trap plisql_trigger plisql_varprops plisql_nested_subproc \
6061
plisql_nested_subproc2 plisql_out_parameter plisql_type_rowtype \
61-
plisql_exception
62+
plisql_exception plisql_dbms_output
6263

6364
# where to find ora_gen_keywordlist.pl and subsidiary files
6465
TOOLSDIR = $(top_srcdir)/src/tools

0 commit comments

Comments
 (0)