Files
Vinod Sridharan d2a7669a25 Merged PR 1566832: [OSS] Enable support for current_op aggregation stage in DocumentDB
### Does this PR have any customer impact?
Yes

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Refactor

### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No

### Are you introducing any new config? If yes, do you have tests with and without them being set?
Yes
### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))

### Description
Enable support for current_op aggregation stage in OSS.
Still pending: support for getting locking pids and index builds.
----
#### AI description  (iteration 1)
#### PR Classification
New feature

#### PR Summary
This pull request enables support for the `current_op` aggregation stage in DocumentDB.
- Added new functions in `current_op--0.101-0.sql` and `current_op--latest.sql` to support the `current_op` aggregation stage.
- Modified `current_op.c` to handle new attributes and improve the `current_op` command processing.
- Updated `system_configs.c` to include a new configuration variable for tracking the application name in `current_op`.
- Adjusted test cases in `bson_aggregation_pipeline_tests_coll_agnostic.sql` and related expected output files to validate the new feature.
- Updated `metadata_cache.c` to correctly reference the `current_op_aggregation` function.
2025-02-06 09:18:21 -08:00

22 lines
562 B
Bash
Executable File

#!/bin/bash
# fail if trying to reference a variable that is not set.
set -u
# exit immediately if a command exits with a non-zero status
set -e
touch ~/.psqlrc;
if grep -Fq "documentdb_api_catalog" ~/.psqlrc; then
echo "documentdb command already set"
else
echo "SET search_path TO documentdb_core,documentdb_api_catalog,public;" >> ~/.psqlrc
fi
if grep -Fq "documentdb_core.bsonUseEJson" ~/.psqlrc; then
echo "BsonTextRepresentation already set"
else
echo "SET documentdb_core.bsonUseEJson TO true;" >> ~/.psqlrc
fi
export PSQLRC=~/.psqlrc