Skip to content

Commit ff61b59

Browse files
committed
pl/isql language that support function and procedure(II)
refine the comments.
1 parent 035bb67 commit ff61b59

7 files changed

Lines changed: 18 additions & 18 deletions

File tree

‎src/backend/commands/functioncmds.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,10 +1614,10 @@ CreateFunction(ParseState *pstate, CreateFunctionStmt *stmt)
16141614
}
16151615

16161616
/*
1617-
* support oracle grammer like
1617+
* Support oracle grammer:
16181618
* alter function func editionable|noneditionable or compile
1619-
* this function we doesn't consider function arguments and
1620-
* search pg_proc directly, if we found more than one or less
1619+
* In this function we don't support function arguments or
1620+
* searching pg_proc directly, if we found more than one or less
16211621
* than one, we report error.
16221622
*/
16231623
ObjectAddress

‎src/backend/oracle_parser/ora_gram.y‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9104,7 +9104,7 @@ implementation_package:
91049104
{
91059105
$$ = NIL;
91069106
}
9107-
/* reuse implementation_type temporary */
9107+
/* reuse implementation_type temporarily */
91089108
| implementation_package_type POLYMORPHIC implementation_type
91099109
{
91109110
$$ = $3;
@@ -9202,7 +9202,7 @@ opt_ora_func_args_with_defaults:
92029202
* In order to avoid reduce/reduce conflict, we are compatible with Oracle
92039203
* based on the original CREATE PROCEUDRE grammar rules of PG. The purpose
92049204
* of adding this nonterminal is to try not to destroy the syntax of PG.
9205-
* Although we can switch to the gram.y of native PG, try our best to Stick
9205+
* Although we can switch to the gram.y of native PG, try our best to stick
92069206
* to this principle.
92079207
*/
92089208
opt_procedure_args_with_defaults:

‎src/include/nodes/parsenodes.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4394,21 +4394,21 @@ typedef struct AccessibleByClause
43944394
} AccessibleByClause;
43954395

43964396
/*
4397-
* support alter a function like
4397+
* support alter a function like:
43984398
* alter function func editable|noneditable or compile
4399-
* we doesn't use the AlterFunctionStmt, because we doesn't
4399+
* we don't use the AlterFunctionStmt, because we don't
44004400
* want to use AlterFunction function, which will modify the
44014401
* pg_proc catalog table,compile doesn't change the system catalog.
4402-
* another reason is AlterFunction which fun should
4402+
* another reason is AlterFunction which should
44034403
* bring function arguments and find function rely on its
4404-
* arguments, this struct will doesn't consider function arguments.
4404+
* arguments, this struct will not consider function arguments.
44054405
*/
44064406
typedef struct CompileFunctionStmt
44074407
{
44084408
NodeTag type;
44094409
ObjectType objtype;
44104410
ObjectWithArgs *func; /* name and args of function */
4411-
bool is_compile; /* if false, it is change the editable|noneditable */
4411+
bool is_compile;
44124412
bool editable;
44134413
List *parameters;
44144414
} CompileFunctionStmt;

‎src/include/pg_config.h.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
/* Saved arguments from configure */
3434
#undef CONFIGURE_ARGS
3535

36-
/* Define to the default TCP port number on which the server listens and to
36+
/* Define the default TCP port number on which the server listens and to
3737
which clients will try to connect. This can be overridden at run-time, but
3838
it's convenient if your clients have the right default compiled in.
3939
(--with-oraport=PORTNUM) */

‎src/oracle_fe_utils/ora_psqlscan.l‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1869,7 +1869,7 @@ is_oracle_slash(PsqlScanState state, const char *line)
18691869
len = strlen(line);
18701870
for (i = 0; i < len; i++)
18711871
{
1872-
/* allowed special char */
1872+
/* allow special char */
18731873
if (line[i] == '\t' ||
18741874
line[i] == '\n' ||
18751875
line[i] == '\r' ||

‎src/oracle_test/regress/expected/ora_plisql.out‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--
22
-- PLISQL
33
--
4-
-- return is a non-reserved keyword, Can be used as object name.
4+
-- return is a non-reserved keyword, can be used as object name.
55
CREATE TABLE RETURN (fooid INT, foosubid INT, fooname TEXT);
66
INSERT INTO RETURN VALUES (1, 2, 'three');
77
INSERT INTO RETURN VALUES (4, 5, 'six');
@@ -936,7 +936,7 @@ SELECT pg_get_functiondef('test_subproc_func'::regproc) from dual;
936936
end;
937937
(1 row)
938938

939-
-- ivy_get_plisql_functiondef is only using get plisql func/proc definition.
939+
-- ivy_get_plisql_functiondef is only used to get plisql func/proc definition.
940940
SELECT ivy_get_plisql_functiondef('test_func'::regproc) from dual;
941941
ivy_get_plisql_functiondef
942942
-----------------------------------------------
@@ -1142,7 +1142,7 @@ EXEC test_proc6(2, 3, 4);
11421142
(1 row)
11431143

11441144
DROP PROCEDURE test_proc6;
1145-
-- recursive with output arguments
1145+
-- recursion with output arguments
11461146
CREATE OR REPLACE PROCEDURE test_proc7(x int, INOUT a int, INOUT b numeric)
11471147
AS
11481148
BEGIN

‎src/oracle_test/regress/sql/ora_plisql.sql‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- PLISQL
33
--
44

5-
-- return is a non-reserved keyword, Can be used as object name.
5+
-- return is a non-reserved keyword, can be used as object name.
66
CREATE TABLE RETURN (fooid INT, foosubid INT, fooname TEXT);
77
INSERT INTO RETURN VALUES (1, 2, 'three');
88
INSERT INTO RETURN VALUES (4, 5, 'six');
@@ -934,7 +934,7 @@ SELECT pg_get_functiondef('test_func'::regproc) from dual;
934934
SELECT pg_get_functiondef('test_proc'::regproc) from dual;
935935
SELECT pg_get_functiondef('test_subproc_func'::regproc) from dual;
936936

937-
-- ivy_get_plisql_functiondef is only using get plisql func/proc definition.
937+
-- ivy_get_plisql_functiondef is only used to get plisql func/proc definition.
938938
SELECT ivy_get_plisql_functiondef('test_func'::regproc) from dual;
939939
SELECT ivy_get_plisql_functiondef('test_proc'::regproc) from dual;
940940
SELECT ivy_get_plisql_functiondef('test_subproc_func'::regproc) from dual;
@@ -1056,7 +1056,7 @@ END;
10561056
CALL test_proc6(2, 3, 4);
10571057
EXEC test_proc6(2, 3, 4);
10581058
DROP PROCEDURE test_proc6;
1059-
-- recursive with output arguments
1059+
-- recursion with output arguments
10601060

10611061
CREATE OR REPLACE PROCEDURE test_proc7(x int, INOUT a int, INOUT b numeric)
10621062
AS

0 commit comments

Comments
 (0)