Skip to content

Commit

Permalink
Converted SQL mail into multiple files. (apache#1401)
Browse files Browse the repository at this point in the history
Converted SQL mail into multiple files.

This pull request is aimed at improving the overall quality of our SQL codebase
by converting the main SQL (age-x.x.x.sql) file into multiple smaller files in the
sql directory. The primary goal is to enhance code readability, maintainability,
and organization for the benefit of the development team.

(cherry picked from commit f6e6af7)
  • Loading branch information
muhammadshoaib committed Nov 28, 2023
1 parent 79829d6 commit 027a48f
Show file tree
Hide file tree
Showing 20 changed files with 4,708 additions and 4,374 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.o
*.so
build.sh
age--*.*.*.sql
.idea
.deps
.DS_Store
Expand Down
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

MODULE_big = age


age_sql = age--1.4.0.sql

OBJS = src/backend/age.o \
src/backend/catalog/ag_catalog.o \
Expand Down Expand Up @@ -75,7 +75,12 @@ OBJS = src/backend/age.o \

EXTENSION = age

DATA = age--1.4.0.sql
#SQLS = $(sort ($(wildcard sql/*.sql)))
SQLS := $(shell cat sql/sql_files)
SQLS := $(addprefix sql/,$(SQLS))
SQLS := $(addsuffix .sql,$(SQLS))

DATA_built = $(age_sql)

# sorted in dependency order
REGRESS = scan \
Expand Down Expand Up @@ -110,7 +115,7 @@ ag_regress_dir = $(srcdir)/regress
REGRESS_OPTS = --load-extension=age --inputdir=$(ag_regress_dir) --outputdir=$(ag_regress_dir) --temp-instance=$(ag_regress_dir)/instance --port=61958 --encoding=UTF-8 --temp-config $(ag_regress_dir)/age_regression.conf

ag_regress_out = instance/ log/ results/ regression.*
EXTRA_CLEAN = $(addprefix $(ag_regress_dir)/, $(ag_regress_out)) src/backend/parser/cypher_gram.c src/include/parser/cypher_gram_def.h src/include/parser/cypher_kwlist_d.h
EXTRA_CLEAN = $(addprefix $(ag_regress_dir)/, $(ag_regress_out)) src/backend/parser/cypher_gram.c src/include/parser/cypher_gram_def.h src/include/parser/cypher_kwlist_d.h $(age_sql)

GEN_KEYWORDLIST = $(PERL) -I ./tools/ ./tools/gen_keywordlist.pl
GEN_KEYWORDLIST_DEPS = ./tools/gen_keywordlist.pl tools/PerfectHash.pm
Expand All @@ -134,6 +139,9 @@ src/backend/parser/cypher_gram.c: BISONFLAGS += --defines=src/include/parser/cyp
src/backend/parser/cypher_parser.o: src/backend/parser/cypher_gram.c
src/backend/parser/cypher_keywords.o: src/backend/parser/cypher_gram.c

$(age_sql):
@cat $(SQLS) > $@

src/backend/parser/ag_scanner.c: FLEX_NO_BACKUP=yes

installcheck: export LC_COLLATE=C
Loading

0 comments on commit 027a48f

Please sign in to comment.