jrgemignani commented on code in PR #2364:
URL: https://github.com/apache/age/pull/2364#discussion_r3029351621


##########
Makefile:
##########
@@ -157,15 +226,78 @@ src/backend/parser/cypher_parser.bc: 
src/backend/parser/cypher_gram.c src/includ
 src/backend/parser/cypher_keywords.o: src/backend/parser/cypher_gram.c 
src/include/parser/cypher_gram_def.h
 src/backend/parser/cypher_keywords.bc: src/backend/parser/cypher_gram.c 
src/include/parser/cypher_gram_def.h
 
-# Strip PASSEDBYVALUE on 32-bit (SIZEOF_DATUM=4) for graphid pass-by-reference
+# Build the default install SQL (age--<VER>.sql) from the INITIAL version-bump
+# commit in git history. This means CREATE EXTENSION age installs the "day-one
+# release" SQL — the state of sql/ at the moment the version was bumped in
+# age.control. All other regression tests run against this SQL + the current
+# HEAD .so, implicitly validating that the .so is backward-compatible with the
+# initial release SQL.
+#
+# The current HEAD SQL goes into the synthetic next version (age--<NEXT>.sql)
+# which is only reachable via ALTER EXTENSION UPDATE in the upgrade test.
+ifneq ($(AGE_VER_COMMIT),)
+$(age_sql): age.control
+       @echo "Building initial-release install SQL: $@ from commit 
$(AGE_VER_COMMIT)"
+       @for f in $$(git show $(AGE_VER_COMMIT):sql/sql_files 2>/dev/null); do \
+               git show $(AGE_VER_COMMIT):sql/$${f}.sql 2>/dev/null; \
+       done > $@
+ifeq ($(SIZEOF_DATUM),4)
+       @echo "32-bit build: removing PASSEDBYVALUE from graphid type"
+       @sed 's/^  PASSEDBYVALUE,$$/  -- PASSEDBYVALUE removed for 32-bit (see 
Makefile)/' $@ > [email protected] && mv [email protected] $@

Review Comment:
   Updated.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to