Files
documentdb/pg_helio_api/Makefile
T
Zinan Ren 4e093b2c9d Merged PR 1545484: [OSS] Porting udfs into documentdb - part 2
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Refactoring
### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes
### Are you introducing any new config? If yes, do you have tests with and without them being set?
No
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description

Porting udfs into documentdb

----
#### AI description  (iteration 1)
#### PR Classification
Code cleanup and feature enhancement.

#### PR Summary
This pull request continues the porting of UDFs into DocumentDB, updating and including various SQL files for better functionality and organization.
- Updated `documentdb--0.24-0.sql` to include new UDFs and operators, replacing old function references.
- Added new UDFs for query, projection, geospatial, aggregation, metadata, schema management, index management, CRUD commands, user management, schema validation, telemetry, TTL, vector search, extension version, diagnostic, and RBAC metadata.
- Removed outdated function definitions and replaced them with updated SQL includes.
2025-01-15 07:48:41 +00:00

96 lines
2.7 KiB
Makefile

EXTENSION = pg_helio_api
SQL_DEPDIR=.deps/sql
SQL_BUILDDIR=build/sql
template_sql_files = $(wildcard sql/*.sql)
generated_sql_files = $(patsubst %,build/%,$(template_sql_files))
DATA_built = $(generated_sql_files)
sql_file_inputs = $(wildcard sql/**/*.sql)
BUILD_SCRIPT_DIR = ../
OSS_SRC_DIR = ../
OSS_COMMON_SQL_HEADER = $(wildcard $(OSS_SRC_DIR)/common_header.sql)
# Extension defines
API_SCHEMA_NAME=helio_api
API_SCHEMA_NAME_V2=helio_api
API_SCHEMA_INTERNAL_NAME=helio_api_internal
API_SCHEMA_INTERNAL_NAME_V2=helio_api_internal
API_CATALOG_SCHEMA_NAME=helio_api_catalog
API_CATALOG_SCHEMA_NAME_V2=helio_api_catalog
CORE_SCHEMA_NAME=helio_core
CORE_SCHEMA_NAME_V2=helio_core
API_DATA_SCHEMA_NAME=helio_data
API_ADMIN_ROLE=helio_admin_role
API_READONLY_ROLE=helio_readonly_role
POSTGIS_SCHEMA_NAME=public
EXTENSION_OBJECT_PREFIX=helio
API_GUC_PREFIX=helio_api
# compilation configuration
MODULE_big = $(EXTENSION)
# TODO: Need to remove this with PG16 and expose only valid exports
ALLOW_DEFAULT_VISIBILITY=yes
USE_DOCUMENTDB_CORE = 1
USE_DOCUMENTDB = 1
include $(OSS_SRC_DIR)/Makefile.cflags
PG_CPPFLAGS += -I$(OSS_SRC_DIR)/pg_helio_core/include/
SOURCES = $(wildcard src/*.c) $(wildcard src/**/*.c)
OBJS = $(patsubst %.c,%.o,$(SOURCES))
DEBUG ?= no
ifeq ($(DEBUG),yes)
PG_CPPFLAGS += -ggdb -O0 -g
PG_CFLAGS += -ggdb -O0 -g
endif
SHLIB_LINK = $(libpq)
include $(OSS_SRC_DIR)/Makefile.global
clean-sql:
rm -rf .deps/ build/
check:
$(MAKE) -C src/test all
check-minimal:
$(MAKE) -C src/test/regress check-bson-minimal
citus-indent:
citus_indent
analysis: citus-indent
check-regress:
$(MAKE) -C src/test check-regress
# Before installing, trim any files extension*.sql files in the target install directory
install: trim_installed_data_files
trim_installed_data_files:
rm -f $(DESTDIR)$(datadir)/$(datamoduledir)/$(EXTENSION)--*.sql
build-sql: $(generated_sql_files)
$(generated_sql_files): build/%: %
@mkdir -p $(SQL_DEPDIR) $(SQL_BUILDDIR)
@# -MF is used to store dependency files(.Po) in another directory for separation
@# -MT is used to change the target of the rule emitted by dependency generation.
@# -P is used to inhibit generation of linemarkers in the output from the preprocessor.
@# -undef is used to not predefine any system-specific or GCC-specific macros.
@# -imacros is used to specify a file that defines macros for the global context but its output is thrown away.
@# `man cpp` for further information
cpp -undef -w $(SQL_DEFINES) -I$(OSS_SRC_DIR) -imacros $(OSS_COMMON_SQL_HEADER) -P -MMD -MP -MF$(SQL_DEPDIR)/$(*F).Po -MT$@ $< > $@
include $(OSS_SRC_DIR)/Makefile.versions
include $(OSS_SRC_DIR)/Makefile.docdb
src/helio_api_extension_version.o : build/include/metadata/helio_extension_version.h