Skip to content

Commit 89e4b15

Browse files
authored
Merge pull request #918 from OreoYang/nls_reconstruct
NLS refactor
2 parents e7d0b3a + 17428ae commit 89e4b15

File tree

17 files changed

+790
-766
lines changed

17 files changed

+790
-766
lines changed

.coderabbit.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
# Minimal configuration for getting started
3+
language: "en-US"
4+
reviews:
5+
profile: "chill"
6+
high_level_summary: true
7+
auto_review:
8+
enabled: true
9+
drafts: false
10+
base_branches: ["master", "IVORY_REL_5_STABLE"]

GNUmakefile.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,11 @@ headerscheck: submake-generated-headers
158158
cpluspluscheck: submake-generated-headers
159159
$(top_srcdir)/src/tools/pginclude/headerscheck --cplusplus $(top_srcdir) $(abs_top_builddir)
160160

161+
# ivorysql code format
162+
code-format: submake-generated-headers
163+
@bash tools/enable-git-hooks.sh
164+
161165
#.PHONY: dist distdir distcheck docs install-docs world check-world install-world installcheck-world headerscheck cpluspluscheck
162166

163-
.PHONY: dist distcheck docs install-docs world check-world install-world installcheck-world headerscheck cpluspluscheck oracle-pg-check-world oracle-check-world oracle-installcheck-world all-check all-check-world all-installcheck-world
167+
.PHONY: dist distcheck docs install-docs world check-world install-world installcheck-world headerscheck cpluspluscheck oracle-pg-check-world oracle-check-world oracle-installcheck-world all-check all-check-world all-installcheck-world code-format
164168

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,3 @@ all check oracle-check all-check install installdirs installcheck oracle-install
4444
false; \
4545
fi
4646

47-
48-
.PHONY: enable-git-hooks
49-
enable-git-hooks:
50-
@bash tools/enable-git-hooks.sh

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Furthermore, for more detailed installation instructions, please refer to the [I
3232
- [Source code installation](https://docs.ivorysql.org/en/ivorysql-doc/v4.5/v4.5/6#Source-code-installation)
3333

3434
## Developer Formatting hooks and CI:
35-
- A pre-commit formatting hook is provided at `.githooks/pre-commit`. Enable it with `git config core.hooksPath .githooks`, or run `make enable-git-hooks` (equivalently `bash tools/enable-git-hooks.sh`).
35+
- A pre-commit formatting hook is provided at `.githooks/pre-commit`. Enable it with `git config core.hooksPath .githooks`, or run `make code-format` (equivalently `bash tools/enable-git-hooks.sh`).
3636
- The hook depends only on in-tree tools `src/tools/pgindent` and `src/tools/pg_bsd_indent`. On commit it formats staged C/C++ files with pgindent and re-adds them to the staged area.
3737
- A Cirrus workflow `FormatCheck` runs `pgindent --check` on files changed in a PR.
3838

README_CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ IvorySQL 项目采用 Apache 2.0 许可协议发布,并鼓励各种形式的
1818

1919
## 开发者代码格式化
2020
- 提交前自动格式化(推荐):
21-
- 已克隆仓库:在仓库根目录执行 `make enable-git-hooks`(或 `bash tools/enable-git-hooks.sh`
21+
- 已克隆仓库:在仓库根目录执行 `make code-format`(或 `bash tools/enable-git-hooks.sh`
2222
- 提交时行为:Git 钩子会自动用 `pgindent` 格式化已暂存的 C/C++ 文件并回加到暂存区,未通过二次校验会阻止提交。
2323
- PR 阶段:Cirrus 将运行 `FormatCheck`(pgindent --check)对差异文件做只读校验。
2424

contrib/ivorysql_ora/expected/ora_datetime.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ CREATE INDEX TEST_DATE_BRIN ON TEST_DATE USING BRIN (A);
280280
-- Build tables and test 'NLS_TIMESTAMP_FORMAT' parameter, don't do the validity check.
281281
CREATE TABLE TEST_TIMESTAMP(a TIMESTAMP);
282282
SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SS.FF9';
283-
-- effective number of fractional seconds is 6,the part of excess is 0
283+
-- effective number of fractional seconds is 6, the part of excess is 0
284284
INSERT INTO TEST_TIMESTAMP VALUES('1990-1-19 11:11:11.123456789');
285285
INSERT INTO TEST_TIMESTAMP VALUES('1990-2-19'); -- hour、minute、second、fractional second is zero.
286286
INSERT INTO TEST_TIMESTAMP VALUES('1990-2-19 11:11:11');
@@ -550,7 +550,7 @@ CREATE INDEX TEST_TIMESTAMP_BRIN ON TEST_TIMESTAMP USING BRIN (A);
550550
-- Build tables and test 'NLS_TIMESTAMP_TZ_FORMAT' parameter, don't do the validity check.
551551
CREATE TABLE TEST_TIMESTAMPTZ(a TIMESTAMP WITH TIME ZONE);
552552
SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF9';
553-
-- effective number of fractional seconds is 6,the part of excess is 0
553+
-- effective number of fractional seconds is 6, the part of excess is 0
554554
INSERT INTO TEST_TIMESTAMPTZ VALUES('1990-1-19 11:11:11.123456789');
555555
INSERT INTO TEST_TIMESTAMPTZ VALUES('1990-2-19'); -- hour、minute、second、fractional second is zero.
556556
INSERT INTO TEST_TIMESTAMPTZ VALUES('1990-2-19 11:11:11');

contrib/ivorysql_ora/expected/ora_datetime_datatype_functions.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,10 +1739,10 @@ select * from timestpwtz_tb;
17391739
drop table timestpwtz_tb;
17401740
alter session set NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH.MI.SS.FF5 AM';
17411741
CREATE TABLE timestp_tb(timestp_clo timestamp(7));
1742-
WARNING: TIMESTAMP(7) effective number of fractional seconds is 6,the part of excess is 0
1742+
WARNING: TIMESTAMP(7) effective number of fractional seconds is 6, the part of excess is 0
17431743
LINE 1: CREATE TABLE timestp_tb(timestp_clo timestamp(7));
17441744
^
1745-
WARNING: TIMESTAMP(7) effective number of fractional seconds is 6,the part of excess is 0
1745+
WARNING: TIMESTAMP(7) effective number of fractional seconds is 6, the part of excess is 0
17461746
insert into timestp_tb values ('2022-08-19 03.37.05 PM');
17471747
select * from timestp_tb;
17481748
timestp_clo

contrib/ivorysql_ora/sql/ora_datetime.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ CREATE TABLE TEST_TIMESTAMP(a TIMESTAMP);
143143

144144
SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SS.FF9';
145145

146-
-- effective number of fractional seconds is 6,the part of excess is 0
146+
-- effective number of fractional seconds is 6, the part of excess is 0
147147
INSERT INTO TEST_TIMESTAMP VALUES('1990-1-19 11:11:11.123456789');
148148

149149
INSERT INTO TEST_TIMESTAMP VALUES('1990-2-19'); -- hour、minute、second、fractional second is zero.
@@ -276,7 +276,7 @@ CREATE TABLE TEST_TIMESTAMPTZ(a TIMESTAMP WITH TIME ZONE);
276276
SET NLS_TIMESTAMP_TZ_FORMAT='YYYY-MM-DD HH24:MI:SS.FF9';
277277

278278

279-
-- effective number of fractional seconds is 6,the part of excess is 0
279+
-- effective number of fractional seconds is 6, the part of excess is 0
280280
INSERT INTO TEST_TIMESTAMPTZ VALUES('1990-1-19 11:11:11.123456789');
281281

282282
INSERT INTO TEST_TIMESTAMPTZ VALUES('1990-2-19'); -- hour、minute、second、fractional second is zero.

0 commit comments

Comments
 (0)