diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2f1c9a1ea..744719139 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,4 @@ -* @supabase/backend -migrations/ @supabase/cli @supabase/backend +* @supabase/backend @supabase/postgres +migrations/ @supabase/dev-workflows @supabase/postgres @supabase/backend +docker/orioledb @supabase/postgres @supabase/backend +common.vars.pkr.hcl @supabase/postgres @supabase/backend diff --git a/.github/workflows/ami-release-nix.yml b/.github/workflows/ami-release-nix.yml new file mode 100644 index 000000000..004a597d7 --- /dev/null +++ b/.github/workflows/ami-release-nix.yml @@ -0,0 +1,171 @@ +name: Release AMI Nix + +on: + push: + branches: + - develop + - release/* + paths: + - '.github/workflows/ami-release-nix.yml' + - 'common-nix.vars.pkr.hcl' + - 'ansible/vars.yml' + workflow_dispatch: + +permissions: + contents: write + id-token: write + +jobs: + prepare: + runs-on: ubuntu-latest + outputs: + postgres_versions: ${{ steps.set-versions.outputs.postgres_versions }} + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - uses: DeterminateSystems/nix-installer-action@main + + - name: Set PostgreSQL versions + id: set-versions + run: | + VERSIONS=$(nix run nixpkgs#yq -- '.postgres_major[]' ansible/vars.yml | nix run nixpkgs#jq -- -R -s -c 'split("\n")[:-1]') + echo "postgres_versions=$VERSIONS" >> $GITHUB_OUTPUT + + build: + needs: prepare + strategy: + matrix: + postgres_version: ${{ fromJson(needs.prepare.outputs.postgres_versions) }} + include: + - runner: arm-runner + arch: arm64 + ubuntu_release: focal + ubuntu_version: 20.04 + mcpu: neoverse-n1 + runs-on: ${{ matrix.runner }} + timeout-minutes: 150 + + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - uses: DeterminateSystems/nix-installer-action@main + + - name: Run checks if triggered manually + if: ${{ github.event_name == 'workflow_dispatch' }} + run: | + SUFFIX=$(sudo nix run nixpkgs#yq -- ".postgres_release[\"postgres${{ matrix.postgres_version }}\"]" ansible/vars.yml | sed -E 's/[0-9\.]+(.*)$/\1/') + if [[ -z "$SUFFIX" ]] ; then + echo "Version must include non-numeric characters if built manually." + exit 1 + fi + + - name: Set PostgreSQL version environment variable + run: echo "POSTGRES_MAJOR_VERSION=${{ matrix.postgres_version }}" >> $GITHUB_ENV + + - name: Generate common-nix.vars.pkr.hcl + run: | + PG_VERSION=$(sudo nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml) + PG_VERSION=$(echo "$PG_VERSION" | tr -d '"') # Remove any surrounding quotes + echo 'postgres-version = "'$PG_VERSION'"' > common-nix.vars.pkr.hcl + # Ensure there's a newline at the end of the file + echo "" >> common-nix.vars.pkr.hcl + + - name: Build AMI stage 1 + env: + POSTGRES_MAJOR_VERSION: ${{ env.POSTGRES_MAJOR_VERSION }} + run: | + packer init amazon-arm64-nix.pkr.hcl + GIT_SHA=${{github.sha}} + # why is postgresql_major defined here instead of where the _three_ other postgresql_* variables are defined? + packer build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" -var "ansible_arguments=-e postgresql_major=${POSTGRES_MAJOR_VERSION}" amazon-arm64-nix.pkr.hcl + + - name: Build AMI stage 2 + env: + POSTGRES_MAJOR_VERSION: ${{ env.POSTGRES_MAJOR_VERSION }} + run: | + packer init stage2-nix-psql.pkr.hcl + GIT_SHA=${{github.sha}} + POSTGRES_MAJOR_VERSION=${{ env.POSTGRES_MAJOR_VERSION }} + packer build -var "git_sha=${GIT_SHA}" -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var "postgres_major_version=${POSTGRES_MAJOR_VERSION}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" stage2-nix-psql.pkr.hcl + + - name: Grab release version + id: process_release_version + run: | + VERSION=$(cat common-nix.vars.pkr.hcl | sed -e 's/postgres-version = "\(.*\)"/\1/g') + echo "version=$VERSION" >> $GITHUB_OUTPUT + + - name: Create nix flake revision tarball + run: | + GIT_SHA=${{github.sha}} + MAJOR_VERSION=${{ env.POSTGRES_MAJOR_VERSION }} + + mkdir -p "/tmp/pg_upgrade_bin/${MAJOR_VERSION}" + echo "$GIT_SHA" >> "/tmp/pg_upgrade_bin/${MAJOR_VERSION}/nix_flake_version" + tar -czf "/tmp/pg_binaries.tar.gz" -C "/tmp/pg_upgrade_bin" . + + - name: configure aws credentials - staging + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.DEV_AWS_ROLE }} + aws-region: "us-east-1" + + - name: Upload software manifest to s3 staging + run: | + cd ansible + ansible-playbook -i localhost \ + -e "ami_release_version=${{ steps.process_release_version.outputs.version }}" \ + -e "internal_artifacts_bucket=${{ secrets.ARTIFACTS_BUCKET }}" \ + -e "postgres_major_version=${{ env.POSTGRES_MAJOR_VERSION }}" \ + manifest-playbook.yml + + - name: Upload nix flake revision to s3 staging + run: | + aws s3 cp /tmp/pg_binaries.tar.gz s3://${{ secrets.ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/20.04.tar.gz + + - name: configure aws credentials - prod + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.PROD_AWS_ROLE }} + aws-region: "us-east-1" + + - name: Upload software manifest to s3 prod + run: | + cd ansible + ansible-playbook -i localhost \ + -e "ami_release_version=${{ steps.process_release_version.outputs.version }}" \ + -e "internal_artifacts_bucket=${{ secrets.PROD_ARTIFACTS_BUCKET }}" \ + -e "postgres_major_version=${{ env.POSTGRES_MAJOR_VERSION }}" \ + manifest-playbook.yml + + - name: Upload nix flake revision to s3 prod + run: | + aws s3 cp /tmp/pg_binaries.tar.gz s3://${{ secrets.PROD_ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/20.04.tar.gz + + - name: Create release + uses: softprops/action-gh-release@v2 + with: + name: ${{ steps.process_release_version.outputs.version }} + tag_name: ${{ steps.process_release_version.outputs.version }} + target_commitish: ${{github.sha}} + + - name: Slack Notification on Failure + if: ${{ failure() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }} + SLACK_USERNAME: 'gha-failures-notifier' + SLACK_COLOR: 'danger' + SLACK_MESSAGE: 'Building Postgres AMI failed' + SLACK_FOOTER: '' + + - name: Cleanup resources after build + if: ${{ always() }} + run: | + aws ec2 describe-instances --filters "Name=tag:packerExecutionId,Values=${GITHUB_RUN_ID}" --query "Reservations[].Instances[].InstanceId" --output text | xargs -r aws ec2 terminate-instances --instance-ids + + - name: Cleanup resources on build cancellation + if: ${{ cancelled() }} + run: | + aws ec2 describe-instances --filters "Name=tag:packerExecutionId,Values=${GITHUB_RUN_ID}" --query "Reservations[].Instances[].InstanceId" --output text | xargs -r aws ec2 terminate-instances --instance-ids diff --git a/.github/workflows/ami-release.yml b/.github/workflows/ami-release.yml deleted file mode 100644 index 9a26571cb..000000000 --- a/.github/workflows/ami-release.yml +++ /dev/null @@ -1,152 +0,0 @@ -name: Release AMI - -on: - push: - branches: - - develop - paths: - - '.github/workflows/ami-release.yml' - - 'common.vars.pkr.hcl' - workflow_dispatch: - -jobs: - build: - strategy: - matrix: - include: - - runner: arm-runner - arch: arm64 - ubuntu_release: focal - ubuntu_version: 20.04 - mcpu: neoverse-n1 - runs-on: ${{ matrix.runner }} - timeout-minutes: 150 - permissions: - contents: write - packages: write - id-token: write - - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - - id: args - uses: mikefarah/yq@master - with: - cmd: yq 'to_entries | map(select(.value|type == "!!str")) | map(.key + "=" + .value) | join("\n")' 'ansible/vars.yml' - - run: docker context create builders - - uses: docker/setup-buildx-action@v3 - with: - endpoint: builders - - uses: docker/build-push-action@v5 - with: - load: true - build-args: | - ${{ steps.args.outputs.result }} - target: extensions - tags: supabase/postgres:extensions - platforms: linux/${{ matrix.arch }} - cache-from: type=gha,scope=${{ github.ref_name }}-latest-${{ matrix.arch }} - # No need to export extensions cache because latest depends on it - - name: Extract built packages - run: | - mkdir -p /tmp/extensions ansible/files/extensions - docker save supabase/postgres:extensions | tar xv -C /tmp/extensions - for layer in /tmp/extensions/*/layer.tar; do - tar xvf "$layer" -C ansible/files/extensions --strip-components 1 - done - - - id: version - run: echo "${{ steps.args.outputs.result }}" | grep "postgresql" >> "$GITHUB_OUTPUT" - - name: Build Postgres deb - uses: docker/build-push-action@v5 - with: - load: true - file: docker/Dockerfile - target: pg-deb - build-args: | - ubuntu_release=${{ matrix.ubuntu_release }} - ubuntu_release_no=${{ matrix.ubuntu_version }} - postgresql_major=${{ steps.version.outputs.postgresql_major }} - postgresql_release=${{ steps.version.outputs.postgresql_release }} - CPPFLAGS=-mcpu=${{ matrix.mcpu }} - tags: supabase/postgres:deb - platforms: linux/${{ matrix.arch }} - cache-from: type=gha,scope=${{ github.ref_name }}-deb - cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-deb - - name: Extract Postgres deb - run: | - mkdir -p /tmp/build ansible/files/postgres - docker save supabase/postgres:deb | tar xv -C /tmp/build - for layer in /tmp/build/*/layer.tar; do - tar xvf "$layer" -C ansible/files/postgres --strip-components 1 - done - - - name: Build AMI - run: | - GIT_SHA=${{github.sha}} - packer build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var-file="development-arm.vars.pkr.hcl" -var-file="common.vars.pkr.hcl" -var "ansible_arguments=" amazon-arm64.pkr.hcl - - - name: Grab release version - id: process_release_version - run: | - VERSION=$(sed -e 's/postgres-version = "\(.*\)"/\1/g' common.vars.pkr.hcl) - echo "version=$VERSION" >> "$GITHUB_OUTPUT" - - - name: configure aws credentials - staging - uses: aws-actions/configure-aws-credentials@v1 - with: - role-to-assume: ${{ secrets.DEV_AWS_ROLE }} - aws-region: "us-east-1" - - - name: Upload software manifest to s3 staging - run: | - cd ansible - ansible-playbook -i localhost \ - -e "ami_release_version=${{ steps.process_release_version.outputs.version }}" \ - -e "internal_artifacts_bucket=${{ secrets.ARTIFACTS_BUCKET }}" \ - manifest-playbook.yml - - - name: Upload pg binaries to s3 staging - run: | - aws s3 cp /tmp/pg_binaries.tar.gz s3://${{ secrets.ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/20.04.tar.gz - - - name: configure aws credentials - prod - uses: aws-actions/configure-aws-credentials@v1 - with: - role-to-assume: ${{ secrets.PROD_AWS_ROLE }} - aws-region: "us-east-1" - - - name: Upload software manifest to s3 prod - run: | - cd ansible - ansible-playbook -i localhost \ - -e "ami_release_version=${{ steps.process_release_version.outputs.version }}" \ - -e "internal_artifacts_bucket=${{ secrets.PROD_ARTIFACTS_BUCKET }}" \ - manifest-playbook.yml - - - name: Upload pg binaries to s3 prod - run: | - aws s3 cp /tmp/pg_binaries.tar.gz s3://${{ secrets.PROD_ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/20.04.tar.gz - - - name: Create release - uses: softprops/action-gh-release@v1 - with: - name: ${{ steps.process_release_version.outputs.version }} - tag_name: ${{ steps.process_release_version.outputs.version }} - target_commitish: ${{github.sha}} - - - name: Slack Notification on Failure - if: ${{ failure() }} - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }} - SLACK_USERNAME: 'gha-failures-notifier' - SLACK_COLOR: 'danger' - SLACK_MESSAGE: 'Building Postgres AMI failed' - SLACK_FOOTER: '' - - - name: Cleanup resources on build cancellation - if: ${{ cancelled() }} - run: | - aws ec2 describe-instances --filters "Name=tag:packerExecutionId,Values=${GITHUB_RUN_ID}" --query "Reservations[].Instances[].InstanceId" --output text | xargs -I {} aws ec2 terminate-instances --instance-ids {} diff --git a/.github/workflows/build-ccache.yml b/.github/workflows/build-ccache.yml deleted file mode 100644 index f296dd62f..000000000 --- a/.github/workflows/build-ccache.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: Update ccache - -on: - push: - branches: - - develop - paths: - - ".github/workflows/build-ccache.yml" - - "ansible/vars.yml" - - "Dockerfile" - workflow_dispatch: - -env: - image_tag: public.ecr.aws/supabase/postgres:ccache -permissions: - contents: read - packages: write - id-token: write - -jobs: - settings: - runs-on: ubuntu-latest - outputs: - build_args: ${{ steps.args.outputs.result }} - steps: - - uses: actions/checkout@v3 - - id: args - uses: mikefarah/yq@master - with: - cmd: yq 'to_entries | map(select(.value|type == "!!str")) | map(.key + "=" + .value) | join("\n")' 'ansible/vars.yml' - - build_image: - needs: settings - strategy: - matrix: - include: - - runner: [self-hosted, X64] - arch: amd64 - - runner: arm-runner - arch: arm64 - runs-on: ${{ matrix.runner }} - timeout-minutes: 180 - outputs: - image_digest: ${{ steps.build.outputs.digest }} - steps: - - run: docker context create builders - - uses: docker/setup-buildx-action@v3 - with: - endpoint: builders - - name: Configure AWS credentials - prod - uses: aws-actions/configure-aws-credentials@v1 - with: - role-to-assume: ${{ secrets.PROD_AWS_ROLE }} - aws-region: "us-east-1" - - uses: docker/login-action@v2 - with: - registry: public.ecr.aws - - id: build - uses: docker/build-push-action@v5 - with: - push: true - target: buildcache - build-args: | - CACHE_EPOCH=${{ github.event.repository.updated_at }} - ${{ needs.settings.outputs.build_args }} - tags: ${{ env.image_tag }}_${{ matrix.arch }} - platforms: linux/${{ matrix.arch }} - - merge_manifest: - needs: build_image - runs-on: ubuntu-latest - steps: - - uses: docker/setup-buildx-action@v3 - - name: Configure AWS credentials - prod - uses: aws-actions/configure-aws-credentials@v1 - with: - role-to-assume: ${{ secrets.PROD_AWS_ROLE }} - aws-region: "us-east-1" - - uses: docker/login-action@v2 - with: - registry: public.ecr.aws - - name: Merge multi-arch manifests - run: | - docker buildx imagetools create -t ${{ env.image_tag }} \ - ${{ env.image_tag }}_amd64 \ - ${{ env.image_tag }}_arm64 diff --git a/.github/workflows/check-shellscripts.yml b/.github/workflows/check-shellscripts.yml index b796bdb90..ab0f59b87 100644 --- a/.github/workflows/check-shellscripts.yml +++ b/.github/workflows/check-shellscripts.yml @@ -7,6 +7,9 @@ on: pull_request: workflow_dispatch: +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..93a2afdc5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: Check merge requirements + +on: + pull_request: + +permissions: + contents: read + +jobs: + check-release-version: + timeout-minutes: 5 + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - name: Load postgres_release values + id: load_postgres_release + uses: mikefarah/yq@master + with: + args: eval '.postgres_release' ansible/vars.yml + # The output will be available as steps.load_postgres_release.outputs.stdout + + - name: Run checks + run: | + POSTGRES_RELEASES="${{ steps.load_postgres_release.outputs.stdout }}" + + # Iterate through each release + for release in $(echo "$POSTGRES_RELEASES" | yq eval 'keys | .[]' -); do + VERSION=$(echo "$POSTGRES_RELEASES" | yq eval ".\"$release\"" -) + if [[ "$release" == "postgresorioledb-17" ]]; then + # Check for suffix after -orioledb + if [[ "$VERSION" =~ -orioledb(.*) ]]; then + SUFFIX="${BASH_REMATCH[1]}" + if [[ -n "$SUFFIX" ]]; then + echo "We no longer allow merging versions with suffixes after -orioledb." + exit 1 + fi + fi + else + # Check for suffix after version digits + if [[ "$VERSION" =~ ([0-9]+\.[0-9]+\.[0-9]+)(.*) ]]; then + SUFFIX="${BASH_REMATCH[2]}" + if [[ -n "$SUFFIX" ]]; then + echo "We no longer allow merging versions with suffixes after version $VERSION." + exit 1 + fi + fi + fi + done diff --git a/.github/workflows/collect-u18-binaries.yml b/.github/workflows/collect-u18-binaries.yml deleted file mode 100644 index 6bdd5bde2..000000000 --- a/.github/workflows/collect-u18-binaries.yml +++ /dev/null @@ -1,143 +0,0 @@ -name: Collect Ubuntu 18 compatible binaries - -on: - push: - branches: - - develop - - pcnc/pg-upgrade-fixes - paths: - - '.github/workflows/collect-u18-binaries.yml' - - 'common.vars.pkr.hcl' - - workflow_run: - workflows: [Release AMI] - branches: - - develop - types: - - completed - - workflow_dispatch: - -jobs: - build: - strategy: - matrix: - include: - - runner: arm-runner - arch: arm64 - ubuntu_release: bionic - ubuntu_version: 18.04 - mcpu: neoverse-n1 - runs-on: ${{ matrix.runner }} - timeout-minutes: 150 - permissions: - contents: write - packages: write - id-token: write - - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - - name: Grab release version - id: process_release_version - run: | - VERSION=$(sed -e 's/postgres-version = "\(.*\)"/\1/g' common.vars.pkr.hcl) - echo "version=$VERSION" >> "$GITHUB_OUTPUT" - - - id: args - uses: mikefarah/yq@master - with: - cmd: yq 'to_entries | map(select(.value|type == "!!str")) | map(.key + "=" + .value) | join("\n")' 'ansible/vars.yml' - - run: docker context create builders - - uses: docker/setup-buildx-action@v3 - with: - endpoint: builders - - uses: docker/build-push-action@v5 - with: - load: true - file: Dockerfile-u18 - build-args: | - ${{ steps.args.outputs.result }} - target: extensions - tags: supabase/postgres:extensions-u18 - platforms: linux/${{ matrix.arch }} - cache-from: type=gha,scope=${{ github.ref_name }}-extensions-u18 - cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-extensions-u18,ignore-error=true - - - name: Extract built packages - run: | - mkdir -p /tmp/extensions ansible/files/extensions - docker save supabase/postgres:extensions-u18 | tar xv -C /tmp/extensions - for layer in /tmp/extensions/*/layer.tar; do - tar xvf "$layer" -C ansible/files/extensions --strip-components 1 - done - - - id: version - run: echo "${{ steps.args.outputs.result }}" | grep "postgresql" >> "$GITHUB_OUTPUT" - - name: Build Postgres deb - uses: docker/build-push-action@v5 - with: - load: true - file: docker/Dockerfile - target: pg-deb - build-args: | - ubuntu_release=${{ matrix.ubuntu_release }} - ubuntu_release_no=${{ matrix.ubuntu_version }} - postgresql_major=${{ steps.version.outputs.postgresql_major }} - postgresql_release=${{ steps.version.outputs.postgresql_release }} - DEB_BUILD_PROFILES=pkg.postgresql.nozstd - tags: supabase/postgres:deb-u18 - platforms: linux/${{ matrix.arch }} - cache-from: type=gha,scope=${{ github.ref_name }}-deb-u18 - cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-deb-u18,ignore-error=true - - name: Extract Postgres deb - run: | - mkdir -p /tmp/build ansible/files/postgres - docker save supabase/postgres:deb-u18 | tar xv -C /tmp/build - for layer in /tmp/build/*/layer.tar; do - tar xvf "$layer" -C ansible/files/postgres --strip-components 1 - done - - - name: Build surrogate Docker image - uses: docker/build-push-action@v5 - with: - context: . - load: true - file: Dockerfile-u18 - target: pg_binary_collection - build-args: | - ubuntu_release=${{ matrix.ubuntu_release }} - ubuntu_release_no=${{ matrix.ubuntu_version }} - postgresql_major=${{ steps.version.outputs.postgresql_major }} - postgresql_release=${{ steps.version.outputs.postgresql_release }} - tags: supabase/postgres:u18-binaries - platforms: linux/${{ matrix.arch }} - cache-from: type=gha,scope=${{ github.ref_name }}-u18-binaries - cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-u18-binaries,ignore-error=true - - - name: Copy binary tarball - run: | - CONTAINER_ID=$(docker create supabase/postgres:u18-binaries) - docker cp "${CONTAINER_ID}:/tmp/pg_binaries/${{ matrix.ubuntu_version }}.tar.gz" /tmp/pg_binaries.tar.gz - docker rm "${CONTAINER_ID}" - - - name: configure aws credentials - staging - uses: aws-actions/configure-aws-credentials@v1 - with: - role-to-assume: ${{ secrets.DEV_AWS_ROLE }} - aws-region: "us-east-1" - - - name: Upload pg binaries to s3 staging - run: | - aws s3 cp /tmp/pg_binaries.tar.gz s3://${{ secrets.ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/18.04.tar.gz - - - name: configure aws credentials - prod - uses: aws-actions/configure-aws-credentials@v1 - with: - role-to-assume: ${{ secrets.PROD_AWS_ROLE }} - aws-region: "us-east-1" - - - name: Upload pg binaries to s3 prod - run: | - aws s3 cp /tmp/pg_binaries.tar.gz s3://${{ secrets.PROD_ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/18.04.tar.gz diff --git a/.github/workflows/dockerhub-release-aio.yml b/.github/workflows/dockerhub-release-aio.yml deleted file mode 100644 index 3664c3c02..000000000 --- a/.github/workflows/dockerhub-release-aio.yml +++ /dev/null @@ -1,110 +0,0 @@ -name: Release AIO image on Dockerhub - -on: - push: - branches: - - pcnc/trigger-build - paths: - - ".github/workflows/dockerhub-release-aio.yml" - - "docker/all-in-one/*" - - "common.vars*" - workflow_run: - workflows: [Release on Dockerhub] - branches: - - develop - types: - - completed - -jobs: - settings: - runs-on: ubuntu-latest - outputs: - docker_version: ${{ steps.settings.outputs.postgres-version }} - image_tag: supabase/postgres:aio-${{ steps.settings.outputs.postgres-version }} - build_args: ${{ steps.args.outputs.result }} - steps: - - uses: actions/checkout@v3 - - id: settings - # Remove spaces and quotes to get the raw version string - run: sed -r 's/(\s|\")+//g' common.vars.pkr.hcl >> $GITHUB_OUTPUT - - id: args - uses: mikefarah/yq@master - with: - cmd: yq 'to_entries | map(select(.value|type == "!!str")) | map(.key + "=" + .value) | join("\n")' 'ansible/vars.yml' - - build_image: - needs: settings - strategy: - matrix: - include: - - runner: [self-hosted, X64] - arch: amd64 - - runner: arm-runner - arch: arm64 - runs-on: ${{ matrix.runner }} - timeout-minutes: 180 - outputs: - image_digest: ${{ steps.build.outputs.digest }} - steps: - - run: docker context create builders - - uses: docker/setup-buildx-action@v3 - with: - endpoint: builders - - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - id: build - uses: docker/build-push-action@v5 - with: - file: docker/all-in-one/Dockerfile - push: true - build-args: | - postgres_version=${{ needs.settings.outputs.docker_version }} - ${{ needs.settings.outputs.build_args }} - target: production - tags: ${{ needs.settings.outputs.image_tag }}_${{ matrix.arch }} - platforms: linux/${{ matrix.arch }} - cache-from: type=gha,scope=${{ github.ref_name }}-aio-${{ matrix.arch }} - cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-aio-${{ matrix.arch }} - - name: Slack Notification - if: ${{ failure() }} - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }} - SLACK_USERNAME: "gha-failures-notifier" - SLACK_COLOR: "danger" - SLACK_MESSAGE: "Building Postgres AIO ${{ matrix.arch }} image failed" - SLACK_FOOTER: "" - - merge_manifest: - needs: [settings, build_image] - runs-on: ubuntu-latest - steps: - - uses: docker/setup-buildx-action@v3 - - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Merge multi-arch manifests - run: | - docker buildx imagetools create -t ${{ needs.settings.outputs.image_tag }} \ - ${{ needs.settings.outputs.image_tag }}_amd64 \ - ${{ needs.settings.outputs.image_tag }}_arm64 - - name: Slack Notification - if: ${{ failure() }} - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }} - SLACK_USERNAME: "gha-failures-notifier" - SLACK_COLOR: "danger" - SLACK_MESSAGE: "Building Postgres image failed" - SLACK_FOOTER: "" - - publish: - needs: [settings, merge_manifest] - # Call workflow explicitly because events from actions cannot trigger more actions - uses: ./.github/workflows/mirror.yml - with: - version: aio-${{ needs.settings.outputs.docker_version }} - secrets: inherit diff --git a/.github/workflows/dockerhub-release-matrix.yml b/.github/workflows/dockerhub-release-matrix.yml new file mode 100644 index 000000000..ed7075d1d --- /dev/null +++ b/.github/workflows/dockerhub-release-matrix.yml @@ -0,0 +1,249 @@ +name: Release all major versions on Dockerhub + +on: + push: + branches: + - develop + - release/* + paths: + - ".github/workflows/dockerhub-release-matrix.yml" + - "ansible/vars.yml" + workflow_dispatch: + +permissions: + contents: read + id-token: write + +jobs: + prepare: + runs-on: ubuntu-latest + outputs: + matrix_config: ${{ steps.set-matrix.outputs.matrix_config }} + steps: + - uses: DeterminateSystems/nix-installer-action@main + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Generate build matrix + id: set-matrix + run: | + nix run nixpkgs#nushell -- -c 'let versions = (open ansible/vars.yml | get postgres_major) + let matrix = ($versions | each { |ver| + let version = ($ver | str trim) + let dockerfile = $"Dockerfile-($version)" + if ($dockerfile | path exists) { + { + version: $version, + dockerfile: $dockerfile + } + } else { + null + } + } | compact) + + let matrix_config = { + include: $matrix + } + + $"matrix_config=($matrix_config | to json -r)" | save --append $env.GITHUB_OUTPUT' + build: + needs: prepare + strategy: + matrix: ${{ fromJson(needs.prepare.outputs.matrix_config) }} + runs-on: ubuntu-latest + outputs: + build_args: ${{ steps.args.outputs.result }} + steps: + - uses: actions/checkout@v3 + - uses: DeterminateSystems/nix-installer-action@main + - name: Set PostgreSQL version environment variable + run: echo "POSTGRES_MAJOR_VERSION=${{ matrix.version }}" >> $GITHUB_ENV + + - id: args + run: | + nix run nixpkgs#nushell -- -c ' + open ansible/vars.yml + | items { |key value| {name: $key, item: $value} } + | where { |it| ($it.item | describe) == "string" } + | each { |it| $"($it.name)=($it.item)" } + | str join "\n" + | save --append $env.GITHUB_OUTPUT + ' + build_release_image: + needs: [prepare, build] + strategy: + matrix: + postgres: ${{ fromJson(needs.prepare.outputs.matrix_config).include }} + arch: [amd64, arm64] + runs-on: ${{ matrix.arch == 'amd64' && 'ubuntu-latest' || 'arm-runner' }} + timeout-minutes: 180 + steps: + - uses: actions/checkout@v3 + - uses: DeterminateSystems/nix-installer-action@main + - run: docker context create builders + - uses: docker/setup-buildx-action@v3 + with: + endpoint: builders + - uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Get image tag + id: image + run: | + if [[ "${{ matrix.arch }}" == "arm64" ]]; then + pg_version=$(sudo nix run nixpkgs#nushell -- -c ' + let version = "${{ matrix.postgres.version }}" + let release_key = if ($version | str contains "orioledb") { + $"postgresorioledb-17" + } else { + $"postgres($version)" + } + open ansible/vars.yml | get postgres_release | get $release_key | str trim + ') + echo "pg_version=supabase/postgres:$pg_version" >> $GITHUB_OUTPUT + else + pg_version=$(nix run nixpkgs#nushell -- -c ' + let version = "${{ matrix.postgres.version }}" + let release_key = if ($version | str contains "orioledb") { + $"postgresorioledb-17" + } else { + $"postgres($version)" + } + open ansible/vars.yml | get postgres_release | get $release_key | str trim + ') + echo "pg_version=supabase/postgres:$pg_version" >> $GITHUB_OUTPUT + fi + - id: build + uses: docker/build-push-action@v5 + with: + push: true + build-args: | + ${{ needs.build.outputs.build_args }} + target: production + tags: ${{ steps.image.outputs.pg_version }}_${{ matrix.arch }} + platforms: linux/${{ matrix.arch }} + cache-from: type=gha,scope=${{ github.ref_name }}-latest-${{ matrix.arch }} + cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-latest-${{ matrix.arch }} + file: ${{ matrix.postgres.dockerfile }} + merge_manifest: + needs: [prepare, build, build_release_image] + strategy: + matrix: + include: ${{ fromJson(needs.prepare.outputs.matrix_config).include }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: DeterminateSystems/nix-installer-action@main + - uses: docker/setup-buildx-action@v3 + - uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Get image tag + id: get_version + run: | + nix run nixpkgs#nushell -- -c ' + let version = "${{ matrix.version }}" + let release_key = if ($version | str contains "orioledb") { + $"postgresorioledb-17" + } else { + $"postgres($version)" + } + let pg_version = (open ansible/vars.yml | get postgres_release | get $release_key | str trim) + $"pg_version=supabase/postgres:($pg_version)" | save --append $env.GITHUB_OUTPUT + ' + - name: Output version + id: output_version + run: | + echo "result=${{ steps.get_version.outputs.pg_version }}" >> $GITHUB_OUTPUT + - name: Collect versions + id: collect_versions + run: | + echo "${{ steps.output_version.outputs.result }}" >> results.txt # Append results + - name: Upload Results Artifact + uses: actions/upload-artifact@v4 + with: + name: merge_results-${{ matrix.version }} + path: results.txt + if-no-files-found: warn + - name: Merge multi-arch manifests + run: | + docker buildx imagetools create -t ${{ steps.get_version.outputs.pg_version }} \ + ${{ steps.get_version.outputs.pg_version }}_amd64 \ + ${{ steps.get_version.outputs.pg_version }}_arm64 + combine_results: + needs: [prepare, merge_manifest] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: DeterminateSystems/nix-installer-action@main + + - name: Debug Input from Prepare + run: | + echo "Raw matrix_config output:" + echo "${{ needs.prepare.outputs.matrix_config }}" + - name: Get Versions from Matrix Config + id: get_versions + run: | + nix run nixpkgs#nushell -- -c ' + # Parse the matrix configuration directly + let matrix_config = (${{ toJson(needs.prepare.outputs.matrix_config) }} | from json) + + # Get versions directly from include array + let versions = ($matrix_config.include | get version) + + echo "Versions: $versions" + + # Convert the versions to a comma-separated string + let versions_str = ($versions | str join ",") + $"versions=$versions_str" | save --append $env.GITHUB_ENV + ' + - name: Download Results Artifacts + uses: actions/download-artifact@v4 + with: + pattern: merge_results-* + - name: Combine Results + id: combine + run: | + nix run nixpkgs#nushell -- -c ' + # Get all results files and process them in one go + let files = (ls **/results.txt | get name) + echo $"Found files: ($files)" + + let matrix = { + include: ( + $files + | each { |file| open $file } # Open each file + | each { |content| $content | lines } # Split into lines + | flatten # Flatten the nested lists + | where { |line| $line != "" } # Filter empty lines + | each { |line| + # Extract just the version part after the last colon + let version = ($line | parse "supabase/postgres:{version}" | get version.0) + {version: $version} + } + ) + } + + let json_output = ($matrix | to json -r) # -r for raw output + echo $"Debug output: ($json_output)" + + $"matrix=($json_output)" | save --append $env.GITHUB_OUTPUT + ' + - name: Debug Combined Results + run: | + echo "Combined Results: '${{ steps.combine.outputs.matrix }}'" + outputs: + matrix: ${{ steps.combine.outputs.matrix }} + publish: + needs: combine_results + permissions: + contents: read + packages: write + id-token: write + strategy: + matrix: ${{ fromJson(needs.combine_results.outputs.matrix) }} + uses: ./.github/workflows/mirror.yml + with: + version: ${{ matrix.version }} + secrets: inherit diff --git a/.github/workflows/dockerhub-release.yml b/.github/workflows/dockerhub-release.yml deleted file mode 100644 index 6af84ec55..000000000 --- a/.github/workflows/dockerhub-release.yml +++ /dev/null @@ -1,101 +0,0 @@ -name: Release on Dockerhub - -on: - push: - branches: - - develop - paths: - - ".github/workflows/dockerhub-release.yml" - - "common.vars*" - -jobs: - settings: - runs-on: ubuntu-latest - outputs: - docker_version: ${{ steps.settings.outputs.postgres-version }} - image_tag: supabase/postgres:${{ steps.settings.outputs.postgres-version }} - build_args: ${{ steps.args.outputs.result }} - steps: - - uses: actions/checkout@v3 - - id: settings - # Remove spaces and quotes to get the raw version string - run: sed -r 's/(\s|\")+//g' common.vars.pkr.hcl >> $GITHUB_OUTPUT - - id: args - uses: mikefarah/yq@master - with: - cmd: yq 'to_entries | map(select(.value|type == "!!str")) | map(.key + "=" + .value) | join("\n")' 'ansible/vars.yml' - - build_image: - needs: settings - strategy: - matrix: - include: - - runner: [self-hosted, X64] - arch: amd64 - - runner: arm-runner - arch: arm64 - runs-on: ${{ matrix.runner }} - timeout-minutes: 180 - outputs: - image_digest: ${{ steps.build.outputs.digest }} - steps: - - run: docker context create builders - - uses: docker/setup-buildx-action@v3 - with: - endpoint: builders - - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - id: build - uses: docker/build-push-action@v5 - with: - push: true - build-args: | - ${{ needs.settings.outputs.build_args }} - target: production - tags: ${{ needs.settings.outputs.image_tag }}_${{ matrix.arch }} - platforms: linux/${{ matrix.arch }} - cache-from: type=gha,scope=${{ github.ref_name }}-latest-${{ matrix.arch }} - cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-latest-${{ matrix.arch }} - - name: Slack Notification - if: ${{ failure() }} - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }} - SLACK_USERNAME: "gha-failures-notifier" - SLACK_COLOR: "danger" - SLACK_MESSAGE: "Building Postgres ${{ matrix.arch }} image failed" - SLACK_FOOTER: "" - - merge_manifest: - needs: [settings, build_image] - runs-on: ubuntu-latest - steps: - - uses: docker/setup-buildx-action@v3 - - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Merge multi-arch manifests - run: | - docker buildx imagetools create -t ${{ needs.settings.outputs.image_tag }} \ - ${{ needs.settings.outputs.image_tag }}_amd64 \ - ${{ needs.settings.outputs.image_tag }}_arm64 - - name: Slack Notification - if: ${{ failure() }} - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }} - SLACK_USERNAME: "gha-failures-notifier" - SLACK_COLOR: "danger" - SLACK_MESSAGE: "Building Postgres image failed" - SLACK_FOOTER: "" - - publish: - needs: [settings, merge_manifest] - # Call workflow explicitly because events from actions cannot trigger more actions - uses: ./.github/workflows/mirror.yml - with: - version: ${{ needs.settings.outputs.docker_version }} - secrets: inherit diff --git a/.github/workflows/manual-docker-release.yml b/.github/workflows/manual-docker-release.yml new file mode 100644 index 000000000..8948324db --- /dev/null +++ b/.github/workflows/manual-docker-release.yml @@ -0,0 +1,258 @@ +name: Manual Docker Artifacts Release + +on: + workflow_dispatch: + inputs: + postgresVersion: + description: 'Optional. Postgres version to publish against, i.e. 15.1.1.78' + required: false + +permissions: + id-token: write + contents: read + +jobs: + prepare: + runs-on: ubuntu-latest + outputs: + matrix_config: ${{ steps.set-matrix.outputs.matrix_config }} + steps: + - uses: DeterminateSystems/nix-installer-action@main + - name: Checkout Repo + uses: actions/checkout@v3 + - name: Generate build matrix + id: set-matrix + run: | + nix run nixpkgs#nushell -- -c 'let versions = (open ansible/vars.yml | get postgres_major) + let matrix = ($versions | each { |ver| + let version = ($ver | str trim) + let dockerfile = $"Dockerfile-($version)" + if ($dockerfile | path exists) { + { + version: $version, + dockerfile: $dockerfile + } + } else { + null + } + } | compact) + + let matrix_config = { + include: $matrix + } + + $"matrix_config=($matrix_config | to json -r)" | save --append $env.GITHUB_OUTPUT' + build: + needs: prepare + strategy: + matrix: ${{ fromJson(needs.prepare.outputs.matrix_config) }} + runs-on: ubuntu-latest + outputs: + build_args: ${{ steps.args.outputs.result }} + steps: + - uses: actions/checkout@v3 + - uses: DeterminateSystems/nix-installer-action@main + - name: Set PostgreSQL version environment variable + run: echo "POSTGRES_MAJOR_VERSION=${{ matrix.version }}" >> $GITHUB_ENV + + - id: args + run: | + nix run nixpkgs#nushell -- -c ' + open ansible/vars.yml + | items { |key value| {name: $key, item: $value} } + | where { |it| ($it.item | describe) == "string" } + | each { |it| $"($it.name)=($it.item)" } + | str join "\n" + | save --append $env.GITHUB_OUTPUT + ' + build_release_image: + needs: [prepare, build] + strategy: + matrix: + postgres: ${{ fromJson(needs.prepare.outputs.matrix_config).include }} + arch: [amd64, arm64] + runs-on: ${{ matrix.arch == 'amd64' && 'ubuntu-latest' || 'arm-runner' }} + timeout-minutes: 180 + steps: + - uses: actions/checkout@v3 + - uses: DeterminateSystems/nix-installer-action@main + - run: docker context create builders + - uses: docker/setup-buildx-action@v3 + with: + endpoint: builders + - uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Get image tag + id: image + run: | + if [[ "${{ matrix.arch }}" == "arm64" ]]; then + pg_version=$(sudo nix run nixpkgs#nushell -- -c ' + let version = "${{ matrix.postgres.version }}" + let release_key = if ($version | str contains "orioledb") { + $"postgresorioledb-17" + } else { + $"postgres($version)" + } + let base_version = (open ansible/vars.yml | get postgres_release | get $release_key | str trim) + let final_version = if "${{ inputs.postgresVersion }}" != "" { + "${{ inputs.postgresVersion }}" + } else { + $base_version + } + $final_version | str trim + ') + echo "pg_version=supabase/postgres:$pg_version" >> $GITHUB_OUTPUT + else + pg_version=$(nix run nixpkgs#nushell -- -c ' + let version = "${{ matrix.postgres.version }}" + let release_key = if ($version | str contains "orioledb") { + $"postgresorioledb-17" + } else { + $"postgres($version)" + } + let base_version = (open ansible/vars.yml | get postgres_release | get $release_key | str trim) + let final_version = if "${{ inputs.postgresVersion }}" != "" { + "${{ inputs.postgresVersion }}" + } else { + $base_version + } + $final_version | str trim + ') + echo "pg_version=supabase/postgres:$pg_version" >> $GITHUB_OUTPUT + fi + - id: build + uses: docker/build-push-action@v5 + with: + push: true + build-args: | + ${{ needs.build.outputs.build_args }} + target: production + tags: ${{ steps.image.outputs.pg_version }}_${{ matrix.arch }} + platforms: linux/${{ matrix.arch }} + cache-from: type=gha,scope=${{ github.ref_name }}-latest-${{ matrix.arch }} + cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-latest-${{ matrix.arch }} + file: ${{ matrix.postgres.dockerfile }} + merge_manifest: + needs: [prepare, build, build_release_image] + strategy: + matrix: + include: ${{ fromJson(needs.prepare.outputs.matrix_config).include }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: DeterminateSystems/nix-installer-action@main + - uses: docker/setup-buildx-action@v3 + - uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Get image tag + id: get_version + run: | + nix run nixpkgs#nushell -- -c ' + let version = "${{ matrix.version }}" + let release_key = if ($version | str contains "orioledb") { + $"postgresorioledb-17" + } else { + $"postgres($version)" + } + let pg_version = (open ansible/vars.yml | get postgres_release | get $release_key | str trim) + $"pg_version=supabase/postgres:($pg_version)" | save --append $env.GITHUB_OUTPUT + ' + - name: Output version + id: output_version + run: | + echo "result=${{ steps.get_version.outputs.pg_version }}" >> $GITHUB_OUTPUT + - name: Collect versions + id: collect_versions + run: | + echo "${{ steps.output_version.outputs.result }}" >> results.txt # Append results + - name: Upload Results Artifact + uses: actions/upload-artifact@v4 + with: + name: merge_results-${{ matrix.version }} + path: results.txt + if-no-files-found: warn + - name: Merge multi-arch manifests + run: | + docker buildx imagetools create -t ${{ steps.get_version.outputs.pg_version }} \ + ${{ steps.get_version.outputs.pg_version }}_amd64 \ + ${{ steps.get_version.outputs.pg_version }}_arm64 + combine_results: + needs: [prepare, merge_manifest] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: DeterminateSystems/nix-installer-action@main + + - name: Debug Input from Prepare + run: | + echo "Raw matrix_config output:" + echo "${{ needs.prepare.outputs.matrix_config }}" + - name: Get Versions from Matrix Config + id: get_versions + run: | + nix run nixpkgs#nushell -- -c ' + # Parse the matrix configuration directly + let matrix_config = (${{ toJson(needs.prepare.outputs.matrix_config) }} | from json) + + # Get versions directly from include array + let versions = ($matrix_config.include | get version) + + echo "Versions: $versions" + + # Convert the versions to a comma-separated string + let versions_str = ($versions | str join ",") + $"versions=$versions_str" | save --append $env.GITHUB_ENV + ' + - name: Download Results Artifacts + uses: actions/download-artifact@v4 + with: + pattern: merge_results-* + - name: Combine Results + id: combine + run: | + nix run nixpkgs#nushell -- -c ' + # Get all results files and process them in one go + let files = (ls **/results.txt | get name) + echo $"Found files: ($files)" + + let matrix = { + include: ( + $files + | each { |file| open $file } # Open each file + | each { |content| $content | lines } # Split into lines + | flatten # Flatten the nested lists + | where { |line| $line != "" } # Filter empty lines + | each { |line| + # Extract just the version part after the last colon + let version = ($line | parse "supabase/postgres:{version}" | get version.0) + {version: $version} + } + ) + } + + let json_output = ($matrix | to json -r) # -r for raw output + echo $"Debug output: ($json_output)" + + $"matrix=($json_output)" | save --append $env.GITHUB_OUTPUT + ' + - name: Debug Combined Results + run: | + echo "Combined Results: '${{ steps.combine.outputs.matrix }}'" + outputs: + matrix: ${{ steps.combine.outputs.matrix }} + publish: + permissions: + contents: read + packages: write + id-token: write + needs: combine_results + strategy: + matrix: ${{ fromJson(needs.combine_results.outputs.matrix) }} + uses: ./.github/workflows/mirror.yml + with: + version: ${{ inputs.postgresVersion != '' && inputs.postgresVersion || matrix.version }} + secrets: inherit diff --git a/.github/workflows/mirror-postgrest.yml b/.github/workflows/mirror-postgrest.yml new file mode 100644 index 000000000..1658730f7 --- /dev/null +++ b/.github/workflows/mirror-postgrest.yml @@ -0,0 +1,36 @@ +name: Mirror PostgREST + +on: + push: + branches: + - develop + paths: + - ".github/workflows/mirror-postgrest.yml" + - "common.vars*" + +permissions: + contents: read + +jobs: + version: + runs-on: ubuntu-latest + outputs: + postgrest_release: ${{ steps.args.outputs.result }} + steps: + - uses: actions/checkout@v4 + - id: args + uses: mikefarah/yq@master + with: + cmd: yq '.postgrest_release' 'ansible/vars.yml' + + mirror: + needs: + - version + permissions: + contents: read + packages: write + id-token: write + uses: supabase/cli/.github/workflows/mirror-image.yml@main + with: + image: postgrest/postgrest:v${{ needs.version.outputs.postgrest_release }} + secrets: inherit diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 9f53e7fd7..28a068277 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -13,6 +13,9 @@ on: required: true type: string +permissions: + contents: read + jobs: mirror: runs-on: ubuntu-latest diff --git a/.github/workflows/nix-build.yml b/.github/workflows/nix-build.yml new file mode 100644 index 000000000..c1811fd00 --- /dev/null +++ b/.github/workflows/nix-build.yml @@ -0,0 +1,83 @@ +name: Nix CI + +on: + push: + branches: + - develop + - release/* + pull_request: + workflow_dispatch: + +permissions: + contents: read + id-token: write + +jobs: + build-run-image: + strategy: + fail-fast: false + matrix: + include: + - runner: larger-runner-4cpu + arch: amd64 + - runner: arm-runner + arch: arm64 + - runner: macos-latest + arch: arm64 + runs-on: ${{ matrix.runner }} + timeout-minutes: 180 + steps: + + - name: Check out code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref || github.ref }} + fetch-depth: 0 + fetch-tags: true + - name: aws-creds + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.DEV_AWS_ROLE }} + aws-region: "us-east-1" + output-credentials: true + role-duration-seconds: 7200 + - name: write secret key + # use python so we don't interpolate the secret into the workflow logs, in case of bugs + run: | + python -c "import os; file = open('nix-secret-key', 'w'); file.write(os.environ['NIX_SIGN_SECRET_KEY']); file.close()" + env: + NIX_SIGN_SECRET_KEY: ${{ secrets.NIX_SIGN_SECRET_KEY }} + - name: Log in to Docker Hub + if: matrix.runner != 'macos-latest' && matrix.runner != 'macos-13' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build psql bundle with nix + if: matrix.runner != 'macos-latest' && matrix.runner != 'macos-13' + run: docker build -t base_nix -f docker/nix/Dockerfile . + - name: Run build psql bundle + if: matrix.runner != 'macos-latest' && matrix.runner != 'macos-13' + run: | + docker run -e AWS_ACCESS_KEY_ID=${{ env.AWS_ACCESS_KEY_ID }} \ + -e AWS_SECRET_ACCESS_KEY=${{ env.AWS_SECRET_ACCESS_KEY }} \ + -e AWS_SESSION_TOKEN=${{ env.AWS_SESSION_TOKEN }} \ + base_nix bash -c "./workspace/docker/nix/build_nix.sh" + - name: Build psql bundle on macos + if: matrix.runner == 'macos-latest' || matrix.runner == 'macos-13' + run: | + curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm \ + --extra-conf "substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com" \ + --extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh + cp ./docker/nix/build_nix.sh ./build_nix.sh + sed -i '' '1s|^#!/bin/env bash|#!/usr/bin/env bash|' ./build_nix.sh + chmod +x ./build_nix.sh + ./build_nix.sh + env: + AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} + AWS_SESSION_TOKEN: ${{ env.AWS_SESSION_TOKEN }} + + name: build psql bundle on ${{ matrix.arch }} + diff --git a/.github/workflows/package-plv8.yml b/.github/workflows/package-plv8.yml deleted file mode 100644 index 34822d7b6..000000000 --- a/.github/workflows/package-plv8.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: Package plv8 - -on: - push: - branches: - - develop - paths: - - ".github/workflows/package-plv8.yml" - - "Dockerfile" - -env: - image: ghcr.io/supabase/plv8 -permissions: - contents: read - packages: write - id-token: write - -jobs: - settings: - runs-on: ubuntu-latest - outputs: - image_tag: ${{ env.image }}:${{ steps.meta.outputs.image_tag }} - steps: - - uses: actions/checkout@v3 - - id: meta - run: | - plv8_release=$(grep -o 'plv8_release=.*' Dockerfile | head -1 | cut -d "=" -f 2) - postgresql_major=$(grep -o 'postgresql_major=.*' Dockerfile | head -1 | cut -d "=" -f 2) - echo "image_tag=${plv8_release}-pg${postgresql_major}" >> $GITHUB_OUTPUT - - build_image: - needs: settings - strategy: - matrix: - include: - - runner: [self-hosted, X64] - arch: amd64 - - runner: arm-runner - arch: arm64 - runs-on: ${{ matrix.runner }} - timeout-minutes: 180 - outputs: - image_digest: ${{ steps.build.outputs.digest }} - steps: - - run: docker context create builders - - uses: docker/setup-buildx-action@v3 - with: - endpoint: builders - - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - id: build - uses: docker/build-push-action@v5 - with: - push: true - target: plv8-deb - tags: ${{ needs.settings.outputs.image_tag }}_${{ matrix.arch }} - platforms: linux/${{ matrix.arch }} - no-cache: true - - merge_manifest: - needs: [settings, build_image] - runs-on: ubuntu-latest - steps: - - uses: docker/setup-buildx-action@v3 - - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Merge multi-arch manifests - run: | - docker buildx imagetools create -t ${{ needs.settings.outputs.image_tag }} \ - ${{ needs.settings.outputs.image_tag }}_amd64 \ - ${{ needs.settings.outputs.image_tag }}_arm64 diff --git a/.github/workflows/publish-migrations-prod.yml b/.github/workflows/publish-migrations-prod.yml new file mode 100644 index 000000000..d7e813667 --- /dev/null +++ b/.github/workflows/publish-migrations-prod.yml @@ -0,0 +1,41 @@ +name: Release Migrations - Prod + +on: + workflow_dispatch: + +jobs: + build: + runs-on: [self-hosted, linux] + timeout-minutes: 15 + permissions: + id-token: write + contents: read + + steps: + - name: Guard + run: | + if [ $GITHUB_REF != 'refs/heads/develop' ]; then + echo "This action can only be run on the develop branch" + exit 1 + fi + env: + GITHUB_REF: ${{ github.ref }} + + - name: Checkout Repo + uses: actions/checkout@v2 + + - name: Merging migration files + run: cat $(ls -1) > ../migration-output.sql + working-directory: ${{ github.workspace }}/migrations/db/migrations + + - name: configure aws credentials - prod + uses: aws-actions/configure-aws-credentials@v1 + with: + role-to-assume: ${{ secrets.PROD_AWS_ROLE }} + aws-region: "ap-southeast-1" + + - name: Deploy to S3 prod + shell: bash + run: aws s3 sync migrations/db s3://$AWS_S3_BUCKET/migrations/db --delete + env: + AWS_S3_BUCKET: ${{ secrets.PG_INIT_SCRIPT_S3_BUCKET_PROD }} diff --git a/.github/workflows/publish-migrations.yml b/.github/workflows/publish-migrations-staging.yml similarity index 65% rename from .github/workflows/publish-migrations.yml rename to .github/workflows/publish-migrations-staging.yml index 1abc9f2b6..72b28e927 100644 --- a/.github/workflows/publish-migrations.yml +++ b/.github/workflows/publish-migrations-staging.yml @@ -1,9 +1,10 @@ -name: Release Migrations +name: Release Migrations - Staging on: push: branches: - develop + workflow_dispatch: jobs: build: @@ -32,15 +33,3 @@ jobs: run: aws s3 sync migrations/db s3://$AWS_S3_BUCKET/migrations/db --delete env: AWS_S3_BUCKET: ${{ secrets.PG_INIT_SCRIPT_S3_BUCKET_STAGING }} - - - name: configure aws credentials - prod - uses: aws-actions/configure-aws-credentials@v1 - with: - role-to-assume: ${{ secrets.PROD_AWS_ROLE }} - aws-region: "ap-southeast-1" - - - name: Deploy to S3 prod - shell: bash - run: aws s3 sync migrations/db s3://$AWS_S3_BUCKET/migrations/db --delete - env: - AWS_S3_BUCKET: ${{ secrets.PG_INIT_SCRIPT_S3_BUCKET_PROD }} diff --git a/.github/workflows/publish-nix-pgupgrade-bin-flake-version.yml b/.github/workflows/publish-nix-pgupgrade-bin-flake-version.yml new file mode 100644 index 000000000..bec85166e --- /dev/null +++ b/.github/workflows/publish-nix-pgupgrade-bin-flake-version.yml @@ -0,0 +1,126 @@ +name: Publish nix pg_upgrade_bin flake version + +on: + workflow_dispatch: + inputs: + postgresVersion: + description: 'Optional. Postgres version to publish against, i.e. 15.1.1.78' + required: false + +permissions: + id-token: write + +jobs: + prepare: + runs-on: ubuntu-latest + outputs: + postgres_versions: ${{ steps.set-versions.outputs.postgres_versions }} + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - uses: DeterminateSystems/nix-installer-action@main + + - name: Set PostgreSQL versions + id: set-versions + run: | + VERSIONS=$(nix run nixpkgs#yq -- '.postgres_major[]' ansible/vars.yml | nix run nixpkgs#jq -- -R -s -c 'split("\n")[:-1]') + echo "postgres_versions=$VERSIONS" >> $GITHUB_OUTPUT + + publish-staging: + needs: prepare + runs-on: ubuntu-latest + strategy: + matrix: + postgres_version: ${{ fromJson(needs.prepare.outputs.postgres_versions) }} + + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - uses: DeterminateSystems/nix-installer-action@main + + - name: Grab release version + id: process_release_version + run: | + VERSION=$(nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml) + VERSION=$(echo "$VERSION" | tr -d '"') # Remove any surrounding quotes + if [[ "${{ inputs.postgresVersion }}" != "" ]]; then + VERSION="${{ inputs.postgresVersion }}" + fi + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + echo "major_version=$(echo $VERSION | cut -d'.' -f1)" >> "$GITHUB_OUTPUT" + + - name: Create a tarball containing the latest nix flake version + working-directory: /tmp/ + run: | + mkdir -p "${{ steps.process_release_version.outputs.major_version }}" + echo "$GITHUB_SHA" > "${{ steps.process_release_version.outputs.major_version }}/nix_flake_version" + tar -czvf pg_upgrade_bin.tar.gz "${{ steps.process_release_version.outputs.major_version }}" + + - name: configure aws credentials - staging + uses: aws-actions/configure-aws-credentials@v1 + with: + role-to-assume: ${{ secrets.DEV_AWS_ROLE }} + aws-region: "us-east-1" + + - name: Upload pg_upgrade scripts to s3 staging + run: | + aws s3 cp /tmp/pg_upgrade_bin.tar.gz "s3://${{ secrets.ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/20.04.tar.gz" + + - name: Slack Notification on Failure + if: ${{ failure() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }} + SLACK_USERNAME: 'gha-failures-notifier' + SLACK_COLOR: 'danger' + SLACK_MESSAGE: 'Publishing pg_upgrade binaries flake version failed' + SLACK_FOOTER: '' + + publish-prod: + runs-on: ubuntu-latest + if: github.ref_name == 'develop' || contains( github.ref, 'release' ) + needs: prepare + strategy: + matrix: + postgres_version: ${{ fromJson(needs.prepare.outputs.postgres_versions) }} + + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - name: Grab release version + id: process_release_version + run: | + VERSION=$(sudo nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml) + VERSION=$(echo $VERSION | tr -d '"') # Remove any surrounding quotes + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + echo "major_version=$(echo $VERSION | cut -d'.' -f1)" >> "$GITHUB_OUTPUT" + + - name: Create a tarball containing the latest nix flake version + working-directory: /tmp/ + run: | + mkdir -p "${{ steps.process_release_version.outputs.major_version }}" + echo "$GITHUB_SHA" > "${{ steps.process_release_version.outputs.major_version }}/nix_flake_version" + tar -czvf pg_upgrade_bin.tar.gz "${{ steps.process_release_version.outputs.major_version }}" + + - name: configure aws credentials - prod + uses: aws-actions/configure-aws-credentials@v1 + with: + role-to-assume: ${{ secrets.PROD_AWS_ROLE }} + aws-region: "us-east-1" + + - name: Upload pg_upgrade scripts to s3 prod + run: | + aws s3 cp /tmp/pg_upgrade_bin.tar.gz "s3://${{ secrets.PROD_ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/20.04.tar.gz" + + - name: Slack Notification on Failure + if: ${{ failure() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }} + SLACK_USERNAME: 'gha-failures-notifier' + SLACK_COLOR: 'danger' + SLACK_MESSAGE: 'Publishing pg_upgrade binaries flake version failed' + SLACK_FOOTER: '' diff --git a/.github/workflows/publish-nix-pgupgrade-scripts.yml b/.github/workflows/publish-nix-pgupgrade-scripts.yml new file mode 100644 index 000000000..ece3e5966 --- /dev/null +++ b/.github/workflows/publish-nix-pgupgrade-scripts.yml @@ -0,0 +1,135 @@ +name: Publish nix pg_upgrade_scripts + +on: + push: + branches: + - develop + - release/* + paths: + - '.github/workflows/publish-nix-pgupgrade-scripts.yml' + - 'ansible/vars.yml' + workflow_dispatch: + inputs: + postgresVersion: + description: 'Optional. Postgres version to publish against, i.e. 15.1.1.78' + required: false + +permissions: + id-token: write + +jobs: + prepare: + runs-on: ubuntu-latest + outputs: + postgres_versions: ${{ steps.set-versions.outputs.postgres_versions }} + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - uses: DeterminateSystems/nix-installer-action@main + + - name: Set PostgreSQL versions + id: set-versions + run: | + VERSIONS=$(nix run nixpkgs#yq -- '.postgres_major[]' ansible/vars.yml | nix run nixpkgs#jq -- -R -s -c 'split("\n")[:-1]') + echo "postgres_versions=$VERSIONS" >> $GITHUB_OUTPUT + + publish-staging: + needs: prepare + runs-on: ubuntu-latest + strategy: + matrix: + postgres_version: ${{ fromJson(needs.prepare.outputs.postgres_versions) }} + + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - uses: DeterminateSystems/nix-installer-action@main + + - name: Grab release version + id: process_release_version + run: | + VERSION=$(nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml) + VERSION=$(echo "$VERSION" | tr -d '"') # Remove any surrounding quotes + if [[ "${{ inputs.postgresVersion }}" != "" ]]; then + VERSION="${{ inputs.postgresVersion }}" + fi + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + + - name: Create a tarball containing pg_upgrade scripts + run: | + mkdir -p /tmp/pg_upgrade_scripts + cp -r ansible/files/admin_api_scripts/pg_upgrade_scripts/* /tmp/pg_upgrade_scripts + tar -czvf /tmp/pg_upgrade_scripts.tar.gz -C /tmp/ pg_upgrade_scripts + + - name: configure aws credentials - staging + uses: aws-actions/configure-aws-credentials@v1 + with: + role-to-assume: ${{ secrets.DEV_AWS_ROLE }} + aws-region: "us-east-1" + + - name: Upload pg_upgrade scripts to s3 staging + run: | + aws s3 cp /tmp/pg_upgrade_scripts.tar.gz "s3://${{ secrets.ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/pg_upgrade_scripts.tar.gz" + + - name: Slack Notification on Failure + if: ${{ failure() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }} + SLACK_USERNAME: 'gha-failures-notifier' + SLACK_COLOR: 'danger' + SLACK_MESSAGE: 'Publishing pg_upgrade scripts failed' + SLACK_FOOTER: '' + publish-prod: + needs: prepare + runs-on: ubuntu-latest + if: github.ref_name == 'develop' || contains( github.ref, 'release' ) + + strategy: + matrix: + postgres_version: ${{ fromJson(needs.prepare.outputs.postgres_versions) }} + + + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - uses: DeterminateSystems/nix-installer-action@main + + - name: Grab release version + id: process_release_version + run: | + VERSION=$(nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml) + VERSION=$(echo "$VERSION" | tr -d '"') # Remove any surrounding quotes + if [[ "${{ inputs.postgresVersion }}" != "" ]]; then + VERSION="${{ inputs.postgresVersion }}" + fi + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + + - name: Create a tarball containing pg_upgrade scripts + run: | + mkdir -p /tmp/pg_upgrade_scripts + cp -r ansible/files/admin_api_scripts/pg_upgrade_scripts/* /tmp/pg_upgrade_scripts + tar -czvf /tmp/pg_upgrade_scripts.tar.gz -C /tmp/ pg_upgrade_scripts + + - name: configure aws credentials - prod + uses: aws-actions/configure-aws-credentials@v1 + with: + role-to-assume: ${{ secrets.PROD_AWS_ROLE }} + aws-region: "us-east-1" + + - name: Upload pg_upgrade scripts to s3 prod + run: | + aws s3 cp /tmp/pg_upgrade_scripts.tar.gz "s3://${{ secrets.PROD_ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/pg_upgrade_scripts.tar.gz" + + - name: Slack Notification on Failure + if: ${{ failure() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }} + SLACK_USERNAME: 'gha-failures-notifier' + SLACK_COLOR: 'danger' + SLACK_MESSAGE: 'Publishing pg_upgrade scripts failed' + SLACK_FOOTER: '' diff --git a/.github/workflows/publish-pgupgrade-scripts.yml b/.github/workflows/publish-pgupgrade-scripts.yml deleted file mode 100644 index 49a74f447..000000000 --- a/.github/workflows/publish-pgupgrade-scripts.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Publish pg_upgrade_scripts - -on: - push: - branches: - - develop - paths: - - '.github/workflows/publish-pgupgrade-scripts.yml' - - 'common.vars.pkr.hcl' - workflow_dispatch: - -permissions: - id-token: write - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - - name: Grab release version - id: process_release_version - run: | - VERSION=$(sed -e 's/postgres-version = "\(.*\)"/\1/g' common.vars.pkr.hcl) - echo "version=$VERSION" >> "$GITHUB_OUTPUT" - - - name: Create a tarball containing pg_upgrade scripts - run: | - mkdir -p /tmp/pg_upgrade_scripts - cp -r ansible/files/admin_api_scripts/pg_upgrade_scripts/* /tmp/pg_upgrade_scripts - tar -czvf /tmp/pg_upgrade_scripts.tar.gz -C /tmp/ pg_upgrade_scripts - - - name: configure aws credentials - staging - uses: aws-actions/configure-aws-credentials@v1 - with: - role-to-assume: ${{ secrets.DEV_AWS_ROLE }} - aws-region: "us-east-1" - - - name: Upload pg_upgrade scripts to s3 staging - run: | - aws s3 cp /tmp/pg_upgrade_scripts.tar.gz s3://${{ secrets.ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/pg_upgrade_scripts.tar.gz - - - name: configure aws credentials - prod - uses: aws-actions/configure-aws-credentials@v1 - with: - role-to-assume: ${{ secrets.PROD_AWS_ROLE }} - aws-region: "us-east-1" - - - name: Upload pg_upgrade scripts to s3 prod - run: | - aws s3 cp /tmp/pg_upgrade_scripts.tar.gz s3://${{ secrets.PROD_ARTIFACTS_BUCKET }}/upgrades/postgres/supabase-postgres-${{ steps.process_release_version.outputs.version }}/pg_upgrade_scripts.tar.gz - - - name: Slack Notification on Failure - if: ${{ failure() }} - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }} - SLACK_USERNAME: 'gha-failures-notifier' - SLACK_COLOR: 'danger' - SLACK_MESSAGE: 'Publishing pg_upgrade scripts failed' - SLACK_FOOTER: '' diff --git a/.github/workflows/qemu-image-build.yml b/.github/workflows/qemu-image-build.yml new file mode 100644 index 000000000..7253af151 --- /dev/null +++ b/.github/workflows/qemu-image-build.yml @@ -0,0 +1,154 @@ +name: Build QEMU image + +on: + push: + branches: + - develop + - release/* + paths: + - '.github/workflows/qemu-image-build.yml' + - 'qemu-arm64-nix.pkr.hcl' + - 'common-nix.vars.pkr.hcl' + - 'ansible/vars.yml' + workflow_dispatch: + +permissions: + contents: read + id-token: write + +jobs: + prepare: + runs-on: ubuntu-latest + outputs: + postgres_versions: ${{ steps.set-versions.outputs.postgres_versions }} + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - uses: DeterminateSystems/nix-installer-action@main + + - name: Set PostgreSQL versions - only builds pg17 atm + id: set-versions + run: | + VERSIONS=$(nix run nixpkgs#yq -- '.postgres_major[2]' ansible/vars.yml | nix run nixpkgs#jq -- -R -s -c 'split("\n")[:-1]') + echo "postgres_versions=$VERSIONS" >> $GITHUB_OUTPUT + + build: + needs: prepare + strategy: + matrix: + postgres_version: ${{ fromJson(needs.prepare.outputs.postgres_versions) }} + runs-on: arm-native-runner + timeout-minutes: 150 + permissions: + contents: write + packages: write + id-token: write + + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - uses: DeterminateSystems/nix-installer-action@main + + - name: Run checks if triggered manually + if: ${{ github.event_name == 'workflow_dispatch' }} + run: | + SUFFIX=$(sudo nix run nixpkgs#yq -- ".postgres_release[\"postgres${{ matrix.postgres_version }}\"]" ansible/vars.yml | sed -E 's/[0-9\.]+(.*)$/\1/') + if [[ -z $SUFFIX ]] ; then + echo "Version must include non-numeric characters if built manually." + exit 1 + fi + + - name: enable KVM support + run: | + sudo chown runner /dev/kvm + sudo chmod 666 /dev/kvm + + - name: Set PostgreSQL version environment variable + run: echo "POSTGRES_MAJOR_VERSION=${{ matrix.postgres_version }}" >> $GITHUB_ENV + + - name: Generate common-nix.vars.pkr.hcl + run: | + curl -L https://github.com/mikefarah/yq/releases/download/v4.45.1/yq_linux_arm64 -o yq && chmod +x yq + PG_VERSION=$(./yq '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml) + PG_VERSION=$(echo "$PG_VERSION" | tr -d '"') # Remove any surrounding quotes + echo 'postgres-version = "'$PG_VERSION'"' > common-nix.vars.pkr.hcl + echo 'postgres-major-version = "'$POSTGRES_MAJOR_VERSION'"' >> common-nix.vars.pkr.hcl + # Ensure there's a newline at the end of the file + echo "" >> common-nix.vars.pkr.hcl + + # TODO (darora): not quite sure why I'm having to uninstall and re-install these deps, but the build fails w/o this + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get remove -y qemu-efi-aarch64 cloud-image-utils qemu-system-arm qemu-utils + sudo apt-get install -y qemu-efi-aarch64 cloud-image-utils qemu-system-arm qemu-utils + + - name: Build QEMU artifact + run: | + make init + GIT_SHA=${{github.sha}} + export PACKER_LOG=1 + packer build -var "git_sha=${GIT_SHA}" -var-file="common-nix.vars.pkr.hcl" qemu-arm64-nix.pkr.hcl + + - name: Grab release version + id: process_release_version + run: | + VERSION=$(cat common-nix.vars.pkr.hcl | sed -e 's/postgres-version = "\(.*\)"/\1/g') + echo "version=$VERSION" >> $GITHUB_OUTPUT + + - name: configure aws credentials - staging + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.CONTROL_PLANE_DEV_ROLE }} + aws-region: "us-east-1" + + - name: Login to Amazon ECR + id: login-ecr-private-dev + uses: aws-actions/amazon-ecr-login@v2 + + - name: Build image + env: + IMAGE_TAG: ${{ steps.process_release_version.outputs.version }} + run: | + docker build -f Dockerfile-kubernetes -t "postgres:$IMAGE_TAG" . + + - name: Push docker image to Amazon ECR + env: + REGISTRY: 812073016711.dkr.ecr.us-east-1.amazonaws.com + REPOSITORY: postgres-vm-image + IMAGE_TAG: ${{ steps.process_release_version.outputs.version }} + run: | + docker tag "postgres:$IMAGE_TAG" "$REGISTRY/$REPOSITORY:$IMAGE_TAG" + docker push "$REGISTRY/$REPOSITORY:$IMAGE_TAG" + + # TODO (darora): temporarily also push to prod account from here - add a guard to only publish proper tagged releases to prod? + - name: configure aws credentials - prod + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.CONTROL_PLANE_PROD_ROLE }} + aws-region: "us-east-1" + + - name: Login to Amazon ECR + id: login-ecr-private-prod + uses: aws-actions/amazon-ecr-login@v2 + + - name: Push docker image to Amazon ECR + env: + REGISTRY: 156470330064.dkr.ecr.us-east-1.amazonaws.com + REPOSITORY: postgres-vm-image + IMAGE_TAG: ${{ steps.process_release_version.outputs.version }} + run: | + docker tag "postgres:$IMAGE_TAG" "$REGISTRY/$REPOSITORY:$IMAGE_TAG" + docker push "$REGISTRY/$REPOSITORY:$IMAGE_TAG" + + - name: Cleanup resources after build + if: ${{ always() }} + run: | + aws ec2 describe-instances --filters "Name=tag:packerExecutionId,Values=${GITHUB_RUN_ID}" --query "Reservations[].Instances[].InstanceId" --output text | xargs -r aws ec2 terminate-instances --instance-ids + + - name: Cleanup resources on build cancellation + if: ${{ cancelled() }} + run: | + aws ec2 describe-instances --filters "Name=tag:packerExecutionId,Values=${GITHUB_RUN_ID}" --query "Reservations[].Instances[].InstanceId" --output text | xargs -r aws ec2 terminate-instances --instance-ids diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f2de89a82..a218ef882 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,4 @@ name: Test Database - on: push: branches: @@ -7,14 +6,42 @@ on: pull_request: workflow_dispatch: +permissions: + contents: read + id-token: write + jobs: + prepare: + runs-on: ubuntu-latest + outputs: + postgres_versions: ${{ steps.set-versions.outputs.postgres_versions }} + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Clear Nix cache + run: | + sudo rm -rf /home/runner/.cache/nix + + - uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com + trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= + - name: Set PostgreSQL versions + id: set-versions + run: | + VERSIONS=$(nix run nixpkgs#yq -- '.postgres_major[]' ansible/vars.yml | nix run nixpkgs#jq -- -R -s -c "split(\"\n\")[:-1]") + echo "postgres_versions=$VERSIONS" >> $GITHUB_OUTPUT build: + needs: prepare strategy: matrix: + postgres_version: ${{ fromJson(needs.prepare.outputs.postgres_versions) }} include: - - runner: [self-hosted, X64] + - runner: ubuntu-22.04 arch: amd64 - - runner: arm-runner + - runner: ubuntu-22.04 arch: arm64 runs-on: ${{ matrix.runner }} timeout-minutes: 180 @@ -22,96 +49,41 @@ jobs: POSTGRES_PORT: 5478 POSTGRES_PASSWORD: password steps: - - uses: actions/checkout@v3 - - id: args - uses: mikefarah/yq@master - with: - cmd: yq 'to_entries | map(select(.value|type == "!!str")) | map(.key + "=" + .value) | join("\n")' 'ansible/vars.yml' - - - run: docker context create builders - - uses: docker/setup-buildx-action@v3 - with: - endpoint: builders - - uses: docker/build-push-action@v5 + - uses: actions/checkout@v4 + - name: Clear Nix cache + run: | + sudo rm -rf /home/runner/.cache/nix + - uses: DeterminateSystems/nix-installer-action@main with: - load: true - context: . - target: production - build-args: | - ${{ steps.args.outputs.result }} - tags: supabase/postgres:latest - cache-from: | - type=gha,scope=${{ github.ref_name }}-latest-${{ matrix.arch }} - type=gha,scope=${{ github.base_ref }}-latest-${{ matrix.arch }} - cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-latest-${{ matrix.arch }} - - - name: Start Postgres + extra-conf: | + substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com + trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= + - name: Set PostgreSQL version environment variable + run: echo "POSTGRES_MAJOR_VERSION=${{ matrix.postgres_version }}" >> $GITHUB_ENV + - name: Strip quotes from pg major and set env var run: | - docker run --rm --pull=never \ - -e POSTGRES_PASSWORD=${{ env.POSTGRES_PASSWORD }} \ - -p ${{ env.POSTGRES_PORT }}:5432 \ - --name supabase_postgres \ - -d supabase/postgres:latest - - - name: Install psql + stripped_version=$(echo "${{ matrix.postgres_version }}" | sed 's/^"\(.*\)"$/\1/') + echo "PGMAJOR=$stripped_version" >> $GITHUB_ENV + - name: Generate common-nix.vars.pkr.hcl run: | - sudo apt update - sudo apt install -y --no-install-recommends postgresql-client - - - name: Install pg_prove - run: sudo cpan -T TAP::Parser::SourceHandler::pgTAP - env: - SHELL: /bin/bash - - - name: Wait for healthy database + PG_VERSION=$(nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml) + PG_VERSION=$(echo $PG_VERSION | tr -d '"') # Remove any surrounding quotes + echo 'postgres-version = "'$PG_VERSION'"' > common-nix.vars.pkr.hcl + echo "" >> common-nix.vars.pkr.hcl + - id: settings + run: sed -r 's/(\s|\")+//g' common-nix.vars.pkr.hcl >> $GITHUB_OUTPUT + - name: Generate args + id: args run: | - count=0 - until [ "$(docker inspect -f '{{.State.Health.Status}}' "$container")" == "healthy" ]; do - exit=$? - count=$((count + 1)) - if [ $count -ge "$retries" ]; then - echo "Retry $count/$retries exited $exit, no more retries left." - docker stop -t 2 "$container" - return $exit - fi - sleep 1; - done; - echo "$container container is healthy" - env: - retries: 20 - container: supabase_postgres - - - name: Run tests - run: pg_prove migrations/tests/test.sql - env: - PGHOST: localhost - PGPORT: ${{ env.POSTGRES_PORT }} - PGDATABASE: postgres - PGUSER: supabase_admin - PGPASSWORD: ${{ env.POSTGRES_PASSWORD }} - - - name: Check migrations are idempotent - run: | - for sql in ./migrations/db/migrations/*.sql; do - echo "$0: running $sql" - psql -v ON_ERROR_STOP=1 --no-password --no-psqlrc -f "$sql" - done - env: - PGHOST: localhost - PGPORT: ${{ env.POSTGRES_PORT }} - PGDATABASE: postgres - PGUSER: supabase_admin - PGPASSWORD: ${{ env.POSTGRES_PASSWORD }} - - schema: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 + ARGS=$(nix run nixpkgs#yq -- 'to_entries | map(select(.value|type == "!!str")) | map(.key + "=" + .value) | join("\n")' ansible/vars.yml) + echo "result<> $GITHUB_OUTPUT + echo "$ARGS" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT - name: verify schema.sql is committed run: | - docker compose -f migrations/docker-compose.yaml up db dbmate --abort-on-container-exit - if ! git diff --ignore-space-at-eol --exit-code --quiet migrations/schema.sql; then - echo "Detected uncommitted changes after build. See status below:" - git diff + nix run github:supabase/postgres/${{ github.sha }}#dbmate-tool -- --version ${{ env.PGMAJOR }} --flake-url github:supabase/postgres/${{ github.sha }} + if ! git diff --exit-code --quiet migrations/schema-${{ env.PGMAJOR }}.sql; then + echo "Detected changes in schema.sql:" + git diff migrations/schema-${{ env.PGMAJOR }}.sql exit 1 - fi + fi \ No newline at end of file diff --git a/.github/workflows/testinfra-ami-build.yml b/.github/workflows/testinfra-ami-build.yml new file mode 100644 index 000000000..2b07e716f --- /dev/null +++ b/.github/workflows/testinfra-ami-build.yml @@ -0,0 +1,148 @@ +name: Testinfra Integration Tests Nix + +on: + pull_request: + workflow_dispatch: + +permissions: + contents: read + id-token: write + +jobs: + prepare: + runs-on: ubuntu-latest + outputs: + postgres_versions: ${{ steps.set-versions.outputs.postgres_versions }} + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - uses: DeterminateSystems/nix-installer-action@main + + - name: Clean Nix store before build + run: | + sudo nix-collect-garbage -d || true + sudo nix-store --optimize || true + df -h / # Display available space + + - name: Set PostgreSQL versions + id: set-versions + run: | + VERSIONS=$(nix run nixpkgs#yq -- '.postgres_major[]' ansible/vars.yml | nix run nixpkgs#jq -- -R -s -c 'split("\n")[:-1]') + echo "postgres_versions=$VERSIONS" >> $GITHUB_OUTPUT + + test-ami-nix: + needs: prepare + strategy: + fail-fast: false + matrix: + postgres_version: ${{ fromJson(needs.prepare.outputs.postgres_versions) }} + include: + - runner: arm-runner + arch: arm64 + ubuntu_release: focal + ubuntu_version: 20.04 + mcpu: neoverse-n1 + runs-on: ${{ matrix.runner }} + timeout-minutes: 150 + permissions: + contents: write + packages: write + id-token: write + + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - id: args + uses: mikefarah/yq@master + with: + cmd: yq 'to_entries | map(select(.value|type == "!!str")) | map(.key + "=" + .value) | join("\n")' 'ansible/vars.yml' + + - run: docker context create builders + + - uses: docker/setup-buildx-action@v3 + with: + endpoint: builders + + - name: Generate random string + id: random + run: echo "random_string=$(openssl rand -hex 8)" >> $GITHUB_OUTPUT + + - name: Set PostgreSQL version environment variable + run: echo "POSTGRES_MAJOR_VERSION=${{ matrix.postgres_version }}" >> $GITHUB_ENV + + + - name: Generate common-nix.vars.pkr.hcl + run: | + PG_VERSION=$(sudo nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml) + PG_VERSION=$(echo "$PG_VERSION" | tr -d '"') # Remove any surrounding quotes + echo 'postgres-version = "'$PG_VERSION'"' > common-nix.vars.pkr.hcl + # Ensure there's a newline at the end of the file + echo "" >> common-nix.vars.pkr.hcl + + - name: Build AMI stage 1 + run: | + packer init amazon-arm64-nix.pkr.hcl + GIT_SHA=${{github.sha}} + packer build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" -var "ansible_arguments=" -var "postgres-version=${{ steps.random.outputs.random_string }}" -var "region=ap-southeast-1" -var 'ami_regions=["ap-southeast-1"]' -var "force-deregister=true" -var "ansible_arguments=-e postgresql_major=${POSTGRES_MAJOR_VERSION}" amazon-arm64-nix.pkr.hcl + + - name: Clean up after AMI stage 1 + if: always() # Run even if previous steps fail + run: | + sudo nix-collect-garbage -d # Delete old generations of all profiles + sudo rm -rf /tmp/* # Clean temporary files + df -h / # Display available space + + - name: Build AMI stage 2 + run: | + packer init stage2-nix-psql.pkr.hcl + GIT_SHA=${{github.sha}} + packer build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var "postgres_major_version=${POSTGRES_MAJOR_VERSION}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" -var "postgres-version=${{ steps.random.outputs.random_string }}" -var "region=ap-southeast-1" -var 'ami_regions=["ap-southeast-1"]' -var "force-deregister=true" -var "git_sha=${GITHUB_SHA}" stage2-nix-psql.pkr.hcl + + - name: Clean up after AMI stage 2 + if: always() # Run even if previous steps fail + run: | + sudo nix-collect-garbage -d # Delete old generations of all profiles + sudo rm -rf /tmp/* # Clean temporary files + df -h / # Display available space + + - name: Run tests + timeout-minutes: 10 + env: + AMI_NAME: "supabase-postgres-${{ steps.random.outputs.random_string }}" + run: | + # TODO: use poetry for pkg mgmt + pip3 install boto3 boto3-stubs[essential] docker ec2instanceconnectcli pytest pytest-testinfra[paramiko,docker] requests + pytest -vv -s testinfra/test_ami_nix.py + + - name: Cleanup resources on build cancellation + if: ${{ cancelled() }} + run: | + aws ec2 --region ap-southeast-1 describe-instances --filters "Name=tag:packerExecutionId,Values=${GITHUB_RUN_ID}" --query "Reservations[].Instances[].InstanceId" --output text | xargs -r aws ec2 terminate-instances --region ap-southeast-1 --instance-ids + + - name: Cleanup resources after build + if: ${{ always() }} + run: | + aws ec2 --region ap-southeast-1 describe-instances --filters "Name=tag:testinfra-run-id,Values=${GITHUB_RUN_ID}" --query "Reservations[].Instances[].InstanceId" --output text | xargs -r aws ec2 terminate-instances --region ap-southeast-1 --instance-ids || true + + - name: Cleanup AMIs + if: always() + run: | + # Define AMI name patterns + STAGE1_AMI_NAME="supabase-postgres-ci-ami-test-stage-1" + STAGE2_AMI_NAME="${{ steps.random.outputs.random_string }}" + + # Function to deregister AMIs by name pattern + deregister_ami_by_name() { + local ami_name_pattern=$1 + local ami_ids=$(aws ec2 describe-images --region ap-southeast-1 --owners self --filters "Name=name,Values=${ami_name_pattern}" --query 'Images[*].ImageId' --output text) + for ami_id in $ami_ids; do + echo "Deregistering AMI: $ami_id" + aws ec2 deregister-image --region ap-southeast-1 --image-id $ami_id + done + } + + # Deregister AMIs + deregister_ami_by_name "$STAGE1_AMI_NAME" + deregister_ami_by_name "$STAGE2_AMI_NAME" diff --git a/.github/workflows/testinfra.yml b/.github/workflows/testinfra.yml deleted file mode 100644 index 41a564e84..000000000 --- a/.github/workflows/testinfra.yml +++ /dev/null @@ -1,135 +0,0 @@ -name: Testinfra Integration Tests - -on: - pull_request: - workflow_dispatch: - -jobs: - test-all-in-one: - strategy: - matrix: - include: - - runner: [self-hosted, X64] - arch: amd64 - - runner: arm-runner - arch: arm64 - runs-on: ${{ matrix.runner }} - timeout-minutes: 30 - steps: - - uses: actions/checkout@v3 - - - run: docker context create builders - - uses: docker/setup-buildx-action@v3 - with: - endpoint: builders - - - name: Run aio integration tests - run: | - # TODO: use poetry for pkg mgmt - pip3 install boto3 boto3-stubs[essential] docker ec2instanceconnectcli pytest pytest-testinfra[paramiko,docker] requests - pytest -vv testinfra/test_all_in_one.py - - test-ami: - if: false - strategy: - matrix: - include: - - runner: arm-runner - arch: arm64 - ubuntu_release: focal - ubuntu_version: 20.04 - mcpu: neoverse-n1 - runs-on: ${{ matrix.runner }} - timeout-minutes: 150 - permissions: - contents: write - packages: write - id-token: write - - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - - - id: args - uses: mikefarah/yq@master - with: - cmd: yq 'to_entries | map(select(.value|type == "!!str")) | map(.key + "=" + .value) | join("\n")' 'ansible/vars.yml' - - - run: docker context create builders - - - uses: docker/setup-buildx-action@v3 - with: - endpoint: builders - - - uses: docker/build-push-action@v5 - with: - load: true - build-args: | - ${{ steps.args.outputs.result }} - target: extensions - tags: supabase/postgres:extensions - platforms: linux/${{ matrix.arch }} - cache-from: | - type=gha,scope=${{ github.ref_name }}-extensions - type=gha,scope=${{ github.base_ref }}-extensions - type=gha,scope=develop-extensions - cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-extensions - - - name: Extract built packages - run: | - mkdir -p /tmp/extensions ansible/files/extensions - docker save supabase/postgres:extensions | tar xv -C /tmp/extensions - for layer in /tmp/extensions/*/layer.tar; do - tar xvf "$layer" -C ansible/files/extensions --strip-components 1 - done - - - id: version - run: echo "${{ steps.args.outputs.result }}" | grep "postgresql" >> "$GITHUB_OUTPUT" - - - name: Build Postgres deb - uses: docker/build-push-action@v5 - with: - load: true - file: docker/Dockerfile - target: pg-deb - build-args: | - ubuntu_release=${{ matrix.ubuntu_release }} - ubuntu_release_no=${{ matrix.ubuntu_version }} - postgresql_major=${{ steps.version.outputs.postgresql_major }} - postgresql_release=${{ steps.version.outputs.postgresql_release }} - CPPFLAGS=-mcpu=${{ matrix.mcpu }} - tags: supabase/postgres:deb - platforms: linux/${{ matrix.arch }} - cache-from: | - type=gha,scope=${{ github.ref_name }}-deb - type=gha,scope=${{ github.base_ref }}-deb - type=gha,scope=develop-deb - cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-deb - - - name: Extract Postgres deb - run: | - mkdir -p /tmp/build ansible/files/postgres - docker save supabase/postgres:deb | tar xv -C /tmp/build - for layer in /tmp/build/*/layer.tar; do - tar xvf "$layer" -C ansible/files/postgres --strip-components 1 - done - - # Packer doesn't support skipping registering the AMI for the ebssurrogate - # builder, so we register an AMI with a fixed name and run tests on an - # instance launched from that - # https://github.com/hashicorp/packer/issues/4899 - - name: Build AMI - run: | - GIT_SHA=${{github.sha}} - packer build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${GITHUB_RUN_ID}" -var-file="development-arm.vars.pkr.hcl" -var-file="common.vars.pkr.hcl" -var "ansible_arguments=" -var "postgres-version=ci-ami-test" -var "region=ap-southeast-1" -var 'ami_regions=["ap-southeast-1"]' -var "force-deregister=true" amazon-arm64.pkr.hcl - - - name: Run tests - run: | - # TODO: use poetry for pkg mgmt - pip3 install boto3 boto3-stubs[essential] docker ec2instanceconnectcli pytest pytest-testinfra[paramiko,docker] requests - pytest -vv testinfra/test_ami.py - - - name: Cleanup resources on build cancellation - if: ${{ cancelled() }} - run: | - aws ec2 --region ap-southeast-1 describe-instances --filters "Name=tag:packerExecutionId,Values=${GITHUB_RUN_ID}" --query "Reservations[].Instances[].InstanceId" --output text | xargs -I {} aws ec2 terminate-instances --instance-ids {} diff --git a/.gitignore b/.gitignore index 1b2009550..d32cc8f60 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,27 @@ .DS_Store .python-version +.mise.toml venv/ *.swp docker/cache/ ansible/image-manifest*.json +testinfra-aio-container-logs.log # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class + +#nix related +result* +.env-local +.history + + +#IDE +.idea/ +.vscode/ + +db/schema.sql +common-nix.vars.pkr.hcl diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index c4b78f567..000000000 --- a/Dockerfile +++ /dev/null @@ -1,954 +0,0 @@ -# syntax=docker/dockerfile:1.6 -ARG postgresql_major=15 -ARG postgresql_release=${postgresql_major}.1 - -# Bump default build arg to build a package from source -# Bump vars.yml to specify runtime package version -ARG sfcgal_release=1.3.10 -ARG postgis_release=3.3.2 -ARG pgrouting_release=3.4.1 -ARG pgtap_release=1.2.0 -ARG pg_cron_release=1.4.2 -ARG pgaudit_release=1.7.0 -ARG pgjwt_release=9742dab1b2f297ad3811120db7b21451bca2d3c9 -ARG pgsql_http_release=1.5.0 -ARG plpgsql_check_release=2.2.5 -ARG pg_safeupdate_release=1.4 -ARG timescaledb_release=2.9.1 -ARG wal2json_release=2_5 -ARG pljava_release=1.6.4 -ARG plv8_release=3.1.5 -ARG pg_plan_filter_release=5081a7b5cb890876e67d8e7486b6a64c38c9a492 -ARG pg_net_release=0.7.1 -ARG rum_release=1.3.13 -ARG pg_hashids_release=cd0e1b31d52b394a0df64079406a14a4f7387cd6 -ARG libsodium_release=1.0.18 -ARG pgsodium_release=3.1.6 -ARG pg_graphql_release=1.2.2 -ARG pg_stat_monitor_release=1.1.1 -ARG pg_jsonschema_release=0.1.4 -ARG vault_release=0.2.8 -ARG groonga_release=12.0.8 -ARG pgroonga_release=2.4.0 -ARG wrappers_release=0.1.18 -ARG hypopg_release=1.3.1 -ARG pg_repack_release=1.4.8 -ARG pgvector_release=0.4.0 -ARG pg_tle_release=1.0.3 -ARG supautils_release=1.9.0 -ARG wal_g_release=2.0.1 - -#################### -# Setup Postgres PPA -#################### -FROM ubuntu:focal as ppa -# Redeclare args for use in subsequent stages -ARG postgresql_major -RUN apt-get update && apt-get install -y --no-install-recommends \ - gnupg \ - ca-certificates \ - && rm -rf /var/lib/apt/lists/* -# Add Postgres PPA -# In the off-chance that the key in the repository expires, it can be replaced by running the following in the repository's root: -# gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys $NEW_POSTGRESQL_GPG_KEY -# gpg --export --armor $NEW_POSTGRESQL_GPG_KEY > postgresql.gpg.key -COPY postgresql.gpg.key /tmp/postgresql.gpg.key -RUN apt-key add /tmp/postgresql.gpg.key && \ - echo "deb https://apt-archive.postgresql.org/pub/repos/apt focal-pgdg-archive main" > /etc/apt/sources.list.d/pgdg.list - -#################### -# Download pre-built postgres -#################### -FROM ppa as pg -ARG postgresql_release -# Download .deb packages -RUN apt-get update && apt-get install -y --no-install-recommends --download-only \ - postgresql-${postgresql_major}=${postgresql_release}-1.pgdg20.04+1 \ - && rm -rf /var/lib/apt/lists/* -RUN mv /var/cache/apt/archives/*.deb /tmp/ - -FROM ppa as pg-dev -ARG postgresql_release -# Download .deb packages -RUN apt-get update && apt-get install -y --no-install-recommends --download-only \ - postgresql-server-dev-${postgresql_major}=${postgresql_release}-1.pgdg20.04+1 \ - && rm -rf /var/lib/apt/lists/* -RUN mv /var/cache/apt/archives/*.deb /tmp/ - -#################### -# Install postgres -#################### -FROM ubuntu:focal as base -# Redeclare args for use in subsequent stages -ARG TARGETARCH -ARG postgresql_major - -# Install postgres -COPY --from=pg /tmp /tmp -# Ref: https://github.com/docker-library/postgres/blob/master/15/bullseye/Dockerfile#L91 -ENV DEBIAN_FRONTEND=noninteractive -RUN set -ex; \ - export PYTHONDONTWRITEBYTECODE=1; \ - apt-get update; \ - apt-get install -y --no-install-recommends /tmp/postgresql-common_*.deb /tmp/postgresql-client-common_*.deb; \ - sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf; \ - apt-get install -y --no-install-recommends /tmp/*.deb; \ - rm -rf /var/lib/apt/lists/* /tmp/*; \ - find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' + - -ENV PATH=$PATH:/usr/lib/postgresql/${postgresql_major}/bin -ENV PGDATA=/var/lib/postgresql/data - -# Make the "en_US.UTF-8" locale so postgres will be utf-8 enabled by default -RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 -ENV LANG=en_US.UTF-8 -ENV LC_CTYPE=C.UTF-8 -ENV LC_COLLATE=C.UTF-8 - -FROM base as builder -# Install build dependencies -COPY --from=pg-dev /tmp /tmp -RUN apt-get update && apt-get install -y --no-install-recommends \ - /tmp/*.deb \ - build-essential \ - checkinstall \ - cmake \ - && rm -rf /var/lib/apt/lists/* /tmp/* - -FROM builder as ccache -# Cache large build artifacts -RUN apt-get update && apt-get install -y --no-install-recommends \ - clang \ - ccache \ - && rm -rf /var/lib/apt/lists/* -ENV CCACHE_DIR=/ccache -ENV PATH=/usr/lib/ccache:$PATH -# Used to update ccache -ARG CACHE_EPOCH - -#################### -# 01-postgis.yml -#################### -FROM ccache as sfcgal -# Download and extract -ARG sfcgal_release -ARG sfcgal_release_checksum -ADD --checksum=${sfcgal_release_checksum} \ - "https://supabase-public-artifacts-bucket.s3.amazonaws.com/sfcgal/SFCGAL-v$%7Bsfcgal_release%7D.tar.gz" \ - /tmp/sfcgal.tar.gz -RUN tar -xvf /tmp/sfcgal.tar.gz -C /tmp --one-top-level --strip-components 1 && \ - rm -rf /tmp/sfcgal.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - libcgal-dev \ - libboost-serialization1.71-dev \ - libmpfr-dev \ - libgmp-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/sfcgal/build -RUN cmake .. -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=yes --fstrans=no --backup=no --pakdir=/tmp --pkgname=sfcgal --pkgversion=${sfcgal_release} --requires=libgmpxx4ldbl,libboost-serialization1.71.0,libmpfr6 --nodoc - -FROM sfcgal as postgis-source -# Download and extract -ARG postgis_release -ARG postgis_release_checksum -ADD --checksum=${postgis_release_checksum} \ - "https://supabase-public-artifacts-bucket.s3.amazonaws.com/postgis-$%7Bpostgis_release%7D.tar.gz" \ - /tmp/postgis.tar.gz -RUN tar -xvf /tmp/postgis.tar.gz -C /tmp && \ - rm -rf /tmp/postgis.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - protobuf-c-compiler \ - libgeos-dev \ - libproj-dev \ - libgdal-dev \ - libjson-c-dev \ - libxml2-dev \ - libprotobuf-c-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/postgis-${postgis_release} -RUN ./configure --with-sfcgal -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --requires=libgeos-c1v5,libproj15,libjson-c4,libprotobuf-c1,libgdal26 --nodoc - -FROM ppa as postgis -# Latest available is 3.3.2 -ARG postgis_release -# Download pre-built packages -RUN apt-get update && apt-get install -y --no-install-recommends --download-only \ - postgresql-${postgresql_major}-postgis-3=${postgis_release}+dfsg-1.pgdg20.04+1 \ - && rm -rf /var/lib/apt/lists/* -RUN mv /var/cache/apt/archives/*.deb /tmp/ - -#################### -# 02-pgrouting.yml -#################### -FROM ccache as pgrouting-source -# Download and extract -ARG pgrouting_release -ARG pgrouting_release_checksum -ADD --checksum=${pgrouting_release_checksum} \ - "https://github.com/pgRouting/pgrouting/releases/download/v$%7Bpgrouting_release%7D/pgrouting-$%7Bpgrouting_release%7D.tar.gz" \ - /tmp/pgrouting.tar.gz -RUN tar -xvf /tmp/pgrouting.tar.gz -C /tmp && \ - rm -rf /tmp/pgrouting.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - libboost-all-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/pgrouting-${pgrouting_release}/build -RUN cmake -DBUILD_HTML=OFF -DBUILD_DOXY=OFF .. -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --pkgname=pgrouting --pkgversion=${pgrouting_release} --nodoc - -FROM ppa as pgrouting -ARG pgrouting_release -# Download pre-built packages -RUN apt-get update && apt-get install -y --no-install-recommends --download-only \ - postgresql-${postgresql_major}-pgrouting=${pgrouting_release}-1.pgdg20.04+1 \ - && rm -rf /var/lib/apt/lists/* -RUN mv /var/cache/apt/archives/*.deb /tmp/ - -#################### -# 03-pgtap.yml -#################### -FROM builder as pgtap-source -# Download and extract -ARG pgtap_release -ARG pgtap_release_checksum -ADD --checksum=${pgtap_release_checksum} \ - "https://github.com/theory/pgtap/archive/v$%7Bpgtap_release%7D.tar.gz" \ - /tmp/pgtap.tar.gz -RUN tar -xvf /tmp/pgtap.tar.gz -C /tmp && \ - rm -rf /tmp/pgtap.tar.gz -# Build from source -WORKDIR /tmp/pgtap-${pgtap_release} -RUN make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 04-pg_cron.yml -#################### -FROM ccache as pg_cron-source -# Download and extract -ARG pg_cron_release -ARG pg_cron_release_checksum -ADD --checksum=${pg_cron_release_checksum} \ - "https://github.com/citusdata/pg_cron/archive/refs/tags/v$%7Bpg_cron_release%7D.tar.gz" \ - /tmp/pg_cron.tar.gz -RUN tar -xvf /tmp/pg_cron.tar.gz -C /tmp && \ - rm -rf /tmp/pg_cron.tar.gz -# Build from source -WORKDIR /tmp/pg_cron-${pg_cron_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 05-pgaudit.yml -#################### -FROM ccache as pgaudit-source -# Download and extract -ARG pgaudit_release -ARG pgaudit_release_checksum -ADD --checksum=${pgaudit_release_checksum} \ - "https://github.com/pgaudit/pgaudit/archive/refs/tags/$%7Bpgaudit_release%7D.tar.gz" \ - /tmp/pgaudit.tar.gz -RUN tar -xvf /tmp/pgaudit.tar.gz -C /tmp && \ - rm -rf /tmp/pgaudit.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - libssl-dev \ - libkrb5-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/pgaudit-${pgaudit_release} -ENV USE_PGXS=1 -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 06-pgjwt.yml -#################### -FROM builder as pgjwt-source -# Download and extract -ARG pgjwt_release -ADD "https://github.com/michelp/pgjwt.git#${pgjwt_release}" \ - /tmp/pgjwt-${pgjwt_release} -# Build from source -WORKDIR /tmp/pgjwt-${pgjwt_release} -RUN make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --pkgversion=1 --nodoc - -#################### -# 07-pgsql-http.yml -#################### -FROM ccache as pgsql-http-source -# Download and extract -ARG pgsql_http_release -ARG pgsql_http_release_checksum -ADD --checksum=${pgsql_http_release_checksum} \ - "https://github.com/pramsey/pgsql-http/archive/refs/tags/v$%7Bpgsql_http_release%7D.tar.gz" \ - /tmp/pgsql-http.tar.gz -RUN tar -xvf /tmp/pgsql-http.tar.gz -C /tmp && \ - rm -rf /tmp/pgsql-http.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - libcurl4-gnutls-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/pgsql-http-${pgsql_http_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --requires=libcurl3-gnutls --nodoc - -#################### -# 08-plpgsql_check.yml -#################### -FROM ccache as plpgsql_check-source -# Download and extract -ARG plpgsql_check_release -ARG plpgsql_check_release_checksum -ADD --checksum=${plpgsql_check_release_checksum} \ - "https://github.com/okbob/plpgsql_check/archive/refs/tags/v$%7Bplpgsql_check_release%7D.tar.gz" \ - /tmp/plpgsql_check.tar.gz -RUN tar -xvf /tmp/plpgsql_check.tar.gz -C /tmp && \ - rm -rf /tmp/plpgsql_check.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - libicu-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/plpgsql_check-${plpgsql_check_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 09-pg-safeupdate.yml -#################### -FROM ccache as pg-safeupdate-source -# Download and extract -ARG pg_safeupdate_release -ARG pg_safeupdate_release_checksum -ADD --checksum=${pg_safeupdate_release_checksum} \ - "https://github.com/eradman/pg-safeupdate/archive/refs/tags/$%7Bpg_safeupdate_release%7D.tar.gz" \ - /tmp/pg-safeupdate.tar.gz -RUN tar -xvf /tmp/pg-safeupdate.tar.gz -C /tmp && \ - rm -rf /tmp/pg-safeupdate.tar.gz -# Build from source -WORKDIR /tmp/pg-safeupdate-${pg_safeupdate_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 10-timescaledb.yml -#################### -FROM ccache as timescaledb-source -# Download and extract -ARG timescaledb_release -ARG timescaledb_release_checksum -ADD --checksum=${timescaledb_release_checksum} \ - "https://github.com/timescale/timescaledb/archive/refs/tags/$%7Btimescaledb_release%7D.tar.gz" \ - /tmp/timescaledb.tar.gz -RUN tar -xvf /tmp/timescaledb.tar.gz -C /tmp && \ - rm -rf /tmp/timescaledb.tar.gz -# Build from source -WORKDIR /tmp/timescaledb-${timescaledb_release}/build -RUN cmake -DAPACHE_ONLY=1 .. -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --pkgname=timescaledb --pkgversion=${timescaledb_release} --nodoc - -#################### -# 11-wal2json.yml -#################### -FROM ccache as wal2json-source -# Download and extract -ARG wal2json_release -ARG wal2json_release_checksum -ADD --checksum=${wal2json_release_checksum} \ - "https://github.com/eulerto/wal2json/archive/refs/tags/wal2json_$%7Bwal2json_release%7D.tar.gz" \ - /tmp/wal2json.tar.gz -RUN tar -xvf /tmp/wal2json.tar.gz -C /tmp --one-top-level --strip-components 1 && \ - rm -rf /tmp/wal2json.tar.gz -# Build from source -WORKDIR /tmp/wal2json -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -ENV version=${wal2json_release} -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --pkgversion="\${version/_/.}" --nodoc - -#################### -# 12-pljava.yml -#################### -FROM builder as pljava-source -# Download and extract -# TODO: revert to using main repo after PG15 support is merged: https://github.com/tada/pljava/pull/413 -ARG pljava_release=master -ARG pljava_release_checksum=sha256:e99b1c52f7b57f64c8986fe6ea4a6cc09d78e779c1643db060d0ac66c93be8b6 -ADD --checksum=${pljava_release_checksum} \ - "https://github.com/supabase/pljava/archive/refs/heads/$%7Bpljava_release%7D.tar.gz" \ - /tmp/pljava.tar.gz -RUN tar -xvf /tmp/pljava.tar.gz -C /tmp && \ - rm -rf /tmp/pljava.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - maven \ - default-jdk \ - libssl-dev \ - libkrb5-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/pljava-${pljava_release} -RUN mvn -T 1C clean install -Dmaven.test.skip -DskipTests -Dmaven.javadoc.skip=true -# Create debian package -RUN cp pljava-packaging/target/pljava-pg${postgresql_major}.jar /tmp/ - -FROM base as pljava -# Download pre-built packages -RUN apt-get update && apt-get install -y --no-install-recommends --download-only \ - default-jdk-headless \ - postgresql-${postgresql_major}-pljava \ - && rm -rf /var/lib/apt/lists/* -RUN mv /var/cache/apt/archives/*.deb /tmp/ - -#################### -# 13-plv8.yml -#################### -FROM ccache as plv8-source -# Download and extract -ARG plv8_release -ARG plv8_release_checksum -ADD --checksum=${plv8_release_checksum} \ - "https://github.com/plv8/plv8/archive/refs/tags/v$%7Bplv8_release%7D.tar.gz" \ - /tmp/plv8.tar.gz -RUN tar -xvf /tmp/plv8.tar.gz -C /tmp && \ - rm -rf /tmp/plv8.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - pkg-config \ - ninja-build \ - git \ - libtinfo5 \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/plv8-${plv8_release} -ENV DOCKER=1 -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -FROM scratch as plv8-deb -COPY --from=plv8-source /tmp/*.deb /tmp/ - -FROM ghcr.io/supabase/plv8:${plv8_release}-pg${postgresql_major} as plv8 - -#################### -# 14-pg_plan_filter.yml -#################### -FROM ccache as pg_plan_filter-source -# Download and extract -ARG pg_plan_filter_release -ADD "https://github.com/pgexperts/pg_plan_filter.git#${pg_plan_filter_release}" \ - /tmp/pg_plan_filter-${pg_plan_filter_release} -# Build from source -WORKDIR /tmp/pg_plan_filter-${pg_plan_filter_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --pkgversion=1 --nodoc - -#################### -# 15-pg_net.yml -#################### -FROM ccache as pg_net-source -# Download and extract -ARG pg_net_release -ARG pg_net_release_checksum -ADD --checksum=${pg_net_release_checksum} \ - "https://github.com/supabase/pg_net/archive/refs/tags/v$%7Bpg_net_release%7D.tar.gz" \ - /tmp/pg_net.tar.gz -RUN tar -xvf /tmp/pg_net.tar.gz -C /tmp && \ - rm -rf /tmp/pg_net.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - libcurl4-gnutls-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/pg_net-${pg_net_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --requires=libcurl3-gnutls --nodoc - -#################### -# 16-rum.yml -#################### -FROM ccache as rum-source -# Download and extract -ARG rum_release -ARG rum_release_checksum -ADD --checksum=${rum_release_checksum} \ - "https://github.com/postgrespro/rum/archive/refs/tags/$%7Brum_release%7D.tar.gz" \ - /tmp/rum.tar.gz -RUN tar -xvf /tmp/rum.tar.gz -C /tmp && \ - rm -rf /tmp/rum.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - systemtap-sdt-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/rum-${rum_release} -ENV USE_PGXS=1 -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 17-pg_hashids.yml -#################### -FROM ccache as pg_hashids-source -# Download and extract -ARG pg_hashids_release -ADD "https://github.com/iCyberon/pg_hashids.git#${pg_hashids_release}" \ - /tmp/pg_hashids-${pg_hashids_release} -# Build from source -WORKDIR /tmp/pg_hashids-${pg_hashids_release} -RUN make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --pkgversion=1 --nodoc - -#################### -# 18-pgsodium.yml -#################### -FROM ccache as libsodium -# Download and extract -ARG libsodium_release -ARG libsodium_release_checksum -ADD --checksum=${libsodium_release_checksum} \ - "https://download.libsodium.org/libsodium/releases/libsodium-$%7Blibsodium_release%7D.tar.gz" \ - /tmp/libsodium.tar.gz -RUN tar -xvf /tmp/libsodium.tar.gz -C /tmp && \ - rm -rf /tmp/libsodium.tar.gz -# Build from source -WORKDIR /tmp/libsodium-${libsodium_release} -RUN ./configure -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -RUN make install - -FROM libsodium as pgsodium-source -# Download and extract -ARG pgsodium_release -ARG pgsodium_release_checksum -ADD --checksum=${pgsodium_release_checksum} \ - "https://github.com/michelp/pgsodium/archive/refs/tags/v$%7Bpgsodium_release%7D.tar.gz" \ - /tmp/pgsodium.tar.gz -RUN tar -xvf /tmp/pgsodium.tar.gz -C /tmp && \ - rm -rf /tmp/pgsodium.tar.gz -# Build from source -WORKDIR /tmp/pgsodium-${pgsodium_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --requires=libsodium23 --nodoc - -#################### -# 19-pg_graphql.yml -#################### -FROM base as pg_graphql -# Download package archive -ARG pg_graphql_release -ADD "https://github.com/supabase/pg_graphql/releases/download/v$%7Bpg_graphql_release%7D/pg_graphql-v$%7Bpg_graphql_release%7D-pg$%7Bpostgresql_major%7D-$%7BTARGETARCH%7D-linux-gnu.deb" \ - /tmp/pg_graphql.deb - -#################### -# 20-pg_stat_monitor.yml -#################### -FROM ccache as pg_stat_monitor-source -# Download and extract -ARG pg_stat_monitor_release -ARG pg_stat_monitor_release_checksum -ADD --checksum=${pg_stat_monitor_release_checksum} \ - "https://github.com/percona/pg_stat_monitor/archive/refs/tags/$%7Bpg_stat_monitor_release%7D.tar.gz" \ - /tmp/pg_stat_monitor.tar.gz -RUN tar -xvf /tmp/pg_stat_monitor.tar.gz -C /tmp && \ - rm -rf /tmp/pg_stat_monitor.tar.gz -# Build from source -WORKDIR /tmp/pg_stat_monitor-${pg_stat_monitor_release} -ENV USE_PGXS=1 -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 21-auto_explain.yml -#################### - -#################### -# 22-pg_jsonschema.yml -#################### -FROM base as pg_jsonschema -# Download package archive -ARG pg_jsonschema_release -ADD "https://github.com/supabase/pg_jsonschema/releases/download/v$%7Bpg_jsonschema_release%7D/pg_jsonschema-v$%7Bpg_jsonschema_release%7D-pg$%7Bpostgresql_major%7D-$%7BTARGETARCH%7D-linux-gnu.deb" \ - /tmp/pg_jsonschema.deb - -#################### -# 23-vault.yml -#################### -FROM builder as vault-source -# Download and extract -ARG vault_release -ARG vault_release_checksum -ADD --checksum=${vault_release_checksum} \ - "https://github.com/supabase/vault/archive/refs/tags/v$%7Bvault_release%7D.tar.gz" \ - /tmp/vault.tar.gz -RUN tar -xvf /tmp/vault.tar.gz -C /tmp && \ - rm -rf /tmp/vault.tar.gz -# Build from source -WORKDIR /tmp/vault-${vault_release} -RUN make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 24-pgroonga.yml -#################### -FROM ccache as groonga -# Download and extract -ARG groonga_release -ARG groonga_release_checksum -ADD --checksum=${groonga_release_checksum} \ - "https://packages.groonga.org/source/groonga/groonga-$%7Bgroonga_release%7D.tar.gz" \ - /tmp/groonga.tar.gz -RUN tar -xvf /tmp/groonga.tar.gz -C /tmp && \ - rm -rf /tmp/groonga.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - zlib1g-dev \ - liblz4-dev \ - libzstd-dev \ - libmsgpack-dev \ - libzmq3-dev \ - libevent-dev \ - libmecab-dev \ - rapidjson-dev \ - pkg-config \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/groonga-${groonga_release} -RUN ./configure -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=yes --fstrans=no --backup=no --pakdir=/tmp --requires=zlib1g,liblz4-1,libzstd1,libmsgpackc2,libzmq5,libevent-2.1-7,libmecab2 --nodoc - -FROM groonga as pgroonga-source -# Download and extract -ARG pgroonga_release -ARG pgroonga_release_checksum -ADD --checksum=${pgroonga_release_checksum} \ - "https://packages.groonga.org/source/pgroonga/pgroonga-$%7Bpgroonga_release%7D.tar.gz" \ - /tmp/pgroonga.tar.gz -RUN tar -xvf /tmp/pgroonga.tar.gz -C /tmp && \ - rm -rf /tmp/pgroonga.tar.gz -# Build from source -WORKDIR /tmp/pgroonga-${pgroonga_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --requires=mecab-naist-jdic --nodoc - -FROM scratch as pgroonga-deb -COPY --from=pgroonga-source /tmp/*.deb /tmp/ - -FROM base as pgroonga -# Latest available is 3.0.3 -ARG pgroonga_release -# Download pre-built packages -ADD "https://packages.groonga.org/ubuntu/groonga-apt-source-latest-focal.deb" /tmp/source.deb -RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - /tmp/source.deb \ - && rm -rf /var/lib/apt/lists/* -RUN rm /tmp/source.deb -RUN apt-get update && apt-get install -y --no-install-recommends --download-only \ - postgresql-${postgresql_major}-pgdg-pgroonga=${pgroonga_release}-1 \ - && rm -rf /var/lib/apt/lists/* -RUN mv /var/cache/apt/archives/*.deb /tmp/ - -#################### -# 25-wrappers.yml -#################### -FROM base as wrappers -# Download package archive -ARG wrappers_release -ADD "https://github.com/supabase/wrappers/releases/download/v$%7Bwrappers_release%7D/wrappers-v$%7Bwrappers_release%7D-pg$%7Bpostgresql_major%7D-$%7BTARGETARCH%7D-linux-gnu.deb" \ - /tmp/wrappers.deb - -#################### -# 26-hypopg.yml -#################### -FROM ccache as hypopg-source -# Download and extract -ARG hypopg_release -ARG hypopg_release_checksum -ADD --checksum=${hypopg_release_checksum} \ - "https://github.com/HypoPG/hypopg/archive/refs/tags/$%7Bhypopg_release%7D.tar.gz" \ - /tmp/hypopg.tar.gz -RUN tar -xvf /tmp/hypopg.tar.gz -C /tmp && \ - rm -rf /tmp/hypopg.tar.gz -# Build from source -WORKDIR /tmp/hypopg-${hypopg_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 27-pg_repack.yml -#################### -FROM ccache as pg_repack-source -ARG pg_repack_release -ARG pg_repack_release_checksum -ADD --checksum=${pg_repack_release_checksum} \ - "https://github.com/reorg/pg_repack/archive/refs/tags/ver_$%7Bpg_repack_release%7D.tar.gz" \ - /tmp/pg_repack.tar.gz -RUN tar -xvf /tmp/pg_repack.tar.gz -C /tmp && \ - rm -rf /tmp/pg_repack.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - liblz4-dev \ - libz-dev \ - libzstd-dev \ - libreadline-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/pg_repack-ver_${pg_repack_release} -ENV USE_PGXS=1 -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --pkgversion=${pg_repack_release} --nodoc - -#################### -# 28-pgvector.yml -#################### -FROM ccache as pgvector-source -ARG pgvector_release -ARG pgvector_release_checksum -ADD --checksum=${pgvector_release_checksum} \ - "https://github.com/pgvector/pgvector/archive/refs/tags/v$%7Bpgvector_release%7D.tar.gz" \ - /tmp/pgvector.tar.gz -RUN tar -xvf /tmp/pgvector.tar.gz -C /tmp && \ - rm -rf /tmp/pgvector.tar.gz -# Build from source -WORKDIR /tmp/pgvector-${pgvector_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 29-pg_tle.yml -#################### -FROM ccache as pg_tle-source -ARG pg_tle_release -ARG pg_tle_release_checksum -ADD --checksum=${pg_tle_release_checksum} \ - "https://github.com/aws/pg_tle/archive/refs/tags/v$%7Bpg_tle_release%7D.tar.gz" \ - /tmp/pg_tle.tar.gz -RUN tar -xvf /tmp/pg_tle.tar.gz -C /tmp && \ - rm -rf /tmp/pg_tle.tar.gz -RUN apt-get update && apt-get install -y --no-install-recommends \ - flex \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/pg_tle-${pg_tle_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# internal/supautils.yml -#################### -FROM base as supautils -# Download package archive -ARG supautils_release -ADD "https://github.com/supabase/supautils/releases/download/v$%7Bsupautils_release%7D/supautils-v$%7Bsupautils_release%7D-pg$%7Bpostgresql_major%7D-$%7BTARGETARCH%7D-linux-gnu.deb" \ - /tmp/supautils.deb - -#################### -# setup-wal-g.yml -#################### -FROM base as walg -ARG wal_g_release -# ADD "https://github.com/wal-g/wal-g/releases/download/v$%7Bwal_g_release%7D/wal-g-pg-ubuntu-20.04-$%7BTARGETARCH%7D.tar.gz" /tmp/wal-g.tar.gz -RUN arch=$([ "$TARGETARCH" = "arm64" ] && echo "aarch64" || echo "$TARGETARCH") && \ - apt-get update && apt-get install -y --no-install-recommends curl && \ - curl -kL "https://github.com/wal-g/wal-g/releases/download/v$%7Bwal_g_release%7D/wal-g-pg-ubuntu-20.04-$%7Barch%7D.tar.gz" -o /tmp/wal-g.tar.gz && \ - tar -xvf /tmp/wal-g.tar.gz -C /tmp && \ - rm -rf /tmp/wal-g.tar.gz && \ - mv /tmp/wal-g-pg-ubuntu*20.04-$arch /tmp/wal-g - -#################### -# Collect extension packages -#################### -FROM scratch as extensions -COPY --from=postgis-source /tmp/*.deb /tmp/ -COPY --from=pgrouting-source /tmp/*.deb /tmp/ -COPY --from=pgtap-source /tmp/*.deb /tmp/ -COPY --from=pg_cron-source /tmp/*.deb /tmp/ -COPY --from=pgaudit-source /tmp/*.deb /tmp/ -COPY --from=pgjwt-source /tmp/*.deb /tmp/ -COPY --from=pgsql-http-source /tmp/*.deb /tmp/ -COPY --from=plpgsql_check-source /tmp/*.deb /tmp/ -COPY --from=pg-safeupdate-source /tmp/*.deb /tmp/ -COPY --from=timescaledb-source /tmp/*.deb /tmp/ -COPY --from=wal2json-source /tmp/*.deb /tmp/ -# COPY --from=pljava /tmp/*.deb /tmp/ -COPY --from=plv8 /tmp/*.deb /tmp/ -COPY --from=pg_plan_filter-source /tmp/*.deb /tmp/ -COPY --from=pg_net-source /tmp/*.deb /tmp/ -COPY --from=rum-source /tmp/*.deb /tmp/ -COPY --from=pgsodium-source /tmp/*.deb /tmp/ -COPY --from=pg_hashids-source /tmp/*.deb /tmp/ -COPY --from=pg_graphql /tmp/*.deb /tmp/ -COPY --from=pg_stat_monitor-source /tmp/*.deb /tmp/ -COPY --from=pg_jsonschema /tmp/*.deb /tmp/ -COPY --from=vault-source /tmp/*.deb /tmp/ -COPY --from=pgroonga-source /tmp/*.deb /tmp/ -COPY --from=wrappers /tmp/*.deb /tmp/ -COPY --from=hypopg-source /tmp/*.deb /tmp/ -COPY --from=pg_repack-source /tmp/*.deb /tmp/ -COPY --from=pgvector-source /tmp/*.deb /tmp/ -COPY --from=pg_tle-source /tmp/*.deb /tmp/ -COPY --from=supautils /tmp/*.deb /tmp/ - -#################### -# Download gosu for easy step-down from root -#################### -FROM ubuntu:focal as gosu -ARG TARGETARCH -# Install dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - gnupg \ - ca-certificates \ - && rm -rf /var/lib/apt/lists/* -# Download binary -ARG GOSU_VERSION=1.16 -ARG GOSU_GPG_KEY=B42F6819007F00F88E364FD4036A9C25BF357DD4 -ADD https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$TARGETARCH \ - /usr/local/bin/gosu -ADD https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$TARGETARCH.asc \ - /usr/local/bin/gosu.asc -# Verify checksum -RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys $GOSU_GPG_KEY && \ - gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu && \ - gpgconf --kill all && \ - chmod +x /usr/local/bin/gosu - -#################### -# Build final image -#################### -FROM base as production - -# Setup extensions -COPY --from=extensions /tmp /tmp -COPY --from=walg /tmp/wal-g /usr/local/bin/ - -ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y --no-install-recommends \ - /tmp/*.deb \ - # Needed for anything using libcurl - # https://github.com/supabase/postgres/issues/573 - ca-certificates \ - && rm -rf /var/lib/apt/lists/* /tmp/* - -# Initialise configs -COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql.conf.j2 /etc/postgresql/postgresql.conf -COPY --chown=postgres:postgres ansible/files/postgresql_config/pg_hba.conf.j2 /etc/postgresql/pg_hba.conf -COPY --chown=postgres:postgres ansible/files/postgresql_config/pg_ident.conf.j2 /etc/postgresql/pg_ident.conf -COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql-stdout-log.conf /etc/postgresql/logging.conf -COPY --chown=postgres:postgres ansible/files/postgresql_config/supautils.conf.j2 /etc/postgresql-custom/supautils.conf -COPY --chown=postgres:postgres ansible/files/postgresql_extension_custom_scripts /etc/postgresql-custom/extension-custom-scripts -COPY --chown=postgres:postgres ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/lib/postgresql/${postgresql_major}/bin/pgsodium_getkey.sh -COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.j2 /etc/postgresql-custom/wal-g.conf -COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh -COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh - -RUN sed -i \ - -e "s|#unix_socket_directories = '/tmp'|unix_socket_directories = '/var/run/postgresql'|g" \ - -e "s|#session_preload_libraries = ''|session_preload_libraries = 'supautils'|g" \ - -e "s|#include = '/etc/postgresql-custom/supautils.conf'|include = '/etc/postgresql-custom/supautils.conf'|g" \ - -e "s|#include = '/etc/postgresql-custom/wal-g.conf'|include = '/etc/postgresql-custom/wal-g.conf'|g" /etc/postgresql/postgresql.conf && \ - echo "cron.database_name = 'postgres'" >> /etc/postgresql/postgresql.conf && \ - echo "pljava.libjvm_location = '/usr/lib/jvm/java-11-openjdk-${TARGETARCH}/lib/server/libjvm.so'" >> /etc/postgresql/postgresql.conf && \ - echo "pgsodium.getkey_script= '/usr/lib/postgresql/${postgresql_major}/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \ - echo 'auto_explain.log_min_duration = 10s' >> /etc/postgresql/postgresql.conf && \ - useradd --create-home --shell /bin/bash wal-g -G postgres && \ - mkdir -p /etc/postgresql-custom && \ - chown postgres:postgres /etc/postgresql-custom - -# Include schema migrations -COPY migrations/db /docker-entrypoint-initdb.d/ -COPY ansible/files/pgbouncer_config/pgbouncer_auth_schema.sql /docker-entrypoint-initdb.d/init-scripts/00-schema.sql -COPY ansible/files/stat_extension.sql /docker-entrypoint-initdb.d/migrations/00-extension.sql - -# Add upstream entrypoint script -COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu -ADD --chmod=0755 \ - https://github.com/docker-library/postgres/raw/master/15/bullseye/docker-entrypoint.sh \ - /usr/local/bin/ -ENTRYPOINT ["docker-entrypoint.sh"] - -HEALTHCHECK --interval=2s --timeout=2s --retries=10 CMD pg_isready -U postgres -h localhost -STOPSIGNAL SIGINT -EXPOSE 5432 - -ENV POSTGRES_HOST=/var/run/postgresql -CMD ["postgres", "-D", "/etc/postgresql"] - -#################### -# Update build cache -#################### -FROM ccache as stats -COPY --from=extensions /tmp/*.deb /dev/null -# Additional packages that are separately built from source -# COPY --from=plv8-deb /tmp/*.deb /dev/null -# Cache mount is only populated by docker build --no-cache -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - ccache -s && \ - cp -r /ccache/* /tmp -FROM scratch as buildcache -COPY --from=stats /tmp / diff --git a/Dockerfile-15 b/Dockerfile-15 new file mode 100644 index 000000000..42ffc858c --- /dev/null +++ b/Dockerfile-15 @@ -0,0 +1,225 @@ +# syntax=docker/dockerfile:1.6 +ARG postgresql_major=15 +ARG postgresql_release=${postgresql_major}.1 + +# Bump default build arg to build a package from source +# Bump vars.yml to specify runtime package version +ARG sfcgal_release=1.3.10 +ARG postgis_release=3.3.2 +ARG pgrouting_release=3.4.1 +ARG pgtap_release=1.2.0 +ARG pg_cron_release=1.6.2 +ARG pgaudit_release=1.7.0 +ARG pgsql_http_release=1.5.0 +ARG plpgsql_check_release=2.2.5 +ARG pg_safeupdate_release=1.4 +ARG timescaledb_release=2.9.1 +ARG wal2json_release=2_5 +ARG pljava_release=1.6.4 +ARG plv8_release=3.1.5 +ARG pg_plan_filter_release=5081a7b5cb890876e67d8e7486b6a64c38c9a492 +ARG pg_net_release=0.7.1 +ARG rum_release=1.3.13 +ARG pg_hashids_release=cd0e1b31d52b394a0df64079406a14a4f7387cd6 +ARG libsodium_release=1.0.18 +ARG pgsodium_release=3.1.6 +ARG pg_graphql_release=1.5.11 +ARG pg_stat_monitor_release=1.1.1 +ARG pg_jsonschema_release=0.1.4 +ARG pg_repack_release=1.4.8 +ARG vault_release=0.2.8 +ARG groonga_release=12.0.8 +ARG pgroonga_release=2.4.0 +ARG wrappers_release=0.4.6 +ARG hypopg_release=1.3.1 +ARG pgvector_release=0.4.0 +ARG pg_tle_release=1.3.2 +ARG index_advisor_release=0.2.0 +ARG supautils_release=2.2.0 +ARG wal_g_release=2.0.1 + +FROM ubuntu:focal as base + +RUN apt update -y && apt install -y \ + curl \ + gnupg \ + lsb-release \ + software-properties-common \ + wget \ + sudo \ + && apt clean + + +RUN adduser --system --home /var/lib/postgresql --no-create-home --shell /bin/bash --group --gecos "PostgreSQL administrator" postgres +RUN adduser --system --no-create-home --shell /bin/bash --group wal-g +RUN curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux \ +--init none \ +--no-confirm \ +--extra-conf "substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com" \ +--extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + +ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin" + +COPY . /nixpg + +WORKDIR /nixpg + +RUN nix profile install .#psql_15/bin + +RUN nix store gc + + +WORKDIR / + + +RUN mkdir -p /usr/lib/postgresql/bin \ + /usr/lib/postgresql/share/postgresql \ + /usr/share/postgresql \ + /var/lib/postgresql \ + && chown -R postgres:postgres /usr/lib/postgresql \ + && chown -R postgres:postgres /var/lib/postgresql \ + && chown -R postgres:postgres /usr/share/postgresql + +# Create symbolic links +RUN ln -s /nix/var/nix/profiles/default/bin/* /usr/lib/postgresql/bin/ \ + && ln -s /nix/var/nix/profiles/default/bin/* /usr/bin/ \ + && chown -R postgres:postgres /usr/bin + +# Create symbolic links for PostgreSQL shares +RUN ln -s /nix/var/nix/profiles/default/share/postgresql/* /usr/lib/postgresql/share/postgresql/ +RUN ln -s /nix/var/nix/profiles/default/share/postgresql/* /usr/share/postgresql/ +RUN chown -R postgres:postgres /usr/lib/postgresql/share/postgresql/ +RUN chown -R postgres:postgres /usr/share/postgresql/ +# Create symbolic links for contrib directory +RUN mkdir -p /usr/lib/postgresql/share/postgresql/contrib \ + && find /nix/var/nix/profiles/default/share/postgresql/contrib/ -mindepth 1 -type d -exec sh -c 'for dir do ln -s "$dir" "/usr/lib/postgresql/share/postgresql/contrib/$(basename "$dir")"; done' sh {} + \ + && chown -R postgres:postgres /usr/lib/postgresql/share/postgresql/contrib/ + +RUN chown -R postgres:postgres /usr/lib/postgresql + +RUN ln -sf /usr/lib/postgresql/share/postgresql/timezonesets /usr/share/postgresql/timezonesets + + +RUN apt-get update && \ + apt-get install -y --no-install-recommends tzdata + +RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && \ + dpkg-reconfigure --frontend noninteractive tzdata + +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + build-essential \ + checkinstall \ + cmake + +ENV PGDATA=/var/lib/postgresql/data + +#################### +# setup-wal-g.yml +#################### +FROM base as walg +ARG wal_g_release +WORKDIR /nixpg + +RUN nix profile install .#wal-g-3 && \ + ln -s /nix/var/nix/profiles/default/bin/wal-g-3 /tmp/wal-g + +RUN nix store gc + +WORKDIR / +# #################### +# # Download gosu for easy step-down from root +# #################### +FROM base as gosu +ARG TARGETARCH +# Install dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + gnupg \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* +# Download binary +ARG GOSU_VERSION=1.16 +ARG GOSU_GPG_KEY=B42F6819007F00F88E364FD4036A9C25BF357DD4 +ADD https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$TARGETARCH \ + /usr/local/bin/gosu +ADD https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$TARGETARCH.asc \ + /usr/local/bin/gosu.asc +# Verify checksum +RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys $GOSU_GPG_KEY && \ + gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu && \ + gpgconf --kill all && \ + chmod +x /usr/local/bin/gosu + +# #################### +# # Build final image +# #################### +FROM gosu as production +RUN id postgres || (echo "postgres user does not exist" && exit 1) +# # Setup extensions +COPY --from=walg /tmp/wal-g /usr/local/bin/ + +# # Initialise configs +COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql.conf.j2 /etc/postgresql/postgresql.conf +COPY --chown=postgres:postgres ansible/files/postgresql_config/pg_hba.conf.j2 /etc/postgresql/pg_hba.conf +COPY --chown=postgres:postgres ansible/files/postgresql_config/pg_ident.conf.j2 /etc/postgresql/pg_ident.conf +COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql-stdout-log.conf /etc/postgresql/logging.conf +COPY --chown=postgres:postgres ansible/files/postgresql_config/supautils.conf.j2 /etc/postgresql-custom/supautils.conf +COPY --chown=postgres:postgres ansible/files/postgresql_extension_custom_scripts /etc/postgresql-custom/extension-custom-scripts +COPY --chown=postgres:postgres ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/lib/postgresql/bin/pgsodium_getkey.sh +COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_read_replica.conf.j2 /etc/postgresql-custom/read-replica.conf +COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.j2 /etc/postgresql-custom/wal-g.conf +COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh +COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh + +RUN sed -i \ + -e "s|#unix_socket_directories = '/tmp'|unix_socket_directories = '/var/run/postgresql'|g" \ + -e "s|#session_preload_libraries = ''|session_preload_libraries = 'supautils'|g" \ + -e "s|#include = '/etc/postgresql-custom/supautils.conf'|include = '/etc/postgresql-custom/supautils.conf'|g" \ + -e "s|#include = '/etc/postgresql-custom/wal-g.conf'|include = '/etc/postgresql-custom/wal-g.conf'|g" /etc/postgresql/postgresql.conf && \ + echo "cron.database_name = 'postgres'" >> /etc/postgresql/postgresql.conf && \ + #echo "pljava.libjvm_location = '/usr/lib/jvm/java-11-openjdk-${TARGETARCH}/lib/server/libjvm.so'" >> /etc/postgresql/postgresql.conf && \ + echo "pgsodium.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \ + echo "vault.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \ + echo 'auto_explain.log_min_duration = 10s' >> /etc/postgresql/postgresql.conf && \ + usermod -aG postgres wal-g && \ + mkdir -p /etc/postgresql-custom && \ + chown postgres:postgres /etc/postgresql-custom + +# # Include schema migrations +COPY migrations/db /docker-entrypoint-initdb.d/ +COPY ansible/files/pgbouncer_config/pgbouncer_auth_schema.sql /docker-entrypoint-initdb.d/init-scripts/00-schema.sql +COPY ansible/files/stat_extension.sql /docker-entrypoint-initdb.d/migrations/00-extension.sql + +# # Add upstream entrypoint script +COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu +ADD --chmod=0755 \ + https://github.com/docker-library/postgres/raw/master/15/bullseye/docker-entrypoint.sh \ + /usr/local/bin/ + +RUN mkdir -p /var/run/postgresql && chown postgres:postgres /var/run/postgresql + +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK --interval=2s --timeout=2s --retries=10 CMD pg_isready -U postgres -h localhost +STOPSIGNAL SIGINT +EXPOSE 5432 + +ENV POSTGRES_HOST=/var/run/postgresql +ENV POSTGRES_USER=supabase_admin +ENV POSTGRES_DB=postgres +RUN apt-get update && apt-get install -y --no-install-recommends \ + locales \ + && rm -rf /var/lib/apt/lists/* && \ + localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ + && localedef -i C -c -f UTF-8 -A /usr/share/locale/locale.alias C.UTF-8 +RUN echo "C.UTF-8 UTF-8" > /etc/locale.gen && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 +ENV LC_CTYPE=C.UTF-8 +ENV LC_COLLATE=C.UTF-8 +ENV LOCALE_ARCHIVE /usr/lib/locale/locale-archive +RUN mkdir -p /usr/share/postgresql/extension/ && \ + ln -s /usr/lib/postgresql/bin/pgsodium_getkey.sh /usr/share/postgresql/extension/pgsodium_getkey && \ + chmod +x /usr/lib/postgresql/bin/pgsodium_getkey.sh +CMD ["postgres", "-D", "/etc/postgresql"] diff --git a/Dockerfile-17 b/Dockerfile-17 new file mode 100644 index 000000000..8bfdf39af --- /dev/null +++ b/Dockerfile-17 @@ -0,0 +1,234 @@ +# syntax=docker/dockerfile:1.6 +ARG postgresql_major=17-orioledb +ARG postgresql_release=${postgresql_major}.1 + +# Bump default build arg to build a package from source +# Bump vars.yml to specify runtime package version +ARG sfcgal_release=1.3.10 +ARG postgis_release=3.3.2 +ARG pgrouting_release=3.4.1 +ARG pgtap_release=1.2.0 +ARG pg_cron_release=1.6.2 +ARG pgaudit_release=1.7.0 +ARG pgjwt_release=9742dab1b2f297ad3811120db7b21451bca2d3c9 +ARG pgsql_http_release=1.5.0 +ARG plpgsql_check_release=2.2.5 +ARG pg_safeupdate_release=1.4 +ARG timescaledb_release=2.9.1 +ARG wal2json_release=2_5 +ARG pljava_release=1.6.4 +ARG plv8_release=3.1.5 +ARG pg_plan_filter_release=5081a7b5cb890876e67d8e7486b6a64c38c9a492 +ARG pg_net_release=0.7.1 +ARG rum_release=1.3.13 +ARG pg_hashids_release=cd0e1b31d52b394a0df64079406a14a4f7387cd6 +ARG libsodium_release=1.0.18 +ARG pgsodium_release=3.1.6 +ARG pg_graphql_release=1.5.11 +ARG pg_stat_monitor_release=1.1.1 +ARG pg_jsonschema_release=0.1.4 +ARG pg_repack_release=1.4.8 +ARG vault_release=0.2.8 +ARG groonga_release=12.0.8 +ARG pgroonga_release=2.4.0 +ARG wrappers_release=0.4.6 +ARG hypopg_release=1.3.1 +ARG pgvector_release=0.4.0 +ARG pg_tle_release=1.3.2 +ARG index_advisor_release=0.2.0 +ARG supautils_release=2.2.0 +ARG wal_g_release=3.0.5 + +FROM ubuntu:focal as base + +RUN apt update -y && apt install -y \ + curl \ + gnupg \ + lsb-release \ + software-properties-common \ + wget \ + sudo \ + tree \ + && apt clean + + +RUN adduser --system --home /var/lib/postgresql --no-create-home --shell /bin/bash --group --gecos "PostgreSQL administrator" postgres +RUN adduser --system --no-create-home --shell /bin/bash --group wal-g +RUN curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux \ +--init none \ +--no-confirm \ +--extra-conf "substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com" \ +--extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + +ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin" + +COPY . /nixpg + +WORKDIR /nixpg + +RUN nix profile install .#psql_17/bin + +RUN nix store gc + +WORKDIR / + + +RUN mkdir -p /usr/lib/postgresql/bin \ + /usr/lib/postgresql/share/postgresql \ + /usr/share/postgresql \ + /var/lib/postgresql \ + && chown -R postgres:postgres /usr/lib/postgresql \ + && chown -R postgres:postgres /var/lib/postgresql \ + && chown -R postgres:postgres /usr/share/postgresql + +# Create symbolic links +RUN ln -s /nix/var/nix/profiles/default/bin/* /usr/lib/postgresql/bin/ \ + && ln -s /nix/var/nix/profiles/default/bin/* /usr/bin/ \ + && chown -R postgres:postgres /usr/bin + +# Create symbolic links for PostgreSQL shares +RUN ln -s /nix/var/nix/profiles/default/share/postgresql/* /usr/lib/postgresql/share/postgresql/ +RUN ln -s /nix/var/nix/profiles/default/share/postgresql/* /usr/share/postgresql/ +RUN chown -R postgres:postgres /usr/lib/postgresql/share/postgresql/ +RUN chown -R postgres:postgres /usr/share/postgresql/ +# Create symbolic links for contrib directory +RUN tree /nix > /tmp/tree.txt && cat /tmp/tree.txt && cat /tmp/tree.txt >&2 + +RUN chown -R postgres:postgres /usr/lib/postgresql + +RUN ln -sf /usr/lib/postgresql/share/postgresql/timezonesets /usr/share/postgresql/timezonesets + + +RUN apt-get update && \ + apt-get install -y --no-install-recommends tzdata + +RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && \ + dpkg-reconfigure --frontend noninteractive tzdata + +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + build-essential \ + checkinstall \ + cmake + +ENV PGDATA=/var/lib/postgresql/data + +#################### +# setup-wal-g.yml +#################### +FROM base as walg +ARG wal_g_release + +WORKDIR /nixpg + +RUN nix profile install .#wal-g-3 && \ + ln -s /nix/var/nix/profiles/default/bin/wal-g-3 /tmp/wal-g + +RUN nix store gc + +WORKDIR / +# #################### +# # Download gosu for easy step-down from root +# #################### +FROM base as gosu +ARG TARGETARCH +# Install dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + gnupg \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* +# Download binary +ARG GOSU_VERSION=1.16 +ARG GOSU_GPG_KEY=B42F6819007F00F88E364FD4036A9C25BF357DD4 +ADD https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$TARGETARCH \ + /usr/local/bin/gosu +ADD https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$TARGETARCH.asc \ + /usr/local/bin/gosu.asc +# Verify checksum +RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys $GOSU_GPG_KEY && \ + gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu && \ + gpgconf --kill all && \ + chmod +x /usr/local/bin/gosu + +# #################### +# # Build final image +# #################### +FROM gosu as production +RUN id postgres || (echo "postgres user does not exist" && exit 1) +# # Setup extensions +COPY --from=walg /tmp/wal-g /usr/local/bin/ + +# # Initialise configs +COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql.conf.j2 /etc/postgresql/postgresql.conf +COPY --chown=postgres:postgres ansible/files/postgresql_config/pg_hba.conf.j2 /etc/postgresql/pg_hba.conf +COPY --chown=postgres:postgres ansible/files/postgresql_config/pg_ident.conf.j2 /etc/postgresql/pg_ident.conf +COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql-stdout-log.conf /etc/postgresql/logging.conf +COPY --chown=postgres:postgres ansible/files/postgresql_config/supautils.conf.j2 /etc/postgresql-custom/supautils.conf +COPY --chown=postgres:postgres ansible/files/postgresql_extension_custom_scripts /etc/postgresql-custom/extension-custom-scripts +COPY --chown=postgres:postgres ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/lib/postgresql/bin/pgsodium_getkey.sh +COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_read_replica.conf.j2 /etc/postgresql-custom/read-replica.conf +COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.j2 /etc/postgresql-custom/wal-g.conf +COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh +COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh + +RUN sed -i \ + -e "s|#unix_socket_directories = '/tmp'|unix_socket_directories = '/var/run/postgresql'|g" \ + -e "s|#session_preload_libraries = ''|session_preload_libraries = 'supautils'|g" \ + -e "s|#include = '/etc/postgresql-custom/supautils.conf'|include = '/etc/postgresql-custom/supautils.conf'|g" \ + -e "s|#include = '/etc/postgresql-custom/wal-g.conf'|include = '/etc/postgresql-custom/wal-g.conf'|g" /etc/postgresql/postgresql.conf && \ + echo "cron.database_name = 'postgres'" >> /etc/postgresql/postgresql.conf && \ + #echo "pljava.libjvm_location = '/usr/lib/jvm/java-11-openjdk-${TARGETARCH}/lib/server/libjvm.so'" >> /etc/postgresql/postgresql.conf && \ + echo "pgsodium.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \ + echo "vault.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \ + echo 'auto_explain.log_min_duration = 10s' >> /etc/postgresql/postgresql.conf && \ + usermod -aG postgres wal-g && \ + mkdir -p /etc/postgresql-custom && \ + chown postgres:postgres /etc/postgresql-custom + + # Remove items from postgresql.conf +RUN sed -i 's/ timescaledb,//g;' "/etc/postgresql/postgresql.conf" + #as of pg 16.4 + this db_user_namespace totally deprecated and will break the server if setting is present +RUN sed -i 's/db_user_namespace = off/#db_user_namespace = off/g;' "/etc/postgresql/postgresql.conf" +RUN sed -i 's/ timescaledb,//g; s/ plv8,//g' "/etc/postgresql-custom/supautils.conf" + + + +# # Include schema migrations +COPY migrations/db /docker-entrypoint-initdb.d/ +COPY ansible/files/pgbouncer_config/pgbouncer_auth_schema.sql /docker-entrypoint-initdb.d/init-scripts/00-schema.sql +COPY ansible/files/stat_extension.sql /docker-entrypoint-initdb.d/migrations/00-extension.sql + +# # Add upstream entrypoint script +COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu +ADD --chmod=0755 \ + https://github.com/docker-library/postgres/raw/master/17/bullseye/docker-entrypoint.sh \ + /usr/local/bin/ + +RUN mkdir -p /var/run/postgresql && chown postgres:postgres /var/run/postgresql + +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK --interval=2s --timeout=2s --retries=10 CMD pg_isready -U postgres -h localhost +STOPSIGNAL SIGINT +EXPOSE 5432 + +ENV POSTGRES_HOST=/var/run/postgresql +ENV POSTGRES_USER=supabase_admin +ENV POSTGRES_DB=postgres +ENV POSTGRES_INITDB_ARGS="--allow-group-access --locale-provider=icu --encoding=UTF-8 --icu-locale=en_US.UTF-8" +RUN apt-get update && apt-get install -y --no-install-recommends \ + locales \ + && rm -rf /var/lib/apt/lists/* && \ + localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ + && localedef -i C -c -f UTF-8 -A /usr/share/locale/locale.alias C.UTF-8 +RUN echo "C.UTF-8 UTF-8" > /etc/locale.gen && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 +ENV LC_CTYPE=C.UTF-8 +ENV LC_COLLATE=C.UTF-8 +ENV LOCALE_ARCHIVE /usr/lib/locale/locale-archive +RUN mkdir -p /usr/share/postgresql/extension/ && \ + ln -s /usr/lib/postgresql/bin/pgsodium_getkey.sh /usr/share/postgresql/extension/pgsodium_getkey && \ + chmod +x /usr/lib/postgresql/bin/pgsodium_getkey.sh +CMD ["postgres", "-D", "/etc/postgresql"] diff --git a/Dockerfile-kubernetes b/Dockerfile-kubernetes new file mode 100644 index 000000000..a1a39e498 --- /dev/null +++ b/Dockerfile-kubernetes @@ -0,0 +1,9 @@ +FROM alpine:3.21 + +ADD ./output-cloudimg/packer-cloudimg /disk/focal.qcow2 + +RUN apk add --no-cache qemu-system-aarch64 qemu-img openssh-client nftables cloud-utils-localds aavmf virtiofsd +# dev stuff +# RUN apk add --no-cache iproute2 + +CMD exec /bin/sh -c "trap : TERM INT; sleep 9999999999d & wait" diff --git a/Dockerfile-orioledb-17 b/Dockerfile-orioledb-17 new file mode 100644 index 000000000..f7c0d4f63 --- /dev/null +++ b/Dockerfile-orioledb-17 @@ -0,0 +1,240 @@ +# syntax=docker/dockerfile:1.6 +ARG postgresql_major=17-orioledb +ARG postgresql_release=${postgresql_major}.1 + +# Bump default build arg to build a package from source +# Bump vars.yml to specify runtime package version +ARG sfcgal_release=1.3.10 +ARG postgis_release=3.3.2 +ARG pgrouting_release=3.4.1 +ARG pgtap_release=1.2.0 +ARG pg_cron_release=1.6.2 +ARG pgaudit_release=1.7.0 +ARG pgjwt_release=9742dab1b2f297ad3811120db7b21451bca2d3c9 +ARG pgsql_http_release=1.5.0 +ARG plpgsql_check_release=2.2.5 +ARG pg_safeupdate_release=1.4 +ARG timescaledb_release=2.9.1 +ARG wal2json_release=2_5 +ARG pljava_release=1.6.4 +ARG plv8_release=3.1.5 +ARG pg_plan_filter_release=5081a7b5cb890876e67d8e7486b6a64c38c9a492 +ARG pg_net_release=0.7.1 +ARG rum_release=1.3.13 +ARG pg_hashids_release=cd0e1b31d52b394a0df64079406a14a4f7387cd6 +ARG libsodium_release=1.0.18 +ARG pgsodium_release=3.1.6 +ARG pg_graphql_release=1.5.11 +ARG pg_stat_monitor_release=1.1.1 +ARG pg_jsonschema_release=0.1.4 +ARG pg_repack_release=1.4.8 +ARG vault_release=0.2.8 +ARG groonga_release=12.0.8 +ARG pgroonga_release=2.4.0 +ARG wrappers_release=0.4.6 +ARG hypopg_release=1.3.1 +ARG pgvector_release=0.4.0 +ARG pg_tle_release=1.3.2 +ARG index_advisor_release=0.2.0 +ARG supautils_release=2.2.0 +ARG wal_g_release=3.0.5 + +FROM ubuntu:focal as base + +RUN apt update -y && apt install -y \ + curl \ + gnupg \ + lsb-release \ + software-properties-common \ + wget \ + sudo \ + tree \ + && apt clean + + +RUN adduser --system --home /var/lib/postgresql --no-create-home --shell /bin/bash --group --gecos "PostgreSQL administrator" postgres +RUN adduser --system --no-create-home --shell /bin/bash --group wal-g +RUN curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install linux \ +--init none \ +--no-confirm \ +--extra-conf "substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com" \ +--extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + +ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin" + +COPY . /nixpg + +WORKDIR /nixpg + +RUN nix profile install .#psql_orioledb-17/bin + +RUN nix store gc + +WORKDIR / + + +RUN mkdir -p /usr/lib/postgresql/bin \ + /usr/lib/postgresql/share/postgresql \ + /usr/share/postgresql \ + /var/lib/postgresql \ + && chown -R postgres:postgres /usr/lib/postgresql \ + && chown -R postgres:postgres /var/lib/postgresql \ + && chown -R postgres:postgres /usr/share/postgresql + +# Create symbolic links +RUN ln -s /nix/var/nix/profiles/default/bin/* /usr/lib/postgresql/bin/ \ + && ln -s /nix/var/nix/profiles/default/bin/* /usr/bin/ \ + && chown -R postgres:postgres /usr/bin + +# Create symbolic links for PostgreSQL shares +RUN ln -s /nix/var/nix/profiles/default/share/postgresql/* /usr/lib/postgresql/share/postgresql/ +RUN ln -s /nix/var/nix/profiles/default/share/postgresql/* /usr/share/postgresql/ +RUN chown -R postgres:postgres /usr/lib/postgresql/share/postgresql/ +RUN chown -R postgres:postgres /usr/share/postgresql/ +# Create symbolic links for contrib directory +RUN tree /nix > /tmp/tree.txt && cat /tmp/tree.txt && cat /tmp/tree.txt >&2 + +RUN chown -R postgres:postgres /usr/lib/postgresql + +RUN ln -sf /usr/lib/postgresql/share/postgresql/timezonesets /usr/share/postgresql/timezonesets + + +RUN apt-get update && \ + apt-get install -y --no-install-recommends tzdata + +RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && \ + dpkg-reconfigure --frontend noninteractive tzdata + +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + build-essential \ + checkinstall \ + cmake + +ENV PGDATA=/var/lib/postgresql/data + +#################### +# setup-wal-g.yml +#################### +FROM base as walg +ARG wal_g_release + +WORKDIR /nixpg + +RUN nix profile install .#wal-g-3 && \ + ln -s /nix/var/nix/profiles/default/bin/wal-g-3 /tmp/wal-g + +RUN nix store gc + +WORKDIR / +# #################### +# # Download gosu for easy step-down from root +# #################### +FROM base as gosu +ARG TARGETARCH +# Install dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + gnupg \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* +# Download binary +ARG GOSU_VERSION=1.16 +ARG GOSU_GPG_KEY=B42F6819007F00F88E364FD4036A9C25BF357DD4 +ADD https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$TARGETARCH \ + /usr/local/bin/gosu +ADD https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$TARGETARCH.asc \ + /usr/local/bin/gosu.asc +# Verify checksum +RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys $GOSU_GPG_KEY && \ + gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu && \ + gpgconf --kill all && \ + chmod +x /usr/local/bin/gosu + +# #################### +# # Build final image +# #################### +FROM gosu as production +RUN id postgres || (echo "postgres user does not exist" && exit 1) +# # Setup extensions +COPY --from=walg /tmp/wal-g /usr/local/bin/ + +# # Initialise configs +COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql.conf.j2 /etc/postgresql/postgresql.conf +COPY --chown=postgres:postgres ansible/files/postgresql_config/pg_hba.conf.j2 /etc/postgresql/pg_hba.conf +COPY --chown=postgres:postgres ansible/files/postgresql_config/pg_ident.conf.j2 /etc/postgresql/pg_ident.conf +COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql-stdout-log.conf /etc/postgresql/logging.conf +COPY --chown=postgres:postgres ansible/files/postgresql_config/supautils.conf.j2 /etc/postgresql-custom/supautils.conf +COPY --chown=postgres:postgres ansible/files/postgresql_extension_custom_scripts /etc/postgresql-custom/extension-custom-scripts +COPY --chown=postgres:postgres ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/lib/postgresql/bin/pgsodium_getkey.sh +COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_read_replica.conf.j2 /etc/postgresql-custom/read-replica.conf +COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.j2 /etc/postgresql-custom/wal-g.conf +COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh +COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh + +RUN sed -i \ + -e "s|#unix_socket_directories = '/tmp'|unix_socket_directories = '/var/run/postgresql'|g" \ + -e "s|#session_preload_libraries = ''|session_preload_libraries = 'supautils'|g" \ + -e "s|#include = '/etc/postgresql-custom/supautils.conf'|include = '/etc/postgresql-custom/supautils.conf'|g" \ + -e "s|#include = '/etc/postgresql-custom/wal-g.conf'|include = '/etc/postgresql-custom/wal-g.conf'|g" /etc/postgresql/postgresql.conf && \ + echo "cron.database_name = 'postgres'" >> /etc/postgresql/postgresql.conf && \ + #echo "pljava.libjvm_location = '/usr/lib/jvm/java-11-openjdk-${TARGETARCH}/lib/server/libjvm.so'" >> /etc/postgresql/postgresql.conf && \ + echo "pgsodium.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \ + echo "vault.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \ + echo 'auto_explain.log_min_duration = 10s' >> /etc/postgresql/postgresql.conf && \ + usermod -aG postgres wal-g && \ + mkdir -p /etc/postgresql-custom && \ + chown postgres:postgres /etc/postgresql-custom + + # Remove items from postgresql.conf +RUN sed -i 's/ timescaledb,//g;' "/etc/postgresql/postgresql.conf" + #as of pg 16.4 + this db_user_namespace totally deprecated and will break the server if setting is present +RUN sed -i 's/db_user_namespace = off/#db_user_namespace = off/g;' "/etc/postgresql/postgresql.conf" +RUN sed -i 's/ timescaledb,//g; s/ plv8,//g; s/ postgis,//g; s/ pgrouting,//g' "/etc/postgresql-custom/supautils.conf" +RUN sed -i 's/\(shared_preload_libraries.*\)'\''\(.*\)$/\1, orioledb'\''\2/' "/etc/postgresql/postgresql.conf" +RUN echo "default_table_access_method = 'orioledb'" >> "/etc/postgresql/postgresql.conf" + + + +# # Include schema migrations +COPY migrations/db /docker-entrypoint-initdb.d/ +COPY ansible/files/pgbouncer_config/pgbouncer_auth_schema.sql /docker-entrypoint-initdb.d/init-scripts/00-schema.sql +COPY ansible/files/stat_extension.sql /docker-entrypoint-initdb.d/migrations/00-extension.sql +# Enable orioledb extension first +RUN echo "CREATE EXTENSION orioledb;" > /docker-entrypoint-initdb.d/init-scripts/00-pre-init.sql && \ + chown postgres:postgres /docker-entrypoint-initdb.d/init-scripts/00-pre-init.sql + +# # Add upstream entrypoint script +COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu +ADD --chmod=0755 \ + https://github.com/docker-library/postgres/raw/master/17/bullseye/docker-entrypoint.sh \ + /usr/local/bin/ + +RUN mkdir -p /var/run/postgresql && chown postgres:postgres /var/run/postgresql + +ENTRYPOINT ["docker-entrypoint.sh"] + +HEALTHCHECK --interval=2s --timeout=2s --retries=10 CMD pg_isready -U postgres -h localhost +STOPSIGNAL SIGINT +EXPOSE 5432 + +ENV POSTGRES_HOST=/var/run/postgresql +ENV POSTGRES_USER=supabase_admin +ENV POSTGRES_DB=postgres +ENV POSTGRES_INITDB_ARGS="--allow-group-access --locale-provider=icu --encoding=UTF-8 --icu-locale=en_US.UTF-8" +RUN apt-get update && apt-get install -y --no-install-recommends \ + locales \ + && rm -rf /var/lib/apt/lists/* && \ + localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ + && localedef -i C -c -f UTF-8 -A /usr/share/locale/locale.alias C.UTF-8 +RUN echo "C.UTF-8 UTF-8" > /etc/locale.gen && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 +ENV LC_CTYPE=C.UTF-8 +ENV LC_COLLATE=C.UTF-8 +ENV LOCALE_ARCHIVE /usr/lib/locale/locale-archive +RUN mkdir -p /usr/share/postgresql/extension/ && \ + ln -s /usr/lib/postgresql/bin/pgsodium_getkey.sh /usr/share/postgresql/extension/pgsodium_getkey && \ + chmod +x /usr/lib/postgresql/bin/pgsodium_getkey.sh + +CMD ["postgres", "-D", "/etc/postgresql"] diff --git a/Dockerfile-u18 b/Dockerfile-u18 deleted file mode 100644 index 09cbfc61c..000000000 --- a/Dockerfile-u18 +++ /dev/null @@ -1,1010 +0,0 @@ -# syntax=docker/dockerfile:1.5-labs -ARG postgresql_major=15 -ARG postgresql_release=${postgresql_major}.1 - -# Bump default build arg to build a package from source -# Bump vars.yml to specify runtime package version -# ARG sfcgal_release=1.3.10 -# ARG postgis_release=3.3.2 -# ARG pgrouting_release=3.4.1 -# ARG pgtap_release=1.2.0 -# ARG pg_cron_release=1.4.2 -# ARG pgaudit_release=1.7.0 -# ARG pgjwt_release=9742dab1b2f297ad3811120db7b21451bca2d3c9 -# ARG pgsql_http_release=1.5.0 -# ARG plpgsql_check_release=2.2.5 -# ARG pg_safeupdate_release=1.4 -# ARG timescaledb_release=2.9.1 -# ARG wal2json_release=2_5 -# ARG pljava_release=1.6.4 -# ARG plv8_release=3.1.5 -# ARG pg_plan_filter_release=5081a7b5cb890876e67d8e7486b6a64c38c9a492 -# ARG pg_net_release=0.7.1 -# ARG rum_release=1.3.13 -# ARG pg_hashids_release=cd0e1b31d52b394a0df64079406a14a4f7387cd6 -# ARG libsodium_release=1.0.18 -# ARG pgsodium_release=3.1.6 -# ARG pg_graphql_release=1.2.2 -# ARG pg_stat_monitor_release=1.1.1 -# ARG pg_jsonschema_release=0.1.4 -# ARG vault_release=0.2.8 -# ARG groonga_release=12.0.8 -# ARG pgroonga_release=2.4.0 -# ARG wrappers_release=0.1.16 -# ARG hypopg_release=1.3.1 -# ARG pgvector_release=0.4.0 -# ARG pg_tle_release=1.0.3 -# ARG supautils_release=1.9.0 -# ARG wal_g_release=2.0.1 - -ARG postgresql_major=15 -ARG postgresql_release=15.1 -ARG postgresql_release_checksum=sha256:ea2cf059a85882654b989acd07edc121833164a30340faee0d3615cf7058e66c -ARG pgbouncer_release=1.19.0 -ARG pgbouncer_release_checksum=sha256:af0b05e97d0e1fd9ad45fe00ea6d2a934c63075f67f7e2ccef2ca59e3d8ce682 -ARG postgrest_release=11.2.0 -ARG postgrest_arm_release_checksum=sha1:42496254d6fb8aa5660b8b7586f1e6a40977e319 -ARG postgrest_x86_release_checksum=sha1:6c09ba1b97830e794a28ad7e475f7f8d20e759cc -ARG gotrue_release=2.92.1 -ARG gotrue_release_checksum=sha1:d893b5f0a433a087536773b961b96acbfd0bb55a -ARG aws_cli_release=2.2.7 -ARG golang_version=1.19.3 -ARG kong_release_target=bionic -ARG kong_deb=kong_2.8.1_arm64.deb -ARG kong_deb_checksum=sha1:2086f6ccf8454fe64435252fea4d29d736d7ec61 -ARG nginx_release=1.22.0 -ARG nginx_release_checksum=sha1:419efb77b80f165666e2ee406ad8ae9b845aba93 -ARG wal_g_release=2.0.1 -ARG sfcgal_release=1.3.10 -ARG sfcgal_release_checksum=sha256:4e39b3b2adada6254a7bdba6d297bb28e1a9835a9f879b74f37e2dab70203232 -ARG postgres_exporter_release=0.9.0 -ARG adminapi_release=0.48.0 -ARG adminmgr_release=0.10.0 -ARG postgis_release=3.3.2 -ARG postgis_release_checksum=sha256:9a2a219da005a1730a39d1959a1c7cec619b1efb009b65be80ffc25bad299068 -ARG pgrouting_release=3.4.1 -ARG pgrouting_release_checksum=sha256:a4e034efee8cf67582b67033d9c3ff714a09d8f5425339624879df50aff3f642 -ARG pgtap_release=1.2.0 -ARG pgtap_release_checksum=sha256:9c7c3de67ea41638e14f06da5da57bac6f5bd03fea05c165a0ec862205a5c052 -ARG pg_cron_release=1.4.2 -ARG pg_cron_release_checksum=sha256:3652722ea98d94d8e27bf5e708dd7359f55a818a43550d046c5064c98876f1a8 -ARG pgaudit_release=1.7.0 -ARG pgaudit_release_checksum=sha256:8f4a73e451c88c567e516e6cba7dc1e23bc91686bb6f1f77f8f3126d428a8bd8 -ARG pgjwt_release=9742dab1b2f297ad3811120db7b21451bca2d3c9 -ARG pgsql_http_release=1.5.0 -ARG pgsql_http_release_checksum=sha256:43efc9e82afcd110f205b86b8d28d1355d39b6b134161e9661a33a1346818f5d -ARG plpgsql_check_release=2.2.5 -ARG plpgsql_check_release_checksum=sha256:6c3a3c5faf3f9689425c6db8a6b20bf4cd5e7144a055e29538eae980c7232573 -ARG pg_safeupdate_release=1.4 -ARG pg_safeupdate_release_checksum=sha256:ff01d3d444d35924bd3d745c5695696292e2855042da4c30fe728fb3b6648122 -ARG timescaledb_release=2.9.1 -ARG timescaledb_release_checksum=sha256:883638f2e79d25ec88ee58f603f3c81c999b6364cb4c799919d363f04089b47b -ARG wal2json_release=2_5 -ARG wal2json_release_checksum=sha256:b516653575541cf221b99cf3f8be9b6821f6dbcfc125675c85f35090f824f00e -ARG supautils_release=1.9.0 -ARG supautils_release_checksum=sha256:bc2f2b6393f865e7db973630334e1ce8b561e8774e23cd14396192232fb59ad7 -ARG pljava_release=master -ARG pljava_release_checksum=sha256:e99b1c52f7b57f64c8986fe6ea4a6cc09d78e779c1643db060d0ac66c93be8b6 -ARG plv8_release=3.1.5 -ARG plv8_release_checksum=sha256:1e108d5df639e4c189e1c5bdfa2432a521c126ca89e7e5a969d46899ca7bf106 -ARG pg_plan_filter_release=5081a7b5cb890876e67d8e7486b6a64c38c9a492 -ARG pg_net_release=0.7.1 -ARG pg_net_release_checksum=sha256:f403019fbffe5b3ec28816957ef81279dea1db5b008e3fb3bc39181a5e361940 -ARG rum_release=1.3.13 -ARG rum_release_checksum=sha256:6ab370532c965568df6210bd844ac6ba649f53055e48243525b0b7e5c4d69a7d -ARG pg_hashids_release=cd0e1b31d52b394a0df64079406a14a4f7387cd6 -ARG vector_x86_deb=https://packages.timber.io/vector/0.22.3/vector_0.22.3-1_amd64.deb -ARG vector_arm_deb=https://packages.timber.io/vector/0.22.3/vector_0.22.3-1_arm64.deb -ARG libsodium_release=1.0.18 -ARG libsodium_release_checksum=sha256:6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1 -ARG pgsodium_release=3.1.8 -ARG pgsodium_release_checksum=sha256:4d027aeee5163f3f33740d269938a120d1593a41c3701c920d2a1de80aa97486 -ARG pg_graphql_release=1.2.3 -ARG pg_jsonschema_release=0.1.4 -ARG pg_stat_monitor_release=1.1.1 -ARG pg_stat_monitor_release_checksum=sha256:1756a02d5a6dd66b892d15920257c69a17a67d48d3d4e2f189b681b83001ec2a -ARG vault_release=0.2.9 -ARG vault_release_checksum=sha256:1e813216395c59bb94c92be47ce8b70ba19ccc0efbcdb1fb14ed6d34a42c6cdb -ARG groonga_release=13.0.1 -ARG groonga_release_checksum=sha256:1c2d1a6981c1ad3f02a11aff202b15ba30cb1c6147f1fa9195b519a2b728f8ba -ARG pgroonga_release=3.0.7 -ARG pgroonga_release_checksum=sha256:885ff3878cc30e9030e5fc56d561bc8b66df3ede1562c9d802bc0ea04fe5c203 -ARG wrappers_release=0.1.16 -ARG hypopg_release=1.3.1 -ARG hypopg_release_checksum=sha256:e7f01ee0259dc1713f318a108f987663d60f3041948c2ada57a94b469565ca8e -ARG pgvector_release=0.5.0 -ARG pgvector_release_checksum=sha256:d8aa3504b215467ca528525a6de12c3f85f9891b091ce0e5864dd8a9b757f77b -ARG pg_tle_release=1.0.4 -ARG pg_tle_release_checksum=sha256:679559584d83fb629c3b56825849fca4ff1fa3355b350aaaf8aa0b7b3460b08a - -#################### -# Setup Postgres PPA -#################### -FROM ubuntu:bionic as ppa -# Redeclare args for use in subsequent stages -ARG postgresql_major -RUN apt-get update && apt-get install -y --no-install-recommends \ - gnupg \ - ca-certificates \ - && rm -rf /var/lib/apt/lists/* -# Add Postgres PPA -# In the off-chance that the key in the repository expires, it can be replaced by running the following in the repository's root: -# gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys $NEW_POSTGRESQL_GPG_KEY -# gpg --export --armor $NEW_POSTGRESQL_GPG_KEY > postgresql.gpg.key -COPY postgresql.gpg.key /tmp/postgresql.gpg.key -RUN apt-key add /tmp/postgresql.gpg.key && \ - echo "deb https://apt-archive.postgresql.org/pub/repos/apt bionic-pgdg-archive main" > /etc/apt/sources.list.d/pgdg.list - -#################### -# Download pre-built postgres -#################### -FROM ppa as pg -ARG postgresql_release -# Download .deb packages -RUN apt-get update && apt-get install -y --no-install-recommends --download-only \ - postgresql-${postgresql_major}=${postgresql_release}-1.pgdg18.04+1 \ - && rm -rf /var/lib/apt/lists/* -RUN mv /var/cache/apt/archives/*.deb /tmp/ - -FROM ppa as pg-dev -ARG postgresql_release -# Download .deb packages -RUN apt-get update && apt-get install -y --no-install-recommends --download-only \ - postgresql-server-dev-${postgresql_major}=${postgresql_release}-1.pgdg18.04+1 \ - && rm -rf /var/lib/apt/lists/* -RUN mv /var/cache/apt/archives/*.deb /tmp/ - -#################### -# Install postgres -#################### -FROM ubuntu:bionic as base -# Redeclare args for use in subsequent stages -ARG TARGETARCH -ARG postgresql_major - -# Install postgres -COPY --from=pg /tmp /tmp -# Ref: https://github.com/docker-library/postgres/blob/master/15/bullseye/Dockerfile#L91 -ENV DEBIAN_FRONTEND=noninteractive -RUN set -ex; \ - export PYTHONDONTWRITEBYTECODE=1; \ - apt-get update; \ - apt-get install -y --no-install-recommends /tmp/postgresql-common_*.deb /tmp/postgresql-client-common_*.deb; \ - sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf; \ - apt-get install -y --no-install-recommends /tmp/*.deb; \ - rm -rf /var/lib/apt/lists/* /tmp/*; \ - find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' + - -ENV PATH=$PATH:/usr/lib/postgresql/${postgresql_major}/bin -ENV PGDATA=/var/lib/postgresql/data - -# Make the "en_US.UTF-8" locale so postgres will be utf-8 enabled by default -RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 -ENV LANG=en_US.UTF-8 -ENV LC_CTYPE=C.UTF-8 -ENV LC_COLLATE=C.UTF-8 - -FROM base as builder -# Install build dependencies -COPY --from=pg-dev /tmp /tmp -RUN apt-get update && apt-get install -y --no-install-recommends \ - /tmp/*.deb \ - build-essential \ - checkinstall \ - cmake \ - && rm -rf /var/lib/apt/lists/* /tmp/* - -FROM builder as ccache -# Cache large build artifacts -RUN apt-get update && apt-get install -y --no-install-recommends \ - clang \ - ccache \ - && rm -rf /var/lib/apt/lists/* -ENV CCACHE_DIR=/ccache -ENV PATH=/usr/lib/ccache:$PATH -# Used to update ccache -ARG CACHE_EPOCH - -#################### -# 01-postgis.yml -#################### -FROM ccache as sfcgal -# Download and extract -ARG sfcgal_release -ARG sfcgal_release_checksum -ADD --checksum=${sfcgal_release_checksum} \ - "https://supabase-public-artifacts-bucket.s3.amazonaws.com/sfcgal/SFCGAL-v$%7Bsfcgal_release%7D.tar.gz" \ - /tmp/sfcgal.tar.gz -RUN tar -xvf /tmp/sfcgal.tar.gz -C /tmp --one-top-level --strip-components 1 && \ - rm -rf /tmp/sfcgal.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y \ - libcgal-dev \ - libmpfr-dev \ - libgmp-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/sfcgal/build -RUN cmake .. -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=yes --fstrans=no --backup=no --pakdir=/tmp --pkgname=sfcgal --pkgversion=${sfcgal_release} --requires=libgmpxx4ldbl,libboost-serialization1.71.0,libmpfr6 --nodoc - -FROM sfcgal as postgis-source -# Download and extract -ARG postgis_release -ARG postgis_release_checksum -ADD --checksum=${postgis_release_checksum} \ - "https://supabase-public-artifacts-bucket.s3.amazonaws.com/postgis-$%7Bpostgis_release%7D.tar.gz" \ - /tmp/postgis.tar.gz -RUN tar -xvf /tmp/postgis.tar.gz -C /tmp && \ - rm -rf /tmp/postgis.tar.gz -# Install build dependencies -RUN apt-get update && apt --fix-broken install -y && apt-get install -y \ - protobuf-c-compiler \ - libgeos-dev \ - libproj-dev \ - libgdal-dev \ - libjson-c-dev \ - libxml2-dev \ - libprotobuf-c-dev \ - && rm -rf /var/lib/apt/lists/* - - -WORKDIR /tmp/sfcgal/build -RUN make install - -# Build from source -WORKDIR /tmp/postgis-${postgis_release} -RUN ./configure --with-sfcgal -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --requires=libgeos-c1v5,libproj15,libjson-c4,libprotobuf-c1,libgdal26 --nodoc - -FROM ppa as postgis -# Latest available is 3.3.2 -ARG postgis_release -# Download pre-built packages -RUN apt-get update && apt-get install -y --no-install-recommends --download-only \ - postgresql-${postgresql_major}-postgis-3=${postgis_release}+dfsg-1.pgdg18.04+1 \ - && rm -rf /var/lib/apt/lists/* -RUN mv /var/cache/apt/archives/*.deb /tmp/ - -#################### -# 02-pgrouting.yml -#################### -FROM ccache as pgrouting-source -# Download and extract -ARG pgrouting_release -ARG pgrouting_release_checksum -ADD --checksum=${pgrouting_release_checksum} \ - "https://github.com/pgRouting/pgrouting/releases/download/v$%7Bpgrouting_release%7D/pgrouting-$%7Bpgrouting_release%7D.tar.gz" \ - /tmp/pgrouting.tar.gz -RUN tar -xvf /tmp/pgrouting.tar.gz -C /tmp && \ - rm -rf /tmp/pgrouting.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - libboost-all-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/pgrouting-${pgrouting_release}/build -RUN cmake -DBUILD_HTML=OFF -DBUILD_DOXY=OFF .. -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --pkgname=pgrouting --pkgversion=${pgrouting_release} --nodoc - -FROM ppa as pgrouting -ARG pgrouting_release -# Download pre-built packages -RUN apt-get update && apt-get install -y --no-install-recommends --download-only \ - postgresql-${postgresql_major}-pgrouting=${pgrouting_release}-1.pgdg18.04+1 \ - && rm -rf /var/lib/apt/lists/* -RUN mv /var/cache/apt/archives/*.deb /tmp/ - -#################### -# 03-pgtap.yml -#################### -FROM builder as pgtap-source -# Download and extract -ARG pgtap_release -ARG pgtap_release_checksum -ADD --checksum=${pgtap_release_checksum} \ - "https://github.com/theory/pgtap/archive/v$%7Bpgtap_release%7D.tar.gz" \ - /tmp/pgtap.tar.gz -RUN tar -xvf /tmp/pgtap.tar.gz -C /tmp && \ - rm -rf /tmp/pgtap.tar.gz -# Build from source -WORKDIR /tmp/pgtap-${pgtap_release} -RUN make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 04-pg_cron.yml -#################### -FROM ccache as pg_cron-source -# Download and extract -ARG pg_cron_release -ARG pg_cron_release_checksum -ADD --checksum=${pg_cron_release_checksum} \ - "https://github.com/citusdata/pg_cron/archive/refs/tags/v$%7Bpg_cron_release%7D.tar.gz" \ - /tmp/pg_cron.tar.gz -RUN tar -xvf /tmp/pg_cron.tar.gz -C /tmp && \ - rm -rf /tmp/pg_cron.tar.gz -# Build from source -WORKDIR /tmp/pg_cron-${pg_cron_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 05-pgaudit.yml -#################### -FROM ccache as pgaudit-source -# Download and extract -ARG pgaudit_release -ARG pgaudit_release_checksum -ADD --checksum=${pgaudit_release_checksum} \ - "https://github.com/pgaudit/pgaudit/archive/refs/tags/$%7Bpgaudit_release%7D.tar.gz" \ - /tmp/pgaudit.tar.gz -RUN tar -xvf /tmp/pgaudit.tar.gz -C /tmp && \ - rm -rf /tmp/pgaudit.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - libssl-dev \ - libkrb5-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/pgaudit-${pgaudit_release} -ENV USE_PGXS=1 -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 06-pgjwt.yml -#################### -FROM builder as pgjwt-source -# Download and extract -ARG pgjwt_release -ADD "https://github.com/michelp/pgjwt.git#${pgjwt_release}" \ - /tmp/pgjwt-${pgjwt_release} -# Build from source -WORKDIR /tmp/pgjwt-${pgjwt_release} -RUN make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --pkgversion=1 --nodoc - -#################### -# 07-pgsql-http.yml -#################### -FROM ccache as pgsql-http-source -# Download and extract -ARG pgsql_http_release -ARG pgsql_http_release_checksum -ADD --checksum=${pgsql_http_release_checksum} \ - "https://github.com/pramsey/pgsql-http/archive/refs/tags/v$%7Bpgsql_http_release%7D.tar.gz" \ - /tmp/pgsql-http.tar.gz -RUN tar -xvf /tmp/pgsql-http.tar.gz -C /tmp && \ - rm -rf /tmp/pgsql-http.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - libcurl4-gnutls-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/pgsql-http-${pgsql_http_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --requires=libcurl3-gnutls --nodoc - -#################### -# 08-plpgsql_check.yml -#################### -FROM ccache as plpgsql_check-source -# Download and extract -ARG plpgsql_check_release -ARG plpgsql_check_release_checksum -ADD --checksum=${plpgsql_check_release_checksum} \ - "https://github.com/okbob/plpgsql_check/archive/refs/tags/v$%7Bplpgsql_check_release%7D.tar.gz" \ - /tmp/plpgsql_check.tar.gz -RUN tar -xvf /tmp/plpgsql_check.tar.gz -C /tmp && \ - rm -rf /tmp/plpgsql_check.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - libicu-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/plpgsql_check-${plpgsql_check_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 09-pg-safeupdate.yml -#################### -FROM ccache as pg-safeupdate-source -# Download and extract -ARG pg_safeupdate_release -ARG pg_safeupdate_release_checksum -ADD --checksum=${pg_safeupdate_release_checksum} \ - "https://github.com/eradman/pg-safeupdate/archive/refs/tags/$%7Bpg_safeupdate_release%7D.tar.gz" \ - /tmp/pg-safeupdate.tar.gz -RUN tar -xvf /tmp/pg-safeupdate.tar.gz -C /tmp && \ - rm -rf /tmp/pg-safeupdate.tar.gz -# Build from source -WORKDIR /tmp/pg-safeupdate-${pg_safeupdate_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 11-wal2json.yml -#################### -FROM ccache as wal2json-source -# Download and extract -ARG wal2json_release -ARG wal2json_release_checksum -ADD --checksum=${wal2json_release_checksum} \ - "https://github.com/eulerto/wal2json/archive/refs/tags/wal2json_$%7Bwal2json_release%7D.tar.gz" \ - /tmp/wal2json.tar.gz -RUN tar -xvf /tmp/wal2json.tar.gz -C /tmp --one-top-level --strip-components 1 && \ - rm -rf /tmp/wal2json.tar.gz -# Build from source -WORKDIR /tmp/wal2json -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -ENV version=${wal2json_release} -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --pkgversion="\${version/_/.}" --nodoc - -#################### -# 12-pljava.yml -#################### -FROM builder as pljava-source -# Download and extract -# TODO: revert to using main repo after PG15 support is merged: https://github.com/tada/pljava/pull/413 -ARG pljava_release=master -ARG pljava_release_checksum=sha256:e99b1c52f7b57f64c8986fe6ea4a6cc09d78e779c1643db060d0ac66c93be8b6 -ADD --checksum=${pljava_release_checksum} \ - "https://github.com/supabase/pljava/archive/refs/heads/$%7Bpljava_release%7D.tar.gz" \ - /tmp/pljava.tar.gz -RUN tar -xvf /tmp/pljava.tar.gz -C /tmp && \ - rm -rf /tmp/pljava.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - maven \ - default-jdk \ - libssl-dev \ - libkrb5-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/pljava-${pljava_release} -RUN mvn -T 1C clean install -Dmaven.test.skip -DskipTests -Dmaven.javadoc.skip=true -# Create debian package -RUN cp pljava-packaging/target/pljava-pg${postgresql_major}.jar /tmp/ - -FROM base as pljava -# Download pre-built packages -RUN apt-get update && apt-get install -y --no-install-recommends --download-only \ - default-jdk-headless \ - postgresql-${postgresql_major}-pljava \ - && rm -rf /var/lib/apt/lists/* -RUN mv /var/cache/apt/archives/*.deb /tmp/ - -#################### -# 13-plv8.yml -#################### -FROM ccache as plv8-source -# Download and extract -ARG plv8_release -ARG plv8_release_checksum -ADD --checksum=${plv8_release_checksum} \ - "https://github.com/plv8/plv8/archive/refs/tags/v$%7Bplv8_release%7D.tar.gz" \ - /tmp/plv8.tar.gz -RUN tar -xvf /tmp/plv8.tar.gz -C /tmp && \ - rm -rf /tmp/plv8.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - pkg-config \ - ninja-build \ - git \ - libtinfo5 \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/plv8-${plv8_release} -ENV DOCKER=1 -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -FROM scratch as plv8-deb -COPY --from=plv8-source /tmp/*.deb /tmp/ - -FROM ghcr.io/supabase/plv8:${plv8_release}-pg${postgresql_major} as plv8 - -#################### -# 14-pg_plan_filter.yml -#################### -FROM ccache as pg_plan_filter-source -# Download and extract -ARG pg_plan_filter_release -ADD "https://github.com/pgexperts/pg_plan_filter.git#${pg_plan_filter_release}" \ - /tmp/pg_plan_filter-${pg_plan_filter_release} -# Build from source -WORKDIR /tmp/pg_plan_filter-${pg_plan_filter_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --pkgversion=1 --nodoc - -#################### -# 15-pg_net.yml -#################### -FROM ccache as pg_net-source -# Download and extract -ARG pg_net_release -ARG pg_net_release_checksum -ADD --checksum=${pg_net_release_checksum} \ - "https://github.com/supabase/pg_net/archive/refs/tags/v$%7Bpg_net_release%7D.tar.gz" \ - /tmp/pg_net.tar.gz -RUN tar -xvf /tmp/pg_net.tar.gz -C /tmp && \ - rm -rf /tmp/pg_net.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - libcurl4-gnutls-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/pg_net-${pg_net_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --requires=libcurl3-gnutls --nodoc - -#################### -# 16-rum.yml -#################### -FROM ccache as rum-source -# Download and extract -ARG rum_release -ARG rum_release_checksum -ADD --checksum=${rum_release_checksum} \ - "https://github.com/postgrespro/rum/archive/refs/tags/$%7Brum_release%7D.tar.gz" \ - /tmp/rum.tar.gz -RUN tar -xvf /tmp/rum.tar.gz -C /tmp && \ - rm -rf /tmp/rum.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - systemtap-sdt-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/rum-${rum_release} -ENV USE_PGXS=1 -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 17-pg_hashids.yml -#################### -FROM ccache as pg_hashids-source -# Download and extract -ARG pg_hashids_release -ADD "https://github.com/iCyberon/pg_hashids.git#${pg_hashids_release}" \ - /tmp/pg_hashids-${pg_hashids_release} -# Build from source -WORKDIR /tmp/pg_hashids-${pg_hashids_release} -RUN make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --pkgversion=1 --nodoc - -#################### -# 18-pgsodium.yml -#################### -FROM ccache as libsodium -# Download and extract -ARG libsodium_release -ARG libsodium_release_checksum -ADD --checksum=${libsodium_release_checksum} \ - "https://download.libsodium.org/libsodium/releases/libsodium-$%7Blibsodium_release%7D.tar.gz" \ - /tmp/libsodium.tar.gz -RUN tar -xvf /tmp/libsodium.tar.gz -C /tmp && \ - rm -rf /tmp/libsodium.tar.gz -# Build from source -WORKDIR /tmp/libsodium-${libsodium_release} -RUN ./configure -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -RUN make install - -FROM libsodium as pgsodium-source -# Download and extract -ARG pgsodium_release -ARG pgsodium_release_checksum -ADD --checksum=${pgsodium_release_checksum} \ - "https://github.com/michelp/pgsodium/archive/refs/tags/v$%7Bpgsodium_release%7D.tar.gz" \ - /tmp/pgsodium.tar.gz -RUN tar -xvf /tmp/pgsodium.tar.gz -C /tmp && \ - rm -rf /tmp/pgsodium.tar.gz -# Build from source -WORKDIR /tmp/pgsodium-${pgsodium_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --requires=libsodium23 --nodoc - -#################### -# 19-pg_graphql.yml -#################### -FROM base as pg_graphql -# Download package archive -ARG pg_graphql_release -ADD "https://github.com/supabase/pg_graphql/releases/download/v$%7Bpg_graphql_release%7D/pg_graphql-v$%7Bpg_graphql_release%7D-pg$%7Bpostgresql_major%7D-$%7BTARGETARCH%7D-linux-gnu.deb" \ - /tmp/pg_graphql.deb - -#################### -# 20-pg_stat_monitor.yml -#################### -FROM ccache as pg_stat_monitor-source -# Download and extract -ARG pg_stat_monitor_release -ARG pg_stat_monitor_release_checksum -ADD --checksum=${pg_stat_monitor_release_checksum} \ - "https://github.com/percona/pg_stat_monitor/archive/refs/tags/$%7Bpg_stat_monitor_release%7D.tar.gz" \ - /tmp/pg_stat_monitor.tar.gz -RUN tar -xvf /tmp/pg_stat_monitor.tar.gz -C /tmp && \ - rm -rf /tmp/pg_stat_monitor.tar.gz -# Build from source -WORKDIR /tmp/pg_stat_monitor-${pg_stat_monitor_release} -ENV USE_PGXS=1 -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 21-auto_explain.yml -#################### - -#################### -# 22-pg_jsonschema.yml -#################### -FROM base as pg_jsonschema -# Download package archive -ARG pg_jsonschema_release -ADD "https://github.com/supabase/pg_jsonschema/releases/download/v$%7Bpg_jsonschema_release%7D/pg_jsonschema-v$%7Bpg_jsonschema_release%7D-pg$%7Bpostgresql_major%7D-$%7BTARGETARCH%7D-linux-gnu.deb" \ - /tmp/pg_jsonschema.deb - -#################### -# 23-vault.yml -#################### -FROM builder as vault-source -# Download and extract -ARG vault_release -ARG vault_release_checksum -ADD --checksum=${vault_release_checksum} \ - "https://github.com/supabase/vault/archive/refs/tags/v$%7Bvault_release%7D.tar.gz" \ - /tmp/vault.tar.gz -RUN tar -xvf /tmp/vault.tar.gz -C /tmp && \ - rm -rf /tmp/vault.tar.gz -# Build from source -WORKDIR /tmp/vault-${vault_release} -RUN make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 24-pgroonga.yml -#################### -FROM ccache as groonga -# Download and extract -ARG groonga_release -ARG groonga_release_checksum -ADD --checksum=${groonga_release_checksum} \ - "https://packages.groonga.org/source/groonga/groonga-$%7Bgroonga_release%7D.tar.gz" \ - /tmp/groonga.tar.gz -RUN tar -xvf /tmp/groonga.tar.gz -C /tmp && \ - rm -rf /tmp/groonga.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - zlib1g-dev \ - liblz4-dev \ - libzstd-dev \ - libmsgpack-dev \ - libzmq3-dev \ - libevent-dev \ - libmecab-dev \ - rapidjson-dev \ - pkg-config \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/groonga-${groonga_release} -RUN ./configure -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=yes --fstrans=no --backup=no --pakdir=/tmp --requires=zlib1g,liblz4-1,libzstd1,libmsgpackc2,libzmq5,libevent-2.1-7,libmecab2 --nodoc - -FROM groonga as pgroonga-source -# Download and extract -ARG pgroonga_release -ARG pgroonga_release_checksum -ADD --checksum=${pgroonga_release_checksum} \ - "https://packages.groonga.org/source/pgroonga/pgroonga-$%7Bpgroonga_release%7D.tar.gz" \ - /tmp/pgroonga.tar.gz -RUN tar -xvf /tmp/pgroonga.tar.gz -C /tmp && \ - rm -rf /tmp/pgroonga.tar.gz -# Build from source -WORKDIR /tmp/pgroonga-${pgroonga_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --requires=mecab-naist-jdic --nodoc - -FROM scratch as pgroonga-deb -COPY --from=pgroonga-source /tmp/*.deb /tmp/ - -FROM base as pgroonga -# Latest available is 3.0.3 -ARG pgroonga_release -# Download pre-built packages -ADD "https://packages.groonga.org/ubuntu/groonga-apt-source-latest-bionic.deb" /tmp/source.deb -RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - /tmp/source.deb \ - && rm -rf /var/lib/apt/lists/* -RUN rm /tmp/source.deb -RUN apt-get update && apt-get install -y --no-install-recommends --download-only \ - postgresql-${postgresql_major}-pgdg-pgroonga=${pgroonga_release}-1 \ - && rm -rf /var/lib/apt/lists/* -RUN mv /var/cache/apt/archives/*.deb /tmp/ - -#################### -# 25-wrappers.yml -#################### -FROM base as wrappers -# Download package archive -ARG wrappers_release -ADD "https://github.com/supabase/wrappers/releases/download/v$%7Bwrappers_release%7D/wrappers-v$%7Bwrappers_release%7D-pg$%7Bpostgresql_major%7D-$%7BTARGETARCH%7D-linux-gnu.deb" \ - /tmp/wrappers.deb - -#################### -# 26-hypopg.yml -#################### -FROM ccache as hypopg-source -# Download and extract -ARG hypopg_release -ARG hypopg_release_checksum -ADD --checksum=${hypopg_release_checksum} \ - "https://github.com/HypoPG/hypopg/archive/refs/tags/$%7Bhypopg_release%7D.tar.gz" \ - /tmp/hypopg.tar.gz -RUN tar -xvf /tmp/hypopg.tar.gz -C /tmp && \ - rm -rf /tmp/hypopg.tar.gz -# Build from source -WORKDIR /tmp/hypopg-${hypopg_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 28-pgvector.yml -#################### -FROM ccache as pgvector-source -ARG pgvector_release -ARG pgvector_release_checksum -ADD --checksum=${pgvector_release_checksum} \ - "https://github.com/pgvector/pgvector/archive/refs/tags/v$%7Bpgvector_release%7D.tar.gz" \ - /tmp/pgvector.tar.gz -RUN tar -xvf /tmp/pgvector.tar.gz -C /tmp && \ - rm -rf /tmp/pgvector.tar.gz -# Build from source -WORKDIR /tmp/pgvector-${pgvector_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# 29-pg_tle.yml -#################### -FROM ccache as pg_tle-source -ARG pg_tle_release -ARG pg_tle_release_checksum -ADD --checksum=${pg_tle_release_checksum} \ - "https://github.com/aws/pg_tle/archive/refs/tags/v$%7Bpg_tle_release%7D.tar.gz" \ - /tmp/pg_tle.tar.gz -RUN tar -xvf /tmp/pg_tle.tar.gz -C /tmp && \ - rm -rf /tmp/pg_tle.tar.gz -RUN apt-get update && apt-get install -y --no-install-recommends \ - flex \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/pg_tle-${pg_tle_release} -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --nodoc - -#################### -# internal/supautils.yml -#################### -FROM base as supautils -# Download package archive -ARG supautils_release -ADD "https://github.com/supabase/supautils/releases/download/v$%7Bsupautils_release%7D/supautils-v$%7Bsupautils_release%7D-pg$%7Bpostgresql_major%7D-$%7BTARGETARCH%7D-linux-gnu.deb" \ - /tmp/supautils.deb - -#################### -# Collect extension packages -#################### -FROM scratch as extensions -COPY --from=postgis-source /tmp/*.deb /tmp/ -COPY --from=pgrouting-source /tmp/*.deb /tmp/ -COPY --from=pgtap-source /tmp/*.deb /tmp/ -COPY --from=pg_cron-source /tmp/*.deb /tmp/ -COPY --from=pgaudit-source /tmp/*.deb /tmp/ -COPY --from=pgjwt-source /tmp/*.deb /tmp/ -COPY --from=pgsql-http-source /tmp/*.deb /tmp/ -COPY --from=plpgsql_check-source /tmp/*.deb /tmp/ -COPY --from=pg-safeupdate-source /tmp/*.deb /tmp/ -COPY --from=wal2json-source /tmp/*.deb /tmp/ -# COPY --from=pljava /tmp/*.deb /tmp/ -COPY --from=plv8 /tmp/*.deb /tmp/ -COPY --from=pg_plan_filter-source /tmp/*.deb /tmp/ -COPY --from=pg_net-source /tmp/*.deb /tmp/ -COPY --from=rum-source /tmp/*.deb /tmp/ -COPY --from=pgsodium-source /tmp/*.deb /tmp/ -COPY --from=pg_hashids-source /tmp/*.deb /tmp/ -COPY --from=pg_graphql /tmp/*.deb /tmp/ -COPY --from=pg_stat_monitor-source /tmp/*.deb /tmp/ -COPY --from=pg_jsonschema /tmp/*.deb /tmp/ -COPY --from=vault-source /tmp/*.deb /tmp/ -COPY --from=pgroonga-source /tmp/*.deb /tmp/ -COPY --from=wrappers /tmp/*.deb /tmp/ -COPY --from=hypopg-source /tmp/*.deb /tmp/ -COPY --from=pgvector-source /tmp/*.deb /tmp/ -COPY --from=pg_tle-source /tmp/*.deb /tmp/ -COPY --from=supautils /tmp/*.deb /tmp/ - -#################### -# Download gosu for easy step-down from root -#################### -FROM ubuntu:bionic as gosu -ARG TARGETARCH -# Install dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - gnupg \ - ca-certificates \ - && rm -rf /var/lib/apt/lists/* -# Download binary -ARG GOSU_VERSION=1.16 -ARG GOSU_GPG_KEY=B42F6819007F00F88E364FD4036A9C25BF357DD4 -ADD https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$TARGETARCH \ - /usr/local/bin/gosu -ADD https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$TARGETARCH.asc \ - /usr/local/bin/gosu.asc -# Verify checksum -RUN gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys $GOSU_GPG_KEY && \ - gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu && \ - gpgconf --kill all && \ - chmod +x /usr/local/bin/gosu - -#################### -# Build final image -#################### -FROM base as production - -# Setup extensions -COPY --from=extensions /tmp /tmp - -ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y --no-install-recommends \ - /tmp/*.deb \ - # Needed for anything using libcurl - # https://github.com/supabase/postgres/issues/573 - ca-certificates \ - && rm -rf /var/lib/apt/lists/* /tmp/* - -# Initialise configs -COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql.conf.j2 /etc/postgresql/postgresql.conf -COPY --chown=postgres:postgres ansible/files/postgresql_config/pg_hba.conf.j2 /etc/postgresql/pg_hba.conf -COPY --chown=postgres:postgres ansible/files/postgresql_config/pg_ident.conf.j2 /etc/postgresql/pg_ident.conf -COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql-stdout-log.conf /etc/postgresql/logging.conf -COPY --chown=postgres:postgres ansible/files/postgresql_config/supautils.conf.j2 /etc/postgresql-custom/supautils.conf -COPY --chown=postgres:postgres ansible/files/postgresql_extension_custom_scripts /etc/postgresql-custom/extension-custom-scripts -COPY --chown=postgres:postgres ansible/files/pgsodium_getkey_urandom.sh.j2 /usr/lib/postgresql/${postgresql_major}/bin/pgsodium_getkey.sh -COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.j2 /etc/postgresql-custom/wal-g.conf -COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh -COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh - -RUN sed -i \ - -e "s|#unix_socket_directories = '/tmp'|unix_socket_directories = '/var/run/postgresql'|g" \ - -e "s|#session_preload_libraries = ''|session_preload_libraries = 'supautils'|g" \ - -e "s|#include = '/etc/postgresql-custom/supautils.conf'|include = '/etc/postgresql-custom/supautils.conf'|g" \ - -e "s|#include = '/etc/postgresql-custom/wal-g.conf'|include = '/etc/postgresql-custom/wal-g.conf'|g" /etc/postgresql/postgresql.conf && \ - echo "cron.database_name = 'postgres'" >> /etc/postgresql/postgresql.conf && \ - echo "pljava.libjvm_location = '/usr/lib/jvm/java-11-openjdk-${TARGETARCH}/lib/server/libjvm.so'" >> /etc/postgresql/postgresql.conf && \ - echo "pgsodium.getkey_script= '/usr/lib/postgresql/${postgresql_major}/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \ - echo 'auto_explain.log_min_duration = 10s' >> /etc/postgresql/postgresql.conf && \ - useradd --create-home --shell /bin/bash wal-g -G postgres && \ - mkdir -p /etc/postgresql-custom && \ - chown postgres:postgres /etc/postgresql-custom - -# Include schema migrations -COPY migrations/db /docker-entrypoint-initdb.d/ -COPY ansible/files/pgbouncer_config/pgbouncer_auth_schema.sql /docker-entrypoint-initdb.d/init-scripts/00-schema.sql -COPY ansible/files/stat_extension.sql /docker-entrypoint-initdb.d/migrations/00-extension.sql - -# Add upstream entrypoint script -COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu -ADD --chmod=0755 \ - https://github.com/docker-library/postgres/raw/master/15/bullseye/docker-entrypoint.sh \ - /usr/local/bin/ -ENTRYPOINT ["docker-entrypoint.sh"] - -HEALTHCHECK --interval=2s --timeout=2s --retries=10 CMD pg_isready -U postgres -h localhost -STOPSIGNAL SIGINT -EXPOSE 5432 - -ENV POSTGRES_HOST=/var/run/postgresql -CMD ["postgres", "-D", "/etc/postgresql"] - -#################### -# Update build cache -#################### -FROM ccache as stats -COPY --from=extensions /tmp/*.deb /dev/null -# Additional packages that are separately built from source -# COPY --from=plv8-deb /tmp/*.deb /dev/null -# Cache mount is only populated by docker build --no-cache -RUN --mount=type=cache,target=/ccache,from=public.ecr.aws/supabase/postgres:ccache \ - ccache -s && \ - cp -r /ccache/* /tmp -FROM scratch as buildcache -COPY --from=stats /tmp / - -FROM ubuntu:bionic as pg_binary_collection_base -ARG postgresql_major -ARG postgresql_release -ENV DEBIAN_FRONTEND=noninteractive - -COPY --from=extensions /tmp/* /tmp/build/extensions/ -COPY ansible/files/postgres/* /tmp/build/ - -RUN echo "deb [ trusted=yes ] file:///tmp/build ./" > /etc/apt/sources.list.d/temp.list -RUN apt-get update && \ - apt-get install -y postgresql-${postgresql_major}=${postgresql_release}-1.pgdg18.04+1 --no-install-recommends && \ - apt-get install -y ca-certificates \ - libcurl3-gnutls libmecab2 libnghttp2-14 \ - libpsl5 librtmp1 libsodium23 mecab-naist-jdic \ - mecab-naist-jdic-eucjp mecab-utils publicsuffix -RUN rm -f /tmp/build/extensions/postgis* && \ - dpkg -i /tmp/build/extensions/* - -FROM ubuntu:bionic as pg_binary_collection -ARG postgresql_major -ARG postgresql_release - -RUN mkdir -p /tmp/pg_binaries/${postgresql_major} -COPY --from=pg_binary_collection_base /usr/lib/postgresql/${postgresql_major} /tmp/pg_binaries/${postgresql_major} -COPY --from=pg_binary_collection_base /var/lib/postgresql/extension /tmp/pg_binaries/${postgresql_major}/lib -COPY --from=pg_binary_collection_base /usr/lib/aarch64-linux-gnu/libpq.so.5 /tmp/pg_binaries/${postgresql_major}/lib -COPY --from=pg_binary_collection_base /usr/lib/aarch64-linux-gnu/libpq.so.5 /tmp/pg_binaries/${postgresql_major}/libpq.so.5 -COPY --from=pg_binary_collection_base /usr/lib/postgresql/lib /tmp/pg_binaries/${postgresql_major}/lib -COPY --from=pg_binary_collection_base /usr/share/postgresql/${postgresql_major} /tmp/pg_binaries/${postgresql_major}/share -COPY --from=pg_binary_collection_base /var/lib/postgresql/extension /tmp/pg_binaries/${postgresql_major}/share/extension - -RUN cd /tmp/pg_binaries && \ - tar czvf 18.04.tar.gz ${postgresql_major}/ && \ - rm -rf ${postgresql_major}/ diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..5bef8a430 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +UPSTREAM_NIX_GIT_SHA := $(shell git rev-parse HEAD) +GIT_SHA := $(shell git describe --tags --always --dirty) + +init: qemu-arm64-nix.pkr.hcl + packer init qemu-arm64-nix.pkr.hcl + +output-cloudimg/packer-cloudimg: ansible qemu-arm64-nix.pkr.hcl + packer build -var "git_sha=$(UPSTREAM_NIX_GIT_SHA)" qemu-arm64-nix.pkr.hcl + +disk/focal-raw.img: output-cloudimg/packer-cloudimg + mkdir -p disk + sudo qemu-img convert -O raw output-cloudimg/packer-cloudimg disk/focal-raw.img + +alpine-image: output-cloudimg/packer-cloudimg + sudo nerdctl build . -t supabase-postgres-test:$(GIT_SHA) -f ./Dockerfile-kubernetes + +clean: + rm -rf output-cloudimg + +.PHONY: alpine-image init clean diff --git a/README.md b/README.md index bb6b0fa13..d7b106cf8 100644 --- a/README.md +++ b/README.md @@ -3,66 +3,129 @@ Unmodified Postgres with some useful plugins. Our goal with this repo is not to modify Postgres, but to provide some of the most common extensions with a one-click install. ## Primary Features -- ✅ Postgres [15](https://www.postgresql.org/about/news/postgresql-15-released-2526/). +- ✅ Postgres [postgresql-15.8](https://www.postgresql.org/docs/15/index.html) +- ✅ Postgres [postgresql-17.4](https://www.postgresql.org/docs/17/index.html) +- ✅ Postgres [orioledb-postgresql-17_5](https://github.com/orioledb/orioledb) - ✅ Ubuntu 20.04 (Focal Fossa). - ✅ [wal_level](https://www.postgresql.org/docs/current/runtime-config-wal.html) = logical and [max_replication_slots](https://www.postgresql.org/docs/current/runtime-config-replication.html) = 5. Ready for replication. - ✅ [Large Systems Extensions](https://github.com/aws/aws-graviton-getting-started#building-for-graviton-and-graviton2). Enabled for ARM images. - ## Extensions + +### PostgreSQL 15 Extensions | Extension | Version | Description | | ------------- | :-------------: | ------------- | -| [Postgres contrib modules](https://www.postgresql.org/docs/current/contrib.html) | - | Because everyone should enable `pg_stat_statements`. | -| [PostGIS](https://postgis.net/) | [3.3.2](https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.3.2/NEWS) | Postgres' most popular extension - support for geographic objects. | -| [pgRouting](https://pgrouting.org/) | [v3.4.1](https://github.com/pgRouting/pgrouting/releases/tag/v3.4.1) | Extension of PostGIS - provides geospatial routing functionalities. | -| [pgTAP](https://pgtap.org/) | [v1.2.0](https://github.com/theory/pgtap/releases/tag/v1.2.0) | Unit Testing for Postgres. | -| [pg_cron](https://github.com/citusdata/pg_cron) | [v1.4.2](https://github.com/citusdata/pg_cron/releases/tag/v1.4.2) | Run CRON jobs inside Postgres. | -| [pgAudit](https://www.pgaudit.org/) | [1.7.0](https://github.com/pgaudit/pgaudit/releases/tag/1.7.0) | Generate highly compliant audit logs. | -| [pgjwt](https://github.com/michelp/pgjwt) | [commit](https://github.com/michelp/pgjwt/commit/9742dab1b2f297ad3811120db7b21451bca2d3c9) | Generate JSON Web Tokens (JWT) in Postgres. | -| [pgsql-http](https://github.com/pramsey/pgsql-http) | [1.5.0](https://github.com/pramsey/pgsql-http/releases/tag/v1.5.0) | HTTP client for Postgres. | -| [plpgsql_check](https://github.com/okbob/plpgsql_check) | [2.2.3](https://github.com/okbob/plpgsql_check/releases/tag/v2.2.3) | Linter tool for PL/pgSQL. | -| [pg-safeupdate](https://github.com/eradman/pg-safeupdate) | [1.4](https://github.com/eradman/pg-safeupdate/releases/tag/1.4) | Protect your data from accidental updates or deletes. | -| [wal2json](https://github.com/eulerto/wal2json) | [commit](https://github.com/eulerto/wal2json/commit/53b548a29ebd6119323b6eb2f6013d7c5fe807ec) | JSON output plugin for logical replication decoding. | -| [PL/Java](https://github.com/tada/pljava) | [1.6.4](https://github.com/tada/pljava/releases/tag/V1_6_4) | Write in Java functions in Postgres. | -| [plv8](https://github.com/plv8/plv8) | [commit](https://github.com/plv8/plv8/commit/bcddd92f71530e117f2f98b92d206dafe824f73a) | Write in Javascript functions in Postgres. | -| [pg_plan_filter](https://github.com/pgexperts/pg_plan_filter) | [commit](https://github.com/pgexperts/pg_plan_filter/commit/5081a7b5cb890876e67d8e7486b6a64c38c9a492) | Only allow statements that fulfill set criteria to be executed. | -| [pg_net](https://github.com/supabase/pg_net) | [v0.6.1](https://github.com/supabase/pg_net/releases/tag/v0.6.1) | Expose the SQL interface for async networking. | -| [rum](https://github.com/postgrespro/rum) | [1.3.13](https://github.com/postgrespro/rum/releases/tag/1.3.13) | An alternative to the GIN index. | -| [pg_hashids](https://github.com/iCyberon/pg_hashids) | [commit](https://github.com/iCyberon/pg_hashids/commit/83398bcbb616aac2970f5e77d93a3200f0f28e74) | Generate unique identifiers from numbers. | -| [pgsodium](https://github.com/michelp/pgsodium) | [3.1.0](https://github.com/michelp/pgsodium/releases/tag/2.0.0) | Modern encryption API using libsodium. | -| [pg_stat_monitor](https://github.com/percona/pg_stat_monitor) | [1.0.1](https://github.com/percona/pg_stat_monitor/releases/tag/1.0.1) | Query Performance Monitoring Tool for PostgreSQL -| [pgvector](https://github.com/pgvector/pgvector) | [v0.4.0](https://github.com/pgvector/pgvector/releases/tag/v0.4.0) | Open-source vector similarity search for Postgres -| [pg_repack](https://github.com/reorg/pg_repack) | [ver_1.4.8](https://github.com/reorg/pg_repack/releases/tag/ver_1.4.8) | Tool to remove bloat from tables and indexes - - -Can't find your favorite extension? Suggest for it to be added into future releases [here](https://github.com/supabase/supabase/discussions/679)! - -## Enhanced Security -*This is only available for our AWS EC2/ DO Droplet images* - -Aside from having [ufw](https://help.ubuntu.com/community/UFW),[fail2ban](https://www.fail2ban.org/wiki/index.php/Main_Page), and [unattended-upgrades](https://wiki.debian.org/UnattendedUpgrades) installed, we also have the following enhancements in place: -| Enhancement | Description | -| ------------- | ------------- | -| [fail2ban filter](https://github.com/supabase/postgres/blob/develop/ansible/files/fail2ban_config/filter-postgresql.conf.j2) for PostgreSQL access | Monitors for brute force attempts over at port `5432`. | -| [fail2ban filter](https://github.com/supabase/postgres/blob/develop/ansible/files/fail2ban_config/filter-pgbouncer.conf.j2) for PgBouncer access | Monitors for brute force attempts over at port `6543`. | - +| [hypopg](https://github.com/HypoPG/hypopg/archive/refs/tags/1.4.1.tar.gz) | [1.4.1](https://github.com/HypoPG/hypopg/archive/refs/tags/1.4.1.tar.gz) | Hypothetical Indexes for PostgreSQL | +| [index_advisor](https://github.com/olirice/index_advisor/archive/v0.2.0.tar.gz) | [0.2.0](https://github.com/olirice/index_advisor/archive/v0.2.0.tar.gz) | Recommend indexes to improve query performance in PostgreSQL | +| [pg-safeupdate](https://github.com/eradman/pg-safeupdate/archive/1.4.tar.gz) | [1.4](https://github.com/eradman/pg-safeupdate/archive/1.4.tar.gz) | A simple extension to PostgreSQL that requires criteria for UPDATE and DELETE | +| [pg_cron](https://github.com/citusdata/pg_cron/archive/v1.6.4.tar.gz) | [1.6.4](https://github.com/citusdata/pg_cron/archive/v1.6.4.tar.gz) | Run Cron jobs through PostgreSQL | +| [pg_graphql](https://github.com/supabase/pg_graphql/archive/v1.5.11.tar.gz) | [1.5.11](https://github.com/supabase/pg_graphql/archive/v1.5.11.tar.gz) | GraphQL support for PostreSQL | +| [pg_hashids](https://github.com/iCyberon/pg_hashids/archive/cd0e1b31d52b394a0df64079406a14a4f7387cd6.tar.gz) | [cd0e1b31d52b394a0df64079406a14a4f7387cd6](https://github.com/iCyberon/pg_hashids/archive/cd0e1b31d52b394a0df64079406a14a4f7387cd6.tar.gz) | Generate short unique IDs in PostgreSQL | +| [pg_jsonschema](https://github.com/supabase/pg_jsonschema/archive/v0.3.3.tar.gz) | [0.3.3](https://github.com/supabase/pg_jsonschema/archive/v0.3.3.tar.gz) | JSON Schema Validation for PostgreSQL | +| [pg_net](https://github.com/supabase/pg_net/archive/refs/tags/v0.14.0.tar.gz) | [0.14.0](https://github.com/supabase/pg_net/archive/refs/tags/v0.14.0.tar.gz) | Async networking for Postgres | +| [pg_plan_filter](https://github.com/pgexperts/pg_plan_filter/archive/5081a7b5cb890876e67d8e7486b6a64c38c9a492.tar.gz) | [5081a7b5cb890876e67d8e7486b6a64c38c9a492](https://github.com/pgexperts/pg_plan_filter/archive/5081a7b5cb890876e67d8e7486b6a64c38c9a492.tar.gz) | Filter PostgreSQL statements by execution plans | +| [pg_repack](https://github.com/reorg/pg_repack/archive/ver_1.5.2.tar.gz) | [1.5.2](https://github.com/reorg/pg_repack/archive/ver_1.5.2.tar.gz) | Reorganize tables in PostgreSQL databases with minimal locks | +| [pg_stat_monitor](https://github.com/percona/pg_stat_monitor/archive/refs/tags/2.1.0.tar.gz) | [2.1.0](https://github.com/percona/pg_stat_monitor/archive/refs/tags/2.1.0.tar.gz) | Query Performance Monitoring Tool for PostgreSQL | +| [pg_tle](https://github.com/aws/pg_tle/archive/refs/tags/v1.4.0.tar.gz) | [1.4.0](https://github.com/aws/pg_tle/archive/refs/tags/v1.4.0.tar.gz) | Framework for 'Trusted Language Extensions' in PostgreSQL | +| [pgaudit](https://github.com/pgaudit/pgaudit/archive/1.7.0.tar.gz) | [1.7.0](https://github.com/pgaudit/pgaudit/archive/1.7.0.tar.gz) | Open Source PostgreSQL Audit Logging | +| [pgjwt](https://github.com/michelp/pgjwt/archive/9742dab1b2f297ad3811120db7b21451bca2d3c9.tar.gz) | [9742dab1b2f297ad3811120db7b21451bca2d3c9](https://github.com/michelp/pgjwt/archive/9742dab1b2f297ad3811120db7b21451bca2d3c9.tar.gz) | PostgreSQL implementation of JSON Web Tokens | +| [pgmq](https://github.com/tembo-io/pgmq/archive/v1.4.4.tar.gz) | [1.4.4](https://github.com/tembo-io/pgmq/archive/v1.4.4.tar.gz) | A lightweight message queue. Like AWS SQS and RSMQ but on Postgres. | +| [pgroonga](https://packages.groonga.org/source/pgroonga/pgroonga-3.2.5.tar.gz) | [3.2.5](https://packages.groonga.org/source/pgroonga/pgroonga-3.2.5.tar.gz) | A PostgreSQL extension to use Groonga as the index | +| [pgrouting](https://github.com/pgRouting/pgrouting/archive/v3.4.1.tar.gz) | [3.4.1](https://github.com/pgRouting/pgrouting/archive/v3.4.1.tar.gz) | A PostgreSQL/PostGIS extension that provides geospatial routing functionality | +| [pgsodium](https://github.com/michelp/pgsodium/archive/refs/tags/v3.1.8.tar.gz) | [3.1.8](https://github.com/michelp/pgsodium/archive/refs/tags/v3.1.8.tar.gz) | Modern cryptography for PostgreSQL | +| [pgsql-http](https://github.com/pramsey/pgsql-http/archive/refs/tags/v1.6.1.tar.gz) | [1.6.1](https://github.com/pramsey/pgsql-http/archive/refs/tags/v1.6.1.tar.gz) | HTTP client for Postgres | +| [pgtap](https://github.com/theory/pgtap/archive/v1.2.0.tar.gz) | [1.2.0](https://github.com/theory/pgtap/archive/v1.2.0.tar.gz) | A unit testing framework for PostgreSQL | +| [pgvector](https://github.com/pgvector/pgvector/archive/refs/tags/v0.8.0.tar.gz) | [0.8.0](https://github.com/pgvector/pgvector/archive/refs/tags/v0.8.0.tar.gz) | Open-source vector similarity search for Postgres | +| [plpgsql-check](https://github.com/okbob/plpgsql_check/archive/v2.7.11.tar.gz) | [2.7.11](https://github.com/okbob/plpgsql_check/archive/v2.7.11.tar.gz) | Linter tool for language PL/pgSQL | +| [plv8](https://github.com/plv8/plv8/archive/v3.1.10.tar.gz) | [3.1.10](https://github.com/plv8/plv8/archive/v3.1.10.tar.gz) | V8 Engine Javascript Procedural Language add-on for PostgreSQL | +| [postgis](https://download.osgeo.org/postgis/source/postgis-3.3.7.tar.gz) | [3.3.7](https://download.osgeo.org/postgis/source/postgis-3.3.7.tar.gz) | Geographic Objects for PostgreSQL | +| [rum](https://github.com/postgrespro/rum/archive/1.3.14.tar.gz) | [1.3.14](https://github.com/postgrespro/rum/archive/1.3.14.tar.gz) | Full text search index method for PostgreSQL | +| [supabase-wrappers](https://github.com/supabase/wrappers/archive/v0.4.5.tar.gz) | [0.4.5](https://github.com/supabase/wrappers/archive/v0.4.5.tar.gz) | Various Foreign Data Wrappers (FDWs) for PostreSQL | +| [supautils](https://github.com/supabase/supautils/archive/refs/tags/v2.6.0.tar.gz) | [2.6.0](https://github.com/supabase/supautils/archive/refs/tags/v2.6.0.tar.gz) | PostgreSQL extension for enhanced security | +| [timescaledb-apache](https://github.com/timescale/timescaledb/archive/2.16.1.tar.gz) | [2.16.1](https://github.com/timescale/timescaledb/archive/2.16.1.tar.gz) | Scales PostgreSQL for time-series data via automatic partitioning across time and space | +| [vault](https://github.com/supabase/vault/archive/refs/tags/v0.2.9.tar.gz) | [0.2.9](https://github.com/supabase/vault/archive/refs/tags/v0.2.9.tar.gz) | Store encrypted secrets in PostgreSQL | +| [wal2json](https://github.com/eulerto/wal2json/archive/wal2json_2_6.tar.gz) | [2_6](https://github.com/eulerto/wal2json/archive/wal2json_2_6.tar.gz) | PostgreSQL JSON output plugin for changeset extraction | + +### PostgreSQL 17 Extensions +| Extension | Version | Description | +| ------------- | :-------------: | ------------- | +| [hypopg](https://github.com/HypoPG/hypopg/archive/refs/tags/1.4.1.tar.gz) | [1.4.1](https://github.com/HypoPG/hypopg/archive/refs/tags/1.4.1.tar.gz) | Hypothetical Indexes for PostgreSQL | +| [index_advisor](https://github.com/olirice/index_advisor/archive/v0.2.0.tar.gz) | [0.2.0](https://github.com/olirice/index_advisor/archive/v0.2.0.tar.gz) | Recommend indexes to improve query performance in PostgreSQL | +| [pg-safeupdate](https://github.com/eradman/pg-safeupdate/archive/1.4.tar.gz) | [1.4](https://github.com/eradman/pg-safeupdate/archive/1.4.tar.gz) | A simple extension to PostgreSQL that requires criteria for UPDATE and DELETE | +| [pg_backtrace](https://github.com/pashkinelfe/pg_backtrace/archive/d100bac815a7365e199263f5b3741baf71b14c70.tar.gz) | [1.1](https://github.com/pashkinelfe/pg_backtrace/archive/d100bac815a7365e199263f5b3741baf71b14c70.tar.gz) | Updated fork of pg_backtrace | +| [pg_cron](https://github.com/citusdata/pg_cron/archive/v1.6.4.tar.gz) | [1.6.4](https://github.com/citusdata/pg_cron/archive/v1.6.4.tar.gz) | Run Cron jobs through PostgreSQL | +| [pg_graphql](https://github.com/supabase/pg_graphql/archive/v1.5.11.tar.gz) | [1.5.11](https://github.com/supabase/pg_graphql/archive/v1.5.11.tar.gz) | GraphQL support for PostreSQL | +| [pg_hashids](https://github.com/iCyberon/pg_hashids/archive/cd0e1b31d52b394a0df64079406a14a4f7387cd6.tar.gz) | [cd0e1b31d52b394a0df64079406a14a4f7387cd6](https://github.com/iCyberon/pg_hashids/archive/cd0e1b31d52b394a0df64079406a14a4f7387cd6.tar.gz) | Generate short unique IDs in PostgreSQL | +| [pg_jsonschema](https://github.com/supabase/pg_jsonschema/archive/v0.3.3.tar.gz) | [0.3.3](https://github.com/supabase/pg_jsonschema/archive/v0.3.3.tar.gz) | JSON Schema Validation for PostgreSQL | +| [pg_net](https://github.com/supabase/pg_net/archive/refs/tags/v0.14.0.tar.gz) | [0.14.0](https://github.com/supabase/pg_net/archive/refs/tags/v0.14.0.tar.gz) | Async networking for Postgres | +| [pg_plan_filter](https://github.com/pgexperts/pg_plan_filter/archive/5081a7b5cb890876e67d8e7486b6a64c38c9a492.tar.gz) | [5081a7b5cb890876e67d8e7486b6a64c38c9a492](https://github.com/pgexperts/pg_plan_filter/archive/5081a7b5cb890876e67d8e7486b6a64c38c9a492.tar.gz) | Filter PostgreSQL statements by execution plans | +| [pg_repack](https://github.com/reorg/pg_repack/archive/ver_1.5.2.tar.gz) | [1.5.2](https://github.com/reorg/pg_repack/archive/ver_1.5.2.tar.gz) | Reorganize tables in PostgreSQL databases with minimal locks | +| [pg_stat_monitor](https://github.com/percona/pg_stat_monitor/archive/refs/tags/2.1.0.tar.gz) | [2.1.0](https://github.com/percona/pg_stat_monitor/archive/refs/tags/2.1.0.tar.gz) | Query Performance Monitoring Tool for PostgreSQL | +| [pg_tle](https://github.com/aws/pg_tle/archive/refs/tags/v1.4.0.tar.gz) | [1.4.0](https://github.com/aws/pg_tle/archive/refs/tags/v1.4.0.tar.gz) | Framework for 'Trusted Language Extensions' in PostgreSQL | +| [pgaudit](https://github.com/pgaudit/pgaudit/archive/17.0.tar.gz) | [17.0](https://github.com/pgaudit/pgaudit/archive/17.0.tar.gz) | Open Source PostgreSQL Audit Logging | +| [pgmq](https://github.com/tembo-io/pgmq/archive/v1.4.4.tar.gz) | [1.4.4](https://github.com/tembo-io/pgmq/archive/v1.4.4.tar.gz) | A lightweight message queue. Like AWS SQS and RSMQ but on Postgres. | +| [pgroonga](https://packages.groonga.org/source/pgroonga/pgroonga-3.2.5.tar.gz) | [3.2.5](https://packages.groonga.org/source/pgroonga/pgroonga-3.2.5.tar.gz) | A PostgreSQL extension to use Groonga as the index | +| [pgrouting](https://github.com/pgRouting/pgrouting/archive/v3.4.1.tar.gz) | [3.4.1](https://github.com/pgRouting/pgrouting/archive/v3.4.1.tar.gz) | A PostgreSQL/PostGIS extension that provides geospatial routing functionality | +| [pgsodium](https://github.com/michelp/pgsodium/archive/refs/tags/v3.1.8.tar.gz) | [3.1.8](https://github.com/michelp/pgsodium/archive/refs/tags/v3.1.8.tar.gz) | Modern cryptography for PostgreSQL | +| [pgsql-http](https://github.com/pramsey/pgsql-http/archive/refs/tags/v1.6.1.tar.gz) | [1.6.1](https://github.com/pramsey/pgsql-http/archive/refs/tags/v1.6.1.tar.gz) | HTTP client for Postgres | +| [pgtap](https://github.com/theory/pgtap/archive/v1.2.0.tar.gz) | [1.2.0](https://github.com/theory/pgtap/archive/v1.2.0.tar.gz) | A unit testing framework for PostgreSQL | +| [pgvector](https://github.com/pgvector/pgvector/archive/refs/tags/v0.8.0.tar.gz) | [0.8.0](https://github.com/pgvector/pgvector/archive/refs/tags/v0.8.0.tar.gz) | Open-source vector similarity search for Postgres | +| [plpgsql-check](https://github.com/okbob/plpgsql_check/archive/v2.7.11.tar.gz) | [2.7.11](https://github.com/okbob/plpgsql_check/archive/v2.7.11.tar.gz) | Linter tool for language PL/pgSQL | +| [postgis](https://download.osgeo.org/postgis/source/postgis-3.3.7.tar.gz) | [3.3.7](https://download.osgeo.org/postgis/source/postgis-3.3.7.tar.gz) | Geographic Objects for PostgreSQL | +| [rum](https://github.com/postgrespro/rum/archive/1.3.14.tar.gz) | [1.3.14](https://github.com/postgrespro/rum/archive/1.3.14.tar.gz) | Full text search index method for PostgreSQL | +| [supabase-wrappers](https://github.com/supabase/wrappers/archive/v0.4.4.tar.gz) | [0.4.4](https://github.com/supabase/wrappers/archive/v0.4.4.tar.gz) | Various Foreign Data Wrappers (FDWs) for PostreSQL | +| [supautils](https://github.com/supabase/supautils/archive/refs/tags/v2.6.0.tar.gz) | [2.6.0](https://github.com/supabase/supautils/archive/refs/tags/v2.6.0.tar.gz) | PostgreSQL extension for enhanced security | +| [vault](https://github.com/supabase/vault/archive/refs/tags/v0.2.9.tar.gz) | [0.2.9](https://github.com/supabase/vault/archive/refs/tags/v0.2.9.tar.gz) | Store encrypted secrets in PostgreSQL | +| [wal2json](https://github.com/eulerto/wal2json/archive/wal2json_2_6.tar.gz) | [2_6](https://github.com/eulerto/wal2json/archive/wal2json_2_6.tar.gz) | PostgreSQL JSON output plugin for changeset extraction | + +### PostgreSQL orioledb-17 Extensions +| Extension | Version | Description | +| ------------- | :-------------: | ------------- | +| [hypopg](https://github.com/HypoPG/hypopg/archive/refs/tags/1.4.1.tar.gz) | [1.4.1](https://github.com/HypoPG/hypopg/archive/refs/tags/1.4.1.tar.gz) | Hypothetical Indexes for PostgreSQL | +| [index_advisor](https://github.com/olirice/index_advisor/archive/v0.2.0.tar.gz) | [0.2.0](https://github.com/olirice/index_advisor/archive/v0.2.0.tar.gz) | Recommend indexes to improve query performance in PostgreSQL | +| [orioledb](https://github.com/orioledb/orioledb/archive/beta9.tar.gz) | [orioledb](https://github.com/orioledb/orioledb/archive/beta9.tar.gz) | orioledb | +| [pg-safeupdate](https://github.com/eradman/pg-safeupdate/archive/1.4.tar.gz) | [1.4](https://github.com/eradman/pg-safeupdate/archive/1.4.tar.gz) | A simple extension to PostgreSQL that requires criteria for UPDATE and DELETE | +| [pg_cron](https://github.com/citusdata/pg_cron/archive/v1.6.4.tar.gz) | [1.6.4](https://github.com/citusdata/pg_cron/archive/v1.6.4.tar.gz) | Run Cron jobs through PostgreSQL | +| [pg_graphql](https://github.com/supabase/pg_graphql/archive/v1.5.11.tar.gz) | [1.5.11](https://github.com/supabase/pg_graphql/archive/v1.5.11.tar.gz) | GraphQL support for PostreSQL | +| [pg_hashids](https://github.com/iCyberon/pg_hashids/archive/cd0e1b31d52b394a0df64079406a14a4f7387cd6.tar.gz) | [cd0e1b31d52b394a0df64079406a14a4f7387cd6](https://github.com/iCyberon/pg_hashids/archive/cd0e1b31d52b394a0df64079406a14a4f7387cd6.tar.gz) | Generate short unique IDs in PostgreSQL | +| [pg_jsonschema](https://github.com/supabase/pg_jsonschema/archive/v0.3.3.tar.gz) | [0.3.3](https://github.com/supabase/pg_jsonschema/archive/v0.3.3.tar.gz) | JSON Schema Validation for PostgreSQL | +| [pg_net](https://github.com/supabase/pg_net/archive/refs/tags/v0.14.0.tar.gz) | [0.14.0](https://github.com/supabase/pg_net/archive/refs/tags/v0.14.0.tar.gz) | Async networking for Postgres | +| [pg_plan_filter](https://github.com/pgexperts/pg_plan_filter/archive/5081a7b5cb890876e67d8e7486b6a64c38c9a492.tar.gz) | [5081a7b5cb890876e67d8e7486b6a64c38c9a492](https://github.com/pgexperts/pg_plan_filter/archive/5081a7b5cb890876e67d8e7486b6a64c38c9a492.tar.gz) | Filter PostgreSQL statements by execution plans | +| [pg_repack](https://github.com/reorg/pg_repack/archive/ver_1.5.2.tar.gz) | [1.5.2](https://github.com/reorg/pg_repack/archive/ver_1.5.2.tar.gz) | Reorganize tables in PostgreSQL databases with minimal locks | +| [pg_stat_monitor](https://github.com/percona/pg_stat_monitor/archive/refs/tags/2.1.0.tar.gz) | [2.1.0](https://github.com/percona/pg_stat_monitor/archive/refs/tags/2.1.0.tar.gz) | Query Performance Monitoring Tool for PostgreSQL | +| [pg_tle](https://github.com/aws/pg_tle/archive/refs/tags/v1.4.0.tar.gz) | [1.4.0](https://github.com/aws/pg_tle/archive/refs/tags/v1.4.0.tar.gz) | Framework for 'Trusted Language Extensions' in PostgreSQL | +| [pgaudit](https://github.com/pgaudit/pgaudit/archive/17.0.tar.gz) | [17.0](https://github.com/pgaudit/pgaudit/archive/17.0.tar.gz) | Open Source PostgreSQL Audit Logging | +| [pgmq](https://github.com/tembo-io/pgmq/archive/v1.4.4.tar.gz) | [1.4.4](https://github.com/tembo-io/pgmq/archive/v1.4.4.tar.gz) | A lightweight message queue. Like AWS SQS and RSMQ but on Postgres. | +| [pgroonga](https://packages.groonga.org/source/pgroonga/pgroonga-3.2.5.tar.gz) | [3.2.5](https://packages.groonga.org/source/pgroonga/pgroonga-3.2.5.tar.gz) | A PostgreSQL extension to use Groonga as the index | +| [pgrouting](https://github.com/pgRouting/pgrouting/archive/v3.4.1.tar.gz) | [3.4.1](https://github.com/pgRouting/pgrouting/archive/v3.4.1.tar.gz) | A PostgreSQL/PostGIS extension that provides geospatial routing functionality | +| [pgsodium](https://github.com/michelp/pgsodium/archive/refs/tags/v3.1.8.tar.gz) | [3.1.8](https://github.com/michelp/pgsodium/archive/refs/tags/v3.1.8.tar.gz) | Modern cryptography for PostgreSQL | +| [pgsql-http](https://github.com/pramsey/pgsql-http/archive/refs/tags/v1.6.1.tar.gz) | [1.6.1](https://github.com/pramsey/pgsql-http/archive/refs/tags/v1.6.1.tar.gz) | HTTP client for Postgres | +| [pgtap](https://github.com/theory/pgtap/archive/v1.2.0.tar.gz) | [1.2.0](https://github.com/theory/pgtap/archive/v1.2.0.tar.gz) | A unit testing framework for PostgreSQL | +| [pgvector](https://github.com/pgvector/pgvector/archive/refs/tags/v0.8.0.tar.gz) | [0.8.0](https://github.com/pgvector/pgvector/archive/refs/tags/v0.8.0.tar.gz) | Open-source vector similarity search for Postgres | +| [plpgsql-check](https://github.com/okbob/plpgsql_check/archive/v2.7.11.tar.gz) | [2.7.11](https://github.com/okbob/plpgsql_check/archive/v2.7.11.tar.gz) | Linter tool for language PL/pgSQL | +| [postgis](https://download.osgeo.org/postgis/source/postgis-3.3.7.tar.gz) | [3.3.7](https://download.osgeo.org/postgis/source/postgis-3.3.7.tar.gz) | Geographic Objects for PostgreSQL | +| [rum](https://github.com/postgrespro/rum/archive/1.3.14.tar.gz) | [1.3.14](https://github.com/postgrespro/rum/archive/1.3.14.tar.gz) | Full text search index method for PostgreSQL | +| [supabase-wrappers](https://github.com/supabase/wrappers/archive/v0.4.5.tar.gz) | [0.4.5](https://github.com/supabase/wrappers/archive/v0.4.5.tar.gz) | Various Foreign Data Wrappers (FDWs) for PostreSQL | +| [supautils](https://github.com/supabase/supautils/archive/refs/tags/v2.6.0.tar.gz) | [2.6.0](https://github.com/supabase/supautils/archive/refs/tags/v2.6.0.tar.gz) | PostgreSQL extension for enhanced security | +| [vault](https://github.com/supabase/vault/archive/refs/tags/v0.2.9.tar.gz) | [0.2.9](https://github.com/supabase/vault/archive/refs/tags/v0.2.9.tar.gz) | Store encrypted secrets in PostgreSQL | +| [wal2json](https://github.com/eulerto/wal2json/archive/wal2json_2_6.tar.gz) | [2_6](https://github.com/eulerto/wal2json/archive/wal2json_2_6.tar.gz) | PostgreSQL JSON output plugin for changeset extraction | ## Additional Goodies -*This is only available for our AWS EC2/ DO Droplet images* +*This is only available for our AWS EC2* | Goodie | Version | Description | | ------------- | :-------------: | ------------- | -| [PgBouncer](https://www.pgbouncer.org/) | [1.16.1](http://www.pgbouncer.org/changelog.html#pgbouncer-116x) | Set up Connection Pooling. | -| [PostgREST](https://postgrest.org/en/stable/) | [v10.1.1](https://github.com/PostgREST/postgrest/releases/tag/v10.1.1) | Instantly transform your database into an RESTful API. | -| [WAL-G](https://github.com/wal-g/wal-g#wal-g) | [v2.0.1](https://github.com/wal-g/wal-g/releases/tag/v2.0.1) | Tool for physical database backup and recovery. | +| [PgBouncer](https://www.pgbouncer.org/) | [1.19.0](http://www.pgbouncer.org/changelog.html#pgbouncer-119x) | Set up Connection Pooling. | +| [PostgREST](https://postgrest.org/en/stable/) | [v12.2.3](https://github.com/PostgREST/postgrest/releases/tag/v12.2.3) | Instantly transform your database into an RESTful API. | +| [WAL-G](https://github.com/wal-g/wal-g#wal-g) | [v2.0.1](https://github.com/wal-g/wal-g/releases/tag/v2.0.1) | Tool for physical database backup and recovery. | --> ## Install See all installation instructions in the [repo wiki](https://github.com/supabase/postgres/wiki). [![Docker](https://github.com/supabase/postgres/blob/develop/docs/img/docker.png)](https://github.com/supabase/postgres/wiki/Docker) -[![Digital Ocean](https://github.com/supabase/postgres/blob/develop/docs/img/digital-ocean.png)](https://github.com/supabase/postgres/wiki/Digital-Ocean) [![AWS](https://github.com/supabase/postgres/blob/develop/docs/img/aws.png)](https://github.com/supabase/postgres/wiki/AWS-EC2) -### Marketplace Images + ## Motivation - Make it fast and simple to get started with Postgres. - Show off a few of Postgres' most exciting features. - This is the same build we offer at [Supabase](https://supabase.io). - -## Roadmap - -- [Support for more images](https://github.com/supabase/postgres/issues/4) -- [Vote for more plugins/extensions](https://github.com/supabase/postgres/issues/5) - Open a github issue if you have a feature request ## License diff --git a/amazon-arm64.pkr.hcl b/amazon-arm64-nix.pkr.hcl similarity index 87% rename from amazon-arm64.pkr.hcl rename to amazon-arm64-nix.pkr.hcl index 884a8944b..e460dfc72 100644 --- a/amazon-arm64.pkr.hcl +++ b/amazon-arm64-nix.pkr.hcl @@ -92,12 +92,21 @@ variable "force-deregister" { default = false } +packer { + required_plugins { + amazon = { + source = "github.com/hashicorp/amazon" + version = "~> 1" + } + } +} + # source block source "amazon-ebssurrogate" "source" { profile = "${var.profile}" #access_key = "${var.aws_access_key}" #ami_name = "${var.ami_name}-arm64-${formatdate("YYYY-MM-DD-hhmm", timestamp())}" - ami_name = "${var.ami_name}-${var.postgres-version}" + ami_name = "${var.ami_name}-${var.postgres-version}-stage-1" ami_virtualization_type = "hvm" ami_architecture = "arm64" ami_regions = "${var.ami_regions}" @@ -155,7 +164,7 @@ source "amazon-ebssurrogate" "source" { tags = { creator = "packer" appType = "postgres" - postgresVersion = "${var.postgres-version}" + postgresVersion = "${var.postgres-version}-stage1" sourceSha = "${var.git-head-version}" } @@ -171,6 +180,8 @@ source "amazon-ebssurrogate" "source" { volume_size = 10 volume_type = "gp2" } + + associate_public_ip_address = true } # a build block invokes sources and runs provisioning steps on them. @@ -193,8 +204,8 @@ build { } provisioner "file" { - source = "ebssurrogate/scripts/chroot-bootstrap.sh" - destination = "/tmp/chroot-bootstrap.sh" + source = "ebssurrogate/scripts/chroot-bootstrap-nix.sh" + destination = "/tmp/chroot-bootstrap-nix.sh" } provisioner "file" { @@ -217,11 +228,6 @@ build { destination = "/tmp" } - provisioner "file" { - source = "ebssurrogate/files/unit-tests" - destination = "/tmp" - } - # Copy ansible playbook provisioner "shell" { inline = ["mkdir /tmp/ansible-playbook"] @@ -237,17 +243,23 @@ build { destination = "/tmp/ansible-playbook" } + provisioner "file" { + source = "ansible/vars.yml" + destination = "/tmp/ansible-playbook/vars.yml" + } + provisioner "shell" { environment_vars = [ "ARGS=${var.ansible_arguments}", "DOCKER_USER=${var.docker_user}", "DOCKER_PASSWD=${var.docker_passwd}", "DOCKER_IMAGE=${var.docker_image}", - "DOCKER_IMAGE_TAG=${var.docker_image_tag}" + "DOCKER_IMAGE_TAG=${var.docker_image_tag}", + "POSTGRES_SUPABASE_VERSION=${var.postgres-version}" ] use_env_var_file = true - script = "ebssurrogate/scripts/surrogate-bootstrap.sh" - execute_command = "sudo -S sh -c '. {{.EnvVarFile}} && {{.Path}}'" + script = "ebssurrogate/scripts/surrogate-bootstrap-nix.sh" + execute_command = "sudo -S sh -c '. {{.EnvVarFile}} && cd /tmp/ansible-playbook && {{.Path}}'" start_retry_timeout = "5m" skip_clean = true } @@ -257,10 +269,4 @@ build { destination = "/tmp/ansible.log" direction = "download" } - - provisioner "file" { - source = "/tmp/pg_binaries.tar.gz" - destination = "/tmp/pg_binaries.tar.gz" - direction = "download" - } } diff --git a/ansible/files/admin_api_scripts/grow_fs.sh b/ansible/files/admin_api_scripts/grow_fs.sh index 6d2a4e5e4..c8c14890f 100644 --- a/ansible/files/admin_api_scripts/grow_fs.sh +++ b/ansible/files/admin_api_scripts/grow_fs.sh @@ -4,20 +4,46 @@ set -euo pipefail VOLUME_TYPE=${1:-data} +if pgrep resizefs; then + echo "resize2fs is already running" + exit 1 +fi + +# Parses the output of lsblk to get the root partition number +# Example output: +# NAME MOUNTPOINT +# nvme0n1 +# ├─nvme0n1p1 /boot +# └─nvme0n1p3 / +# nvme1n1 /data +# +# Resulting in: +# └─nvme0n1p3 / -> nvme0n1p3 -> 3 +ROOT_PARTITION_NUMBER=$(lsblk -no NAME,MOUNTPOINT | grep ' /$' | awk '{print $1;}' | sed 's/.*nvme[0-9]n[0-9]p//g') + +if ! [[ "$ROOT_PARTITION_NUMBER" =~ ^[0-9]+$ ]]; then + echo "Error: ROOT_PARTITION_NUMBER is not a valid number: $ROOT_PARTITION_NUMBER" + exit 1 +fi + if [ -b /dev/nvme1n1 ] ; then if [[ "${VOLUME_TYPE}" == "data" ]]; then resize2fs /dev/nvme1n1 elif [[ "${VOLUME_TYPE}" == "root" ]] ; then - growpart /dev/nvme0n1 2 - resize2fs /dev/nvme0n1p2 - + PLACEHOLDER_FL=/home/ubuntu/50M_PLACEHOLDER + rm -f "${PLACEHOLDER_FL}" || true + growpart /dev/nvme0n1 "${ROOT_PARTITION_NUMBER}" + resize2fs "/dev/nvme0n1p${ROOT_PARTITION_NUMBER}" + if [[ ! -f "${PLACEHOLDER_FL}" ]] ; then + fallocate -l50M "${PLACEHOLDER_FL}" + fi else echo "Invalid disk specified: ${VOLUME_TYPE}" exit 1 fi else - growpart /dev/nvme0n1 2 - resize2fs /dev/nvme0n1p2 + growpart /dev/nvme0n1 "${ROOT_PARTITION_NUMBER}" + resize2fs "/dev/nvme0n1p${ROOT_PARTITION_NUMBER}" fi echo "Done resizing disk" diff --git a/ansible/files/admin_api_scripts/pg_egress_collect.pl b/ansible/files/admin_api_scripts/pg_egress_collect.pl index 2acc98aa6..46934e553 100644 --- a/ansible/files/admin_api_scripts/pg_egress_collect.pl +++ b/ansible/files/admin_api_scripts/pg_egress_collect.pl @@ -26,18 +26,24 @@ # extract tcp packet length captured by tcpdump # -# Sample input lines: +# Sample IPv4 input lines: # # 1674013833.940253 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60) # 10.112.101.122.5432 > 220.235.16.223.62599: Flags [S.], cksum 0x5de3 (incorrect -> 0x63da), seq 2314200657, ack 2071735457, win 62643, options [mss 8961,sackOK,TS val 3358598837 ecr 1277499190,nop,wscale 7], length 0 # 1674013833.989257 IP (tos 0x0, ttl 64, id 24975, offset 0, flags [DF], proto TCP (6), length 52) # 10.112.101.122.5432 > 220.235.16.223.62599: Flags [.], cksum 0x5ddb (incorrect -> 0xa25b), seq 1, ack 9, win 490, options [nop,nop,TS val 3358598885 ecr 1277499232], length 0 +# +# Sample IPv6 input lines: +# +# 1706483718.836526 IP6 (flowlabel 0x0bf27, hlim 64, next-header TCP (6) payload length: 125) 2406:da18:4fd:9b00:959:c52:ce68:10c8.5432 > 2406:da12:d78:f501:1273:296c:2482:c7a7.50530: Flags [P.], seq 25:118, ack 125, win 488, options [nop,nop,TS val 1026340732 ecr 1935666426], length 93 +# 1706483718.912083 IP6 (flowlabel 0x0bf27, hlim 64, next-header TCP (6) payload length: 501) 2406:da18:4fd:9b00:959:c52:ce68:10c8.5432 > 2406:da12:d78:f501:1273:296c:2482:c7a7.50530: Flags [P.], seq 118:587, ack 234, win 488, options [nop,nop,TS val 1026340807 ecr 1935666497], length 469 +# 1706483718.984001 IP6 (flowlabel 0x0bf27, hlim 64, next-header TCP (6) payload length: 151) 2406:da18:4fd:9b00:959:c52:ce68:10c8.5432 > 2406:da12:d78:f501:1273:296c:2482:c7a7.50530: Flags [P.], seq 587:706, ack 448, win 487, options [nop,nop,TS val 1026340879 ecr 1935666569], length 119 sub extract_packet_length { my ($line) = @_; #print("debug: >> " . $line); - if ($line =~ /^\s+\d+\.\d+\.\d+\.\d+\..*, length (\d+)$/) { + if ($line =~ /^.*, length (\d+)$/) { # extract tcp packet length and add it up my $len = $1; $captured_len += $len; diff --git a/ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh b/ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh index bf549b212..e9e3afe8a 100755 --- a/ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh +++ b/ansible/files/admin_api_scripts/pg_upgrade_scripts/common.sh @@ -10,6 +10,8 @@ if [ -f "$REPORTING_CREDENTIALS_FILE" ]; then REPORTING_ANON_KEY=$(cat "$REPORTING_CREDENTIALS_FILE") fi +# shellcheck disable=SC2120 +# Arguments are passed in other files function run_sql { psql -h localhost -U supabase_admin -d postgres "$@" } @@ -61,3 +63,499 @@ function retry { done return 0 } + +CI_stop_postgres() { + BINDIR=$(pg_config --bindir) + ARG=${1:-""} + + if [ "$ARG" = "--new-bin" ]; then + BINDIR="/tmp/pg_upgrade_bin/$PG_MAJOR_VERSION/bin" + fi + + su postgres -c "$BINDIR/pg_ctl stop -o '-c config_file=/etc/postgresql/postgresql.conf' -l /tmp/postgres.log" +} + +CI_start_postgres() { + BINDIR=$(pg_config --bindir) + ARG=${1:-""} + + if [ "$ARG" = "--new-bin" ]; then + BINDIR="/tmp/pg_upgrade_bin/$PG_MAJOR_VERSION/bin" + fi + + su postgres -c "$BINDIR/pg_ctl start -o '-c config_file=/etc/postgresql/postgresql.conf' -l /tmp/postgres.log" +} + +swap_postgres_and_supabase_admin() { + run_sql <<'EOSQL' +alter database postgres connection limit 0; +select pg_terminate_backend(pid) from pg_stat_activity where backend_type = 'client backend' and pid != pg_backend_pid(); +EOSQL + + if [ -z "$IS_CI" ]; then + retry 5 systemctl restart postgresql + else + CI_start_postgres "" + fi + + retry 8 pg_isready -h localhost -U supabase_admin + + run_sql <<'EOSQL' +set statement_timeout = '600s'; +begin; +create role supabase_tmp superuser; +set session authorization supabase_tmp; + +-- to handle snowflakes that happened in the past +revoke supabase_admin from authenticator; + +do $$ +begin + if exists (select from pg_extension where extname = 'timescaledb') then + execute(format('select %s.timescaledb_pre_restore()', (select pronamespace::regnamespace from pg_proc where proname = 'timescaledb_pre_restore'))); + end if; +end +$$; + +do $$ +declare + postgres_rolpassword text := (select rolpassword from pg_authid where rolname = 'postgres'); + supabase_admin_rolpassword text := (select rolpassword from pg_authid where rolname = 'supabase_admin'); + role_settings jsonb[] := ( + select coalesce(array_agg(jsonb_build_object('database', d.datname, 'role', a.rolname, 'configs', s.setconfig)), '{}') + from pg_db_role_setting s + left join pg_database d on d.oid = s.setdatabase + join pg_authid a on a.oid = s.setrole + where a.rolname in ('postgres', 'supabase_admin') + ); + event_triggers jsonb[] := (select coalesce(array_agg(jsonb_build_object('name', evtname)), '{}') from pg_event_trigger where evtowner = 'postgres'::regrole); + user_mappings jsonb[] := ( + select coalesce(array_agg(jsonb_build_object('oid', um.oid, 'role', a.rolname, 'server', s.srvname, 'options', um.umoptions)), '{}') + from pg_user_mapping um + join pg_authid a on a.oid = um.umuser + join pg_foreign_server s on s.oid = um.umserver + where a.rolname in ('postgres', 'supabase_admin') + ); + -- Objects can have initial privileges either by having those privileges set + -- when the system is initialized (by initdb) or when the object is created + -- during a CREATE EXTENSION and the extension script sets initial + -- privileges using the GRANT system. (https://www.postgresql.org/docs/current/catalog-pg-init-privs.html) + -- We only care about swapping init_privs for extensions. + init_privs jsonb[] := ( + select coalesce(array_agg(jsonb_build_object('objoid', objoid, 'classoid', classoid, 'initprivs', initprivs::text)), '{}') + from pg_init_privs + where privtype = 'e' + ); + default_acls jsonb[] := ( + select coalesce(array_agg(jsonb_build_object('oid', d.oid, 'role', a.rolname, 'schema', n.nspname, 'objtype', d.defaclobjtype, 'acl', defaclacl::text)), '{}') + from pg_default_acl d + join pg_authid a on a.oid = d.defaclrole + left join pg_namespace n on n.oid = d.defaclnamespace + ); + schemas jsonb[] := ( + select coalesce(array_agg(jsonb_build_object('oid', n.oid, 'owner', a.rolname, 'acl', nspacl::text)), '{}') + from pg_namespace n + join pg_authid a on a.oid = n.nspowner + where true + and n.nspname != 'information_schema' + and not starts_with(n.nspname, 'pg_') + ); + types jsonb[] := ( + select coalesce(array_agg(jsonb_build_object('oid', t.oid, 'owner', a.rolname, 'acl', t.typacl::text)), '{}') + from pg_type t + join pg_namespace n on n.oid = t.typnamespace + join pg_authid a on a.oid = t.typowner + where true + and n.nspname != 'information_schema' + and not starts_with(n.nspname, 'pg_') + and ( + t.typrelid = 0 + or ( + select + c.relkind = 'c' + from + pg_class c + where + c.oid = t.typrelid + ) + ) + and not exists ( + select + from + pg_type el + where + el.oid = t.typelem + and el.typarray = t.oid + ) + ); + functions jsonb[] := ( + select coalesce(array_agg(jsonb_build_object('oid', p.oid, 'owner', a.rolname, 'kind', p.prokind, 'acl', p.proacl::text)), '{}') + from pg_proc p + join pg_namespace n on n.oid = p.pronamespace + join pg_authid a on a.oid = p.proowner + where true + and n.nspname != 'information_schema' + and not starts_with(n.nspname, 'pg_') + ); + relations jsonb[] := ( + select coalesce(array_agg(jsonb_build_object('oid', c.oid, 'owner', a.rolname, 'acl', c.relacl::text)), '{}') + from ( + -- Sequences must appear after tables, so we order by relkind + select * from pg_class order by relkind desc + ) c + join pg_namespace n on n.oid = c.relnamespace + join pg_authid a on a.oid = c.relowner + where true + and n.nspname != 'information_schema' + and not starts_with(n.nspname, 'pg_') + and c.relkind not in ('c', 'i', 'I') + ); + rec record; + obj jsonb; +begin + set local search_path = ''; + + if exists (select from pg_event_trigger where evtname = 'pgsodium_trg_mask_update') then + alter event trigger pgsodium_trg_mask_update disable; + end if; + + alter role postgres rename to supabase_admin_; + alter role supabase_admin rename to postgres; + alter role supabase_admin_ rename to supabase_admin; + + -- role grants + for rec in + select * from pg_auth_members + loop + execute(format('revoke %s from %s;', rec.roleid::regrole, rec.member::regrole)); + execute(format( + 'grant %s to %s %s granted by %s;', + case + when rec.roleid = 'postgres'::regrole then 'supabase_admin' + when rec.roleid = 'supabase_admin'::regrole then 'postgres' + else rec.roleid::regrole + end, + case + when rec.member = 'postgres'::regrole then 'supabase_admin' + when rec.member = 'supabase_admin'::regrole then 'postgres' + else rec.member::regrole + end, + case + when rec.admin_option then 'with admin option' + else '' + end, + case + when rec.grantor = 'postgres'::regrole then 'supabase_admin' + when rec.grantor = 'supabase_admin'::regrole then 'postgres' + else rec.grantor::regrole + end + )); + end loop; + + -- role passwords + execute(format('alter role postgres password %L;', postgres_rolpassword)); + execute(format('alter role supabase_admin password %L;', supabase_admin_rolpassword)); + + -- role settings + foreach obj in array role_settings + loop + execute(format('alter role %I %s reset all', + case when obj->>'role' = 'postgres' then 'supabase_admin' else 'postgres' end, + case when obj->>'database' is null then '' else format('in database %I', obj->>'database') end + )); + end loop; + foreach obj in array role_settings + loop + for rec in + select split_part(value, '=', 1) as key, substr(value, strpos(value, '=') + 1) as value + from jsonb_array_elements_text(obj->'configs') + loop + execute(format('alter role %I %s set %I to %s', + obj->>'role', + case when obj->>'database' is null then '' else format('in database %I', obj->>'database') end, + rec.key, + -- https://github.com/postgres/postgres/blob/70d1c664f4376fd3499e3b0c6888cf39b65d722b/src/bin/pg_dump/dumputils.c#L861 + case + when rec.key in ('local_preload_libraries', 'search_path', 'session_preload_libraries', 'shared_preload_libraries', 'temp_tablespaces', 'unix_socket_directories') + then rec.value + else quote_literal(rec.value) + end + )); + end loop; + end loop; + + reassign owned by postgres to supabase_admin; + + -- databases + for rec in + select * from pg_database where datname not in ('template0') + loop + execute(format('alter database %I owner to postgres;', rec.datname)); + end loop; + + -- event triggers + foreach obj in array event_triggers + loop + execute(format('alter event trigger %I owner to postgres;', obj->>'name')); + end loop; + + -- publications + for rec in + select * from pg_publication + loop + execute(format('alter publication %I owner to postgres;', rec.pubname)); + end loop; + + -- FDWs + for rec in + select * from pg_foreign_data_wrapper + loop + execute(format('alter foreign data wrapper %I owner to postgres;', rec.fdwname)); + end loop; + + -- foreign servers + for rec in + select * from pg_foreign_server + loop + execute(format('alter server %I owner to postgres;', rec.srvname)); + end loop; + + -- user mappings + foreach obj in array user_mappings + loop + execute(format('drop user mapping for %I server %I', case when obj->>'role' = 'postgres' then 'supabase_admin' else 'postgres' end, obj->>'server')); + end loop; + foreach obj in array user_mappings + loop + execute(format('create user mapping for %I server %I', obj->>'role', obj->>'server')); + for rec in + select split_part(value, '=', 1) as key, substr(value, strpos(value, '=') + 1) as value + from jsonb_array_elements_text(obj->'options') + loop + execute(format('alter user mapping for %I server %I options (%I %L)', obj->>'role', obj->>'server', rec.key, rec.value)); + end loop; + end loop; + + -- init privs + foreach obj in array init_privs + loop + -- We need to modify system catalog directly here because there's no ALTER INIT PRIVILEGES. + update pg_init_privs set initprivs = (obj->>'initprivs')::aclitem[] where objoid = (obj->>'objoid')::oid and classoid = (obj->>'classoid')::oid; + end loop; + + -- default acls + foreach obj in array default_acls + loop + for rec in + select grantor, grantee, privilege_type, is_grantable + from aclexplode((obj->>'acl')::aclitem[]) + loop + if obj->>'role' in ('postgres', 'supabase_admin') or rec.grantee::regrole in ('postgres', 'supabase_admin') then + execute(format('alter default privileges for role %I %s revoke %s on %s from %s' + , case when obj->>'role' = 'postgres' then 'supabase_admin' + when obj->>'role' = 'supabase_admin' then 'postgres' + else obj->>'role' + end + , case when obj->>'schema' is null then '' + else format('in schema %I', obj->>'schema') + end + , rec.privilege_type + , case when obj->>'objtype' = 'r' then 'tables' + when obj->>'objtype' = 'S' then 'sequences' + when obj->>'objtype' = 'f' then 'functions' + when obj->>'objtype' = 'T' then 'types' + when obj->>'objtype' = 'n' then 'schemas' + end + , case when rec.grantee = 'postgres'::regrole then 'supabase_admin' + when rec.grantee = 'supabase_admin'::regrole then 'postgres' + when rec.grantee = 0 then 'public' + else rec.grantee::regrole::text + end + )); + end if; + end loop; + end loop; + + foreach obj in array default_acls + loop + for rec in + select grantor, grantee, privilege_type, is_grantable + from aclexplode((obj->>'acl')::aclitem[]) + loop + if obj->>'role' in ('postgres', 'supabase_admin') or rec.grantee::regrole in ('postgres', 'supabase_admin') then + execute(format('alter default privileges for role %I %s grant %s on %s to %s %s' + , obj->>'role' + , case when obj->>'schema' is null then '' + else format('in schema %I', obj->>'schema') + end + , rec.privilege_type + , case when obj->>'objtype' = 'r' then 'tables' + when obj->>'objtype' = 'S' then 'sequences' + when obj->>'objtype' = 'f' then 'functions' + when obj->>'objtype' = 'T' then 'types' + when obj->>'objtype' = 'n' then 'schemas' + end + , case when rec.grantee = 0 then 'public' else rec.grantee::regrole::text end + , case when rec.is_grantable then 'with grant option' else '' end + )); + end if; + end loop; + end loop; + + -- schemas + foreach obj in array schemas + loop + if obj->>'owner' = 'postgres' then + execute(format('alter schema %s owner to postgres;', (obj->>'oid')::regnamespace)); + end if; + for rec in + select grantor, grantee, privilege_type, is_grantable + from aclexplode((obj->>'acl')::aclitem[]) + where grantee::regrole in ('postgres', 'supabase_admin') + loop + execute(format('revoke %s on schema %s from %I', rec.privilege_type, (obj->>'oid')::regnamespace, case when rec.grantee = 'postgres'::regrole then 'supabase_admin' else 'postgres' end)); + end loop; + end loop; + foreach obj in array schemas + loop + for rec in + select grantor, grantee, privilege_type, is_grantable + from aclexplode((obj->>'acl')::aclitem[]) + where grantee::regrole in ('postgres', 'supabase_admin') + loop + execute(format('grant %s on schema %s to %s %s', rec.privilege_type, (obj->>'oid')::regnamespace, rec.grantee::regrole, case when rec.is_grantable then 'with grant option' else '' end)); + end loop; + end loop; + + -- types + foreach obj in array types + loop + if obj->>'owner' = 'postgres' then + execute(format('alter type %s owner to postgres;', (obj->>'oid')::regtype)); + end if; + for rec in + select grantor, grantee, privilege_type, is_grantable + from aclexplode((obj->>'acl')::aclitem[]) + where grantee::regrole in ('postgres', 'supabase_admin') + loop + execute(format('revoke %s on type %s from %I', rec.privilege_type, (obj->>'oid')::regtype, case when rec.grantee = 'postgres'::regrole then 'supabase_admin' else 'postgres' end)); + end loop; + end loop; + foreach obj in array types + loop + for rec in + select grantor, grantee, privilege_type, is_grantable + from aclexplode((obj->>'acl')::aclitem[]) + where grantee::regrole in ('postgres', 'supabase_admin') + loop + execute(format('grant %s on type %s to %s %s', rec.privilege_type, (obj->>'oid')::regtype, rec.grantee::regrole, case when rec.is_grantable then 'with grant option' else '' end)); + end loop; + end loop; + + -- functions + foreach obj in array functions + loop + if obj->>'owner' = 'postgres' then + execute(format('alter %s %s(%s) owner to postgres;' + , case when obj->>'kind' = 'p' then 'procedure' else 'function' end + , (obj->>'oid')::regproc + , pg_get_function_identity_arguments((obj->>'oid')::regproc))); + end if; + for rec in + select grantor, grantee, privilege_type, is_grantable + from aclexplode((obj->>'acl')::aclitem[]) + where grantee::regrole in ('postgres', 'supabase_admin') + loop + execute(format('revoke %s on %s %s(%s) from %I' + , rec.privilege_type + , case + when obj->>'kind' = 'p' then 'procedure' + else 'function' + end + , (obj->>'oid')::regproc + , pg_get_function_identity_arguments((obj->>'oid')::regproc) + , case when rec.grantee = 'postgres'::regrole then 'supabase_admin' else 'postgres' end + )); + end loop; + end loop; + foreach obj in array functions + loop + for rec in + select grantor, grantee, privilege_type, is_grantable + from aclexplode((obj->>'acl')::aclitem[]) + where grantee::regrole in ('postgres', 'supabase_admin') + loop + execute(format('grant %s on %s %s(%s) to %s %s' + , rec.privilege_type + , case + when obj->>'kind' = 'p' then 'procedure' + else 'function' + end + , (obj->>'oid')::regproc + , pg_get_function_identity_arguments((obj->>'oid')::regproc) + , rec.grantee::regrole + , case when rec.is_grantable then 'with grant option' else '' end + )); + end loop; + end loop; + + -- relations + foreach obj in array relations + loop + -- obj->>'oid' (text) needs to be casted to oid first for some reason + + if obj->>'owner' = 'postgres' then + execute(format('alter table %s owner to postgres;', (obj->>'oid')::oid::regclass)); + end if; + for rec in + select grantor, grantee, privilege_type, is_grantable + from aclexplode((obj->>'acl')::aclitem[]) + where grantee::regrole in ('postgres', 'supabase_admin') + loop + execute(format('revoke %s on table %s from %I', rec.privilege_type, (obj->>'oid')::oid::regclass, case when rec.grantee = 'postgres'::regrole then 'supabase_admin' else 'postgres' end)); + end loop; + end loop; + foreach obj in array relations + loop + -- obj->>'oid' (text) needs to be casted to oid first for some reason + + for rec in + select grantor, grantee, privilege_type, is_grantable + from aclexplode((obj->>'acl')::aclitem[]) + where grantee::regrole in ('postgres', 'supabase_admin') + loop + execute(format('grant %s on table %s to %s %s', rec.privilege_type, (obj->>'oid')::oid::regclass, rec.grantee::regrole, case when rec.is_grantable then 'with grant option' else '' end)); + end loop; + end loop; + + if exists (select from pg_event_trigger where evtname = 'pgsodium_trg_mask_update') then + alter event trigger pgsodium_trg_mask_update enable; + end if; +end +$$; + +do $$ +begin + if exists (select from pg_extension where extname = 'timescaledb') then + execute(format('select %s.timescaledb_post_restore()', (select pronamespace::regnamespace from pg_proc where proname = 'timescaledb_post_restore'))); + end if; +end +$$; + +alter database postgres connection limit -1; + +-- #incident-2024-09-12-project-upgrades-are-temporarily-disabled +do $$ +begin + if exists (select from pg_authid where rolname = 'pg_read_all_data') then + execute('grant pg_read_all_data to postgres'); + end if; +end +$$; +grant pg_signal_backend to postgres; + +set session authorization supabase_admin; +drop role supabase_tmp; +commit; +EOSQL +} diff --git a/ansible/files/admin_api_scripts/pg_upgrade_scripts/complete.sh b/ansible/files/admin_api_scripts/pg_upgrade_scripts/complete.sh index 94b0b60c2..108409463 100755 --- a/ansible/files/admin_api_scripts/pg_upgrade_scripts/complete.sh +++ b/ansible/files/admin_api_scripts/pg_upgrade_scripts/complete.sh @@ -11,6 +11,7 @@ SCRIPT_DIR=$(dirname -- "$0";) # shellcheck disable=SC1091 source "$SCRIPT_DIR/common.sh" +IS_CI=${IS_CI:-} LOG_FILE="/var/log/pg-upgrade-complete.log" function cleanup { @@ -24,6 +25,239 @@ function cleanup { exit "$EXIT_CODE" } +function execute_extension_upgrade_patches { + if [ -f "/var/lib/postgresql/extension/wrappers--0.3.1--0.4.1.sql" ] && [ ! -f "/usr/share/postgresql/15/extension/wrappers--0.3.0--0.4.1.sql" ]; then + cp /var/lib/postgresql/extension/wrappers--0.3.1--0.4.1.sql /var/lib/postgresql/extension/wrappers--0.3.0--0.4.1.sql + ln -s /var/lib/postgresql/extension/wrappers--0.3.0--0.4.1.sql /usr/share/postgresql/15/extension/wrappers--0.3.0--0.4.1.sql + fi +} + +function execute_wrappers_patch { + # If upgrading to pgsodium-less Vault, Wrappers need to be updated so that + # foreign servers use `vault.secrets.id` instead of `vault.secrets.key_id` + UPDATE_WRAPPERS_SERVER_OPTIONS_QUERY=$(cat < 0 from pg_extension where extname = 'pg_net';") + + if [ "$PG_NET_ENABLED" = "t" ]; then + PG_NET_GRANT_QUERY=$(cat < 0 from pg_extension where extname = 'pg_cron' and extowner::regrole::text = 'postgres';") + + if [ "$HAS_PG_CRON_OWNED_BY_POSTGRES" = "t" ]; then + RECREATE_PG_CRON_QUERY=$(cat < 0 from pg_extension where extname = 'pgmq';") + if [ "$HAS_PGMQ" = "t" ]; then + PATCH_PGMQ_QUERY=$(cat < /tmp/pg-upgrade-status echo "1. Mounting data disk" - retry 3 mount -a -v + if [ -z "$IS_CI" ]; then + retry 8 mount -a -v + else + echo "Skipping mount -a -v" + fi # copying custom configurations echo "2. Copying custom configurations" retry 3 copy_configs echo "3. Starting postgresql" - retry 3 service postgresql start + if [ -z "$IS_CI" ]; then + retry 3 service postgresql start + else + CI_start_postgres --new-bin + fi + + execute_extension_upgrade_patches || true + + # For this to work we need `vault.secrets` from the old project to be + # preserved, but `run_generated_sql` includes `ALTER EXTENSION + # supabase_vault UPDATE` which modifies that. So we need to run it + # beforehand. + echo "3.1. Patch Wrappers server options" + execute_wrappers_patch echo "4. Running generated SQL files" retry 3 run_generated_sql + echo "4.1. Applying patches" + execute_patches || true + run_sql -c "ALTER USER postgres WITH NOSUPERUSER;" - echo "4.1. Applying authentication scheme updates" + echo "4.2. Applying authentication scheme updates" retry 3 apply_auth_scheme_updates sleep 5 echo "5. Restarting postgresql" - retry 3 service postgresql restart + if [ -z "$IS_CI" ]; then + retry 3 service postgresql restart + + echo "5.1. Restarting gotrue and postgrest" + retry 3 service gotrue restart + retry 3 service postgrest restart + else + retry 3 CI_stop_postgres || true + retry 3 CI_start_postgres + fi echo "6. Starting vacuum analyze" retry 3 start_vacuum_analyze @@ -63,13 +326,14 @@ function copy_configs { cp -R /data/conf/* /etc/postgresql-custom/ chown -R postgres:postgres /var/lib/postgresql/data chown -R postgres:postgres /data/pgdata + chmod -R 0750 /data/pgdata } function run_generated_sql { if [ -d /data/sql ]; then for FILE in /data/sql/*.sql; do if [ -f "$FILE" ]; then - run_sql -f "$FILE" + run_sql -f "$FILE" || true fi done fi @@ -82,17 +346,41 @@ function apply_auth_scheme_updates { if [ "$PASSWORD_ENCRYPTION_SETTING" = "md5" ]; then run_sql -c "ALTER SYSTEM SET password_encryption TO 'scram-sha-256';" run_sql -c "SELECT pg_reload_conf();" - run_sql -f /etc/postgresql.schema.sql + + if [ -z "$IS_CI" ]; then + run_sql -f /etc/postgresql.schema.sql + fi fi } function start_vacuum_analyze { echo "complete" > /tmp/pg-upgrade-status - su -c 'vacuumdb --all --analyze-in-stages' -s "$SHELL" postgres + + # shellcheck disable=SC1091 + if [ -f "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh" ]; then + # shellcheck disable=SC1091 + source "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh" + fi + vacuumdb --all --analyze-in-stages -U supabase_admin -h localhost -p 5432 echo "Upgrade job completed" } trap cleanup ERR +echo "C.UTF-8 UTF-8" > /etc/locale.gen +echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen +locale-gen + +if [ -z "$IS_CI" ]; then + complete_pg_upgrade >> $LOG_FILE 2>&1 & +else + CI_stop_postgres || true + + rm -f /tmp/pg-upgrade-status + mv /data_migration /data + + rm -rf /var/lib/postgresql/data + ln -s /data/pgdata /var/lib/postgresql/data -complete_pg_upgrade >> $LOG_FILE 2>&1 & + complete_pg_upgrade +fi diff --git a/ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh b/ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh index d4d32fede..92c1516a5 100755 --- a/ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh +++ b/ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh @@ -11,9 +11,8 @@ # them depending on regtypes referencing system OIDs or outdated library files. EXTENSIONS_TO_DISABLE=( "pg_graphql" - "plv8" - "plcoffee" - "plls" + "pg_stat_monitor" + "pg_backtrace" ) PG14_EXTENSIONS_TO_DISABLE=( @@ -31,22 +30,36 @@ SCRIPT_DIR=$(dirname -- "$0";) # shellcheck disable=SC1091 source "$SCRIPT_DIR/common.sh" -LOG_FILE="/var/log/pg-upgrade-initiate.log" +IS_CI=${IS_CI:-} +IS_LOCAL_UPGRADE=${IS_LOCAL_UPGRADE:-} +IS_NIX_UPGRADE=${IS_NIX_UPGRADE:-} +IS_NIX_BASED_SYSTEM="false" PGVERSION=$1 -IS_DRY_RUN=${2:-false} -if [ "$IS_DRY_RUN" != false ]; then - IS_DRY_RUN=true -fi - MOUNT_POINT="/data_migration" +LOG_FILE="/var/log/pg-upgrade-initiate.log" POST_UPGRADE_EXTENSION_SCRIPT="/tmp/pg_upgrade/pg_upgrade_extensions.sql" +POST_UPGRADE_POSTGRES_PERMS_SCRIPT="/tmp/pg_upgrade/pg_upgrade_postgres_perms.sql" OLD_PGVERSION=$(run_sql -A -t -c "SHOW server_version;") +SERVER_LC_COLLATE=$(run_sql -A -t -c "SHOW lc_collate;") +SERVER_LC_CTYPE=$(run_sql -A -t -c "SHOW lc_ctype;") +SERVER_ENCODING=$(run_sql -A -t -c "SHOW server_encoding;") + POSTGRES_CONFIG_PATH="/etc/postgresql/postgresql.conf" PGBINOLD="/usr/lib/postgresql/bin" -PGLIBOLD="/usr/lib/postgresql/lib" + +PG_UPGRADE_BIN_DIR="/tmp/pg_upgrade_bin/$PGVERSION" +NIX_INSTALLER_PATH="/tmp/persistent/nix-installer" +NIX_INSTALLER_PACKAGE_PATH="$NIX_INSTALLER_PATH.tar.gz" + +if [ -L "$PGBINOLD/pg_upgrade" ]; then + BINARY_PATH=$(readlink -f "$PGBINOLD/pg_upgrade") + if [[ "$BINARY_PATH" == *"nix"* ]]; then + IS_NIX_BASED_SYSTEM="true" + fi +fi # If upgrading from older major PG versions, disable specific extensions if [[ "$OLD_PGVERSION" =~ ^14.* ]]; then @@ -58,12 +71,22 @@ elif [[ "$OLD_PGVERSION" =~ ^12.* ]]; then PGBINOLD="/usr/lib/postgresql/12/bin" fi -echo "Detected PG version: $PGVERSION" +if [ -n "$IS_CI" ]; then + PGBINOLD="$(pg_config --bindir)" + echo "Running in CI mode; using pg_config bindir: $PGBINOLD" + echo "PGVERSION: $PGVERSION" +fi + +OLD_BOOTSTRAP_USER=$(run_sql -A -t -c "select rolname from pg_authid where oid = 10;") cleanup() { UPGRADE_STATUS=${1:-"failed"} EXIT_CODE=${?:-0} + if [ "$UPGRADE_STATUS" = "failed" ]; then + EXIT_CODE=1 + fi + if [ "$UPGRADE_STATUS" = "failed" ]; then echo "Upgrade job failed. Cleaning up and exiting." fi @@ -71,6 +94,8 @@ cleanup() { if [ -d "${MOUNT_POINT}/pgdata/pg_upgrade_output.d/" ]; then echo "Copying pg_upgrade output to /var/log" cp -R "${MOUNT_POINT}/pgdata/pg_upgrade_output.d/" /var/log/ || true + chown -R postgres:postgres /var/log/pg_upgrade_output.d/ + chmod -R 0750 /var/log/pg_upgrade_output.d/ ship_logs "$LOG_FILE" || true tail -n +1 /var/log/pg_upgrade_output.d/*/* > /var/log/pg_upgrade_output.d/pg_upgrade.log || true ship_logs "/var/log/pg_upgrade_output.d/pg_upgrade.log" || true @@ -88,34 +113,66 @@ cleanup() { fi fi - if [ -f "/usr/lib/postgresql/lib/aarch64/libpq.so.5.bak" ]; then - rm /usr/lib/postgresql/lib/aarch64/libpq.so.5 - mv /usr/lib/postgresql/lib/aarch64/libpq.so.5.bak /usr/lib/postgresql/lib/aarch64/libpq.so.5 + echo "Restarting postgresql" + if [ -z "$IS_CI" ]; then + systemctl enable postgresql + retry 5 systemctl restart postgresql + else + CI_start_postgres fi - if [ "$IS_DRY_RUN" = false ]; then - echo "Restarting postgresql" - systemctl restart postgresql - fi + retry 8 pg_isready -h localhost -U supabase_admin echo "Re-enabling extensions" if [ -f $POST_UPGRADE_EXTENSION_SCRIPT ]; then - run_sql -f $POST_UPGRADE_EXTENSION_SCRIPT + retry 5 run_sql -f $POST_UPGRADE_EXTENSION_SCRIPT fi echo "Removing SUPERUSER grant from postgres" - run_sql -c "ALTER USER postgres WITH NOSUPERUSER;" + retry 5 run_sql -c "ALTER USER postgres WITH NOSUPERUSER;" - if [ "$IS_DRY_RUN" = false ]; then + echo "Resetting postgres database connection limit" + retry 5 run_sql -c "ALTER DATABASE postgres CONNECTION LIMIT -1;" + + echo "Making sure postgres still has access to pg_shadow" + cat << EOF >> $POST_UPGRADE_POSTGRES_PERMS_SCRIPT +DO \$\$ +begin + if exists (select from pg_authid where rolname = 'pg_read_all_data') then + execute('grant pg_read_all_data to postgres'); + end if; +end +\$\$; +grant pg_signal_backend to postgres; +EOF + + if [ -f $POST_UPGRADE_POSTGRES_PERMS_SCRIPT ]; then + retry 5 run_sql -f $POST_UPGRADE_POSTGRES_PERMS_SCRIPT + fi + + if [ -z "$IS_CI" ] && [ -z "$IS_LOCAL_UPGRADE" ]; then echo "Unmounting data disk from ${MOUNT_POINT}" - umount $MOUNT_POINT + retry 3 umount $MOUNT_POINT fi echo "$UPGRADE_STATUS" > /tmp/pg-upgrade-status - exit "$EXIT_CODE" + if [ -z "$IS_CI" ]; then + exit "$EXIT_CODE" + else + echo "CI run complete with code ${EXIT_CODE}. Exiting." + exit "$EXIT_CODE" + fi } function handle_extensions { + if [ -z "$IS_CI" ]; then + retry 5 systemctl restart postgresql + else + CI_start_postgres + fi + + retry 8 pg_isready -h localhost -U supabase_admin + rm -f $POST_UPGRADE_EXTENSION_SCRIPT touch $POST_UPGRADE_EXTENSION_SCRIPT @@ -155,27 +212,99 @@ function initiate_upgrade { # Wrappers officially launched in PG15; PG14 version is incompatible if [[ "$OLD_PGVERSION" =~ 14* ]]; then - SHARED_PRELOAD_LIBRARIES=$(echo "$SHARED_PRELOAD_LIBRARIES" | sed "s/wrappers,//" | xargs) + SHARED_PRELOAD_LIBRARIES=$(echo "$SHARED_PRELOAD_LIBRARIES" | sed "s/wrappers//" | xargs) + fi + + # Timescale is no longer supported for PG17+ upgrades + if [[ "$PGVERSION" != "15" ]]; then + SHARED_PRELOAD_LIBRARIES=$(echo "$SHARED_PRELOAD_LIBRARIES" | sed "s/timescaledb//" | xargs) + fi + + SHARED_PRELOAD_LIBRARIES=$(echo "$SHARED_PRELOAD_LIBRARIES" | sed "s/pg_cron//" | xargs) + SHARED_PRELOAD_LIBRARIES=$(echo "$SHARED_PRELOAD_LIBRARIES" | sed "s/pg_net//" | xargs) + SHARED_PRELOAD_LIBRARIES=$(echo "$SHARED_PRELOAD_LIBRARIES" | sed "s/check_role_membership//" | xargs) + SHARED_PRELOAD_LIBRARIES=$(echo "$SHARED_PRELOAD_LIBRARIES" | sed "s/safeupdate//" | xargs) + SHARED_PRELOAD_LIBRARIES=$(echo "$SHARED_PRELOAD_LIBRARIES" | sed "s/pg_backtrace//" | xargs) + + # Exclude empty-string entries, as well as leading/trailing commas and spaces resulting from the above lib exclusions + # i.e. " , pg_stat_statements, , pgsodium, " -> "pg_stat_statements, pgsodium" + SHARED_PRELOAD_LIBRARIES=$(echo "$SHARED_PRELOAD_LIBRARIES" | tr ',' ' ' | tr -s ' ' | tr ' ' ', ') + + # Account for trailing comma + # eg. "...,auto_explain,pg_tle,plan_filter," -> "...,auto_explain,pg_tle,plan_filter" + if [[ "${SHARED_PRELOAD_LIBRARIES: -1}" = "," ]]; then + # clean up trailing comma + SHARED_PRELOAD_LIBRARIES=$(echo "$SHARED_PRELOAD_LIBRARIES" | sed "s/.$//" | xargs) fi - SHARED_PRELOAD_LIBRARIES=$(echo "$SHARED_PRELOAD_LIBRARIES" | sed "s/pg_cron,//" | xargs) PGDATAOLD=$(cat "$POSTGRES_CONFIG_PATH" | grep data_directory | sed "s/data_directory = '\(.*\)'.*/\1/") PGDATANEW="$MOUNT_POINT/pgdata" - PG_UPGRADE_BIN_DIR="/tmp/pg_upgrade_bin/$PGVERSION" - PGBINNEW="$PG_UPGRADE_BIN_DIR/bin" - PGLIBNEW="$PG_UPGRADE_BIN_DIR/lib" - PGSHARENEW="$PG_UPGRADE_BIN_DIR/share" # running upgrade using at least 1 cpu core WORKERS=$(nproc | awk '{ print ($1 == 1 ? 1 : $1 - 1) }') + + # To make nix-based upgrades work for testing, create a pg binaries tarball with the following contents: + # - nix_flake_version - a7189a68ed4ea78c1e73991b5f271043636cf074 + # Where the value is the commit hash of the nix flake that contains the binaries + + if [ -n "$IS_LOCAL_UPGRADE" ]; then + mkdir -p "$PG_UPGRADE_BIN_DIR" + mkdir -p /tmp/persistent/ + echo "a7189a68ed4ea78c1e73991b5f271043636cf074" > "$PG_UPGRADE_BIN_DIR/nix_flake_version" + tar -czf "/tmp/persistent/pg_upgrade_bin.tar.gz" -C "/tmp/pg_upgrade_bin" . + rm -rf /tmp/pg_upgrade_bin/ + fi echo "1. Extracting pg_upgrade binaries" mkdir -p "/tmp/pg_upgrade_bin" tar zxf "/tmp/persistent/pg_upgrade_bin.tar.gz" -C "/tmp/pg_upgrade_bin" + PGSHARENEW="$PG_UPGRADE_BIN_DIR/share" + + if [ -f "$PG_UPGRADE_BIN_DIR/nix_flake_version" ]; then + IS_NIX_UPGRADE="true" + NIX_FLAKE_VERSION=$(cat "$PG_UPGRADE_BIN_DIR/nix_flake_version") + + if [ "$IS_NIX_BASED_SYSTEM" = "false" ]; then + if [ ! -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]; then + if ! command -v nix > /dev/null; then + echo "1.1. Nix is not installed; installing." + + if [ -f "$NIX_INSTALLER_PACKAGE_PATH" ]; then + echo "1.1.1. Installing Nix using the provided installer" + tar -xzf "$NIX_INSTALLER_PACKAGE_PATH" -C /tmp/persistent/ + chmod +x "$NIX_INSTALLER_PATH" + "$NIX_INSTALLER_PATH" install --no-confirm \ + --extra-conf "substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com" \ + --extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + else + echo "1.1.1. Installing Nix using the official installer" + + curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm \ + --extra-conf "substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com" \ + --extra-conf "trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + fi + else + echo "1.1. Nix is installed; moving on." + fi + fi + fi + + echo "1.2. Installing flake revision: $NIX_FLAKE_VERSION" + # shellcheck disable=SC1091 + source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh + nix-collect-garbage -d > /tmp/pg_upgrade-nix-gc.log 2>&1 || true + PG_UPGRADE_BIN_DIR=$(nix build "github:supabase/postgres/${NIX_FLAKE_VERSION}#psql_${PGVERSION}/bin" --no-link --print-out-paths --extra-experimental-features nix-command --extra-experimental-features flakes) + PGSHARENEW="$PG_UPGRADE_BIN_DIR/share/postgresql" + fi + + PGBINNEW="$PG_UPGRADE_BIN_DIR/bin" + PGLIBNEW="$PG_UPGRADE_BIN_DIR/lib" + # copy upgrade-specific pgsodium_getkey script into the share dir chmod +x "$SCRIPT_DIR/pgsodium_getkey.sh" + mkdir -p "$PGSHARENEW/extension" cp "$SCRIPT_DIR/pgsodium_getkey.sh" "$PGSHARENEW/extension/pgsodium_getkey" if [ -d "/var/lib/postgresql/extension/" ]; then cp "$SCRIPT_DIR/pgsodium_getkey.sh" "/var/lib/postgresql/extension/pgsodium_getkey" @@ -184,16 +313,6 @@ function initiate_upgrade { chown -R postgres:postgres "/tmp/pg_upgrade_bin/$PGVERSION" - # Make latest libpq available to pg_upgrade - mkdir -p /usr/lib/aarch64-linux-gnu - if [ -f "/usr/lib/aarch64-linux-gnu/libpq.so.5" ]; then - mv /usr/lib/aarch64-linux-gnu/libpq.so.5 /usr/lib/aarch64-linux-gnu/libpq.so.5.bak - fi - if [ -f "${PG_UPGRADE_BIN_DIR}/libpq.so.5" ]; then - cp "${PG_UPGRADE_BIN_DIR}/libpq.so.5" "${PGLIBNEW}/libpq.so.5" - fi - ln -s "${PGLIBNEW}/libpq.so.5" /usr/lib/aarch64-linux-gnu/libpq.so.5 - # upgrade job outputs a log in the cwd; needs write permissions mkdir -p /tmp/pg_upgrade/ chown -R postgres:postgres /tmp/pg_upgrade/ @@ -204,20 +323,30 @@ function initiate_upgrade { DEBIAN_FRONTEND=noninteractive dpkg --configure -a --force-confold || true # handle errors generated by dpkg # Needed for PostGIS, since it's compiled with Protobuf-C support now - echo "3. Installing libprotobuf-c1 if missing" + echo "3. Installing libprotobuf-c1 and libicu66 if missing" if [[ ! "$(apt list --installed libprotobuf-c1 | grep "installed")" ]]; then - apt-get update && apt --fix-broken install -y libprotobuf-c1 + apt-get update -y + apt --fix-broken install -y libprotobuf-c1 libicu66 || true fi - if [ "$IS_DRY_RUN" = false ]; then + echo "4. Setup locale if required" + if ! grep -q "^en_US.UTF-8" /etc/locale.gen ; then + echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen + fi + if ! grep -q "^C.UTF-8" /etc/locale.gen ; then + echo "C.UTF-8 UTF-8" >> /etc/locale.gen + fi + locale-gen + + if [ -z "$IS_CI" ] && [ -z "$IS_LOCAL_UPGRADE" ]; then # awk NF==3 prints lines with exactly 3 fields, which are the block devices currently not mounted anywhere # excluding nvme0 since it is the root disk - echo "4. Determining block device to mount" + echo "5. Determining block device to mount" BLOCK_DEVICE=$(lsblk -dprno name,size,mountpoint,type | grep "disk" | grep -v "nvme0" | awk 'NF==3 { print $1; }') echo "Block device found: $BLOCK_DEVICE" mkdir -p "$MOUNT_POINT" - echo "5. Mounting block device" + echo "6. Mounting block device" sleep 5 e2fsck -pf "$BLOCK_DEVICE" @@ -227,6 +356,8 @@ function initiate_upgrade { sleep 1 resize2fs "$BLOCK_DEVICE" + else + mkdir -p "$MOUNT_POINT" fi if [ -f "$MOUNT_POINT/pgsodium_root.key" ]; then @@ -235,51 +366,48 @@ function initiate_upgrade { chmod 600 /etc/postgresql-custom/pgsodium_root.key fi - echo "6. Disabling extensions and generating post-upgrade script" + echo "7. Disabling extensions and generating post-upgrade script" handle_extensions - - echo "7. Granting SUPERUSER to postgres user" + + echo "8.1. Granting SUPERUSER to postgres user" run_sql -c "ALTER USER postgres WITH SUPERUSER;" - if [ -d "/usr/share/postgresql/${PGVERSION}" ]; then - mv "/usr/share/postgresql/${PGVERSION}" "/usr/share/postgresql/${PGVERSION}.bak" + if [ "$OLD_BOOTSTRAP_USER" = "postgres" ]; then + echo "8.2. Swap postgres & supabase_admin roles as we're upgrading a project with postgres as bootstrap user" + swap_postgres_and_supabase_admin fi - ln -s "$PGSHARENEW" "/usr/share/postgresql/${PGVERSION}" - - cp --remove-destination "$PGLIBNEW"/*.control "$PGSHARENEW/extension/" - cp --remove-destination "$PGLIBNEW"/*.sql "$PGSHARENEW/extension/" - - # This is a workaround for older versions of wrappers which don't have the expected - # naming scheme, containing the version in their library's file name - # e.g. wrappers-0.1.16.so, rather than wrappers.so - # pg_upgrade errors out when it doesn't find an equivalent file in the new PG version's - # library directory, so we're making sure the new version has the expected (old version's) - # file name. - # After the upgrade completes, the new version's library file is used. - # i.e. - # - old version: wrappers-0.1.16.so - # - new version: wrappers-0.1.18.so - # - workaround to make pg_upgrade happy: copy wrappers-0.1.18.so to wrappers-0.1.16.so - if [ -d "$PGLIBOLD" ]; then - WRAPPERS_LIB_PATH=$(find "$PGLIBNEW" -name "wrappers*so" -print -quit) - if [ -f "$WRAPPERS_LIB_PATH" ]; then - OLD_WRAPPER_LIB_PATH=$(find "$PGLIBOLD" -name "wrappers*so" -print -quit) - if [ -f "$OLD_WRAPPER_LIB_PATH" ]; then - LIB_FILE_NAME=$(basename "$OLD_WRAPPER_LIB_PATH") - if [ "$WRAPPERS_LIB_PATH" != "$PGLIBNEW/${LIB_FILE_NAME}" ]; then - echo "Copying $OLD_WRAPPER_LIB_PATH to $WRAPPERS_LIB_PATH" - cp "$WRAPPERS_LIB_PATH" "$PGLIBNEW/${LIB_FILE_NAME}" - fi - fi + + if [ -z "$IS_NIX_UPGRADE" ]; then + if [ -d "/usr/share/postgresql/${PGVERSION}" ]; then + mv "/usr/share/postgresql/${PGVERSION}" "/usr/share/postgresql/${PGVERSION}.bak" fi - fi - export LD_LIBRARY_PATH="${PGLIBNEW}" + ln -s "$PGSHARENEW" "/usr/share/postgresql/${PGVERSION}" + cp --remove-destination "$PGLIBNEW"/*.control "$PGSHARENEW/extension/" + cp --remove-destination "$PGLIBNEW"/*.sql "$PGSHARENEW/extension/" + + export LD_LIBRARY_PATH="${PGLIBNEW}" + fi - echo "8. Creating new data directory, initializing database" + echo "9. Creating new data directory, initializing database" chown -R postgres:postgres "$MOUNT_POINT/" rm -rf "${PGDATANEW:?}/" - su -c "$PGBINNEW/initdb -L $PGSHARENEW -D $PGDATANEW/" -s "$SHELL" postgres + + if [ "$IS_NIX_UPGRADE" = "true" ]; then + LC_ALL=en_US.UTF-8 LC_CTYPE=$SERVER_LC_CTYPE LC_COLLATE=$SERVER_LC_COLLATE LANGUAGE=en_US.UTF-8 LANG=en_US.UTF-8 LOCALE_ARCHIVE=/usr/lib/locale/locale-archive su -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && $PGBINNEW/initdb --encoding=$SERVER_ENCODING --lc-collate=$SERVER_LC_COLLATE --lc-ctype=$SERVER_LC_CTYPE -L $PGSHARENEW -D $PGDATANEW/ --username=supabase_admin" -s "$SHELL" postgres + else + su -c "$PGBINNEW/initdb -L $PGSHARENEW -D $PGDATANEW/ --username=supabase_admin" -s "$SHELL" postgres + fi + + # This line avoids the need to supply the supabase_admin password on the old + # instance, since pg_upgrade connects to the db as supabase_admin using unix + # sockets, which is gated behind scram-sha-256 per pg_hba.conf.j2. The new + # instance is unaffected. + if ! grep -q "local all supabase_admin trust" /etc/postgresql/pg_hba.conf; then + echo "local all supabase_admin trust +$(cat /etc/postgresql/pg_hba.conf)" > /etc/postgresql/pg_hba.conf + run_sql -c "select pg_reload_conf();" + fi UPGRADE_COMMAND=$(cat < /tmp/pg-upgrade-status -if [ "$IS_DRY_RUN" = true ]; then - initiate_upgrade -else +if [ -z "$IS_CI" ] && [ -z "$IS_LOCAL_UPGRADE" ]; then initiate_upgrade >> "$LOG_FILE" 2>&1 & echo "Upgrade initiate job completed" +else + rm -f /tmp/pg-upgrade-status + initiate_upgrade fi diff --git a/ansible/files/adminapi.service.j2 b/ansible/files/adminapi.service.j2 index 849d422d2..3b2821984 100644 --- a/ansible/files/adminapi.service.j2 +++ b/ansible/files/adminapi.service.j2 @@ -7,6 +7,10 @@ ExecStart=/opt/supabase-admin-api User=adminapi Restart=always RestartSec=3 +Environment="AWS_USE_DUALSTACK_ENDPOINT=true" +{% if qemu_mode is defined and qemu_mode %} +Environment="AWS_SDK_LOAD_CONFIG=true" +{% endif %} [Install] WantedBy=multi-user.target diff --git a/ansible/files/adminapi.sudoers.conf b/ansible/files/adminapi.sudoers.conf index fa7dae900..ae5537715 100644 --- a/ansible/files/adminapi.sudoers.conf +++ b/ansible/files/adminapi.sudoers.conf @@ -1,7 +1,8 @@ -Cmnd_Alias KONG = /bin/systemctl start kong.service, /bin/systemctl stop kong.service, /bin/systemctl restart kong.service, /bin/systemctl disable kong.service, /bin/systemctl enable kong.service, /bin/systemctl reload kong.service -Cmnd_Alias POSTGREST = /bin/systemctl start postgrest.service, /bin/systemctl stop postgrest.service, /bin/systemctl restart postgrest.service, /bin/systemctl disable postgrest.service, /bin/systemctl enable postgrest.service -Cmnd_Alias GOTRUE = /bin/systemctl start gotrue.service, /bin/systemctl stop gotrue.service, /bin/systemctl restart gotrue.service, /bin/systemctl disable gotrue.service, /bin/systemctl enable gotrue.service -Cmnd_Alias PGBOUNCER = /bin/systemctl start pgbouncer.service, /bin/systemctl stop pgbouncer.service, /bin/systemctl restart pgbouncer.service, /bin/systemctl disable pgbouncer.service, /bin/systemctl enable pgbouncer.service, /bin/systemctl reload pgbouncer.service +Cmnd_Alias ENVOY = /bin/systemctl start envoy.service, /bin/systemctl stop envoy.service, /bin/systemctl restart envoy.service, /bin/systemctl disable envoy.service, /bin/systemctl enable envoy.service, /bin/systemctl reload envoy.service, /bin/systemctl try-restart envoy.service +Cmnd_Alias KONG = /bin/systemctl start kong.service, /bin/systemctl stop kong.service, /bin/systemctl restart kong.service, /bin/systemctl disable kong.service, /bin/systemctl enable kong.service, /bin/systemctl reload kong.service, /bin/systemctl try-restart kong.service +Cmnd_Alias POSTGREST = /bin/systemctl start postgrest.service, /bin/systemctl stop postgrest.service, /bin/systemctl restart postgrest.service, /bin/systemctl disable postgrest.service, /bin/systemctl enable postgrest.service, /bin/systemctl try-restart postgrest.service +Cmnd_Alias GOTRUE = /bin/systemctl start gotrue.service, /bin/systemctl stop gotrue.service, /bin/systemctl restart gotrue.service, /bin/systemctl disable gotrue.service, /bin/systemctl enable gotrue.service, /bin/systemctl try-restart gotrue.service +Cmnd_Alias PGBOUNCER = /bin/systemctl start pgbouncer.service, /bin/systemctl stop pgbouncer.service, /bin/systemctl restart pgbouncer.service, /bin/systemctl disable pgbouncer.service, /bin/systemctl enable pgbouncer.service, /bin/systemctl reload pgbouncer.service, /bin/systemctl try-restart pgbouncer.service %adminapi ALL= NOPASSWD: /root/grow_fs.sh %adminapi ALL= NOPASSWD: /root/manage_readonly_mode.sh @@ -16,10 +17,13 @@ Cmnd_Alias PGBOUNCER = /bin/systemctl start pgbouncer.service, /bin/systemctl st %adminapi ALL= NOPASSWD: /usr/bin/systemctl restart postgresql.service %adminapi ALL= NOPASSWD: /usr/bin/systemctl show -p NRestarts postgresql.service %adminapi ALL= NOPASSWD: /usr/bin/systemctl restart adminapi.service +%adminapi ALL= NOPASSWD: /usr/bin/systemctl is-active commence-backup.service +%adminapi ALL= NOPASSWD: /usr/bin/systemctl start commence-backup.service %adminapi ALL= NOPASSWD: /bin/systemctl daemon-reload %adminapi ALL= NOPASSWD: /bin/systemctl restart services.slice %adminapi ALL= NOPASSWD: /usr/sbin/nft -f /etc/nftables/supabase_managed.conf %adminapi ALL= NOPASSWD: /usr/bin/admin-mgr +%adminapi ALL= NOPASSWD: ENVOY %adminapi ALL= NOPASSWD: KONG %adminapi ALL= NOPASSWD: POSTGREST %adminapi ALL= NOPASSWD: GOTRUE diff --git a/ansible/files/commence-backup.service.j2 b/ansible/files/commence-backup.service.j2 new file mode 100644 index 000000000..9d4ad0c68 --- /dev/null +++ b/ansible/files/commence-backup.service.j2 @@ -0,0 +1,12 @@ +[Unit] +Description=Async commence physical backup + +[Service] +Type=simple +User=adminapi +ExecStart=/usr/bin/admin-mgr commence-backup --run-as-service true +Restart=no +OOMScoreAdjust=-1000 + +[Install] +WantedBy=multi-user.target diff --git a/ansible/files/envoy.service b/ansible/files/envoy.service new file mode 100644 index 000000000..d739ffdd5 --- /dev/null +++ b/ansible/files/envoy.service @@ -0,0 +1,31 @@ +[Unit] +Description=Envoy +After=postgrest.service gotrue.service adminapi.service +Wants=postgrest.service gotrue.service adminapi.service +Conflicts=kong.service + +[Service] +Type=simple + +ExecStartPre=sh -c 'if ss -lnt | grep -Eq ":(80|443) "; then echo "Port 80 or 443 already in use"; exit 1; fi' + +# Need to run via a restarter script to support hot restart when using a process +# manager, see: +# https://www.envoyproxy.io/docs/envoy/latest/operations/hot_restarter +ExecStart=/opt/envoy-hot-restarter.py /opt/start-envoy.sh + +ExecReload=/bin/kill -HUP $MAINPID +ExecStop=/bin/kill -TERM $MAINPID +User=envoy +Slice=services.slice +Restart=always +RestartSec=3 +LimitNOFILE=100000 + +# The envoy user is unprivileged and thus not permitted to bind on ports < 1024 +# Via systemd we grant the process a set of privileges to bind to 80/443 +# See http://archive.vn/36zJU +AmbientCapabilities=CAP_NET_BIND_SERVICE + +[Install] +WantedBy=multi-user.target diff --git a/ansible/files/envoy_config/cds.yaml b/ansible/files/envoy_config/cds.yaml new file mode 100644 index 000000000..48fd1b9a5 --- /dev/null +++ b/ansible/files/envoy_config/cds.yaml @@ -0,0 +1,86 @@ +resources: + - '@type': type.googleapis.com/envoy.config.cluster.v3.Cluster + name: admin_api + load_assignment: + cluster_name: admin_api + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 8085 + circuit_breakers: + thresholds: + - priority: DEFAULT + max_connections: 10000 + max_pending_requests: 10000 + max_requests: 10000 + retry_budget: + budget_percent: + value: 100 + min_retry_concurrency: 100 + - '@type': type.googleapis.com/envoy.config.cluster.v3.Cluster + name: gotrue + load_assignment: + cluster_name: gotrue + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 9999 + circuit_breakers: + thresholds: + - priority: DEFAULT + max_connections: 10000 + max_pending_requests: 10000 + max_requests: 10000 + retry_budget: + budget_percent: + value: 100 + min_retry_concurrency: 100 + - '@type': type.googleapis.com/envoy.config.cluster.v3.Cluster + name: postgrest + load_assignment: + cluster_name: postgrest + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 3000 + circuit_breakers: + thresholds: + - priority: DEFAULT + max_connections: 10000 + max_pending_requests: 10000 + max_requests: 10000 + retry_budget: + budget_percent: + value: 100 + min_retry_concurrency: 100 + - '@type': type.googleapis.com/envoy.config.cluster.v3.Cluster + name: postgrest_admin + load_assignment: + cluster_name: postgrest_admin + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: 127.0.0.1 + port_value: 3001 + circuit_breakers: + thresholds: + - priority: DEFAULT + max_connections: 10000 + max_pending_requests: 10000 + max_requests: 10000 + retry_budget: + budget_percent: + value: 100 + min_retry_concurrency: 100 + diff --git a/ansible/files/envoy_config/envoy.yaml b/ansible/files/envoy_config/envoy.yaml new file mode 100644 index 000000000..3d25c13cd --- /dev/null +++ b/ansible/files/envoy_config/envoy.yaml @@ -0,0 +1,23 @@ +dynamic_resources: + cds_config: + path_config_source: + path: /etc/envoy/cds.yaml + resource_api_version: V3 + lds_config: + path_config_source: + path: /etc/envoy/lds.yaml + resource_api_version: V3 +node: + cluster: cluster_0 + id: node_0 +overload_manager: + resource_monitors: + - name: envoy.resource_monitors.global_downstream_max_connections + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig + max_active_downstream_connections: 30000 +stats_config: + stats_matcher: + reject_all: true + diff --git a/ansible/files/envoy_config/lds.supabase.yaml b/ansible/files/envoy_config/lds.supabase.yaml new file mode 100644 index 000000000..6fdcb68c7 --- /dev/null +++ b/ansible/files/envoy_config/lds.supabase.yaml @@ -0,0 +1,396 @@ +resources: + - '@type': type.googleapis.com/envoy.config.listener.v3.Listener + name: http_listener + address: + socket_address: + address: '::' + port_value: 80 + ipv4_compat: true + filter_chains: + - filters: &ref_1 + - name: envoy.filters.network.http_connection_manager + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + access_log: + - name: envoy.access_loggers.stdout + filter: + status_code_filter: + comparison: + op: GE + value: + default_value: 400 + runtime_key: unused + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog + generate_request_id: false + http_filters: + - name: envoy.filters.http.cors + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.cors.v3.Cors + - name: envoy.filters.http.rbac + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.rbac.v3.RBAC + rules: + action: DENY + policies: + origin_protection_key_missing: + permissions: + - any: true + principals: + - not_id: + header: + name: sb-opk + present_match: true + origin_protection_key_not_valid: + permissions: + - any: true + principals: + - not_id: + or_ids: + ids: + - header: + name: sb-opk + string_match: + exact: supabase_origin_protection_key + - name: envoy.filters.http.lua + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua + source_codes: + remove_apikey_and_empty_key_query_parameters: + inline_string: |- + function envoy_on_request(request_handle) + local path = request_handle:headers():get(":path") + request_handle + :headers() + :replace(":path", path:gsub("&=[^&]*", ""):gsub("?=[^&]*$", ""):gsub("?=[^&]*&", "?"):gsub("&apikey=[^&]*", ""):gsub("?apikey=[^&]*$", ""):gsub("?apikey=[^&]*&", "?")) + end + remove_empty_key_query_parameters: + inline_string: |- + function envoy_on_request(request_handle) + local path = request_handle:headers():get(":path") + request_handle + :headers() + :replace(":path", path:gsub("&=[^&]*", ""):gsub("?=[^&]*$", ""):gsub("?=[^&]*&", "?")) + end + - name: envoy.filters.http.compressor.brotli + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.compressor.v3.Compressor + response_direction_config: + common_config: + min_content_length: 100 + content_type: + - application/vnd.pgrst.object+json + - application/vnd.pgrst.array+json + - application/openapi+json + - application/geo+json + - text/csv + - application/vnd.pgrst.plan + - application/vnd.pgrst.object + - application/vnd.pgrst.array + - application/javascript + - application/json + - application/xhtml+xml + - image/svg+xml + - text/css + - text/html + - text/plain + - text/xml + disable_on_etag_header: true + request_direction_config: + common_config: + enabled: + default_value: false + runtime_key: request_compressor_enabled + compressor_library: + name: text_optimized + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.compression.brotli.compressor.v3.Brotli + - name: envoy.filters.http.compressor.gzip + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.compressor.v3.Compressor + response_direction_config: + common_config: + min_content_length: 100 + content_type: + - application/vnd.pgrst.object+json + - application/vnd.pgrst.array+json + - application/openapi+json + - application/geo+json + - text/csv + - application/vnd.pgrst.plan + - application/vnd.pgrst.object + - application/vnd.pgrst.array + - application/javascript + - application/json + - application/xhtml+xml + - image/svg+xml + - text/css + - text/html + - text/plain + - text/xml + disable_on_etag_header: true + request_direction_config: + common_config: + enabled: + default_value: false + runtime_key: request_compressor_enabled + compressor_library: + name: text_optimized + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.compression.gzip.compressor.v3.Gzip + - name: envoy.filters.http.router + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.router.v3.Router + dynamic_stats: false + local_reply_config: + mappers: + - filter: + and_filter: + filters: + - status_code_filter: + comparison: + value: + default_value: 403 + runtime_key: unused + - header_filter: + header: + name: ':path' + string_match: + prefix: /customer/v1/privileged/ + status_code: 401 + body: + inline_string: Unauthorized + headers_to_add: + - header: + key: WWW-Authenticate + value: Basic realm="Unknown" + - filter: + and_filter: + filters: + - status_code_filter: + comparison: + value: + default_value: 403 + runtime_key: unused + - header_filter: + header: + name: ':path' + string_match: + prefix: /metrics/aggregated + invert_match: true + status_code: 401 + headers_to_add: + - header: + key: x-sb-error-code + value: '%RESPONSE_CODE_DETAILS%' + body_format_override: + json_format: + message: >- + `apikey` request header or query parameter is either + missing or invalid. Double check your Supabase `anon` + or `service_role` API key. + hint: '%RESPONSE_CODE_DETAILS%' + json_format_options: + sort_properties: false + merge_slashes: true + route_config: + name: route_config_0 + virtual_hosts: + - name: virtual_host_0 + domains: + - '*' + typed_per_filter_config: + envoy.filters.http.cors: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.cors.v3.CorsPolicy + allow_origin_string_match: + - safe_regex: + regex: \* + allow_methods: GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS,TRACE,CONNECT + allow_headers: apikey,authorization,x-client-info + max_age: '3600' + routes: + - match: + path: /health + direct_response: + status: 200 + body: + inline_string: Healthy + typed_per_filter_config: &ref_0 + envoy.filters.http.rbac: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.rbac.v3.RBACPerRoute + - match: + safe_regex: + google_re2: + max_program_size: 150 + regex: >- + /auth/v1/(verify|callback|authorize|sso/saml/(acs|metadata|slo)|\.well-known/(openid-configuration|jwks\.json)) + request_headers_to_remove: + - apikey + - sb-opk + route: + cluster: gotrue + regex_rewrite: + pattern: + regex: ^/auth/v1 + substitution: '' + retry_policy: + num_retries: 3 + retry_on: 5xx + timeout: 35s + typed_per_filter_config: *ref_0 + - match: + prefix: /auth/v1/ + request_headers_to_remove: + - apikey + - sb-opk + route: + cluster: gotrue + prefix_rewrite: / + timeout: 35s + - match: + prefix: /rest/v1/ + query_parameters: + - name: apikey + present_match: true + request_headers_to_remove: + - apikey + - sb-opk + route: + cluster: postgrest + prefix_rewrite: / + timeout: 125s + typed_per_filter_config: + envoy.filters.http.lua: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute + name: remove_apikey_and_empty_key_query_parameters + - match: + prefix: /rest/v1/ + request_headers_to_remove: + - apikey + - sb-opk + route: + cluster: postgrest + prefix_rewrite: / + timeout: 125s + typed_per_filter_config: + envoy.filters.http.lua: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute + name: remove_empty_key_query_parameters + - match: + prefix: /rest-admin/v1/ + query_parameters: + - name: apikey + present_match: true + request_headers_to_remove: + - apikey + - sb-opk + route: + cluster: postgrest_admin + prefix_rewrite: / + typed_per_filter_config: + envoy.filters.http.lua: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute + name: remove_apikey_and_empty_key_query_parameters + - match: + prefix: /rest-admin/v1/ + request_headers_to_remove: + - apikey + - sb-opk + route: + cluster: postgrest_admin + prefix_rewrite: / + - match: + path: /graphql/v1 + request_headers_to_add: + header: + key: Content-Profile + value: graphql_public + request_headers_to_remove: + - apikey + - sb-opk + route: + cluster: postgrest + prefix_rewrite: /rpc/graphql + timeout: 125s + - match: + prefix: /admin/v1/ + request_headers_to_remove: + - sb-opk + route: + cluster: admin_api + prefix_rewrite: / + timeout: 600s + - match: + prefix: /customer/v1/privileged/ + request_headers_to_remove: + - sb-opk + route: + cluster: admin_api + prefix_rewrite: /privileged/ + - match: + prefix: /metrics/aggregated + request_headers_to_remove: + - sb-opk + route: + cluster: admin_api + prefix_rewrite: /supabase-internal/metrics + typed_per_filter_config: + envoy.filters.http.rbac: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.rbac.v3.RBACPerRoute + rbac: + rules: + action: DENY + policies: + not_private_ip: + permissions: + - any: true + principals: + - not_id: + direct_remote_ip: + address_prefix: 10.0.0.0 + prefix_len: 8 + include_attempt_count_in_response: true + retry_policy: + num_retries: 5 + retry_back_off: + base_interval: 0.1s + max_interval: 1s + retry_on: gateway-error + stat_prefix: ingress_http + - '@type': type.googleapis.com/envoy.config.listener.v3.Listener + name: https_listener + address: + socket_address: + address: '::' + port_value: 443 + ipv4_compat: true + filter_chains: + - filters: *ref_1 + transport_socket: + name: envoy.transport_sockets.tls + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext + common_tls_context: + tls_certificates: + - certificate_chain: + filename: /etc/envoy/fullChain.pem + private_key: + filename: /etc/envoy/privKey.pem + diff --git a/ansible/files/envoy_config/lds.yaml b/ansible/files/envoy_config/lds.yaml new file mode 100644 index 000000000..97481c889 --- /dev/null +++ b/ansible/files/envoy_config/lds.yaml @@ -0,0 +1,440 @@ +resources: + - '@type': type.googleapis.com/envoy.config.listener.v3.Listener + name: http_listener + address: + socket_address: + address: '::' + port_value: 80 + ipv4_compat: true + filter_chains: + - filters: &ref_1 + - name: envoy.filters.network.http_connection_manager + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + access_log: + - name: envoy.access_loggers.stdout + filter: + status_code_filter: + comparison: + op: GE + value: + default_value: 400 + runtime_key: unused + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog + generate_request_id: false + http_filters: + - name: envoy.filters.http.cors + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.cors.v3.Cors + - name: envoy.filters.http.rbac + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.rbac.v3.RBAC + rules: + action: DENY + policies: + api_key_missing: + permissions: + - any: true + principals: + - not_id: + or_ids: + ids: + - header: + name: apikey + present_match: true + - header: + name: ':path' + string_match: + contains: apikey= + api_key_not_valid: + permissions: + - any: true + principals: + - not_id: + or_ids: + ids: + - header: + name: apikey + string_match: + exact: anon_key + - header: + name: apikey + string_match: + exact: service_key + - header: + name: apikey + string_match: + exact: supabase_admin_key + - header: + name: ':path' + string_match: + contains: apikey=anon_key + - header: + name: ':path' + string_match: + contains: apikey=service_key + - header: + name: ':path' + string_match: + contains: apikey=supabase_admin_key + - name: envoy.filters.http.lua + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua + source_codes: + remove_apikey_and_empty_key_query_parameters: + inline_string: |- + function envoy_on_request(request_handle) + local path = request_handle:headers():get(":path") + request_handle + :headers() + :replace(":path", path:gsub("&=[^&]*", ""):gsub("?=[^&]*$", ""):gsub("?=[^&]*&", "?"):gsub("&apikey=[^&]*", ""):gsub("?apikey=[^&]*$", ""):gsub("?apikey=[^&]*&", "?")) + end + remove_empty_key_query_parameters: + inline_string: |- + function envoy_on_request(request_handle) + local path = request_handle:headers():get(":path") + request_handle + :headers() + :replace(":path", path:gsub("&=[^&]*", ""):gsub("?=[^&]*$", ""):gsub("?=[^&]*&", "?")) + end + - name: envoy.filters.http.compressor.brotli + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.compressor.v3.Compressor + response_direction_config: + common_config: + min_content_length: 100 + content_type: + - application/vnd.pgrst.object+json + - application/vnd.pgrst.array+json + - application/openapi+json + - application/geo+json + - text/csv + - application/vnd.pgrst.plan + - application/vnd.pgrst.object + - application/vnd.pgrst.array + - application/javascript + - application/json + - application/xhtml+xml + - image/svg+xml + - text/css + - text/html + - text/plain + - text/xml + disable_on_etag_header: true + request_direction_config: + common_config: + enabled: + default_value: false + runtime_key: request_compressor_enabled + compressor_library: + name: text_optimized + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.compression.brotli.compressor.v3.Brotli + - name: envoy.filters.http.compressor.gzip + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.compressor.v3.Compressor + response_direction_config: + common_config: + min_content_length: 100 + content_type: + - application/vnd.pgrst.object+json + - application/vnd.pgrst.array+json + - application/openapi+json + - application/geo+json + - text/csv + - application/vnd.pgrst.plan + - application/vnd.pgrst.object + - application/vnd.pgrst.array + - application/javascript + - application/json + - application/xhtml+xml + - image/svg+xml + - text/css + - text/html + - text/plain + - text/xml + disable_on_etag_header: true + request_direction_config: + common_config: + enabled: + default_value: false + runtime_key: request_compressor_enabled + compressor_library: + name: text_optimized + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.compression.gzip.compressor.v3.Gzip + - name: envoy.filters.http.router + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.router.v3.Router + dynamic_stats: false + local_reply_config: + mappers: + - filter: + and_filter: + filters: + - status_code_filter: + comparison: + value: + default_value: 403 + runtime_key: unused + - header_filter: + header: + name: ':path' + string_match: + prefix: /customer/v1/privileged/ + status_code: 401 + body: + inline_string: Unauthorized + headers_to_add: + - header: + key: WWW-Authenticate + value: Basic realm="Unknown" + - filter: + and_filter: + filters: + - status_code_filter: + comparison: + value: + default_value: 403 + runtime_key: unused + - header_filter: + header: + name: ':path' + string_match: + prefix: /metrics/aggregated + invert_match: true + status_code: 401 + headers_to_add: + - header: + key: x-sb-error-code + value: '%RESPONSE_CODE_DETAILS%' + body_format_override: + json_format: + message: >- + `apikey` request header or query parameter is either + missing or invalid. Double check your Supabase `anon` + or `service_role` API key. + hint: '%RESPONSE_CODE_DETAILS%' + json_format_options: + sort_properties: false + merge_slashes: true + route_config: + name: route_config_0 + virtual_hosts: + - name: virtual_host_0 + domains: + - '*' + typed_per_filter_config: + envoy.filters.http.cors: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.cors.v3.CorsPolicy + allow_origin_string_match: + - safe_regex: + regex: \* + allow_methods: GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS,TRACE,CONNECT + allow_headers: apikey,authorization,x-client-info + max_age: '3600' + routes: + - match: + path: /health + direct_response: + status: 200 + body: + inline_string: Healthy + typed_per_filter_config: &ref_0 + envoy.filters.http.rbac: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.rbac.v3.RBACPerRoute + - match: + safe_regex: + google_re2: + max_program_size: 150 + regex: >- + /auth/v1/(verify|callback|authorize|sso/saml/(acs|metadata|slo)|\.well-known/(openid-configuration|jwks\.json)) + request_headers_to_remove: + - apikey + - sb-opk + route: + cluster: gotrue + regex_rewrite: + pattern: + regex: ^/auth/v1 + substitution: '' + retry_policy: + num_retries: 3 + retry_on: 5xx + timeout: 35s + typed_per_filter_config: *ref_0 + - match: + prefix: /auth/v1/ + request_headers_to_remove: + - apikey + - sb-opk + route: + cluster: gotrue + prefix_rewrite: / + timeout: 35s + - match: + prefix: /rest/v1/ + query_parameters: + - name: apikey + present_match: true + request_headers_to_remove: + - apikey + - sb-opk + route: + cluster: postgrest + prefix_rewrite: / + timeout: 125s + typed_per_filter_config: + envoy.filters.http.lua: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute + name: remove_apikey_and_empty_key_query_parameters + - match: + prefix: /rest/v1/ + request_headers_to_remove: + - apikey + - sb-opk + route: + cluster: postgrest + prefix_rewrite: / + timeout: 125s + typed_per_filter_config: + envoy.filters.http.lua: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute + name: remove_empty_key_query_parameters + - match: + prefix: /rest-admin/v1/ + query_parameters: + - name: apikey + present_match: true + request_headers_to_remove: + - apikey + - sb-opk + route: + cluster: postgrest_admin + prefix_rewrite: / + typed_per_filter_config: + envoy.filters.http.lua: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute + name: remove_apikey_and_empty_key_query_parameters + - match: + prefix: /rest-admin/v1/ + request_headers_to_remove: + - apikey + - sb-opk + route: + cluster: postgrest_admin + prefix_rewrite: / + - match: + path: /graphql/v1 + request_headers_to_add: + header: + key: Content-Profile + value: graphql_public + request_headers_to_remove: + - apikey + - sb-opk + route: + cluster: postgrest + prefix_rewrite: /rpc/graphql + timeout: 125s + - match: + prefix: /admin/v1/ + request_headers_to_remove: + - sb-opk + route: + cluster: admin_api + prefix_rewrite: / + timeout: 600s + - match: + prefix: /customer/v1/privileged/ + request_headers_to_remove: + - sb-opk + route: + cluster: admin_api + prefix_rewrite: /privileged/ + typed_per_filter_config: + envoy.filters.http.rbac: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.rbac.v3.RBACPerRoute + rbac: + rules: + action: DENY + policies: + basic_auth: + permissions: + - any: true + principals: + - header: + name: authorization + invert_match: true + string_match: + exact: Basic c2VydmljZV9yb2xlOnNlcnZpY2Vfa2V5 + treat_missing_header_as_empty: true + - match: + prefix: /metrics/aggregated + request_headers_to_remove: + - sb-opk + route: + cluster: admin_api + prefix_rewrite: /supabase-internal/metrics + typed_per_filter_config: + envoy.filters.http.rbac: + '@type': >- + type.googleapis.com/envoy.extensions.filters.http.rbac.v3.RBACPerRoute + rbac: + rules: + action: DENY + policies: + not_private_ip: + permissions: + - any: true + principals: + - not_id: + direct_remote_ip: + address_prefix: 10.0.0.0 + prefix_len: 8 + include_attempt_count_in_response: true + retry_policy: + num_retries: 5 + retry_back_off: + base_interval: 0.1s + max_interval: 1s + retry_on: gateway-error + stat_prefix: ingress_http + - '@type': type.googleapis.com/envoy.config.listener.v3.Listener + name: https_listener + address: + socket_address: + address: '::' + port_value: 443 + ipv4_compat: true + filter_chains: + - filters: *ref_1 + transport_socket: + name: envoy.transport_sockets.tls + typed_config: + '@type': >- + type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext + common_tls_context: + tls_certificates: + - certificate_chain: + filename: /etc/envoy/fullChain.pem + private_key: + filename: /etc/envoy/privKey.pem + diff --git a/ansible/files/gotrue-optimizations.service.j2 b/ansible/files/gotrue-optimizations.service.j2 new file mode 100644 index 000000000..fe5b26cd7 --- /dev/null +++ b/ansible/files/gotrue-optimizations.service.j2 @@ -0,0 +1,12 @@ +[Unit] +Description=GoTrue (Auth) optimizations + +[Service] +Type=oneshot +# we don't want failures from this command to cause PG startup to fail +ExecStart=/bin/bash -c "/opt/supabase-admin-api optimize auth --destination-config-file-path /etc/gotrue/gotrue.generated.env ; exit 0" +ExecStartPost=/bin/bash -c "cp -a /etc/gotrue/gotrue.generated.env /etc/auth.d/20_generated.env ; exit 0" +User=postgrest + +[Install] +WantedBy=multi-user.target diff --git a/ansible/files/gotrue.service.j2 b/ansible/files/gotrue.service.j2 index c37a2368f..272e5b871 100644 --- a/ansible/files/gotrue.service.j2 +++ b/ansible/files/gotrue.service.j2 @@ -4,7 +4,7 @@ Description=Gotrue [Service] Type=simple WorkingDirectory=/opt/gotrue -ExecStart=/opt/gotrue/gotrue +ExecStart=/opt/gotrue/gotrue --config-dir /etc/auth.d User=gotrue Restart=always RestartSec=3 @@ -12,7 +12,9 @@ RestartSec=3 MemoryAccounting=true MemoryMax=50% +EnvironmentFile=-/etc/gotrue.generated.env EnvironmentFile=/etc/gotrue.env +EnvironmentFile=-/etc/gotrue.overrides.env Slice=services.slice diff --git a/ansible/files/kong_config/kong.conf.j2 b/ansible/files/kong_config/kong.conf.j2 index 54ce718c2..39067575e 100644 --- a/ansible/files/kong_config/kong.conf.j2 +++ b/ansible/files/kong_config/kong.conf.j2 @@ -4,4 +4,4 @@ declarative_config = /etc/kong/kong.yml # plugins defined in the dockerfile plugins = request-transformer,cors,key-auth,http-log -proxy_listen = 0.0.0.0:80 reuseport backlog=16384, 0.0.0.0:443 http2 ssl reuseport backlog=16834 +proxy_listen = 0.0.0.0:80 reuseport backlog=16384, 0.0.0.0:443 http2 ssl reuseport backlog=16834, [::]:80 reuseport backlog=16384, [::]:443 http2 ssl reuseport backlog=16384 diff --git a/ansible/files/kong_config/kong.service.j2 b/ansible/files/kong_config/kong.service.j2 index 6df4b55c6..6a36520bc 100644 --- a/ansible/files/kong_config/kong.service.j2 +++ b/ansible/files/kong_config/kong.service.j2 @@ -2,12 +2,16 @@ Description=Kong server After=postgrest.service gotrue.service adminapi.service Wants=postgrest.service gotrue.service adminapi.service +Conflicts=envoy.service + +# Ensures that Kong service is stopped before Envoy service is started +Before=envoy.service [Service] Type=forking ExecStart=/usr/local/bin/kong start -c /etc/kong/kong.conf ExecReload=/usr/local/bin/kong reload -c /etc/kong/kong.conf -ExecStop=/usr/local/bin/kong stop +ExecStop=/usr/local/bin/kong quit User=kong EnvironmentFile=/etc/kong/kong.env Slice=services.slice @@ -15,8 +19,8 @@ Restart=always RestartSec=3 LimitNOFILE=100000 -# The kong user is unpriviledged and thus not permited to bind on ports < 1024 -# Via systemd we grant the process a set of priviledges to bind to 80/443 +# The kong user is unprivileged and thus not permitted to bind on ports < 1024 +# Via systemd we grant the process a set of privileges to bind to 80/443 # See http://archive.vn/36zJU AmbientCapabilities=CAP_NET_BIND_SERVICE diff --git a/ansible/files/permission_check.py b/ansible/files/permission_check.py new file mode 100644 index 000000000..a753f69ec --- /dev/null +++ b/ansible/files/permission_check.py @@ -0,0 +1,255 @@ +import subprocess +import json +import sys +import argparse + + +# Expected groups for each user +expected_results = { + "postgres": [ + {"groupname": "postgres", "username": "postgres"}, + {"groupname": "ssl-cert", "username": "postgres"}, + ], + "ubuntu": [ + {"groupname": "adm", "username": "ubuntu"}, + {"groupname": "audio", "username": "ubuntu"}, + {"groupname": "cdrom", "username": "ubuntu"}, + {"groupname": "dialout", "username": "ubuntu"}, + {"groupname": "dip", "username": "ubuntu"}, + {"groupname": "floppy", "username": "ubuntu"}, + {"groupname": "lxd", "username": "ubuntu"}, + {"groupname": "netdev", "username": "ubuntu"}, + {"groupname": "plugdev", "username": "ubuntu"}, + {"groupname": "sudo", "username": "ubuntu"}, + {"groupname": "ubuntu", "username": "ubuntu"}, + {"groupname": "video", "username": "ubuntu"}, + ], + "root": [{"groupname": "root", "username": "root"}], + "daemon": [{"groupname": "daemon", "username": "daemon"}], + "bin": [{"groupname": "bin", "username": "bin"}], + "sys": [{"groupname": "sys", "username": "sys"}], + "sync": [{"groupname": "nogroup", "username": "sync"}], + "games": [{"groupname": "games", "username": "games"}], + "man": [{"groupname": "man", "username": "man"}], + "lp": [{"groupname": "lp", "username": "lp"}], + "mail": [{"groupname": "mail", "username": "mail"}], + "news": [{"groupname": "news", "username": "news"}], + "uucp": [{"groupname": "uucp", "username": "uucp"}], + "proxy": [{"groupname": "proxy", "username": "proxy"}], + "www-data": [{"groupname": "www-data", "username": "www-data"}], + "backup": [{"groupname": "backup", "username": "backup"}], + "list": [{"groupname": "list", "username": "list"}], + "irc": [{"groupname": "irc", "username": "irc"}], + "gnats": [{"groupname": "gnats", "username": "gnats"}], + "nobody": [{"groupname": "nogroup", "username": "nobody"}], + "systemd-network": [ + {"groupname": "systemd-network", "username": "systemd-network"} + ], + "systemd-resolve": [ + {"groupname": "systemd-resolve", "username": "systemd-resolve"} + ], + "systemd-timesync": [ + {"groupname": "systemd-timesync", "username": "systemd-timesync"} + ], + "messagebus": [{"groupname": "messagebus", "username": "messagebus"}], + "ec2-instance-connect": [ + {"groupname": "nogroup", "username": "ec2-instance-connect"} + ], + "sshd": [{"groupname": "nogroup", "username": "sshd"}], + "wal-g": [ + {"groupname": "postgres", "username": "wal-g"}, + {"groupname": "wal-g", "username": "wal-g"}, + ], + "pgbouncer": [ + {"groupname": "pgbouncer", "username": "pgbouncer"}, + {"groupname": "postgres", "username": "pgbouncer"}, + {"groupname": "ssl-cert", "username": "pgbouncer"}, + ], + "gotrue": [{"groupname": "gotrue", "username": "gotrue"}], + "envoy": [{"groupname": "envoy", "username": "envoy"}], + "kong": [{"groupname": "kong", "username": "kong"}], + "nginx": [{"groupname": "nginx", "username": "nginx"}], + "vector": [ + {"groupname": "adm", "username": "vector"}, + {"groupname": "postgres", "username": "vector"}, + {"groupname": "systemd-journal", "username": "vector"}, + {"groupname": "vector", "username": "vector"}, + ], + "adminapi": [ + {"groupname": "admin", "username": "adminapi"}, + {"groupname": "adminapi", "username": "adminapi"}, + {"groupname": "envoy", "username": "adminapi"}, + {"groupname": "gotrue", "username": "adminapi"}, + {"groupname": "kong", "username": "adminapi"}, + {"groupname": "pgbouncer", "username": "adminapi"}, + {"groupname": "postgres", "username": "adminapi"}, + {"groupname": "postgrest", "username": "adminapi"}, + {"groupname": "root", "username": "adminapi"}, + {"groupname": "systemd-journal", "username": "adminapi"}, + {"groupname": "vector", "username": "adminapi"}, + {"groupname": "wal-g", "username": "adminapi"}, + ], + "postgrest": [{"groupname": "postgrest", "username": "postgrest"}], + "tcpdump": [{"groupname": "tcpdump", "username": "tcpdump"}], + "systemd-coredump": [ + {"groupname": "systemd-coredump", "username": "systemd-coredump"} + ], +} + +# postgresql.service is expected to mount /etc as read-only +expected_mount = "/etc ro" + +# This program depends on osquery being installed on the system +# Function to run osquery +def run_osquery(query): + process = subprocess.Popen( + ["osqueryi", "--json", query], stdout=subprocess.PIPE, stderr=subprocess.PIPE + ) + output, error = process.communicate() + return output.decode("utf-8") + + +def parse_json(json_str): + try: + return json.loads(json_str) + except json.JSONDecodeError as e: + print("Error decoding JSON:", e) + sys.exit(1) + + +def compare_results(username, query_result): + expected_result = expected_results.get(username) + if expected_result is None: + print(f"No expected result defined for user '{username}'") + sys.exit(1) + + if query_result == expected_result: + print(f"The query result for user '{username}' matches the expected result.") + else: + print( + f"The query result for user '{username}' does not match the expected result." + ) + print("Expected:", expected_result) + print("Got:", query_result) + sys.exit(1) + + +def check_nixbld_users(): + query = """ + SELECT u.username, g.groupname + FROM users u + JOIN user_groups ug ON u.uid = ug.uid + JOIN groups g ON ug.gid = g.gid + WHERE u.username LIKE 'nixbld%'; + """ + query_result = run_osquery(query) + parsed_result = parse_json(query_result) + + for user in parsed_result: + if user["groupname"] != "nixbld": + print( + f"User '{user['username']}' is in group '{user['groupname']}' instead of 'nixbld'." + ) + sys.exit(1) + + print("All nixbld users are in the 'nixbld' group.") + +def check_postgresql_mount(): + # processes table has the nix .postgres-wrapped path as the + # binary path, rather than /usr/lib/postgresql/bin/postgres which + # is a symlink to /var/lib/postgresql/.nix-profile/bin/postgres, a script + # that ultimately calls /nix/store/...-postgresql-and-plugins-15.8/bin/.postgres-wrapped + query = """ + SELECT pid + FROM processes + WHERE path LIKE '%.postgres-wrapped%' + AND cmdline LIKE '%-D /etc/postgresql%'; + """ + query_result = run_osquery(query) + parsed_result = parse_json(query_result) + + pid = parsed_result[0].get("pid") + + # get the mounts for the process + with open(f"/proc/{pid}/mounts", "r") as o: + lines = [line for line in o if "/etc" in line and "ro," in line] + if len(lines) == 0: + print(f"Expected exactly 1 match, got 0") + sys.exit(1) + if len(lines) != 1: + print(f"Expected exactly 1 match, got {len(lines)}: {';'.join(lines)}") + sys.exit(1) + + print("postgresql.service mounts /etc as read-only.") + +def main(): + parser = argparse.ArgumentParser( + prog="Supabase Postgres Artifact Permissions Checker", + description="Checks the Postgres Artifact for the appropriate users and group memberships", + ) + parser.add_argument( + "-q", + "--qemu", + action="https://github.com/store_true", + help="Whether we are checking a QEMU artifact", + ) + args = parser.parse_args() + qemu_artifact = args.qemu or False + + # Define usernames for which you want to compare results + usernames = [ + "postgres", + "ubuntu", + "root", + "daemon", + "bin", + "sys", + "sync", + "games", + "man", + "lp", + "mail", + "news", + "uucp", + "proxy", + "www-data", + "backup", + "list", + "irc", + "gnats", + "nobody", + "systemd-network", + "systemd-resolve", + "systemd-timesync", + "messagebus", + "sshd", + "wal-g", + "pgbouncer", + "gotrue", + "envoy", + "kong", + "nginx", + "vector", + "adminapi", + "postgrest", + "tcpdump", + "systemd-coredump", + ] + if not qemu_artifact: + usernames.append("ec2-instance-connect") + + # Iterate over usernames, run the query, and compare results + for username in usernames: + query = f"SELECT u.username, g.groupname FROM users u JOIN user_groups ug ON u.uid = ug.uid JOIN groups g ON ug.gid = g.gid WHERE u.username = '{username}' ORDER BY g.groupname;" + query_result = run_osquery(query) + parsed_result = parse_json(query_result) + compare_results(username, parsed_result) + + # Check if all nixbld users are in the nixbld group + check_nixbld_users() + + # Check if postgresql.service is using a read-only mount for /etc + check_postgresql_mount() + +if __name__ == "__main__": + main() diff --git a/ansible/files/pgbouncer_config/pgbouncer.ini.j2 b/ansible/files/pgbouncer_config/pgbouncer.ini.j2 index bad7eb46f..e4518c007 100644 --- a/ansible/files/pgbouncer_config/pgbouncer.ini.j2 +++ b/ansible/files/pgbouncer_config/pgbouncer.ini.j2 @@ -51,7 +51,7 @@ pidfile = /var/run/pgbouncer/pgbouncer.pid ;;; ;; IP address or * which means all IPs -listen_addr = 0.0.0.0 +listen_addr = * listen_port = 6543 ;; Unix socket is also used for -R. diff --git a/ansible/files/pgbouncer_config/pgbouncer.service.j2 b/ansible/files/pgbouncer_config/pgbouncer.service.j2 index 1ec5ea378..7fcc9acbe 100644 --- a/ansible/files/pgbouncer_config/pgbouncer.service.j2 +++ b/ansible/files/pgbouncer_config/pgbouncer.service.j2 @@ -15,6 +15,8 @@ ExecStart=/usr/local/bin/pgbouncer /etc/pgbouncer/pgbouncer.ini ExecReload=/bin/kill -HUP $MAINPID KillSignal=SIGINT LimitNOFILE=65536 +Restart=always +RestartSec=5 [Install] WantedBy=multi-user.target diff --git a/ansible/files/postgres_exporter.service.j2 b/ansible/files/postgres_exporter.service.j2 index f8d5fb5ed..0066a76b2 100644 --- a/ansible/files/postgres_exporter.service.j2 +++ b/ansible/files/postgres_exporter.service.j2 @@ -3,8 +3,9 @@ Description=Postgres Exporter [Service] Type=simple -ExecStart=/opt/postgres_exporter/postgres_exporter --disable-settings-metrics --extend.query-path="/opt/postgres_exporter/queries.yml" --disable-default-metrics -User=root +ExecStart=/opt/postgres_exporter/postgres_exporter --disable-settings-metrics --extend.query-path="/opt/postgres_exporter/queries.yml" --disable-default-metrics --no-collector.locks --no-collector.replication --no-collector.replication_slot --no-collector.stat_bgwriter --no-collector.stat_database --no-collector.stat_user_tables --no-collector.statio_user_tables --no-collector.wal +User=postgres +Group=postgres Restart=always RestartSec=3 Environment="DATA_SOURCE_NAME=host=localhost dbname=postgres sslmode=disable user=supabase_admin pg_stat_statements.track=none application_name=postgres_exporter" diff --git a/ansible/files/postgres_prestart.sh.j2 b/ansible/files/postgres_prestart.sh.j2 new file mode 100644 index 000000000..3ffe54c85 --- /dev/null +++ b/ansible/files/postgres_prestart.sh.j2 @@ -0,0 +1,49 @@ +#!/bin/bash + +check_orioledb_enabled() { + local pg_conf="/etc/postgresql/postgresql.conf" + if [ ! -f "$pg_conf" ]; then + return 0 + fi + grep "^shared_preload_libraries" "$pg_conf" | grep -c "orioledb" || return 0 +} + +get_shared_buffers() { + local opt_conf="/etc/postgresql-custom/generated-optimizations.conf" + if [ ! -f "$opt_conf" ]; then + return 0 + fi + grep "^shared_buffers = " "$opt_conf" | cut -d "=" -f2 | tr -d ' ' || return 0 +} + +update_orioledb_buffers() { + local pg_conf="/etc/postgresql/postgresql.conf" + local value="$1" + if grep -q "^orioledb.main_buffers = " "$pg_conf"; then + sed -i "s/^orioledb.main_buffers = .*/orioledb.main_buffers = $value/" "$pg_conf" + else + echo "orioledb.main_buffers = $value" >> "$pg_conf" + fi +} + +main() { + local has_orioledb=$(check_orioledb_enabled) + if [ "$has_orioledb" -lt 1 ]; then + return 0 + fi + local shared_buffers_value=$(get_shared_buffers) + if [ ! -z "$shared_buffers_value" ]; then + update_orioledb_buffers "$shared_buffers_value" + fi +} + +# Initial locale setup +if [ $(cat /etc/locale.gen | grep -c en_US.UTF-8) -eq 0 ]; then + echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen +fi + +if [ $(locale -a | grep -c en_US.utf8) -eq 0 ]; then + locale-gen +fi + +main diff --git a/ansible/files/postgresql_config/custom_read_replica.conf.j2 b/ansible/files/postgresql_config/custom_read_replica.conf.j2 new file mode 100644 index 000000000..7d52f92a7 --- /dev/null +++ b/ansible/files/postgresql_config/custom_read_replica.conf.j2 @@ -0,0 +1,5 @@ +# hot_standby = on +# restore_command = '/usr/bin/admin-mgr wal-fetch %f %p >> /var/log/wal-g/wal-fetch.log 2>&1' +# recovery_target_timeline = 'latest' + +# primary_conninfo = 'host=localhost port=6543 user=replication' diff --git a/ansible/files/postgresql_config/pg_hba.conf.j2 b/ansible/files/postgresql_config/pg_hba.conf.j2 index ec23777a2..9cafd4146 100755 --- a/ansible/files/postgresql_config/pg_hba.conf.j2 +++ b/ansible/files/postgresql_config/pg_hba.conf.j2 @@ -89,3 +89,6 @@ host all all 10.0.0.0/8 scram-sha-256 host all all 172.16.0.0/12 scram-sha-256 host all all 192.168.0.0/16 scram-sha-256 host all all 0.0.0.0/0 scram-sha-256 + +# IPv6 external connections +host all all ::0/0 scram-sha-256 diff --git a/ansible/files/postgresql_config/postgresql.conf.j2 b/ansible/files/postgresql_config/postgresql.conf.j2 index 4473074f6..5d4237068 100644 --- a/ansible/files/postgresql_config/postgresql.conf.j2 +++ b/ansible/files/postgresql_config/postgresql.conf.j2 @@ -300,7 +300,7 @@ max_wal_senders = 10 # max number of walsender processes max_replication_slots = 5 # max number of replication slots # (change requires restart) #wal_keep_size = 0 # in megabytes; 0 disables -max_slot_wal_keep_size = 1024 # in megabytes; -1 disables +max_slot_wal_keep_size = 4096 # in megabytes; -1 disables #wal_sender_timeout = 60s # in milliseconds; 0 disables #track_commit_timestamp = off # collect timestamp of transaction commit # (change requires restart) @@ -540,7 +540,7 @@ log_line_prefix = '%h %m [%p] %q%u@%d ' # special values: #log_parameter_max_length_on_error = 0 # when logging an error, limit logged # bind-parameter values to N bytes; # -1 means print in full, 0 disables -log_statement = 'none' # none, ddl, mod, all +log_statement = 'ddl' # none, ddl, mod, all #log_replication_commands = off #log_temp_files = -1 # log temporary files equal or larger # than the specified size in kilobytes; @@ -688,7 +688,7 @@ default_text_search_config = 'pg_catalog.english' #local_preload_libraries = '' #session_preload_libraries = '' -shared_preload_libraries = 'pg_stat_statements, pg_stat_monitor, pgaudit, plpgsql, plpgsql_check, pg_cron, pg_net, pgsodium, timescaledb, auto_explain, pg_tle' # (change requires restart) +shared_preload_libraries = 'pg_stat_statements, pgaudit, plpgsql, plpgsql_check, pg_cron, pg_net, pgsodium, timescaledb, auto_explain, pg_tle, plan_filter, supabase_vault' # (change requires restart) jit_provider = 'llvmjit' # JIT library to use # - Other Defaults - @@ -763,6 +763,9 @@ jit_provider = 'llvmjit' # JIT library to use # WAL-G specific configurations #include = '/etc/postgresql-custom/wal-g.conf' +# read replica specific configurations +include = '/etc/postgresql-custom/read-replica.conf' + # supautils specific configurations #include = '/etc/postgresql-custom/supautils.conf' @@ -771,3 +774,5 @@ jit_provider = 'llvmjit' # JIT library to use #------------------------------------------------------------------------------ # Add settings for extensions here +auto_explain.log_min_duration = 10s +cron.database_name = 'postgres' diff --git a/ansible/files/postgresql_config/postgresql.service.j2 b/ansible/files/postgresql_config/postgresql.service.j2 index ac44e0a45..4cc138ec7 100644 --- a/ansible/files/postgresql_config/postgresql.service.j2 +++ b/ansible/files/postgresql_config/postgresql.service.j2 @@ -10,6 +10,7 @@ After=database-optimizations.service Type=notify User=postgres ExecStart=/usr/lib/postgresql/bin/postgres -D /etc/postgresql +ExecStartPre=+/usr/local/bin/postgres_prestart.sh ExecReload=/bin/kill -HUP $MAINPID KillMode=mixed KillSignal=SIGINT @@ -18,6 +19,10 @@ TimeoutStartSec=86400 Restart=always RestartSec=5 OOMScoreAdjust=-1000 - +EnvironmentFile=-/etc/environment.d/postgresql.env +LimitNOFILE=16384 +{% if supabase_internal is defined %} +ReadOnlyPaths=/etc +{% endif %} [Install] WantedBy=multi-user.target diff --git a/ansible/files/postgresql_config/supautils.conf.j2 b/ansible/files/postgresql_config/supautils.conf.j2 index 39795982c..433f5ae8f 100644 --- a/ansible/files/postgresql_config/supautils.conf.j2 +++ b/ansible/files/postgresql_config/supautils.conf.j2 @@ -1,12 +1,15 @@ -supautils.placeholders = 'response.headers' -supautils.placeholders_disallowed_values = '"content-type"' -# full list: address_standardizer, address_standardizer_data_us, adminpack, amcheck, autoinc, bloom, btree_gin, btree_gist, citext, cube, dblink, dict_int, dict_xsyn, earthdistance, file_fdw, fuzzystrmatch, hstore, http, hypopg, insert_username, intagg, intarray, isn, lo, ltree, moddatetime, old_snapshot, pageinspect, pg_buffercache, pg_cron, pg_freespacemap, pg_graphql, pg_hashids, pg_jsonschema, pg_net, pg_prewarm, pg_stat_monitor, pg_stat_statements, pg_surgery, pg_tle, pg_trgm, pg_visibility, pg_walinspect, pgaudit, pgcrypto, pgjwt, pgroonga, pgroonga_database, pgrouting, pgrowlocks, pgsodium, pgstattuple, pgtap, plcoffee, pljava, plls, plpgsql, plpgsql_check, plv8, postgis, postgis_raster, postgis_sfcgal, postgis_tiger_geocoder, postgis_topology, postgres_fdw, refint, rum, seg, sslinfo, supabase_vault, supautils, tablefunc, tcn, timescaledb, tsm_system_rows, tsm_system_time, unaccent, uuid-ossp, vector, wrappers, xml2 -# omitted because may be unsafe: adminpack, amcheck, file_fdw, lo, old_snapshot, pageinspect, pg_buffercache, pg_freespacemap, pg_prewarm, pg_surgery, pg_visibility, pgstattuple +supautils.extensions_parameter_overrides = '{"pg_cron":{"schema":"pg_catalog"}}' +supautils.policy_grants = '{"postgres":["auth.audit_log_entries","auth.identities","auth.refresh_tokens","auth.sessions","auth.users","realtime.messages","storage.buckets","storage.migrations","storage.objects","storage.s3_multipart_uploads","storage.s3_multipart_uploads_parts"]}' +supautils.drop_trigger_grants = '{"postgres":["auth.audit_log_entries","auth.identities","auth.refresh_tokens","auth.sessions","auth.users","realtime.messages","storage.buckets","storage.migrations","storage.objects","storage.s3_multipart_uploads","storage.s3_multipart_uploads_parts"]}' +# full list: address_standardizer, address_standardizer_data_us, adminpack, amcheck, autoinc, bloom, btree_gin, btree_gist, citext, cube, dblink, dict_int, dict_xsyn, earthdistance, file_fdw, fuzzystrmatch, hstore, http, hypopg, index_advisor, insert_username, intagg, intarray, isn, lo, ltree, moddatetime, old_snapshot, orioledb, pageinspect, pg_buffercache, pg_cron, pg_freespacemap, pg_graphql, pg_hashids, pg_jsonschema, pg_net, pg_prewarm, pg_repack, pg_stat_monitor, pg_stat_statements, pg_surgery, pg_tle, pg_trgm, pg_visibility, pg_walinspect, pgaudit, pgcrypto, pgjwt, pgmq, pgroonga, pgroonga_database, pgrouting, pgrowlocks, pgsodium, pgstattuple, pgtap, plcoffee, pljava, plls, plpgsql, plpgsql_check, plv8, postgis, postgis_raster, postgis_sfcgal, postgis_tiger_geocoder, postgis_topology, postgres_fdw, refint, rum, seg, sslinfo, supabase_vault, supautils, tablefunc, tcn, timescaledb, tsm_system_rows, tsm_system_time, unaccent, uuid-ossp, vector, wrappers, xml2 +# omitted because may be unsafe: adminpack, amcheck, file_fdw, lo, old_snapshot, pageinspect, pg_freespacemap, pg_surgery, pg_visibility # omitted because deprecated: intagg, xml2 -supautils.privileged_extensions = 'address_standardizer, address_standardizer_data_us, autoinc, bloom, btree_gin, btree_gist, citext, cube, dblink, dict_int, dict_xsyn, earthdistance, fuzzystrmatch, hstore, http, hypopg, insert_username, intarray, isn, ltree, moddatetime, pg_cron, pg_graphql, pg_hashids, pg_jsonschema, pg_net, pg_stat_monitor, pg_stat_statements, pg_tle, pg_trgm, pg_walinspect, pgaudit, pgcrypto, pgjwt, pgroonga, pgroonga_database, pgrouting, pgrowlocks, pgsodium, pgtap, plcoffee, pljava, plls, plpgsql, plpgsql_check, plv8, postgis, postgis_raster, postgis_sfcgal, postgis_tiger_geocoder, postgis_topology, postgres_fdw, refint, rum, seg, sslinfo, supabase_vault, supautils, tablefunc, tcn, timescaledb, tsm_system_rows, tsm_system_time, unaccent, uuid-ossp, vector, wrappers' +# omitted because doesn't require superuser: pgmq +# omitted because protected: plpgsql +supautils.privileged_extensions = 'address_standardizer, address_standardizer_data_us, autoinc, bloom, btree_gin, btree_gist, citext, cube, dblink, dict_int, dict_xsyn, earthdistance, fuzzystrmatch, hstore, http, hypopg, index_advisor, insert_username, intarray, isn, ltree, moddatetime, orioledb, pg_buffercache, pg_cron, pg_graphql, pg_hashids, pg_jsonschema, pg_net, pg_prewarm, pg_repack, pg_stat_monitor, pg_stat_statements, pg_tle, pg_trgm, pg_walinspect, pgaudit, pgcrypto, pgjwt, pgroonga, pgroonga_database, pgrouting, pgrowlocks, pgsodium, pgstattuple, pgtap, plcoffee, pljava, plls, plpgsql_check, plv8, postgis, postgis_raster, postgis_sfcgal, postgis_tiger_geocoder, postgis_topology, postgres_fdw, refint, rum, seg, sslinfo, supabase_vault, supautils, tablefunc, tcn, timescaledb, tsm_system_rows, tsm_system_time, unaccent, uuid-ossp, vector, wrappers' supautils.privileged_extensions_custom_scripts_path = '/etc/postgresql-custom/extension-custom-scripts' supautils.privileged_extensions_superuser = 'supabase_admin' supautils.privileged_role = 'postgres' -supautils.privileged_role_allowed_configs = 'log_min_messages, pgaudit.log, pgaudit.log_catalog, pgaudit.log_client, pgaudit.log_level, pgaudit.log_relation, pgaudit.log_rows, pgaudit.log_statement, pgaudit.log_statement_once, pgaudit.role, pgrst.*, session_replication_role, track_io_timing' -supautils.reserved_memberships = 'pg_read_server_files, pg_write_server_files, pg_execute_server_program, authenticator' -supautils.reserved_roles = 'supabase_admin, supabase_auth_admin, supabase_storage_admin, supabase_read_only_user, supabase_replication_admin, dashboard_user, pgbouncer, service_role*, authenticator*, authenticated*, anon*' +supautils.privileged_role_allowed_configs = 'auto_explain.*, log_lock_waits, log_min_duration_statement, log_min_messages, log_replication_commands, log_statement, log_temp_files, pg_net.batch_size, pg_net.ttl, pg_stat_statements.*, pgaudit.log, pgaudit.log_catalog, pgaudit.log_client, pgaudit.log_level, pgaudit.log_relation, pgaudit.log_rows, pgaudit.log_statement, pgaudit.log_statement_once, pgaudit.role, pgrst.*, plan_filter.*, safeupdate.enabled, session_replication_role, track_io_timing, wal_compression' +supautils.reserved_memberships = 'pg_read_server_files, pg_write_server_files, pg_execute_server_program, supabase_admin, supabase_auth_admin, supabase_storage_admin, supabase_read_only_user, supabase_realtime_admin, supabase_replication_admin, dashboard_user, pgbouncer, authenticator' +supautils.reserved_roles = 'supabase_admin, supabase_auth_admin, supabase_storage_admin, supabase_read_only_user, supabase_realtime_admin, supabase_replication_admin, dashboard_user, pgbouncer, service_role*, authenticator*, authenticated*, anon*' diff --git a/ansible/files/postgresql_config/tmpfiles.postgresql.conf b/ansible/files/postgresql_config/tmpfiles.postgresql.conf new file mode 100644 index 000000000..b5ea54948 --- /dev/null +++ b/ansible/files/postgresql_config/tmpfiles.postgresql.conf @@ -0,0 +1,5 @@ +# unchanged from upstream package +d /run/postgresql 2775 postgres postgres - - +# Log directory - ensure that our logging setup gets preserved +# and that vector can keep writing to a file here as well +d /var/log/postgresql 1775 postgres postgres - - diff --git a/ansible/files/postgresql_extension_custom_scripts/dblink/after-create.sql b/ansible/files/postgresql_extension_custom_scripts/dblink/after-create.sql new file mode 100644 index 000000000..22261bc77 --- /dev/null +++ b/ansible/files/postgresql_extension_custom_scripts/dblink/after-create.sql @@ -0,0 +1,14 @@ +do $$ +declare + r record; +begin + for r in (select oid, (aclexplode(proacl)).grantee from pg_proc where proname = 'dblink_connect_u') loop + continue when r.grantee = 'supabase_admin'::regrole; + execute( + format( + 'revoke all on function %s(%s) from %s;', r.oid::regproc, pg_get_function_identity_arguments(r.oid), r.grantee::regrole + ) + ); + end loop; +end +$$; diff --git a/ansible/files/postgresql_extension_custom_scripts/pg_cron/after-create.sql b/ansible/files/postgresql_extension_custom_scripts/pg_cron/after-create.sql new file mode 100644 index 000000000..6ac9d6b6e --- /dev/null +++ b/ansible/files/postgresql_extension_custom_scripts/pg_cron/after-create.sql @@ -0,0 +1,13 @@ +grant usage on schema cron to postgres with grant option; +grant all on all functions in schema cron to postgres with grant option; + +alter default privileges for user supabase_admin in schema cron grant all + on sequences to postgres with grant option; +alter default privileges for user supabase_admin in schema cron grant all + on tables to postgres with grant option; +alter default privileges for user supabase_admin in schema cron grant all + on functions to postgres with grant option; + +grant all privileges on all tables in schema cron to postgres with grant option; +revoke all on table cron.job from postgres; +grant select on table cron.job to postgres with grant option; diff --git a/ansible/files/postgresql_extension_custom_scripts/pg_repack/after-create.sql b/ansible/files/postgresql_extension_custom_scripts/pg_repack/after-create.sql new file mode 100644 index 000000000..b0ec306de --- /dev/null +++ b/ansible/files/postgresql_extension_custom_scripts/pg_repack/after-create.sql @@ -0,0 +1,4 @@ +grant all on all tables in schema repack to postgres; +grant all on schema repack to postgres; +alter default privileges in schema repack grant all on tables to postgres; +alter default privileges in schema repack grant all on sequences to postgres; diff --git a/ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql b/ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql new file mode 100644 index 000000000..050e07dfc --- /dev/null +++ b/ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql @@ -0,0 +1,173 @@ +do $$ +declare + extoid oid := (select oid from pg_extension where extname = 'pgmq'); + r record; + cls pg_class%rowtype; +begin + + set local search_path = ''; + +/* + Override the pgmq.drop_queue to check if relevant tables are owned + by the pgmq extension before attempting to run + `alter extension pgmq drop table ...` + this is necessary becasue, to enable nightly logical backups to include user queues + we automatically detach them from pgmq. + + this update is backwards compatible with version 1.4.4 but should be removed once we're on + physical backups everywhere +*/ +-- Detach and delete the official function +alter extension pgmq drop function pgmq.drop_queue; +drop function pgmq.drop_queue; + +-- Create and reattach the patched function +CREATE FUNCTION pgmq.drop_queue(queue_name TEXT) +RETURNS BOOLEAN AS $func$ +DECLARE + qtable TEXT := pgmq.format_table_name(queue_name, 'q'); + qtable_seq TEXT := qtable || '_msg_id_seq'; + fq_qtable TEXT := 'pgmq.' || qtable; + atable TEXT := pgmq.format_table_name(queue_name, 'a'); + fq_atable TEXT := 'pgmq.' || atable; + partitioned BOOLEAN; +BEGIN + EXECUTE FORMAT( + $QUERY$ + SELECT is_partitioned FROM pgmq.meta WHERE queue_name = %L + $QUERY$, + queue_name + ) INTO partitioned; + + -- NEW CONDITIONAL CHECK + if exists ( + select 1 + from pg_class c + join pg_depend d on c.oid = d.objid + join pg_extension e on d.refobjid = e.oid + where c.relname = qtable and e.extname = 'pgmq' + ) then + + EXECUTE FORMAT( + $QUERY$ + ALTER EXTENSION pgmq DROP TABLE pgmq.%I + $QUERY$, + qtable + ); + + end if; + + -- NEW CONDITIONAL CHECK + if exists ( + select 1 + from pg_class c + join pg_depend d on c.oid = d.objid + join pg_extension e on d.refobjid = e.oid + where c.relname = qtable_seq and e.extname = 'pgmq' + ) then + EXECUTE FORMAT( + $QUERY$ + ALTER EXTENSION pgmq DROP SEQUENCE pgmq.%I + $QUERY$, + qtable_seq + ); + + end if; + + -- NEW CONDITIONAL CHECK + if exists ( + select 1 + from pg_class c + join pg_depend d on c.oid = d.objid + join pg_extension e on d.refobjid = e.oid + where c.relname = atable and e.extname = 'pgmq' + ) then + + EXECUTE FORMAT( + $QUERY$ + ALTER EXTENSION pgmq DROP TABLE pgmq.%I + $QUERY$, + atable + ); + + end if; + + -- NO CHANGES PAST THIS POINT + + EXECUTE FORMAT( + $QUERY$ + DROP TABLE IF EXISTS pgmq.%I + $QUERY$, + qtable + ); + + EXECUTE FORMAT( + $QUERY$ + DROP TABLE IF EXISTS pgmq.%I + $QUERY$, + atable + ); + + IF EXISTS ( + SELECT 1 + FROM information_schema.tables + WHERE table_name = 'meta' and table_schema = 'pgmq' + ) THEN + EXECUTE FORMAT( + $QUERY$ + DELETE FROM pgmq.meta WHERE queue_name = %L + $QUERY$, + queue_name + ); + END IF; + + IF partitioned THEN + EXECUTE FORMAT( + $QUERY$ + DELETE FROM %I.part_config where parent_table in (%L, %L) + $QUERY$, + pgmq._get_pg_partman_schema(), fq_qtable, fq_atable + ); + END IF; + + RETURN TRUE; +END; +$func$ LANGUAGE plpgsql; + +alter extension pgmq add function pgmq.drop_queue; + + + update pg_extension set extowner = 'postgres'::regrole where extname = 'pgmq'; + + for r in (select * from pg_depend where refobjid = extoid) loop + + + if r.classid = 'pg_type'::regclass then + + -- store the type's relkind + select * into cls from pg_class c where c.reltype = r.objid; + + if r.objid::regtype::text like '%[]' then + -- do nothing (skipping array type) + + elsif cls.relkind in ('r', 'p', 'f', 'm') then + -- table-like objects (regular table, partitioned, foreign, materialized view) + execute format('alter table pgmq.%I owner to postgres;', cls.relname); + + else + execute(format('alter type %s owner to postgres;', r.objid::regtype)); + + end if; + + elsif r.classid = 'pg_proc'::regclass then + execute(format('alter function %s(%s) owner to postgres;', r.objid::regproc, pg_get_function_identity_arguments(r.objid))); + + elsif r.classid = 'pg_class'::regclass then + execute(format('alter table %s owner to postgres;', r.objid::regclass)); + + else + raise exception 'error on pgmq after-create script: unexpected object type %', r.classid; + + end if; + end loop; +end $$; diff --git a/ansible/files/postgresql_extension_custom_scripts/pgsodium/after-create.sql b/ansible/files/postgresql_extension_custom_scripts/pgsodium/after-create.sql index 907c67ebf..38242ab20 100644 --- a/ansible/files/postgresql_extension_custom_scripts/pgsodium/after-create.sql +++ b/ansible/files/postgresql_extension_custom_scripts/pgsodium/after-create.sql @@ -1,3 +1,26 @@ grant execute on function pgsodium.crypto_aead_det_decrypt(bytea, bytea, uuid, bytea) to service_role; grant execute on function pgsodium.crypto_aead_det_encrypt(bytea, bytea, uuid, bytea) to service_role; grant execute on function pgsodium.crypto_aead_det_keygen to service_role; + +CREATE OR REPLACE FUNCTION pgsodium.mask_role(masked_role regrole, source_name text, view_name text) +RETURNS void +LANGUAGE plpgsql +SECURITY DEFINER +SET search_path TO '' +AS $function$ +BEGIN + EXECUTE format( + 'GRANT SELECT ON pgsodium.key TO %s', + masked_role); + + EXECUTE format( + 'GRANT pgsodium_keyiduser, pgsodium_keyholder TO %s', + masked_role); + + EXECUTE format( + 'GRANT ALL ON %I TO %s', + view_name, + masked_role); + RETURN; +END +$function$; diff --git a/ansible/files/postgresql_extension_custom_scripts/pgsodium/before-create.sql b/ansible/files/postgresql_extension_custom_scripts/pgsodium/before-create.sql new file mode 100644 index 000000000..fb82a46a3 --- /dev/null +++ b/ansible/files/postgresql_extension_custom_scripts/pgsodium/before-create.sql @@ -0,0 +1,9 @@ +do $$ +declare + _extversion text := @extversion@; + _r record; +begin + if _extversion is not null and _extversion != '3.1.8' then + raise exception 'only pgsodium 3.1.8 is supported'; + end if; +end $$; diff --git a/ansible/files/postgresql_extension_custom_scripts/supabase_vault/after-create.sql b/ansible/files/postgresql_extension_custom_scripts/supabase_vault/after-create.sql new file mode 100644 index 000000000..f5c728428 --- /dev/null +++ b/ansible/files/postgresql_extension_custom_scripts/supabase_vault/after-create.sql @@ -0,0 +1,8 @@ +grant usage on schema vault to postgres with grant option; +grant select, delete, truncate, references on vault.secrets, vault.decrypted_secrets to postgres with grant option; +grant execute on function vault.create_secret, vault.update_secret, vault._crypto_aead_det_decrypt to postgres with grant option; + +-- service_role used to be able to manage secrets in Vault <=0.2.8 because it had privileges to pgsodium functions +grant usage on schema vault to service_role; +grant select, delete on vault.secrets, vault.decrypted_secrets to service_role; +grant execute on function vault.create_secret, vault.update_secret, vault._crypto_aead_det_decrypt to service_role; diff --git a/ansible/files/sodium_extension.sql b/ansible/files/sodium_extension.sql deleted file mode 100644 index a19cabf72..000000000 --- a/ansible/files/sodium_extension.sql +++ /dev/null @@ -1,6 +0,0 @@ -create schema if not exists pgsodium; -create extension if not exists pgsodium with schema pgsodium cascade; - -grant pgsodium_keyiduser to postgres with admin option; -grant pgsodium_keyholder to postgres with admin option; -grant pgsodium_keymaker to postgres with admin option; diff --git a/ansible/files/start-envoy.sh b/ansible/files/start-envoy.sh new file mode 100644 index 000000000..edd6fe09e --- /dev/null +++ b/ansible/files/start-envoy.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -eou pipefail + +if [[ $(cat /sys/module/ipv6/parameters/disable) = 1 ]]; then + sed -i -e "s/address: '::'/address: '0.0.0.0'/" -e 's/ipv4_compat: true/ipv4_compat: false/' /etc/envoy/lds.yaml +else + sed -i -e "s/address: '0.0.0.0'/address: '::'/" -e 's/ipv4_compat: false/ipv4_compat: true/' /etc/envoy/lds.yaml +fi + +# Workaround using `tee` to get `/dev/stdout` access logging to work, see: +# https://github.com/envoyproxy/envoy/issues/8297#issuecomment-620659781 +exec /opt/envoy --config-path /etc/envoy/envoy.yaml --restart-epoch "${RESTART_EPOCH}" 2>&1 | tee diff --git a/ansible/files/systemd-networkd/systemd-networkd-check-and-fix.service b/ansible/files/systemd-networkd/systemd-networkd-check-and-fix.service new file mode 100644 index 000000000..5e7094388 --- /dev/null +++ b/ansible/files/systemd-networkd/systemd-networkd-check-and-fix.service @@ -0,0 +1,11 @@ +[Unit] +Description=Check if systemd-networkd has broken NDisc routes and fix +Requisite=systemd-networkd.service +After=systemd-networkd.service + +[Service] +Type=oneshot +# This needs to be root for the service restart to work +User=root +Group=root +ExecStart=/usr/local/bin/systemd-networkd-check-and-fix.sh diff --git a/ansible/files/systemd-networkd/systemd-networkd-check-and-fix.sh b/ansible/files/systemd-networkd/systemd-networkd-check-and-fix.sh new file mode 100644 index 000000000..af00b412b --- /dev/null +++ b/ansible/files/systemd-networkd/systemd-networkd-check-and-fix.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Check for occurrences of an NDisc log error +# NOTE: --since timer flag must match the cadence of systemd timer unit. Risk of repeat matches and restart loop +journalctl --no-pager --unit systemd-networkd --since "1 minutes ago" --grep "Could not set NDisc route" >/dev/null +NDISC_ERROR=$? + +if systemctl is-active --quiet systemd-networkd.service && [ "${NDISC_ERROR}" == 0 ]; then + echo "$(date) systemd-network running but NDisc routes are broken. Restarting systemd.networkd.service" + /usr/bin/systemctl restart systemd-networkd.service + exit # no need to check further +fi + +# check for routes +ROUTES=$(ip -6 route list) + +if ! echo "${ROUTES}" | grep default >/dev/null || ! echo "${ROUTES}" | grep "::1 dev lo">/dev/null; then + echo "IPv6 routing table messed up. Restarting systemd.networkd.service" + /usr/bin/systemctl restart systemd-networkd.service +fi diff --git a/ansible/files/systemd-networkd/systemd-networkd-check-and-fix.timer b/ansible/files/systemd-networkd/systemd-networkd-check-and-fix.timer new file mode 100644 index 000000000..93c083637 --- /dev/null +++ b/ansible/files/systemd-networkd/systemd-networkd-check-and-fix.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Check if systemd-networkd has broken NDisc routes and fix + +[Timer] +# NOTE: cadence must match that of the journalctl search (--since). Risk of repeat matches and restart loop +OnCalendar=minutely + +[Install] +WantedBy=timers.target diff --git a/ansible/manifest-playbook.yml b/ansible/manifest-playbook.yml index 69fc07de2..5c1c65053 100644 --- a/ansible/manifest-playbook.yml +++ b/ansible/manifest-playbook.yml @@ -17,27 +17,11 @@ # currently, we upload gotrue, adminapi, postgrest - name: gotrue - download commit archive get_url: - url: "https://github.com/supabase/gotrue/releases/download/v%7B%7B%20gotrue_release%20%7D%7D/gotrue-v%7B%7B%20gotrue_release%20%7D%7D-arm64.tar.gz" - dest: /tmp/gotrue.tar.gz + url: "https://github.com/supabase/gotrue/releases/download/v%7B%7B%20gotrue_release%20%7D%7D/auth-v%7B%7B%20gotrue_release%20%7D%7D-arm64.tar.gz" + dest: /tmp/auth-v{{ gotrue_release }}-arm64.tar.gz checksum: "{{ gotrue_release_checksum }}" timeout: 60 - - name: gotrue - create /tmp/gotrue - file: - path: /tmp/gotrue - state: directory - mode: 0775 - - - name: gotrue - unpack archive in /tmp/gotrue - unarchive: - remote_src: yes - src: /tmp/gotrue.tar.gz - dest: /tmp/gotrue - - - name: gotrue - pack archive - shell: | - cd /tmp && tar -cJf gotrue-v{{ gotrue_release }}-arm64.tar.xz gotrue - - name: PostgREST - download ubuntu binary archive (arm) get_url: url: "https://github.com/PostgREST/postgrest/releases/download/v%7B%7B%20postgrest_release%20%7D%7D/postgrest-v%7B%7B%20postgrest_release%20%7D%7D-ubuntu-aarch64.tar.xz" @@ -82,7 +66,7 @@ aws s3 cp /tmp/{{ item.file }} s3://{{ internal_artifacts_bucket }}/upgrades/{{ item.service }}/{{ item.file }} with_items: - service: gotrue - file: gotrue-v{{ gotrue_release }}-arm64.tar.xz + file: auth-v{{ gotrue_release }}-arm64.tar.gz - service: postgrest file: postgrest-{{ postgrest_release }}-arm64.tar.xz - service: supabase-admin-api diff --git a/ansible/playbook.yml b/ansible/playbook.yml index ececf09b9..bcd47ac9b 100644 --- a/ansible/playbook.yml +++ b/ansible/playbook.yml @@ -3,7 +3,6 @@ pre_tasks: - import_tasks: tasks/setup-system.yml - vars_files: - ./vars.yml @@ -14,7 +13,7 @@ dest: "00-schema.sql", } - { source: "stat_extension.sql", dest: "01-extension.sql" } - + environment: PATH: /usr/lib/postgresql/bin:{{ ansible_env.PATH }} @@ -35,60 +34,82 @@ tags: - install-pgbouncer - install-supabase-internal + when: debpkg_mode or nixpkg_mode - name: Install WAL-G import_tasks: tasks/setup-wal-g.yml + when: debpkg_mode or nixpkg_mode or stage2_nix - name: Install Gotrue import_tasks: tasks/setup-gotrue.yml tags: - install-gotrue - install-supabase-internal - + when: debpkg_mode or nixpkg_mode + - name: Install PostgREST import_tasks: tasks/setup-postgrest.yml tags: - install-postgrest - install-supabase-internal + when: debpkg_mode or nixpkg_mode + + - name: Install Envoy + import_tasks: tasks/setup-envoy.yml + tags: + - install-supabase-internal + when: debpkg_mode or nixpkg_mode - name: Install Kong import_tasks: tasks/setup-kong.yml tags: - install-supabase-internal + when: debpkg_mode or nixpkg_mode - name: Install nginx import_tasks: tasks/setup-nginx.yml tags: - install-supabase-internal + when: debpkg_mode or nixpkg_mode - name: Install Supabase specific content import_tasks: tasks/setup-supabase-internal.yml tags: - install-supabase-internal + when: debpkg_mode or nixpkg_mode - - name: Start Postgres Database - systemd: - name: postgresql - state: started - when: not ebssurrogate_mode + - name: Fix IPv6 NDisc issues + import_tasks: tasks/fix_ipv6_ndisc.yml + tags: + - install-supabase-internal + when: (debpkg_mode or nixpkg_mode) and (qemu_mode is undefined) - name: Start Postgres Database without Systemd become: yes become_user: postgres shell: cmd: /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data start - when: ebssurrogate_mode + when: debpkg_mode - name: Adjust APT update intervals copy: src: files/apt_periodic dest: /etc/apt/apt.conf.d/10periodic - + when: debpkg_mode or nixpkg_mode + - name: Transfer init SQL files copy: src: files/{{ item.source }} dest: /tmp/{{ item.dest }} loop: "{{ sql_files }}" + when: debpkg_mode or stage2_nix + + - name: Create postgres role + become: yes + become_user: postgres + shell: + cmd: /usr/lib/postgresql/bin/psql --username=supabase_admin -d postgres -c "create role postgres superuser login; alter database postgres owner to postgres;" + when: debpkg_mode or stage2_nix - name: Execute init SQL files become: yes @@ -96,25 +117,31 @@ shell: cmd: /usr/lib/postgresql/bin/psql -f /tmp/{{ item.dest }} loop: "{{ sql_files }}" + when: debpkg_mode or stage2_nix - name: Delete SQL scripts file: path: /tmp/{{ item.dest }} state: absent loop: "{{ sql_files }}" + when: debpkg_mode or stage2_nix - name: First boot optimizations import_tasks: tasks/internal/optimizations.yml tags: - install-supabase-internal - + when: debpkg_mode or stage2_nix + - name: Finalize AMI import_tasks: tasks/finalize-ami.yml tags: - install-supabase-internal - + when: debpkg_mode or nixpkg_mode + - name: Enhance fail2ban import_tasks: tasks/setup-fail2ban.yml + when: debpkg_mode or nixpkg_mode + # Install EC2 instance connect # Only for AWS images @@ -125,6 +152,7 @@ - ec2-instance-connect tags: - aws-only + when: qemu_mode is undefined # Install this at the end to prevent it from kicking in during the apt process, causing conflicts - name: Install security tools @@ -143,26 +171,61 @@ become_user: postgres shell: cmd: /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data restart -o "-c shared_preload_libraries='pg_tle'" - when: ebssurrogate_mode + when: debpkg_mode - name: Run migrations import_tasks: tasks/setup-migrations.yml tags: - migrations + when: debpkg_mode or stage2_nix - name: Stop Postgres Database without Systemd become: yes become_user: postgres shell: cmd: /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data stop - when: ebssurrogate_mode + when: debpkg_mode - name: Run unit tests import_tasks: tasks/test-image.yml tags: - unit-tests + when: debpkg_mode or stage2_nix - name: Collect Postgres binaries import_tasks: tasks/internal/collect-pg-binaries.yml tags: - collect-binaries + when: debpkg_mode + + - name: Install osquery from nixpkgs binary cache + become: yes + shell: | + apt autoremove -y --purge snapd + when: stage2_nix + + - name: Install osquery from nixpkgs binary cache + become: yes + shell: | + sudo -u ubuntu bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:nixos/nixpkgs/f98ec4f73c762223d62bee706726138cb6ea27cc#osquery" + when: stage2_nix + + - name: Run osquery permission checks + become: yes + shell: | + systemctl start postgresql.service + sudo -u ubuntu bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && /usr/bin/python3 /tmp/ansible-playbook/ansible/files/permission_check.py {{ '--qemu' if qemu_mode is defined else '' }}" + systemctl stop postgresql.service + when: stage2_nix + + - name: Remove osquery + become: yes + shell: | + sudo -u ubuntu bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile remove osquery" + when: stage2_nix + + - name: nix collect garbage + become: yes + shell: | + sudo -u ubuntu bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix-collect-garbage -d" + when: stage2_nix diff --git a/ansible/tasks/clean-build-dependencies.yml b/ansible/tasks/clean-build-dependencies.yml index 5bbcc8041..43ec05179 100644 --- a/ansible/tasks/clean-build-dependencies.yml +++ b/ansible/tasks/clean-build-dependencies.yml @@ -11,7 +11,11 @@ - g++-10 - g++-9 - gcc-10 + - make + - manpages + - manpages-dev - ninja-build + - patch - python2 state: absent autoremove: yes diff --git a/ansible/tasks/finalize-ami.yml b/ansible/tasks/finalize-ami.yml index fe37fd712..7f0de3ac8 100644 --- a/ansible/tasks/finalize-ami.yml +++ b/ansible/tasks/finalize-ami.yml @@ -27,7 +27,6 @@ port: http tags: - install-supabase-internal - when: ansible_distribution_version != "18.04" - name: UFW - Allow connections to https (443) ufw: @@ -35,23 +34,6 @@ port: https tags: - install-supabase-internal - when: ansible_distribution_version != "18.04" - -- name: UFW - Allow connections to http (80) - Ubuntu 18.04 - ufw: - rule: allow - port: "80" - tags: - - install-supabase-internal - when: ansible_distribution_version == "18.04" - -- name: UFW - Allow connections to https (443) - Ubuntu 18.04 - ufw: - rule: allow - port: "443" - tags: - - install-supabase-internal - when: ansible_distribution_version == "18.04" - name: UFW - Deny all other incoming traffic by default ufw: @@ -85,10 +67,9 @@ shell: cmd: | cp /usr/lib/systemd/system/logrotate.timer /etc/systemd/system/logrotate.timer - sed -i -e 's;daily;*:0/10;' /etc/systemd/system/logrotate.timer + sed -i -e 's;daily;*:0/5;' /etc/systemd/system/logrotate.timer systemctl reenable logrotate.timer become: yes - when: ansible_distribution_version != "18.04" - name: import pgsodium_getkey script template: @@ -97,3 +78,4 @@ owner: postgres group: postgres mode: 0700 + when: debpkg_mode or stage2_nix diff --git a/ansible/tasks/fix_ipv6_ndisc.yml b/ansible/tasks/fix_ipv6_ndisc.yml new file mode 100644 index 000000000..7489a2fe1 --- /dev/null +++ b/ansible/tasks/fix_ipv6_ndisc.yml @@ -0,0 +1,33 @@ +--- +- name: fix Network - systemd timer file + copy: + dest: /etc/systemd/system/systemd-networkd-check-and-fix.timer + src: "files/systemd-networkd/systemd-networkd-check-and-fix.timer" + owner: root + group: root + mode: 0644 + +- name: fix Network - systemd service file + copy: + dest: /etc/systemd/system/systemd-networkd-check-and-fix.service + src: "files/systemd-networkd/systemd-networkd-check-and-fix.service" + owner: root + group: root + mode: 0644 + +- name: fix Network - detect script + copy: + dest: /usr/local/bin/systemd-networkd-check-and-fix.sh + src: "files/systemd-networkd/systemd-networkd-check-and-fix.sh" + owner: root + group: root + mode: 0700 + +- name: fix Network - reload systemd + systemd: + daemon_reload: yes + +- name: fix Network - enable systemd timer + systemd: + name: systemd-networkd-check-and-fix.timer + enabled: true diff --git a/ansible/tasks/internal/admin-api.yml b/ansible/tasks/internal/admin-api.yml index fe40d6f46..5eb6fd276 100644 --- a/ansible/tasks/internal/admin-api.yml +++ b/ansible/tasks/internal/admin-api.yml @@ -1,7 +1,7 @@ - name: adminapi - system user user: name: adminapi - groups: root,admin,kong,pgbouncer,postgres,postgrest,systemd-journal,wal-g + groups: root,admin,envoy,gotrue,kong,pgbouncer,postgres,postgrest,systemd-journal,vector,wal-g append: yes - name: Move shell scripts to /root dir @@ -19,6 +19,7 @@ copy: src: files/adminapi.sudoers.conf dest: /etc/sudoers.d/adminapi + mode: "0644" - name: perms for adminapi shell: | @@ -78,6 +79,11 @@ src: files/adminapi.service.j2 dest: /etc/systemd/system/adminapi.service +- name: adminapi - create service file for commence backup process + template: + src: files/commence-backup.service.j2 + dest: /etc/systemd/system/commence-backup.service + - name: UFW - Allow connections to adminapi ports ufw: rule: allow diff --git a/ansible/tasks/internal/install-salt.yml b/ansible/tasks/internal/install-salt.yml new file mode 100644 index 000000000..73cd6ee85 --- /dev/null +++ b/ansible/tasks/internal/install-salt.yml @@ -0,0 +1,47 @@ +- name: Add apt repository for Saltstack (arm) + block: + - name: Ensure /etc/apt/keyrings directory exists + file: + path: /etc/apt/keyrings + state: directory + mode: '0755' + + - name: salt gpg key + ansible.builtin.get_url: + url: https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public + dest: /etc/apt/keyrings/salt-archive-keyring-2023.pgp + mode: '0644' + + - name: salt apt repo + ansible.builtin.apt_repository: + repo: "deb [signed-by=/etc/apt/keyrings/salt-archive-keyring-2023.pgp arch=arm64] https://packages.broadcom.com/artifactory/saltproject-deb/ stable main" + filename: 'salt.list' + state: present + when: platform == "arm64" + +- name: Add apt repository for Saltstack (amd) + block: + - name: Ensure /etc/apt/keyrings directory exists + file: + path: /etc/apt/keyrings + state: directory + mode: '0755' + + - name: salt gpg key + ansible.builtin.get_url: + url: https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public + dest: /etc/apt/keyrings/salt-archive-keyring-2023.pgp + mode: '0644' + + - name: salt apt repo + ansible.builtin.apt_repository: + repo: "deb [signed-by=/etc/apt/keyrings/salt-archive-keyring-2023.pgp arch=amd64] https://packages.broadcom.com/artifactory/saltproject-deb/ stable main" + filename: 'salt.list' + state: present + when: platform == "amd64" + +- name: Salt minion install + apt: + name: salt-minion + state: present + update_cache: yes diff --git a/ansible/tasks/internal/optimizations.yml b/ansible/tasks/internal/optimizations.yml index 895acccd9..42a0a247c 100644 --- a/ansible/tasks/internal/optimizations.yml +++ b/ansible/tasks/internal/optimizations.yml @@ -1,39 +1,31 @@ -- name: ensure services are stopped - community.general.snap: - name: amazon-ssm-agent - state: absent - failed_when: not ebssurrogate_mode - -- name: ensure services are stopped and disabled for first boot +- name: ensure services are stopped and disabled for first boot debian build systemd: enabled: no name: '{{ item }}' state: stopped with_items: - - snapd - postgresql - pgbouncer - fail2ban - motd-news - vector - failed_when: not ebssurrogate_mode - -- name: Remove snapd - apt: - state: absent - pkg: - - snapd - failed_when: not ebssurrogate_mode + - lvm2-monitor + - salt-minion + when: debpkg_mode -- name: ensure services are stopped and disabled for first boot +- name: ensure services are stopped and disabled for first boot nix build systemd: enabled: no name: '{{ item }}' state: stopped - masked: yes with_items: - - lvm2-monitor - failed_when: not ebssurrogate_mode + - postgresql + - pgbouncer + - fail2ban + - motd-news + - vector + - salt-minion + when: stage2_nix - name: disable man-db become: yes @@ -44,4 +36,4 @@ - man-db - popularity-contest - ubuntu-advantage-tools - failed_when: not ebssurrogate_mode + when: debpkg_mode or stage2_nix diff --git a/ansible/tasks/internal/postgres-exporter.yml b/ansible/tasks/internal/postgres-exporter.yml index b4c1aedc1..0292157b2 100644 --- a/ansible/tasks/internal/postgres-exporter.yml +++ b/ansible/tasks/internal/postgres-exporter.yml @@ -3,16 +3,22 @@ rule: allow port: "9187" -- name: create directories +- name: create directories - systemd unit file: state: directory - path: "{{ item }}" + path: /etc/systemd/system/postgres_exporter.service.d owner: root mode: '0700' become: yes - with_items: - - /opt/postgres_exporter - - /etc/systemd/system/postgres_exporter.service.d + +- name: create directories - service files + file: + state: directory + path: /opt/postgres_exporter + owner: postgres + group: postgres + mode: '0775' + become: yes - name: download postgres exporter get_url: diff --git a/ansible/tasks/internal/postgresql-prestart.yml b/ansible/tasks/internal/postgresql-prestart.yml new file mode 100644 index 000000000..46671d589 --- /dev/null +++ b/ansible/tasks/internal/postgresql-prestart.yml @@ -0,0 +1,7 @@ +- name: postgres_prestart - create service file + template: + src: files/postgres_prestart.sh.j2 + dest: /usr/local/bin/postgres_prestart.sh + mode: a+x + owner: root + group: root diff --git a/ansible/tasks/internal/supautils.yml b/ansible/tasks/internal/supautils.yml index cec6c91b7..33811b5ac 100644 --- a/ansible/tasks/internal/supautils.yml +++ b/ansible/tasks/internal/supautils.yml @@ -6,16 +6,6 @@ - clang-11 update_cache: yes cache_valid_time: 3600 - when: ansible_distribution_version != "18.04" - -- name: supautils - download & install dependencies - Ubuntu 18.04 - apt: - pkg: - - build-essential - - clang-12 - update_cache: yes - cache_valid_time: 3600 - when: ansible_distribution_version == "18.04" - name: supautils - download latest release get_url: diff --git a/ansible/tasks/postgres-extensions/01-postgis.yml b/ansible/tasks/postgres-extensions/01-postgis.yml deleted file mode 100644 index 7475a5d95..000000000 --- a/ansible/tasks/postgres-extensions/01-postgis.yml +++ /dev/null @@ -1,102 +0,0 @@ -# postgis -- name: postgis - download & install dependencies - apt: - pkg: - - libgeos-dev - - libproj-dev - - libgdal-dev - - libjson-c-dev - - libxml2-dev - - libboost-all-dev - - libcgal-dev - - libmpfr-dev - - libgmp-dev - - cmake - - libprotobuf-c-dev - - protobuf-c-compiler - update_cache: yes - cache_valid_time: 3600 - install_recommends: no - -- name: postgis - ensure dependencies do not get autoremoved - shell: | - set -e - apt-mark manual libgeos* libproj* libgdal* libjson-c* libxml2* libboost* libcgal* libmpfr* libgmp* - apt-mark auto libgeos*-dev libproj*-dev libgdal*-dev libjson-c*-dev libxml2*-dev libboost*-dev libcgal*-dev libmpfr*-dev libgmp*-dev - - become: yes - args: - executable: /bin/bash - -- name: postgis - download SFCGAL dependency - get_url: - url: "https://supabase-public-artifacts-bucket.s3.amazonaws.com/sfcgal/SFCGAL-v%7B%7B%20sfcgal_release%20%7D%7D.tar.gz" - dest: /tmp/SFCGAL-v{{ sfcgal_release }}.tar.gz - checksum: "{{ sfcgal_release_checksum }}" - timeout: 60 - -- name: postgis - unpack SFCGAL - unarchive: - remote_src: yes - src: /tmp/SFCGAL-v{{ sfcgal_release }}.tar.gz - dest: /tmp - become: yes - -- name: postgis - compile SFCGAL - shell: - cmd: "cmake ." - chdir: /tmp/SFCGAL-v{{ sfcgal_release }} - become: yes - -- name: postgis - build SFCGAL - community.general.make: - target: all - chdir: /tmp/SFCGAL-v{{ sfcgal_release }} - jobs: "{{ parallel_jobs | default(omit) }}" - become: yes - -- name: postgis - install SFCGAL - make: - chdir: /tmp/SFCGAL-v{{ sfcgal_release }} - target: install - become: yes - -- name: postgis - download latest release - shell: - cmd: "curl -sf -L https://supabase-public-artifacts-bucket.s3.amazonaws.com/postgis-{{ postgis_release }}.tar.gz -o /tmp/postgis-{{ postgis_release }}.tar.gz" - -- name: postgis - unpack archive - unarchive: - remote_src: yes - src: /tmp/postgis-{{ postgis_release }}.tar.gz - dest: /tmp - become: yes - -- name: postgis - configure - shell: - cmd: "./configure --with-sfcgal" - chdir: /tmp/postgis-{{ postgis_release }} - become: yes - -- name: postgis - build - community.general.make: - target: all - chdir: /tmp/postgis-{{ postgis_release }} - jobs: "{{ parallel_jobs | default(omit) }}" - become: yes - -- name: postgis - install - make: - chdir: /tmp/postgis-{{ postgis_release }} - target: install - become: yes - -- name: postgis - SFCGAL cleanup - file: - state: absent - path: /tmp/SFCGAL-v{{ sfcgal_release }} - -- name: postgis - cleanup - file: - state: absent - path: /tmp/postgis-{{ postgis_release }} diff --git a/ansible/tasks/postgres-extensions/02-pgrouting.yml b/ansible/tasks/postgres-extensions/02-pgrouting.yml deleted file mode 100644 index 746870a01..000000000 --- a/ansible/tasks/postgres-extensions/02-pgrouting.yml +++ /dev/null @@ -1,52 +0,0 @@ -# pgRouting -- name: pgRouting - download & install dependencies - apt: - pkg: - - libboost-all-dev - update_cache: yes - cache_valid_time: 3600 - install_recommends: no - -- name: pgRouting - download latest release - get_url: - url: "https://github.com/pgRouting/pgrouting/releases/download/v%7B%7B%20pgrouting_release%20%7D%7D/pgrouting-%7B%7B%20pgrouting_release%20%7D%7D.tar.gz" - dest: /tmp/pgrouting-{{ pgrouting_release }}.tar.gz - checksum: "{{ pgrouting_release_checksum }}" - timeout: 60 - -- name: pgRouting - unpack archive - unarchive: - remote_src: yes - src: /tmp/pgrouting-{{ pgrouting_release }}.tar.gz - dest: /tmp - become: yes - -- name: pgRouting - create build directory - file: - path: /tmp/pgrouting-{{ pgrouting_release }}/build - state: directory - become: yes - -- name: pgRouting - compile - shell: - cmd: "cmake -DBUILD_HTML=OFF -DBUILD_DOXY=OFF .." - chdir: /tmp/pgrouting-{{ pgrouting_release }}/build - become: yes - -- name: pgRouting - build - community.general.make: - target: all - chdir: /tmp/pgrouting-{{ pgrouting_release }}/build - jobs: "{{ parallel_jobs | default(omit) }}" - become: yes - -- name: pgRouting - install - make: - chdir: /tmp/pgrouting-{{ pgrouting_release }}/build - target: install - become: yes - -- name: pgRouting - cleanup - file: - state: absent - path: /tmp/pgrouting-{{ pgrouting_release }} diff --git a/ansible/tasks/postgres-extensions/03-pgtap.yml b/ansible/tasks/postgres-extensions/03-pgtap.yml deleted file mode 100644 index 9b818b92a..000000000 --- a/ansible/tasks/postgres-extensions/03-pgtap.yml +++ /dev/null @@ -1,25 +0,0 @@ -# pgTAP -- name: pgTAP - download latest release - get_url: - url: "https://github.com/theory/pgtap/archive/v%7B%7B%20pgtap_release%20%7D%7D.tar.gz" - dest: /tmp/pgtap-{{ pgtap_release }}.tar.gz - checksum: "{{ pgtap_release_checksum }}" - timeout: 60 - -- name: pgTAP - unpack archive - unarchive: - remote_src: yes - src: /tmp/pgtap-{{ pgtap_release }}.tar.gz - dest: /tmp - become: yes - -- name: pgTAP - install - make: - chdir: /tmp/pgtap-{{ pgtap_release }} - target: install - become: yes - -- name: pgTAP - cleanup - file: - state: absent - path: /tmp/pgtap-{{ pgtap_release }} diff --git a/ansible/tasks/postgres-extensions/04-pg_cron.yml b/ansible/tasks/postgres-extensions/04-pg_cron.yml deleted file mode 100644 index 787fe1d2c..000000000 --- a/ansible/tasks/postgres-extensions/04-pg_cron.yml +++ /dev/null @@ -1,37 +0,0 @@ -# pg_cron -- name: pg_cron - download latest release - get_url: - url: "https://github.com/citusdata/pg_cron/archive/refs/tags/v%7B%7B%20pg_cron_release%20%7D%7D.tar.gz" - dest: /tmp/pg_cron-{{ pg_cron_release }}.tar.gz - checksum: "{{ pg_cron_release_checksum }}" - timeout: 60 - -- name: pg_cron - unpack archive - unarchive: - remote_src: yes - src: /tmp/pg_cron-{{ pg_cron_release }}.tar.gz - dest: /tmp - become: yes - -- name: pg_cron - build - make: - chdir: /tmp/pg_cron-{{ pg_cron_release }} - become: yes - -- name: pg_cron - install - make: - chdir: /tmp/pg_cron-{{ pg_cron_release }} - target: install - become: yes - -- name: pg_cron - set cron.database_name - become: yes - lineinfile: - path: /etc/postgresql/postgresql.conf - state: present - line: cron.database_name = 'postgres' - -- name: pg_cron - cleanup - file: - state: absent - path: /tmp/pg_cron-{{ pg_cron_release }} diff --git a/ansible/tasks/postgres-extensions/05-pgaudit.yml b/ansible/tasks/postgres-extensions/05-pgaudit.yml deleted file mode 100644 index 5f88c8473..000000000 --- a/ansible/tasks/postgres-extensions/05-pgaudit.yml +++ /dev/null @@ -1,43 +0,0 @@ -# pgAudit -- name: pgAudit - download & install dependencies - apt: - pkg: - - libssl-dev - - libkrb5-dev - update_cache: yes - install_recommends: no - -- name: pgAudit - download latest release - get_url: - url: "https://github.com/pgaudit/pgaudit/archive/refs/tags/%7B%7B%20pgaudit_release%20%7D%7D.tar.gz" - dest: /tmp/pgaudit-{{ pgaudit_release }}.tar.gz - checksum: "{{ pgaudit_release_checksum }}" - timeout: 60 - -- name: pgAudit - unpack archive - unarchive: - remote_src: yes - src: /tmp/pgaudit-{{ pgaudit_release }}.tar.gz - dest: /tmp - become: yes - -- name: pgAudit - build - make: - chdir: /tmp/pgaudit-{{ pgaudit_release }} - target: check - params: - USE_PGXS: 1 - become: yes - -- name: pgAudit - install - make: - chdir: /tmp/pgaudit-{{ pgaudit_release }} - target: install - params: - USE_PGXS: 1 - become: yes - -- name: pgAudit - cleanup - file: - state: absent - path: /tmp/pgaudit-{{ pgaudit_release }} diff --git a/ansible/tasks/postgres-extensions/06-pgjwt.yml b/ansible/tasks/postgres-extensions/06-pgjwt.yml deleted file mode 100644 index 61890bf43..000000000 --- a/ansible/tasks/postgres-extensions/06-pgjwt.yml +++ /dev/null @@ -1,17 +0,0 @@ -# pgjwt -- name: pgjwt - download from master branch - git: - repo: https://github.com/michelp/pgjwt.git - dest: /tmp/pgjwt - version: "{{ pgjwt_release }}" - -- name: pgjwt - install - make: - chdir: /tmp/pgjwt - target: install - become: yes - -- name: pgjwt - cleanup - file: - state: absent - path: /tmp/pgjwt diff --git a/ansible/tasks/postgres-extensions/07-pgsql-http.yml b/ansible/tasks/postgres-extensions/07-pgsql-http.yml deleted file mode 100644 index 73044d261..000000000 --- a/ansible/tasks/postgres-extensions/07-pgsql-http.yml +++ /dev/null @@ -1,43 +0,0 @@ -# pgsql-http -- name: pgsql-http - libcurl4 package - apt: - pkg: - - libcurl4 - state: absent - -- name: pgsql-http - download & install dependencies - apt: - pkg: - - libcurl4-gnutls-dev - update_cache: yes - install_recommends: no - -- name: pgsql-http - download latest release - get_url: - url: "https://github.com/pramsey/pgsql-http/archive/refs/tags/v%7B%7B%20pgsql_http_release%20%7D%7D.tar.gz" - dest: /tmp/pgsql_http-{{ pgsql_http_release }}.tar.gz - checksum: "{{ pgsql_http_release_checksum }}" - timeout: 60 - -- name: pgsql-http - unpack archive - unarchive: - remote_src: yes - src: /tmp/pgsql_http-{{ pgsql_http_release }}.tar.gz - dest: /tmp - become: yes - -- name: pgsql-http - build - make: - chdir: /tmp/pgsql-http-{{ pgsql_http_release }} - become: yes - -- name: pgsql-http - install - make: - chdir: /tmp/pgsql-http-{{ pgsql_http_release }} - target: install - become: yes - -- name: pgsql-http - cleanup - file: - state: absent - path: /tmp/pgsql-http-{{ pgsql_http_release }} diff --git a/ansible/tasks/postgres-extensions/08-plpgsql_check.yml b/ansible/tasks/postgres-extensions/08-plpgsql_check.yml deleted file mode 100644 index 75bb041d5..000000000 --- a/ansible/tasks/postgres-extensions/08-plpgsql_check.yml +++ /dev/null @@ -1,38 +0,0 @@ -# plpgsql_check -- name: plpgsql_check - download & install dependencies - apt: - pkg: - - libicu-dev - update_cache: yes - install_recommends: no - -- name: plpgsql_check - download latest release - get_url: - url: "https://github.com/okbob/plpgsql_check/archive/refs/tags/v%7B%7B%20plpgsql_check_release%20%7D%7D.tar.gz" - dest: /tmp/plpgsql_check-{{ plpgsql_check_release }}.tar.gz - checksum: "{{ plpgsql_check_release_checksum }}" - timeout: 60 - -- name: plpgsql_check - unpack archive - unarchive: - remote_src: yes - src: /tmp/plpgsql_check-{{ plpgsql_check_release }}.tar.gz - dest: /tmp - become: yes - -- name: plpgsql_check - clean - make: - chdir: /tmp/plpgsql_check-{{ plpgsql_check_release }} - target: clean - become: yes - -- name: plpgsql_check - install - make: - chdir: /tmp/plpgsql_check-{{ plpgsql_check_release }} - target: install - become: yes - -- name: plpgsql_check - cleanup - file: - state: absent - path: /tmp/plpgsql_check-{{ plpgsql_check_release }} diff --git a/ansible/tasks/postgres-extensions/09-pg-safeupdate.yml b/ansible/tasks/postgres-extensions/09-pg-safeupdate.yml deleted file mode 100644 index 36ae41cfa..000000000 --- a/ansible/tasks/postgres-extensions/09-pg-safeupdate.yml +++ /dev/null @@ -1,30 +0,0 @@ -# pg-safeupdate -- name: pg-safeupdate - download latest release - get_url: - url: "https://github.com/eradman/pg-safeupdate/archive/refs/tags/%7B%7B%20pg_safeupdate_release%20%7D%7D.tar.gz" - dest: /tmp/pg_safeupdate-{{ pg_safeupdate_release }}.tar.gz - checksum: "{{ pg_safeupdate_release_checksum }}" - timeout: 60 - -- name: pg-safeupdate - unpack archive - unarchive: - remote_src: yes - src: /tmp/pg_safeupdate-{{ pg_safeupdate_release }}.tar.gz - dest: /tmp - become: yes - -- name: pg-safeupdate - build - make: - chdir: /tmp/pg-safeupdate-{{ pg_safeupdate_release }} - become: yes - -- name: pg-safeupdate - install - make: - chdir: /tmp/pg-safeupdate-{{ pg_safeupdate_release }} - target: install - become: yes - -- name: pg-safeupdate - cleanup - file: - state: absent - path: /tmp/pg-safeupdate-{{ pg_safeupdate_release }} diff --git a/ansible/tasks/postgres-extensions/10-timescaledb.yml b/ansible/tasks/postgres-extensions/10-timescaledb.yml deleted file mode 100644 index cb4b84237..000000000 --- a/ansible/tasks/postgres-extensions/10-timescaledb.yml +++ /dev/null @@ -1,36 +0,0 @@ -# timescaledb -- name: timescaledb - download & install dependencies - apt: - pkg: - - cmake - update_cache: yes - install_recommends: no - -- name: timescaledb - download latest release - git: - repo: https://github.com/timescale/timescaledb.git - dest: /tmp/timescaledb - version: "{{ timescaledb_release }}" - become: yes - -- name: timescaledb - bootstrap - shell: - cmd: "./bootstrap -DAPACHE_ONLY=1" - chdir: /tmp/timescaledb - become: yes - -- name: timescaledb - build - make: - chdir: /tmp/timescaledb/build - become: yes - -- name: timescaledb - install - make: - chdir: /tmp/timescaledb/build - target: install - become: yes - -- name: timescaledb - cleanup - file: - state: absent - path: /tmp/timescaledb diff --git a/ansible/tasks/postgres-extensions/11-wal2json.yml b/ansible/tasks/postgres-extensions/11-wal2json.yml deleted file mode 100644 index c5abde95c..000000000 --- a/ansible/tasks/postgres-extensions/11-wal2json.yml +++ /dev/null @@ -1,17 +0,0 @@ -# wal2json -- name: wal2json - download by commit sha - git: - repo: https://github.com/eulerto/wal2json.git - dest: /tmp/wal2json - version: "wal2json_{{ wal2json_release }}" - -- name: wal2json - install - make: - chdir: /tmp/wal2json - target: install - become: yes - -- name: wal2json - cleanup - file: - state: absent - path: /tmp/wal2json diff --git a/ansible/tasks/postgres-extensions/12-pljava.yml b/ansible/tasks/postgres-extensions/12-pljava.yml deleted file mode 100644 index bd16d1cec..000000000 --- a/ansible/tasks/postgres-extensions/12-pljava.yml +++ /dev/null @@ -1,84 +0,0 @@ -# pljava -- name: pljava - download & install dependencies - apt: - pkg: - - maven - - default-jre - - default-jdk - - libssl-dev - update_cache: yes - install_recommends: no - -#TODO: revert to using main repo after PG15 support is merged: https://github.com/tada/pljava/pull/413 -# - name: pljava - download latest release -# get_url: -# url: https://github.com/tada/pljava/archive/V{{ pljava_release }}.tar.gz -# dest: /tmp/pljava-{{ pljava_release }}.tar.gz -# checksum: "{{ pljava_release_checksum }}" -# timeout: 60 - -# - name: pljava - unpack archive -# unarchive: -# remote_src: yes -# src: /tmp/pljava-{{ pljava_release }}.tar.gz -# dest: /tmp -# become: yes - -- name: pljava - download latest release - become: yes - git: - repo: https://github.com/supabase/pljava.git - dest: /tmp/pljava-{{ pljava_release }} - version: "{{ pljava_release }}" - -- name: pljava - build - become: yes - shell: - cmd: mvn -T 1C clean install -Dmaven.test.skip -DskipTests -Dmaven.javadoc.skip=true - chdir: /tmp/pljava-{{ pljava_release }} - -- name: pljava - install - become: yes - shell: - cmd: java -jar pljava-packaging/target/pljava-pg{{ postgresql_major }}.jar - chdir: /tmp/pljava-{{ pljava_release }} - -- name: pljava - remove build dependencies - apt: - pkg: - - maven - - default-jre - - default-jdk - state: absent - -- name: pljava - install headless jdk - apt: - pkg: - - default-jdk-headless - update_cache: yes - install_recommends: no - -- name: Hold jre package - dpkg_selections: - name: default-jre-headless - selection: hold - when: async_mode - -- name: pljava - set pljava.libjvm_location - become: yes - lineinfile: - path: /etc/postgresql/postgresql.conf - state: present - line: pljava.libjvm_location = '/usr/lib/jvm/java-11-openjdk-{{ platform }}/lib/server/libjvm.so' - -- name: pljava - remove ~/.m2 directory - become: yes - file: - path: ~/.m2 - state: absent - -- name: pljava - cleanup - become: yes - file: - state: absent - path: /tmp/pljava-{{ pljava_release }} diff --git a/ansible/tasks/postgres-extensions/13-plv8.yml b/ansible/tasks/postgres-extensions/13-plv8.yml deleted file mode 100644 index 9f117355e..000000000 --- a/ansible/tasks/postgres-extensions/13-plv8.yml +++ /dev/null @@ -1,73 +0,0 @@ -# plv8 -- name: plv8 - download & install dependencies - apt: - pkg: - - build-essential - - ca-certificates - - curl - - git-core - - gpp - - cpp - - pkg-config - - apt-transport-https - - cmake - - libc++-dev - - libc++abi-dev - - libc++1 - - libglib2.0-dev - - libtinfo5 - - libc++abi1 - - ninja-build - - python - update_cache: yes - install_recommends: no - -- name: plv8 - download latest release - git: - repo: https://github.com/plv8/plv8.git - dest: /tmp/plv8 - version: "v{{ plv8_release }}" - become: yes - -- name: Create a symbolic link - file: - src: /lib/aarch64-linux-gnu/libc++.so.1 - dest: /lib/aarch64-linux-gnu/libc++.so - state: link - when: platform == "arm64" - ignore_errors: yes # not needed for docker build - -- name: plv8 - enable ccache - become: yes - replace: - path: /tmp/plv8/Makefiles/Makefile.docker - regexp: "^GN_ARGS =" - replace: GN_ARGS = cc_wrapper=\"env CCACHE_SLOPPINESS=time_macros ccache\" - -- name: plv8 - build - make: - chdir: /tmp/plv8 - become: yes - when: not async_mode - -- name: plv8 - install - make: - chdir: /tmp/plv8 - target: install - become: yes - when: not async_mode - -- name: plv8 - cleanup - file: - state: absent - path: /tmp/plv8 - when: not async_mode - -- name: plv8 - build - make: - chdir: /tmp/plv8 - become: yes - async: 2000 - poll: 0 - register: plv8_build - when: async_mode diff --git a/ansible/tasks/postgres-extensions/14-pg_plan_filter.yml b/ansible/tasks/postgres-extensions/14-pg_plan_filter.yml deleted file mode 100644 index 0fa099066..000000000 --- a/ansible/tasks/postgres-extensions/14-pg_plan_filter.yml +++ /dev/null @@ -1,23 +0,0 @@ -# pg_plan_filter -- name: pg_plan_filter - download latest release - git: - repo: https://github.com/pgexperts/pg_plan_filter.git - dest: /tmp/pg_plan_filter - version: "{{ pg_plan_filter_release }}" - become: yes - -- name: pg_plan_filter - build - make: - chdir: /tmp/pg_plan_filter - become: yes - -- name: pg_plan_filter - install - make: - chdir: /tmp/pg_plan_filter - target: install - become: yes - -- name: pg_plan_filter - cleanup - file: - state: absent - path: /tmp/pg_plan_filter diff --git a/ansible/tasks/postgres-extensions/15-pg_net.yml b/ansible/tasks/postgres-extensions/15-pg_net.yml deleted file mode 100644 index 260f38d55..000000000 --- a/ansible/tasks/postgres-extensions/15-pg_net.yml +++ /dev/null @@ -1,37 +0,0 @@ -# pg_net -- name: pg_net - download & install dependencies - apt: - pkg: - - libcurl4-gnutls-dev - update_cache: yes - install_recommends: no - -- name: pg_net - download latest release - get_url: - url: "https://github.com/supabase/pg_net/archive/refs/tags/v%7B%7Bpg_net_release%7D%7D.tar.gz" - dest: /tmp/pg_net-{{ pg_net_release }}.tar.gz - checksum: "{{ pg_net_release_checksum }}" - timeout: 60 - -- name: pg_net - unpack archive - unarchive: - remote_src: yes - src: /tmp/pg_net-{{ pg_net_release }}.tar.gz - dest: /tmp - become: yes - -- name: pg_net - build - make: - chdir: /tmp/pg_net-{{ pg_net_release }} - become: yes - -- name: pg_net - install - make: - chdir: /tmp/pg_net-{{ pg_net_release }} - target: install - become: yes - -- name: pg_net - cleanup - file: - state: absent - path: /tmp/pg_net-{{ pg_net_release }} diff --git a/ansible/tasks/postgres-extensions/16-rum.yml b/ansible/tasks/postgres-extensions/16-rum.yml deleted file mode 100644 index f8cca1600..000000000 --- a/ansible/tasks/postgres-extensions/16-rum.yml +++ /dev/null @@ -1,34 +0,0 @@ -# rum -- name: rum - download latest release - get_url: - url: "https://github.com/postgrespro/rum/archive/refs/tags/%7B%7Brum_release%7D%7D.tar.gz" - dest: /tmp/rum-{{ rum_release }}.tar.gz - checksum: "{{ rum_release_checksum }}" - timeout: 60 - -- name: rum - unpack archive - unarchive: - remote_src: yes - src: /tmp/rum-{{ rum_release }}.tar.gz - dest: /tmp - become: yes - -- name: rum - build - make: - chdir: /tmp/rum-{{ rum_release }} - params: - USE_PGXS: 1 - become: yes - -- name: rum - install - make: - chdir: /tmp/rum-{{ rum_release }} - target: install - params: - USE_PGXS: 1 - become: yes - -- name: rum - cleanup - file: - state: absent - path: /tmp/rum-{{ rum_release }} diff --git a/ansible/tasks/postgres-extensions/17-pg_hashids.yml b/ansible/tasks/postgres-extensions/17-pg_hashids.yml deleted file mode 100644 index 8bd02917d..000000000 --- a/ansible/tasks/postgres-extensions/17-pg_hashids.yml +++ /dev/null @@ -1,22 +0,0 @@ -# pg_hashids -- name: pg_hashids - download from master branch - git: - repo: https://github.com/iCyberon/pg_hashids.git - dest: /tmp/pg_hashids - version: "{{ pg_hashids_release }}" - -- name: pg_hashids - build - make: - chdir: /tmp/pg_hashids - become: yes - -- name: pg_hashids - install - make: - chdir: /tmp/pg_hashids - target: install - become: yes - -- name: pg_hashids - cleanup - file: - state: absent - path: /tmp/pg_hashids diff --git a/ansible/tasks/postgres-extensions/18-pgsodium.yml b/ansible/tasks/postgres-extensions/18-pgsodium.yml deleted file mode 100644 index a7c73c574..000000000 --- a/ansible/tasks/postgres-extensions/18-pgsodium.yml +++ /dev/null @@ -1,80 +0,0 @@ -# libsodium and pgsodium -- name: determine postgres bin directory - shell: pg_config --bindir - register: pg_bindir_output -- set_fact: - pg_bindir: "{{ pg_bindir_output.stdout }}" - -- name: libsodium - download libsodium - get_url: - url: "https://download.libsodium.org/libsodium/releases/libsodium-%7B%7B%20libsodium_release%20%7D%7D.tar.gz" - dest: /tmp/libsodium-{{ libsodium_release }}.tar.gz - checksum: "{{ libsodium_release_checksum }}" - timeout: 60 - -- name: libsodium - unpack archive - unarchive: - remote_src: yes - src: /tmp/libsodium-{{ libsodium_release }}.tar.gz - dest: /tmp - become: yes - -- name: libsodium - configure - shell: - cmd: ./configure - chdir: /tmp/libsodium-{{ libsodium_release }} - become: yes - -- name: libsodium - build - make: - chdir: /tmp/libsodium-{{ libsodium_release }} - become: yes - -- name: libsodium - install - make: - chdir: /tmp/libsodium-{{ libsodium_release }} - target: install - become: yes - -- name: pgsodium - download pgsodium - get_url: - url: "https://github.com/michelp/pgsodium/archive/refs/tags/v%7B%7B%20pgsodium_release%20%7D%7D.tar.gz" - dest: /tmp/pgsodium-{{ pgsodium_release }}.tar.gz - checksum: "{{ pgsodium_release_checksum }}" - timeout: 60 - -- name: pgsodium - unpack archive - unarchive: - remote_src: yes - src: /tmp/pgsodium-{{ pgsodium_release }}.tar.gz - dest: /tmp - become: yes - -- name: pgsodium - build - make: - chdir: /tmp/pgsodium-{{ pgsodium_release }} - become: yes - -- name: pgsodium - install - make: - chdir: /tmp/pgsodium-{{ pgsodium_release }} - target: install - become: yes - -- name: pgsodium - set pgsodium.getkey_script - become: yes - lineinfile: - path: /etc/postgresql/postgresql.conf - state: present - # script is expected to be placed by finalization tasks for different target platforms - line: pgsodium.getkey_script= '{{ pg_bindir }}/pgsodium_getkey.sh' - -- name: libsodium - cleanup - file: - state: absent - path: /tmp/libsodium-{{ libsodium_release }} - -- name: pgsodium - cleanup - file: - state: absent - path: /tmp/pgsodium-{{ pgsodium_release }} diff --git a/ansible/tasks/postgres-extensions/19-pg_graphql.yml b/ansible/tasks/postgres-extensions/19-pg_graphql.yml deleted file mode 100644 index 642becdb6..000000000 --- a/ansible/tasks/postgres-extensions/19-pg_graphql.yml +++ /dev/null @@ -1,3 +0,0 @@ -- name: install pg_graphql - ansible.builtin.apt: - deb: "https://github.com/supabase/pg_graphql/releases/download/v%7B%7B%20pg_graphql_release%20%7D%7D/pg_graphql-v%7B%7B%20pg_graphql_release%20%7D%7D-pg%7B%7B%20postgresql_major%20%7D%7D-%7B%7B%20platform%20%7D%7D-linux-gnu.deb" diff --git a/ansible/tasks/postgres-extensions/20-pg_stat_monitor.yml b/ansible/tasks/postgres-extensions/20-pg_stat_monitor.yml deleted file mode 100644 index bffddefc3..000000000 --- a/ansible/tasks/postgres-extensions/20-pg_stat_monitor.yml +++ /dev/null @@ -1,23 +0,0 @@ -# pg_stat_monitor -- name: pg_stat_monitor - download and install dependencies - git: - repo: https://github.com/percona/pg_stat_monitor.git - dest: /tmp/pg_stat_monitor - version: "{{ pg_stat_monitor_release }}" - become: yes - -- name: pg_stat_monitor build - make: - chdir: /tmp/pg_stat_monitor - params: USE_PGXS=1 - -- name: pg_stat_monitor install - make: - chdir: /tmp/pg_stat_monitor - target: install - params: USE_PGXS=1 - -- name: pg_stat_monitor cleanup - file: - state: absent - path: /tmp/pg_stat_monitor diff --git a/ansible/tasks/postgres-extensions/21-auto_explain.yml b/ansible/tasks/postgres-extensions/21-auto_explain.yml deleted file mode 100644 index b6a16faf0..000000000 --- a/ansible/tasks/postgres-extensions/21-auto_explain.yml +++ /dev/null @@ -1,7 +0,0 @@ - -- name: auto_explain - set auto_explain.log_min_duration - become: yes - lineinfile: - path: /etc/postgresql/postgresql.conf - state: present - line: auto_explain.log_min_duration = 10s diff --git a/ansible/tasks/postgres-extensions/22-pg_jsonschema.yml b/ansible/tasks/postgres-extensions/22-pg_jsonschema.yml deleted file mode 100644 index fc71ab8ed..000000000 --- a/ansible/tasks/postgres-extensions/22-pg_jsonschema.yml +++ /dev/null @@ -1,3 +0,0 @@ -- name: install pg_jsonschema - ansible.builtin.apt: - deb: "https://github.com/supabase/pg_jsonschema/releases/download/v%7B%7B%20pg_jsonschema_release%20%7D%7D/pg_jsonschema-v%7B%7B%20pg_jsonschema_release%20%7D%7D-pg%7B%7B%20postgresql_major%20%7D%7D-%7B%7B%20platform%20%7D%7D-linux-gnu.deb" diff --git a/ansible/tasks/postgres-extensions/23-vault.yml b/ansible/tasks/postgres-extensions/23-vault.yml deleted file mode 100644 index 1cc76c83a..000000000 --- a/ansible/tasks/postgres-extensions/23-vault.yml +++ /dev/null @@ -1,31 +0,0 @@ -# vault - -- name: vault - download vault - get_url: - url: "https://github.com/supabase/vault/archive/refs/tags/v%7B%7B%20vault_release%20%7D%7D.tar.gz" - dest: /tmp/vault-{{ vault_release }}.tar.gz - checksum: "{{ vault_release_checksum }}" - timeout: 60 - -- name: vault - unpack archive - unarchive: - remote_src: yes - src: /tmp/vault-{{ vault_release }}.tar.gz - dest: /tmp - become: yes - -- name: vault - build - make: - chdir: /tmp/vault-{{ vault_release }} - become: yes - -- name: vault - install - make: - chdir: /tmp/vault-{{ vault_release }} - target: install - become: yes - -- name: vault - cleanup - file: - state: absent - path: /tmp/vault-{{ vault_release }} diff --git a/ansible/tasks/postgres-extensions/24-pgroonga.yml b/ansible/tasks/postgres-extensions/24-pgroonga.yml deleted file mode 100644 index f8baaa6f9..000000000 --- a/ansible/tasks/postgres-extensions/24-pgroonga.yml +++ /dev/null @@ -1,85 +0,0 @@ -# groonga and pgroonga -- name: groonga - download & install dependencies - apt: - pkg: - - zlib1g-dev - - liblzo2-dev - - libmsgpack-dev - - libzmq3-dev - - libevent-dev - - libmecab-dev - - mecab-naist-jdic - update_cache: yes - install_recommends: no - -- name: groonga - download groonga - get_url: - url: "https://packages.groonga.org/source/groonga/groonga-%7B%7B%20groonga_release%20%7D%7D.tar.gz" - dest: /tmp/groonga-{{ groonga_release }}.tar.gz - checksum: "{{ groonga_release_checksum }}" - timeout: 60 - -- name: groonga - unpack archive - unarchive: - remote_src: yes - src: /tmp/groonga-{{ groonga_release }}.tar.gz - dest: /tmp - become: yes - -- name: groonga - configure - shell: - cmd: ./configure - chdir: /tmp/groonga-{{ groonga_release }} - become: yes - -- name: groonga - build - community.general.make: - target: all - chdir: /tmp/groonga-{{ groonga_release }} - jobs: "{{ parallel_jobs | default(omit) }}" - become: yes - -- name: groonga - install - make: - chdir: /tmp/groonga-{{ groonga_release }} - target: install - become: yes - -- name: pgroonga - download pgroonga - get_url: - url: "https://packages.groonga.org/source/pgroonga/pgroonga-%7B%7B%20pgroonga_release%20%7D%7D.tar.gz" - dest: /tmp/pgroonga-{{ pgroonga_release }}.tar.gz - checksum: "{{ pgroonga_release_checksum }}" - timeout: 60 - -- name: pgroonga - unpack archive - unarchive: - remote_src: yes - src: /tmp/pgroonga-{{ pgroonga_release }}.tar.gz - dest: /tmp - become: yes - -- name: pgroonga - build - community.general.make: - target: all - chdir: /tmp/pgroonga-{{ pgroonga_release }} - jobs: "{{ parallel_jobs | default(omit) }}" - become: yes - -- name: pgroonga - install - make: - chdir: /tmp/pgroonga-{{ pgroonga_release }} - target: install - become: yes - -- name: groonga - cleanup - file: - state: absent - path: /tmp/groonga-{{ groonga_release }} - become: yes - -- name: pgroonga - cleanup - file: - state: absent - path: /tmp/pgroonga-{{ pgroonga_release }} - become: yes diff --git a/ansible/tasks/postgres-extensions/25-wrappers.yml b/ansible/tasks/postgres-extensions/25-wrappers.yml deleted file mode 100644 index 717fa5ce8..000000000 --- a/ansible/tasks/postgres-extensions/25-wrappers.yml +++ /dev/null @@ -1,3 +0,0 @@ -- name: install wrappers - ansible.builtin.apt: - deb: "https://github.com/supabase/wrappers/releases/download/v%7B%7B%20wrappers_release%20%7D%7D/wrappers-v%7B%7B%20wrappers_release%20%7D%7D-pg%7B%7B%20postgresql_major%20%7D%7D-%7B%7B%20platform%20%7D%7D-linux-gnu.deb" diff --git a/ansible/tasks/postgres-extensions/26-hypopg.yml b/ansible/tasks/postgres-extensions/26-hypopg.yml deleted file mode 100644 index 4a9afcf7c..000000000 --- a/ansible/tasks/postgres-extensions/26-hypopg.yml +++ /dev/null @@ -1,17 +0,0 @@ -# hypopg -- name: hypopg - download by commit sha - git: - repo: https://github.com/HypoPG/hypopg.git - dest: /tmp/hypopg - version: "{{ hypopg_release }}" - -- name: hypopg - install - make: - chdir: /tmp/hypopg - target: install - become: yes - -- name: hypopg - cleanup - file: - state: absent - path: /tmp/hypopg diff --git a/ansible/tasks/postgres-extensions/28-pgvector.yml b/ansible/tasks/postgres-extensions/28-pgvector.yml deleted file mode 100644 index ceae8abe9..000000000 --- a/ansible/tasks/postgres-extensions/28-pgvector.yml +++ /dev/null @@ -1,31 +0,0 @@ -# pgvector -- name: pgvector - download latest release - git: - repo: https://github.com/pgvector/pgvector.git - dest: /tmp/pgvector - version: 'v{{ pgvector_release }}' - become: yes - -- name: pgvector - ubuntu 18.04 compat - lineinfile: - path: /tmp/pgvector/Makefile - regexp: "march=native$" - line: "OPTFLAGS = " - firstmatch: true - when: ansible_distribution_version == "18.04" - -- name: pgvector - build - make: - chdir: /tmp/pgvector - become: yes - -- name: pgvector - install - make: - chdir: /tmp/pgvector - target: install - become: yes - -- name: pgvector - cleanup - file: - state: absent - path: /tmp/pgvector diff --git a/ansible/tasks/postgres-extensions/29-pg_tle.yml b/ansible/tasks/postgres-extensions/29-pg_tle.yml deleted file mode 100644 index ea0b199e1..000000000 --- a/ansible/tasks/postgres-extensions/29-pg_tle.yml +++ /dev/null @@ -1,12 +0,0 @@ -# pg_tle -- name: pg_tle - download - git: - repo: https://github.com/aws/pg_tle.git - dest: /tmp/pg_tle - version: v{{ pg_tle_release }} - -- name: pg_tle - install - make: - chdir: /tmp/pg_tle - target: install - become: yes diff --git a/ansible/tasks/postgres-extensions/99-finish_async_tasks.yml b/ansible/tasks/postgres-extensions/99-finish_async_tasks.yml deleted file mode 100644 index 2e0609ba0..000000000 --- a/ansible/tasks/postgres-extensions/99-finish_async_tasks.yml +++ /dev/null @@ -1,19 +0,0 @@ -## Verify plv8 status and complete plv8-install -- name: Check if plv8 is complete - async_status: - jid: "{{ plv8_build.ansible_job_id }}" - register: job_result - until: job_result.finished - delay: 60 - retries: 60 - -- name: plv8 - install - make: - chdir: /tmp/plv8 - target: install - become: yes - -- name: plv8 - cleanup - file: - state: absent - path: /tmp/plv8 diff --git a/ansible/tasks/setup-docker.yml b/ansible/tasks/setup-docker.yml index 698b51092..7b37f70cc 100644 --- a/ansible/tasks/setup-docker.yml +++ b/ansible/tasks/setup-docker.yml @@ -2,6 +2,7 @@ copy: src: files/extensions/ dest: /tmp/extensions/ + when: debpkg_mode # Builtin apt module does not support wildcard for deb paths - name: Install extensions @@ -9,28 +10,16 @@ set -e apt-get update apt-get install -y --no-install-recommends /tmp/extensions/*.deb - when: ansible_distribution_version != "18.04" - -# Builtin apt module does not support wildcard for deb paths -- name: Install extensions - Ubuntu 18.04 - shell: | - set -e - apt-get update - apt-get install -y /tmp/extensions/*.deb - when: ansible_distribution_version == "18.04" - -- name: pg_cron - set cron.database_name - become: yes - lineinfile: - path: /etc/postgresql/postgresql.conf - state: present - line: cron.database_name = 'postgres' + when: debpkg_mode - name: pgsodium - determine postgres bin directory shell: pg_config --bindir register: pg_bindir_output + when: debpkg_mode + - set_fact: pg_bindir: "{{ pg_bindir_output.stdout }}" + when: debpkg_mode - name: pgsodium - set pgsodium.getkey_script become: yes @@ -39,13 +28,7 @@ state: present # script is expected to be placed by finalization tasks for different target platforms line: pgsodium.getkey_script= '{{ pg_bindir }}/pgsodium_getkey.sh' - -- name: auto_explain - set auto_explain.log_min_duration - become: yes - lineinfile: - path: /etc/postgresql/postgresql.conf - state: present - line: auto_explain.log_min_duration = 10s + when: debpkg_mode # supautils - name: supautils - add supautils to session_preload_libraries @@ -54,6 +37,7 @@ path: /etc/postgresql/postgresql.conf regexp: "#session_preload_libraries = ''" replace: session_preload_libraries = 'supautils' + when: debpkg_mode or stage2_nix - name: supautils - write custom supautils.conf template: @@ -62,12 +46,14 @@ mode: 0664 owner: postgres group: postgres + when: debpkg_mode or stage2_nix - name: supautils - copy extension custom scripts copy: src: files/postgresql_extension_custom_scripts/ dest: /etc/postgresql-custom/extension-custom-scripts become: yes + when: debpkg_mode or stage2_nix - name: supautils - chown extension custom scripts file: @@ -77,6 +63,7 @@ path: /etc/postgresql-custom/extension-custom-scripts recurse: yes become: yes + when: debpkg_mode or stage2_nix - name: supautils - include /etc/postgresql-custom/supautils.conf in postgresql.conf become: yes @@ -84,8 +71,10 @@ path: /etc/postgresql/postgresql.conf regexp: "#include = '/etc/postgresql-custom/supautils.conf'" replace: "include = '/etc/postgresql-custom/supautils.conf'" + when: debpkg_mode or stage2_nix - name: Cleanup - extension packages file: path: /tmp/extensions state: absent + when: debpkg_mode diff --git a/ansible/tasks/setup-envoy.yml b/ansible/tasks/setup-envoy.yml new file mode 100644 index 000000000..9843b5546 --- /dev/null +++ b/ansible/tasks/setup-envoy.yml @@ -0,0 +1,60 @@ +- name: Envoy - system user + ansible.builtin.user: + name: envoy + +- name: Envoy - download binary + ansible.builtin.get_url: + checksum: "{{ envoy_release_checksum }}" + dest: /opt/envoy + group: envoy + mode: u+x + owner: envoy + # yamllint disable-line rule:line-length + url: "https://github.com/envoyproxy/envoy/releases/download/v%7B%7B%20envoy_release%20%7D%7D/envoy-%7B%7B%20envoy_release%20%7D%7D-linux-aarch_64" + +- name: Envoy - download hot restarter script + ansible.builtin.get_url: + checksum: "{{ envoy_hot_restarter_release_checksum }}" + dest: /opt/envoy-hot-restarter.py + group: envoy + mode: u+x + owner: envoy + # yamllint disable-line rule:line-length + url: https://raw.githubusercontent.com/envoyproxy/envoy/v{{ envoy_release }}/restarter/hot-restarter.py + +- name: Envoy - bump up ulimit + community.general.pam_limits: + domain: envoy + limit_item: nofile + limit_type: soft + value: 4096 + +- name: Envoy - create script to start envoy + ansible.builtin.copy: + dest: /opt/start-envoy.sh + group: envoy + mode: u+x + owner: envoy + src: files/start-envoy.sh + +- name: Envoy - create configuration files + ansible.builtin.copy: + dest: /etc/envoy/ + directory_mode: u=rwx,g=rwx,o=rx + group: envoy + mode: u=rw,g=rw,o=r + owner: envoy + src: files/envoy_config/ + +- name: Envoy - create service file + ansible.builtin.copy: + dest: /etc/systemd/system/envoy.service + mode: u=rw,g=r,o=r + src: files/envoy.service + +- name: Envoy - disable service + ansible.builtin.systemd: + daemon_reload: true + enabled: false + name: envoy + state: stopped diff --git a/ansible/tasks/setup-extensions.yml b/ansible/tasks/setup-extensions.yml deleted file mode 100644 index e8d5990ed..000000000 --- a/ansible/tasks/setup-extensions.yml +++ /dev/null @@ -1,91 +0,0 @@ -- name: Install plv8 - import_tasks: tasks/postgres-extensions/13-plv8.yml - -- name: Install pg_jsonschema - import_tasks: tasks/postgres-extensions/22-pg_jsonschema.yml - -- name: Install postgis - import_tasks: tasks/postgres-extensions/01-postgis.yml - -- name: Install pgrouting - import_tasks: tasks/postgres-extensions/02-pgrouting.yml - -- name: Install pgtap - import_tasks: tasks/postgres-extensions/03-pgtap.yml - -- name: Install pg_cron - import_tasks: tasks/postgres-extensions/04-pg_cron.yml - -- name: Install pgaudit - import_tasks: tasks/postgres-extensions/05-pgaudit.yml - -- name: Install pgjwt - import_tasks: tasks/postgres-extensions/06-pgjwt.yml - -- name: Install pgsql-http - import_tasks: tasks/postgres-extensions/07-pgsql-http.yml - -- name: Install plpgsql_check - import_tasks: tasks/postgres-extensions/08-plpgsql_check.yml - -- name: Install pg-safeupdate - import_tasks: tasks/postgres-extensions/09-pg-safeupdate.yml - -- name: Install timescaledb - import_tasks: tasks/postgres-extensions/10-timescaledb.yml - -- name: Install wal2json - import_tasks: tasks/postgres-extensions/11-wal2json.yml - -- name: Install pljava - import_tasks: tasks/postgres-extensions/12-pljava.yml - tags: - - legacy-incompatible - -- name: Install pg_plan_filter - import_tasks: tasks/postgres-extensions/14-pg_plan_filter.yml - -- name: Install pg_net - import_tasks: tasks/postgres-extensions/15-pg_net.yml - -- name: Install rum - import_tasks: tasks/postgres-extensions/16-rum.yml - -- name: Install pg_hashids - import_tasks: tasks/postgres-extensions/17-pg_hashids.yml - -- name: Install pgsodium - import_tasks: tasks/postgres-extensions/18-pgsodium.yml - -- name: Install pg_graphql - import_tasks: tasks/postgres-extensions/19-pg_graphql.yml - tags: - - legacy-incompatible - -- name: Install pg_stat_monitor - import_tasks: tasks/postgres-extensions/20-pg_stat_monitor.yml - -- name: Install auto_explain - import_tasks: tasks/postgres-extensions/21-auto_explain.yml - -- name: Install vault - import_tasks: tasks/postgres-extensions/23-vault.yml - -- name: Install PGroonga - import_tasks: tasks/postgres-extensions/24-pgroonga.yml - -- name: Install wrappers - import_tasks: tasks/postgres-extensions/25-wrappers.yml - -- name: Install hypopg - import_tasks: tasks/postgres-extensions/26-hypopg.yml - -- name: Install pgvector - import_tasks: tasks/postgres-extensions/28-pgvector.yml - -- name: Install Trusted Language Extensions - import_tasks: tasks/postgres-extensions/29-pg_tle.yml - -- name: Verify async task status - import_tasks: tasks/postgres-extensions/99-finish_async_tasks.yml - when: async_mode diff --git a/ansible/tasks/setup-fail2ban.yml b/ansible/tasks/setup-fail2ban.yml index e1cec2d92..7d9088d46 100644 --- a/ansible/tasks/setup-fail2ban.yml +++ b/ansible/tasks/setup-fail2ban.yml @@ -5,16 +5,19 @@ path: /etc/fail2ban/jail.conf regexp: bantime = 10m replace: bantime = 3600 + when: debpkg_mode or nixpkg_mode - name: Configure journald copy: src: files/fail2ban_config/jail-ssh.conf dest: /etc/fail2ban/jail.d/sshd.local + when: debpkg_mode or nixpkg_mode - name: configure fail2ban to use nftables copy: src: files/fail2ban_config/jail.local dest: /etc/fail2ban/jail.local + when: debpkg_mode or nixpkg_mode # postgresql - name: import jail.d/postgresql.conf @@ -22,12 +25,14 @@ src: files/fail2ban_config/jail-postgresql.conf.j2 dest: /etc/fail2ban/jail.d/postgresql.conf become: yes + when: debpkg_mode or nixpkg_mode - name: import filter.d/postgresql.conf template: src: files/fail2ban_config/filter-postgresql.conf.j2 dest: /etc/fail2ban/filter.d/postgresql.conf become: yes + when: debpkg_mode or nixpkg_mode - name: create overrides dir file: @@ -36,11 +41,13 @@ group: root path: /etc/systemd/system/fail2ban.service.d mode: '0700' + when: debpkg_mode or nixpkg_mode - name: Custom systemd overrides copy: src: files/fail2ban_config/fail2ban.service.conf dest: /etc/systemd/system/fail2ban.service.d/overrides.conf + when: debpkg_mode or nixpkg_mode - name: add in supabase specific ignore filters lineinfile: @@ -56,15 +63,11 @@ become: yes tags: - install-supabase-internal - -# Restart -- name: fail2ban - restart - systemd: - name: fail2ban - state: restarted + when: debpkg_mode or nixpkg_mode - name: fail2ban - disable service systemd: name: fail2ban enabled: no daemon_reload: yes + when: debpkg_mode or nixpkg_mode diff --git a/ansible/tasks/setup-gotrue.yml b/ansible/tasks/setup-gotrue.yml index 43a841a28..786f9a767 100644 --- a/ansible/tasks/setup-gotrue.yml +++ b/ansible/tasks/setup-gotrue.yml @@ -19,7 +19,7 @@ - name: gotrue - download commit archive get_url: - url: "https://github.com/supabase/gotrue/releases/download/v%7B%7B%20gotrue_release%20%7D%7D/gotrue-v%7B%7B%20gotrue_release%20%7D%7D-%7B%7B%20arch%20%7D%7D.tar.gz" + url: "https://github.com/supabase/gotrue/releases/download/v%7B%7B%20gotrue_release%20%7D%7D/auth-v%7B%7B%20gotrue_release%20%7D%7D-%7B%7B%20arch%20%7D%7D.tar.gz" dest: /tmp/gotrue.tar.gz checksum: "{{ gotrue_release_checksum }}" @@ -30,6 +30,13 @@ owner: gotrue mode: 0775 +- name: gotrue - create /etc/auth.d + file: + path: /etc/auth.d + state: directory + owner: gotrue + mode: 0775 + - name: gotrue - unpack archive in /opt/gotrue unarchive: remote_src: yes @@ -49,6 +56,11 @@ src: files/gotrue.service.j2 dest: /etc/systemd/system/gotrue.service +- name: gotrue - create optimizations file + template: + src: files/gotrue-optimizations.service.j2 + dest: /etc/systemd/system/gotrue-optimizations.service + - name: gotrue - reload systemd systemd: daemon_reload: yes diff --git a/ansible/tasks/setup-kong.yml b/ansible/tasks/setup-kong.yml index 09d6d2b44..b34f96e78 100644 --- a/ansible/tasks/setup-kong.yml +++ b/ansible/tasks/setup-kong.yml @@ -12,7 +12,7 @@ - name: Kong - download deb package get_url: - url: "https://download.konghq.com/gateway-2.x-ubuntu-%7B%7B%20kong_release_target%20%7D%7D/pool/all/k/kong/%7B%7B%20kong_deb%20%7D%7D" + url: "https://packages.konghq.com/public/gateway-28/deb/ubuntu/pool/%7B%7B%20kong_release_target%20%7D%7D/main/k/ko/kong_2.8.1/%7B%7B%20kong_deb%20%7D%7D" dest: /tmp/kong.deb checksum: "{{ kong_deb_checksum }}" diff --git a/ansible/tasks/setup-migrations.yml b/ansible/tasks/setup-migrations.yml index 570f7763c..6eea6844b 100644 --- a/ansible/tasks/setup-migrations.yml +++ b/ansible/tasks/setup-migrations.yml @@ -1,7 +1,7 @@ - name: Run migrate.sh script shell: ./migrate.sh register: retval - when: ebssurrogate_mode + when: debpkg_mode or stage2_nix args: chdir: /tmp/migrations/db failed_when: retval.rc != 0 @@ -10,4 +10,4 @@ file: path: "/root/MIGRATION-AMI" state: touch - when: ebssurrogate_mode + when: debpkg_mode or stage2_nix diff --git a/ansible/tasks/setup-postgres.yml b/ansible/tasks/setup-postgres.yml index df84eba05..a1b7e6c7f 100644 --- a/ansible/tasks/setup-postgres.yml +++ b/ansible/tasks/setup-postgres.yml @@ -2,46 +2,95 @@ copy: src: files/postgres/ dest: /tmp/build/ + when: debpkg_mode - name: Postgres - add PPA apt_repository: repo: "deb [ trusted=yes ] file:///tmp/build ./" state: present + when: debpkg_mode - name: Postgres - install commons apt: name: postgresql-common install_recommends: no + when: debpkg_mode - name: Do not create main cluster shell: cmd: sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf + when: debpkg_mode - name: Postgres - install server apt: name: postgresql-{{ postgresql_major }}={{ postgresql_release }}-1.pgdg20.04+1 install_recommends: no - when: ansible_distribution_version != "18.04" - -- name: Postgres - install server - Ubuntu 18.04 - apt: - name: postgresql-{{ postgresql_major }}={{ postgresql_release }}-1.pgdg18.04+1 - install_recommends: no - when: ansible_distribution_version == "18.04" + when: debpkg_mode - name: Postgres - remove PPA apt_repository: repo: "deb [ trusted=yes ] file:///tmp/build ./" state: absent + when: debpkg_mode - name: Postgres - cleanup package file: path: /tmp/build state: absent + when: debpkg_mode + +- name: install locales + apt: + name: locales + state: present + become: yes + when: stage2_nix + +- name: configure locales + command: echo "C.UTF-8 UTF-8" > /etc/locale.gen && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen + become: yes + when: stage2_nix + +- name: locale-gen + command: sudo locale-gen + when: stage2_nix + +- name: update-locale + command: sudo update-locale + when: stage2_nix - name: Create symlink to /usr/lib/postgresql/bin shell: cmd: ln -s /usr/lib/postgresql/{{ postgresql_major }}/bin /usr/lib/postgresql/bin + when: debpkg_mode + +- name: create ssl-cert group + group: + name: ssl-cert + state: present + when: nixpkg_mode +# the old method of installing from debian creates this group, but we must create it explicitly +# for the nix built version + +- name: create postgres group + group: + name: postgres + state: present + when: nixpkg_mode + +- name: create postgres user + shell: adduser --system --home /var/lib/postgresql --no-create-home --shell /bin/bash --group --gecos "PostgreSQL administrator" postgres + args: + executable: /bin/bash + become: yes + when: nixpkg_mode + +- name: add postgres user to postgres group + shell: usermod -a -G ssl-cert postgres + args: + executable: /bin/bash + become: yes + when: nixpkg_mode - name: Create relevant directories file: @@ -54,6 +103,7 @@ - '/home/postgres' - '/var/log/postgresql' - '/var/lib/postgresql' + when: debpkg_mode or nixpkg_mode - name: Allow adminapi to write custom config file: @@ -66,6 +116,7 @@ with_items: - '/etc/postgresql' - '/etc/postgresql-custom' + when: debpkg_mode or nixpkg_mode - name: create placeholder config files file: @@ -77,6 +128,7 @@ with_items: - 'generated-optimizations.conf' - 'custom-overrides.conf' + when: debpkg_mode or nixpkg_mode # Move Postgres configuration files into /etc/postgresql # Add postgresql.conf @@ -85,6 +137,7 @@ src: files/postgresql_config/postgresql.conf.j2 dest: /etc/postgresql/postgresql.conf group: postgres + when: debpkg_mode or nixpkg_mode # Add pg_hba.conf - name: import pg_hba.conf @@ -92,6 +145,7 @@ src: files/postgresql_config/pg_hba.conf.j2 dest: /etc/postgresql/pg_hba.conf group: postgres + when: debpkg_mode or nixpkg_mode # Add pg_ident.conf - name: import pg_ident.conf @@ -99,10 +153,27 @@ src: files/postgresql_config/pg_ident.conf.j2 dest: /etc/postgresql/pg_ident.conf group: postgres + when: debpkg_mode or nixpkg_mode + +# Add custom config for read replicas set up +- name: Move custom read-replica.conf file to /etc/postgresql-custom/read-replica.conf + template: + src: "files/postgresql_config/custom_read_replica.conf.j2" + dest: /etc/postgresql-custom/read-replica.conf + mode: 0664 + owner: postgres + group: postgres + when: debpkg_mode or nixpkg_mode # Install extensions before init - name: Install Postgres extensions import_tasks: tasks/setup-docker.yml + when: debpkg_mode or stage2_nix + +#stage 2 postgres tasks +- name: stage2 postgres tasks + import_tasks: tasks/stage2-setup-postgres.yml + when: stage2_nix # init DB - name: Create directory on data volume @@ -115,6 +186,7 @@ mode: 0750 with_items: - "/data/pgdata" + when: debpkg_mode or nixpkg_mode - name: Link database data_dir to data volume directory file: @@ -122,26 +194,102 @@ path: "/var/lib/postgresql/data" state: link force: yes + when: debpkg_mode or nixpkg_mode - name: Initialize the database become: yes become_user: postgres - shell: - cmd: /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data initdb -o "--allow-group-access" + shell: /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data initdb -o "--allow-group-access" -o "--username=supabase_admin" vars: ansible_command_timeout: 60 - # Circumvents the following error: - # "Timeout (12s) waiting for privilege escalation prompt" + when: debpkg_mode + +- name: Make sure .bashrc exists + file: + path: /var/lib/postgresql/.bashrc + state: touch + owner: postgres + group: postgres + when: nixpkg_mode + +- name: Check psql_version and modify supautils.conf and postgresql.conf if necessary + block: + - name: Check if psql_version is psql_orioledb + set_fact: + is_psql_oriole: "{{ psql_version in ['psql_orioledb-17'] }}" + is_psql_17: "{{ psql_version in ['psql_17'] }}" + + - name: Initialize the database stage2_nix (non-orioledb) + become: yes + become_user: postgres + shell: source /var/lib/postgresql/.bashrc && /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data initdb -o "--allow-group-access" -o "--username=supabase_admin" + args: + executable: /bin/bash + environment: + LANG: en_US.UTF-8 + LANGUAGE: en_US.UTF-8 + LC_ALL: en_US.UTF-8 + LC_CTYPE: en_US.UTF-8 + LOCALE_ARCHIVE: /usr/lib/locale/locale-archive + vars: + ansible_command_timeout: 60 + when: stage2_nix and not is_psql_oriole and not is_psql_17 + + - name: Initialize the database stage2_nix (orioledb) + become: yes + become_user: postgres + shell: > + source /var/lib/postgresql/.bashrc && /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data initdb + -o "--allow-group-access" + -o "--username=supabase_admin" + -o "--locale-provider=icu" + -o "--encoding=UTF-8" + -o "--icu-locale=en_US.UTF-8" + args: + executable: /bin/bash + environment: + LANG: en_US.UTF-8 + LANGUAGE: en_US.UTF-8 + LC_ALL: en_US.UTF-8 + LC_CTYPE: en_US.UTF-8 + LOCALE_ARCHIVE: /usr/lib/locale/locale-archive + vars: + ansible_command_timeout: 60 + when: stage2_nix and (is_psql_oriole or is_psql_17) - name: copy PG systemd unit template: src: files/postgresql_config/postgresql.service.j2 dest: /etc/systemd/system/postgresql.service + when: debpkg_mode or stage2_nix - name: copy optimizations systemd unit template: src: files/database-optimizations.service.j2 dest: /etc/systemd/system/database-optimizations.service + when: debpkg_mode or stage2_nix + +- name: initialize pg required state + become: yes + shell: | + mkdir -p /run/postgresql + chown -R postgres:postgres /run/postgresql + when: stage2_nix and qemu_mode is defined + +- name: Restart Postgres Database without Systemd + become: yes + become_user: postgres + shell: | + source /var/lib/postgresql/.bashrc + /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data start + environment: + LANG: en_US.UTF-8 + LANGUAGE: en_US.UTF-8 + LC_ALL: en_US.UTF-8 + LC_CTYPE: en_US.UTF-8 + LOCALE_ARCHIVE: /usr/lib/locale/locale-archive + when: stage2_nix + # Reload - name: System - systemd reload @@ -149,3 +297,26 @@ enabled: yes name: postgresql daemon_reload: yes + when: debpkg_mode or stage2_nix + + +- name: Add LOCALE_ARCHIVE to .bashrc + lineinfile: + dest: "/var/lib/postgresql/.bashrc" + line: 'export LOCALE_ARCHIVE=/usr/lib/locale/locale-archive' + create: yes + become: yes + when: nixpkg_mode + +- name: Add LANG items to .bashrc + lineinfile: + dest: "/var/lib/postgresql/.bashrc" + line: "{{ item }}" + loop: + - 'export LANG="en_US.UTF-8"' + - 'export LANGUAGE="en_US.UTF-8"' + - 'export LC_ALL="en_US.UTF-8"' + - 'export LANG="en_US.UTF-8"' + - 'export LC_CTYPE="en_US.UTF-8"' + become: yes + when: nixpkg_mode diff --git a/ansible/tasks/setup-postgrest.yml b/ansible/tasks/setup-postgrest.yml index 57b76e1ee..a98d1990f 100644 --- a/ansible/tasks/setup-postgrest.yml +++ b/ansible/tasks/setup-postgrest.yml @@ -1,6 +1,20 @@ - name: PostgREST - system user user: name=postgrest +- name: PostgREST - add Postgres PPA gpg key + apt_key: + url: https://www.postgresql.org/media/keys/ACCC4CF8.asc + state: present + +- name: PostgREST - add Postgres PPA + apt_repository: + repo: "deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg {{ postgresql_major }}" + state: present + +- name: PostgREST - update apt cache + apt: + update_cache: yes + # libpq is a C library that enables user programs to communicate with # the PostgreSQL database server. - name: PostgREST - system dependencies @@ -9,9 +23,20 @@ - libpq5 - libnuma-dev +- name: PostgREST - remove Postgres PPA gpg key + apt_key: + url: https://www.postgresql.org/media/keys/ACCC4CF8.asc + state: absent + +- name: PostgREST - remove Postgres PPA + apt_repository: + repo: "deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg {{ postgresql_major }}" + state: absent + - name: postgis - ensure dependencies do not get autoremoved shell: | set -e + apt-mark manual libpq5* apt-mark manual libnuma* apt-mark auto libnuma*-dev diff --git a/ansible/tasks/setup-supabase-internal.yml b/ansible/tasks/setup-supabase-internal.yml index d4aaef435..7aa931763 100644 --- a/ansible/tasks/setup-supabase-internal.yml +++ b/ansible/tasks/setup-supabase-internal.yml @@ -29,6 +29,10 @@ shell: "/tmp/aws/install --update" become: true +- name: AWS CLI - configure ipv6 support for s3 + shell: | + aws configure set default.s3.use_dualstack_endpoint true + - name: install Vector for logging become: yes apt: @@ -52,6 +56,17 @@ src: files/vector.service.j2 dest: /etc/systemd/system/vector.service +- name: configure tmpfiles for postgres - overwrites upstream package + template: + src: files/postgresql_config/tmpfiles.postgresql.conf + dest: /etc/tmpfiles.d/postgresql-common.conf + +- name: fix permissions for vector config to be managed + shell: + cmd: | + chown -R vector:vector /etc/vector + chmod 0775 /etc/vector + - name: vector - reload systemd systemd: daemon_reload: yes @@ -91,3 +106,14 @@ - name: Install pg_egress_collect import_tasks: internal/pg_egress_collect.yml + +- name: Install PostgreSQL prestart script + import_tasks: internal/postgresql-prestart.yml + +- name: Install salt minion + import_tasks: internal/install-salt.yml + tags: + - aws-only + +- name: Envoy - use lds.supabase.yaml for /etc/envoy/lds.yaml + command: mv /etc/envoy/lds.supabase.yaml /etc/envoy/lds.yaml diff --git a/ansible/tasks/setup-system.yml b/ansible/tasks/setup-system.yml index 78f83a1b0..c1285bf6c 100644 --- a/ansible/tasks/setup-system.yml +++ b/ansible/tasks/setup-system.yml @@ -1,6 +1,6 @@ - name: System - apt update and apt upgrade apt: update_cache=yes upgrade=yes - when: not ebssurrogate_mode + when: debpkg_mode or nixpkg_mode # SEE http://archive.vn/DKJjs#parameter-upgrade - name: Install required security updates @@ -8,13 +8,14 @@ pkg: - tzdata - linux-libc-dev - + when: debpkg_mode or nixpkg_mode # SEE https://github.com/georchestra/ansible/issues/55#issuecomment-588313638 # Without this, a similar error is faced - name: Install Ansible dependencies apt: pkg: - acl + when: debpkg_mode or nixpkg_mode - name: Install security tools apt: @@ -23,6 +24,7 @@ - fail2ban update_cache: yes cache_valid_time: 3600 + when: debpkg_mode or nixpkg_mode - name: Use nftables backend shell: | @@ -31,34 +33,44 @@ update-alternatives --set arptables /usr/sbin/arptables-nft update-alternatives --set ebtables /usr/sbin/ebtables-nft systemctl restart ufw + when: debpkg_mode or nixpkg_mode - name: Create Sysstat log directory file: path: /var/log/sysstat state: directory + when: debpkg_mode or nixpkg_mode - name: Install other useful tools apt: pkg: + - bwm-ng + - htop + - net-tools + - ngrep - sysstat - vim-tiny update_cache: yes + when: debpkg_mode or nixpkg_mode - name: Configure sysstat copy: src: files/sysstat.sysstat dest: /etc/sysstat/sysstat + when: debpkg_mode or nixpkg_mode - name: Configure default sysstat copy: src: files/default.sysstat dest: /etc/default/sysstat + when: debpkg_mode or nixpkg_mode - name: Adjust APT update intervals copy: src: files/apt_periodic dest: /etc/apt/apt.conf.d/10periodic + when: debpkg_mode or nixpkg_mode # Find platform architecture and set as a variable - name: finding platform architecture @@ -72,6 +84,7 @@ tags: - update - update-only + when: debpkg_mode or nixpkg_mode or stage2_nix - name: create overrides dir file: @@ -80,40 +93,48 @@ group: root path: /etc/systemd/system/systemd-resolved.service.d mode: '0700' + when: debpkg_mode or nixpkg_mode - name: Custom systemd overrides for resolved copy: src: files/systemd-resolved.conf dest: /etc/systemd/system/systemd-resolved.service.d/override.conf + when: debpkg_mode or nixpkg_mode - name: System - Create services.slice template: src: files/services.slice.j2 dest: /etc/systemd/system/services.slice - when: not ebssurrogate_mode + when: debpkg_mode or nixpkg_mode + - name: System - systemd reload systemd: daemon_reload=yes + when: debpkg_mode or nixpkg_mode - name: Configure journald copy: src: files/journald.conf dest: /etc/systemd/journald.conf + when: debpkg_mode or nixpkg_mode - name: reload systemd-journald systemd: name: systemd-journald state: restarted + when: debpkg_mode or nixpkg_mode - name: Configure logind copy: src: files/logind.conf dest: /etc/systemd/logind.conf + when: debpkg_mode or nixpkg_mode - name: reload systemd-logind systemd: name: systemd-logind state: restarted + when: debpkg_mode or nixpkg_mode - name: enable timestamps for shell history copy: @@ -123,15 +144,18 @@ mode: 0644 owner: root group: root + when: debpkg_mode or nixpkg_mode - name: set hosts file copy: content: | 127.0.0.1 localhost + ::1 localhost dest: /etc/hosts mode: 0644 owner: root group: root + when: debpkg_mode or stage2_nix #Set Sysctl params for restarting the OS on oom after 10 - name: Set vm.panic_on_oom=1 @@ -140,6 +164,7 @@ value: '1' state: present reload: yes + when: debpkg_mode or nixpkg_mode - name: Set kernel.panic=10 ansible.builtin.sysctl: @@ -147,3 +172,28 @@ value: '10' state: present reload: yes + when: debpkg_mode or nixpkg_mode + +- name: configure system + ansible.posix.sysctl: + name: 'net.core.somaxconn' + value: 16834 + +- name: configure system + ansible.posix.sysctl: + name: 'net.ipv4.ip_local_port_range' + value: '1025 65000' + +#Set Sysctl params specific to keepalives +- name: Set net.ipv4.tcp_keepalive_time=1800 + ansible.builtin.sysctl: + name: net.ipv4.tcp_keepalive_time + value: 1800 + state: present + when: debpkg_mode or nixpkg_mode +- name: Set net.ipv4.tcp_keepalive_intvl=60 + ansible.builtin.sysctl: + name: net.ipv4.tcp_keepalive_intvl + value: 60 + state: present + when: debpkg_mode or nixpkg_mode diff --git a/ansible/tasks/setup-wal-g.yml b/ansible/tasks/setup-wal-g.yml index bbc64cdde..a05106ede 100644 --- a/ansible/tasks/setup-wal-g.yml +++ b/ansible/tasks/setup-wal-g.yml @@ -1,72 +1,8 @@ -# Downloading dependencies -- name: wal-g dependencies - become: yes - apt: - pkg: - - libbrotli-dev - - liblzo2-dev - - libsodium-dev - - cmake - -# install go dependency for WAL-G -- name: wal-g go dependency - get_url: - url: "https://golang.org/dl/go%7B%7B%20golang_version%20%7D%7D.linux-%7B%7B%20platform%20%7D%7D.tar.gz" - dest: /tmp - checksum: "{{ golang_version_checksum[platform] }}" - timeout: 60 - -- name: unpack go archive - unarchive: - remote_src: yes - src: "/tmp/go{{ golang_version }}.linux-{{ platform }}.tar.gz" - dest: /usr/local - -# Download WAL-G -- name: wal-g - download latest version - git: - repo: https://github.com/wal-g/wal-g.git - dest: /tmp/wal-g - version: "v{{ wal_g_release }}" - become: yes - -- name: wal-g - pg_clean - make: - chdir: /tmp/wal-g - target: pg_clean - params: - GOBIN: "/usr/local/bin" - PATH: "{{ ansible_env.PATH }}:/usr/local/go/bin" - USE_LIBSODIUM: true - become: yes - ignore_errors: yes - -- name: wal-g - deps - make: - chdir: /tmp/wal-g - target: deps - params: - GOBIN: "/usr/local/bin" - PATH: "{{ ansible_env.PATH }}:/usr/local/go/bin" - USE_LIBSODIUM: true - become: yes - ignore_errors: yes - -- name: wal-g - build and install - community.general.make: - chdir: /tmp/wal-g - target: pg_install - jobs: "{{ parallel_jobs | default(omit) }}" - params: - GOBIN: "/usr/local/bin" - PATH: "{{ ansible_env.PATH }}:/usr/local/go/bin" - USE_LIBSODIUM: true - become: yes - - name: Create wal-g group group: name: wal-g state: present + when: nixpkg_mode - name: Create wal-g user user: @@ -75,7 +11,7 @@ comment: WAL-G user group: wal-g groups: wal-g, postgres - + when: nixpkg_mode - name: Create a config directory owned by wal-g file: path: /etc/wal-g @@ -83,6 +19,37 @@ owner: wal-g group: wal-g mode: '0770' + when: nixpkg_mode + +- name: Install wal-g 2 from nix binary cache + become: yes + shell: | + sudo -u wal-g bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#wal-g-2" + when: stage2_nix + +- name: Install wal-g 3 from nix binary cache + become: yes + shell: | + sudo -u wal-g bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#wal-g-3" + when: stage2_nix + +- name: Create symlink for wal-g-3 from Nix profile to /usr/local/bin + ansible.builtin.file: + src: /home/wal-g/.nix-profile/bin/wal-g-3 + dest: /usr/local/bin/wal-g-v3 + state: link + force: yes # This will replace existing file/symlink if it exists + become: yes # Need sudo to write to /usr/local/bin + when: stage2_nix + +- name: Create symlink to make wal-g-v2 the default wal-g + ansible.builtin.file: + src: /home/wal-g/.nix-profile/bin/wal-g-2 + dest: /usr/local/bin/wal-g + state: link + force: yes + become: yes + when: stage2_nix - name: Create /etc/wal-g/config.json file: @@ -91,6 +58,7 @@ owner: wal-g group: wal-g mode: '0664' + when: stage2_nix - name: Move custom wal-g.conf file to /etc/postgresql-custom/wal-g.conf template: @@ -99,6 +67,7 @@ mode: 0664 owner: postgres group: postgres + when: stage2_nix - name: Add script to be run for restore_command template: @@ -107,6 +76,7 @@ mode: 0500 owner: postgres group: postgres + when: stage2_nix - name: Add helper script for wal_fetch.sh template: @@ -114,6 +84,7 @@ dest: /root/wal_change_ownership.sh mode: 0700 owner: root + when: stage2_nix - name: Include /etc/postgresql-custom/wal-g.conf in postgresql.conf become: yes @@ -121,10 +92,4 @@ path: /etc/postgresql/postgresql.conf regexp: "#include = '/etc/postgresql-custom/wal-g.conf'" replace: "include = '/etc/postgresql-custom/wal-g.conf'" - -# Clean up Go -- name: Uninstall Go - become: yes - file: - path: /usr/local/go - state: absent + when: stage2_nix diff --git a/ansible/tasks/stage2-setup-postgres.yml b/ansible/tasks/stage2-setup-postgres.yml new file mode 100644 index 000000000..99b89d6d9 --- /dev/null +++ b/ansible/tasks/stage2-setup-postgres.yml @@ -0,0 +1,267 @@ +# - name: Install openjdk11 for pljava from nix binary cache +# become: yes +# shell: | +# sudo -u postgres bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install nixpkgs#openjdk11" +# It was decided to leave pljava disabled at https://github.com/supabase/postgres/pull/690 therefore removing this task + +- name: Check psql_version and modify supautils.conf and postgresql.conf if necessary + block: + - name: Check if psql_version is psql_orioledb-17 + set_fact: + is_psql_oriole: "{{ psql_version in ['psql_orioledb-17'] }}" + + - name: Check if psql_version is psql_17 + set_fact: + is_psql_17: "{{ psql_version in ['psql_17'] }}" + + - name: Remove specified extensions from postgresql.conf if orioledb-17 or 17 build + ansible.builtin.command: + cmd: > + sed -i 's/ timescaledb,//g' + /etc/postgresql/postgresql.conf + when: is_psql_oriole or is_psql_17 and stage2_nix + become: yes + + - name: Remove specified extensions from supautils.conf if orioledb-17 or 17 build + ansible.builtin.command: + cmd: > + sed -i 's/ timescaledb,//g; s/ plv8,//g; s/ pgjwt,//g' + /etc/postgresql-custom/supautils.conf + when: is_psql_oriole or is_psql_17 and stage2_nix + become: yes + + - name: Remove db_user_namespace from postgresql.conf if orioledb-17 or 17 build + ansible.builtin.command: + cmd: > + sed -i 's/db_user_namespace = off/#db_user_namespace = off/g;' + /etc/postgresql/postgresql.conf + when: is_psql_oriole or is_psql_17 and stage2_nix + become: yes + + - name: Append orioledb to shared_preload_libraries append within closing quote + ansible.builtin.command: + cmd: > + sed -i 's/\(shared_preload_libraries.*\)'\''\(.*\)$/\1, orioledb'\''\2/' + /etc/postgresql/postgresql.conf + when: is_psql_oriole and stage2_nix + become: yes + + - name: Add default_table_access_method setting + ansible.builtin.lineinfile: + path: /etc/postgresql/postgresql.conf + line: "default_table_access_method = 'orioledb'" + state: present + when: is_psql_oriole and stage2_nix + become: yes + + - name: Add ORIOLEDB_ENABLED environment variable + ansible.builtin.lineinfile: + path: /etc/environment + line: 'ORIOLEDB_ENABLED=true' + when: is_psql_oriole and stage2_nix + become: yes + +- name: Install Postgres from nix binary cache + become: yes + shell: | + sudo -u postgres bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#{{psql_version}}/bin" + when: stage2_nix + +- name: Install pg_prove from nix binary cache + become: yes + shell: | + sudo -u postgres bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#pg_prove" + when: stage2_nix + +- name: Install supabase-groonga from nix binary cache + become: yes + shell: | + sudo -u postgres bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#supabase-groonga" + when: stage2_nix + +- name: Install debug symbols for postgres version + become: yes + shell: | + sudo -u postgres bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#{{postgresql_version}}_debug" + when: stage2_nix + +- name: Install source files for postgresql version + become: yes + shell: | + sudo -u postgres bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#{{postgresql_version}}_src" + when: stage2_nix + +- name: Set ownership and permissions for /etc/ssl/private + become: yes + file: + path: /etc/ssl/private + owner: root + group: postgres + mode: '0750' + when: stage2_nix + +- name: Set permissions for postgresql.env + become: yes + file: + path: /etc/environment.d/postgresql.env + owner: postgres + group: postgres + mode: '0644' + when: stage2_nix + +- name: Ensure /usr/lib/postgresql/bin directory exists + file: + path: /usr/lib/postgresql/bin + state: directory + owner: postgres + group: postgres + when: stage2_nix + +- name: Ensure /usr/lib/postgresql/share directory exists + file: + path: /usr/lib/postgresql/share/postgresql + state: directory + owner: postgres + group: postgres + when: stage2_nix + +- name: Ensure /usr/lib/postgresql/share/contrib directory exists + file: + path: /usr/lib/postgresql/share/postgresql/contrib + state: directory + owner: postgres + group: postgres + when: stage2_nix + +- name: Ensure /usr/lib/postgresql/share/timezonesets directory exists + file: + path: /usr/lib/postgresql/share/postgresql/timezonesets + state: directory + owner: postgres + group: postgres + when: stage2_nix + +- name: Ensure /usr/lib/postgresql/share/tsearch_data directory exists + file: + path: /usr/lib/postgresql/share/postgresql/tsearch_data + state: directory + owner: postgres + group: postgres + when: stage2_nix + +- name: Ensure /usr/lib/postgresql/share/extension directory exists + file: + path: /usr/lib/postgresql/share/postgresql/extension + state: directory + owner: postgres + group: postgres + when: stage2_nix + +- name: import pgsodium_getkey script + template: + src: files/pgsodium_getkey_readonly.sh.j2 + dest: "/usr/lib/postgresql/bin/pgsodium_getkey.sh" + owner: postgres + group: postgres + mode: 0700 + when: stage2_nix + +- name: Create symbolic links from /var/lib/postgresql/.nix-profile/bin to /usr/lib/postgresql/bin + shell: >- + find /var/lib/postgresql/.nix-profile/bin/ -maxdepth 1 -type f,l -exec sh -c 'ln -s "$0" "{{ item }}/$(basename $0)"' {} \; + loop: + - /usr/lib/postgresql/bin + - /usr/bin + become: yes + when: stage2_nix + +- name: Check if /usr/bin/pg_config exists + stat: + path: /usr/bin/pg_config + register: pg_config_stat + when: stage2_nix + +- name: Remove existing /usr/bin/pg_config if it is not a symlink + file: + path: /usr/bin/pg_config + state: absent + when: pg_config_stat.stat.exists and not pg_config_stat.stat.islnk and stage2_nix + become: yes + +- name: Ensure postgres user has ownership of symlink + shell: >- + find /var/lib/postgresql/.nix-profile/bin/ -maxdepth 1 -type f,l -exec chown postgres:postgres "/usr/bin/$(basename {})" \; + become: yes + when: stage2_nix + +- name: Create symbolic links from /var/lib/postgresql/.nix-profile/share/postgresql to /usr/lib/postgresql/share/postgresql + shell: >- + find /var/lib/postgresql/.nix-profile/share/postgresql/ -maxdepth 1 -type f,l -exec sh -c 'ln -s "$0" "/usr/lib/postgresql/share/postgresql/$(basename $0)"' {} \; + become: yes + when: stage2_nix + +- name: Create symbolic links from /var/lib/postgresql/.nix-profile/share/postgresql/extension to /usr/lib/postgresql/share/postgresql/extension + shell: >- + find /var/lib/postgresql/.nix-profile/share/postgresql/extension/ -maxdepth 1 -type f,l -exec sh -c 'ln -s "$0" "/usr/lib/postgresql/share/postgresql/extension/$(basename $0)"' {} \; + become: yes + when: stage2_nix + +- name: create destination directory + file: + path: /usr/lib/postgresql/share/postgresql/contrib/ + state: directory + recurse: yes + when: stage2_nix + +- name: Check psql_version and run postgis linking if not oriole-xx + block: + - name: Check if psql_version is psql_orioledb-17 + set_fact: + is_psql_oriole: "{{ psql_version == 'psql_orioledb-17' }}" + + - name: Recursively create symbolic links and set permissions for the contrib/postgis-* dir + shell: > + sudo mkdir -p /usr/lib/postgresql/share/postgresql/contrib && \ + sudo find /var/lib/postgresql/.nix-profile/share/postgresql/contrib/ -mindepth 1 -type d -exec sh -c 'for dir do sudo ln -s "$dir" "/usr/lib/postgresql/share/postgresql/contrib/$(basename "$dir")"; done' sh {} + \ + && chown -R postgres:postgres "/usr/lib/postgresql/share/postgresql/contrib/" + become: yes + when: stage2_nix and not is_psql_oriole + +- name: Create symbolic links from /var/lib/postgresql/.nix-profile/share/postgresql/timezonesets to /usr/lib/postgresql/share/postgresql/timeszonesets + shell: >- + find /var/lib/postgresql/.nix-profile/share/postgresql/timezonesets/ -maxdepth 1 -type f,l -exec sh -c 'ln -s "$0" "/usr/lib/postgresql/share/postgresql/timezonesets/$(basename $0)"' {} \; + become: yes + when: stage2_nix + +- name: Create symbolic links from /var/lib/postgresql/.nix-profile/share/postgresql/tsearch_data to /usr/lib/postgresql/share/postgresql/tsearch_data + shell: >- + find /var/lib/postgresql/.nix-profile/share/postgresql/tsearch_data/ -maxdepth 1 -type f,l -exec sh -c 'ln -s "$0" "/usr/lib/postgresql/share/postgresql/tsearch_data/$(basename $0)"' {} \; + become: yes + when: stage2_nix + +- set_fact: + pg_bindir: "/usr/lib/postgresql/bin" + when: stage2_nix + +- name: pgsodium - set pgsodium.getkey_script + become: yes + lineinfile: + path: /etc/postgresql/postgresql.conf + state: present + # script is expected to be placed by finalization tasks for different target platforms + line: pgsodium.getkey_script= '{{ pg_bindir }}/pgsodium_getkey.sh' + when: stage2_nix + +- name: Create symbolic link for pgsodium_getkey script + file: + src: "/usr/lib/postgresql/bin/pgsodium_getkey.sh" + dest: "/usr/lib/postgresql/share/postgresql/extension/pgsodium_getkey" + state: link + become: yes + when: stage2_nix + +- name: Append GRN_PLUGINS_DIR to /etc/environment.d/postgresql.env + ansible.builtin.lineinfile: + path: /etc/environment.d/postgresql.env + line: 'GRN_PLUGINS_DIR=/var/lib/postgresql/.nix-profile/lib/groonga/plugins' + become: yes diff --git a/ansible/tasks/test-image.yml b/ansible/tasks/test-image.yml index cd92a27d6..a0d3b2b78 100644 --- a/ansible/tasks/test-image.yml +++ b/ansible/tasks/test-image.yml @@ -1,57 +1,87 @@ -- name: install pg_prove - apt: - pkg: - - libtap-parser-sourcehandler-pgtap-perl +# - name: Temporarily disable PG Sodium references in config +# become: yes +# become_user: postgres +# shell: +# cmd: sed -i.bak -e "s/pg_net,\ pgsodium,\ timescaledb/pg_net,\ timescaledb/g" -e "s/pgsodium.getkey_script=/#pgsodium.getkey_script=/g" /etc/postgresql/postgresql.conf +# when: debpkg_mode or stage2_nix -- name: Temporarily disable PG Sodium references in config +- name: Temporarily disable PG Sodium and Supabase Vault references in config become: yes become_user: postgres shell: - cmd: sed -i.bak -e "s/pg_net,\ pgsodium,\ timescaledb/pg_net,\ timescaledb/g" -e "s/pgsodium.getkey_script=/#pgsodium.getkey_script=/g" /etc/postgresql/postgresql.conf - when: ebssurrogate_mode + cmd: > + sed -i.bak + -e 's/\(shared_preload_libraries = '\''.*\)pgsodium,\(.*'\''\)/\1\2/' + -e 's/\(shared_preload_libraries = '\''.*\)supabase_vault,\(.*'\''\)/\1\2/' + -e 's/\(shared_preload_libraries = '\''.*\), *supabase_vault'\''/\1'\''/' + -e 's/pgsodium.getkey_script=/#pgsodium.getkey_script=/' + /etc/postgresql/postgresql.conf + when: debpkg_mode or stage2_nix + +- name: Verify pgsodium and vault removal from config + become: yes + become_user: postgres + shell: + cmd: | + FOUND=$(grep -E "shared_preload_libraries.*pgsodium|shared_preload_libraries.*supabase_vault|^pgsodium\.getkey_script" /etc/postgresql/postgresql.conf) + if [ ! -z "$FOUND" ]; then + echo "Found unremoved references:" + echo "$FOUND" + exit 1 + fi + register: verify_result + failed_when: verify_result.rc != 0 + when: debpkg_mode or stage2_nix - name: Start Postgres Database to load all extensions. become: yes become_user: postgres shell: cmd: /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data start "-o -c config_file=/etc/postgresql/postgresql.conf" - when: ebssurrogate_mode - -- name: Run Unit tests (with filename unit-test-*) on Postgres Database - shell: /usr/bin/pg_prove -U postgres -h localhost -d postgres -v /tmp/unit-tests/unit-test-*.sql - register: retval - failed_when: retval.rc != 0 - when: ebssurrogate_mode - -- name: Run migrations tests - shell: /usr/bin/pg_prove -U supabase_admin -h localhost -d postgres -v tests/test.sql - register: retval - failed_when: retval.rc != 0 - when: ebssurrogate_mode + when: debpkg_mode + +- name: Stop Postgres Database in stage 2 + become: yes + become_user: postgres + shell: source /var/lib/postgresql/.bashrc && /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data stop args: - chdir: /tmp/migrations + executable: /bin/bash + environment: + LANG: en_US.UTF-8 + LANGUAGE: en_US.UTF-8 + LC_ALL: en_US.UTF-8 + LC_CTYPE: en_US.UTF-8 + LOCALE_ARCHIVE: /usr/lib/locale/locale-archive + when: stage2_nix + +- name: Start Postgres Database to load all extensions. + become: yes + become_user: postgres + shell: source /var/lib/postgresql/.bashrc && /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data start "-o -c config_file=/etc/postgresql/postgresql.conf" + args: + executable: /bin/bash + environment: + LANG: en_US.UTF-8 + LANGUAGE: en_US.UTF-8 + LC_ALL: en_US.UTF-8 + LC_CTYPE: en_US.UTF-8 + LOCALE_ARCHIVE: /usr/lib/locale/locale-archive + when: stage2_nix - name: Re-enable PG Sodium references in config become: yes become_user: postgres shell: cmd: mv /etc/postgresql/postgresql.conf.bak /etc/postgresql/postgresql.conf - when: ebssurrogate_mode + when: debpkg_mode or stage2_nix - name: Reset db stats shell: /usr/lib/postgresql/bin/psql --no-password --no-psqlrc -d postgres -h localhost -U supabase_admin -c 'SELECT pg_stat_statements_reset(); SELECT pg_stat_reset();' - when: ebssurrogate_mode - -- name: remove pg_prove - apt: - pkg: - - libtap-parser-sourcehandler-pgtap-perl - state: absent - autoremove: yes + when: debpkg_mode or stage2_nix - name: Stop Postgres Database become: yes become_user: postgres shell: cmd: /usr/lib/postgresql/bin/pg_ctl -D /var/lib/postgresql/data stop - when: ebssurrogate_mode + when: debpkg_mode or stage2_nix diff --git a/ansible/vars.yml b/ansible/vars.yml index 1beb439dc..0e658202d 100644 --- a/ansible/vars.yml +++ b/ansible/vars.yml @@ -2,28 +2,44 @@ supabase_internal: true ebssurrogate_mode: true async_mode: true -postgresql_major: "15" -postgresql_release: "15.1" -postgresql_release_checksum: sha256:ea2cf059a85882654b989acd07edc121833164a30340faee0d3615cf7058e66c +postgres_major: + - "15" + - "17" + - "orioledb-17" + +# Full version strings for each major version +postgres_release: + postgresorioledb-17: "17.0.1.078-orioledb" + postgres17: "17.4.1.028" + postgres15: "15.8.1.085" # Non Postgres Extensions pgbouncer_release: "1.19.0" pgbouncer_release_checksum: sha256:af0b05e97d0e1fd9ad45fe00ea6d2a934c63075f67f7e2ccef2ca59e3d8ce682 -postgrest_release: "11.2.0" -postgrest_arm_release_checksum: sha1:42496254d6fb8aa5660b8b7586f1e6a40977e319 -postgrest_x86_release_checksum: sha1:6c09ba1b97830e794a28ad7e475f7f8d20e759cc +# to get these use +# wget https://github.com/PostgREST/postgrest/releases/download/v12.2.3/postgrest-v12.2.3-ubuntu-aarch64.tar.xz -q -O- | sha1sum +# wget https://github.com/PostgREST/postgrest/releases/download/v12.2.3/postgrest-v12.2.3-linux-static-x64.tar.xz -q -O- | sha1sum +postgrest_release: "12.2.3" +postgrest_arm_release_checksum: sha1:fbfd6613d711ce1afa25c42d5df8f1b017f396f9 +postgrest_x86_release_checksum: sha1:61c513f91a8931be4062587b9d4a18b42acf5c05 + +gotrue_release: 2.172.1 +gotrue_release_checksum: sha1:60cca6dce1bd37608566d04193483a7fb733214e -gotrue_release: 2.104.2 -gotrue_release_checksum: sha1:81259a28b8aac593cfdd4a4164158e3ddf07cc72 +aws_cli_release: "2.23.11" -aws_cli_release: "2.2.7" +salt_minion_version: 3007 golang_version: "1.19.3" golang_version_checksum: arm64: sha256:99de2fe112a52ab748fb175edea64b313a0c8d51d6157dba683a6be163fd5eab amd64: sha256:74b9640724fd4e6bb0ed2a1bc44ae813a03f1e72a4c76253e2d5c015494430ba +envoy_release: 1.28.0 +envoy_release_checksum: sha1:b0a06e9cfb170f1993f369beaa5aa9d7ec679ce5 +envoy_hot_restarter_release_checksum: sha1:6d43b89d266fb2427a4b51756b649883b0617eda + kong_release_target: focal # if it works, it works kong_deb: kong_2.8.1_arm64.deb kong_deb_checksum: sha1:2086f6ccf8454fe64435252fea4d29d736d7ec61 @@ -31,103 +47,13 @@ kong_deb_checksum: sha1:2086f6ccf8454fe64435252fea4d29d736d7ec61 nginx_release: 1.22.0 nginx_release_checksum: sha1:419efb77b80f165666e2ee406ad8ae9b845aba93 -wal_g_release: "2.0.1" - -sfcgal_release: "1.3.10" -sfcgal_release_checksum: sha256:4e39b3b2adada6254a7bdba6d297bb28e1a9835a9f879b74f37e2dab70203232 - -postgres_exporter_release: "0.9.0" +postgres_exporter_release: "0.15.0" postgres_exporter_release_checksum: - arm64: sha256:d869c16791481dc8475487ad84ae4371a63f9b399898ca1c666eead5cccf7182 - amd64: sha256:ff541bd3ee19c0ae003d71424a75edfcc8695e828dd20d5b4555ce433c89d60b - -adminapi_release: 0.51.0 -adminmgr_release: 0.10.2 - -# Postgres Extensions -postgis_release: "3.3.2" -postgis_release_checksum: sha256:9a2a219da005a1730a39d1959a1c7cec619b1efb009b65be80ffc25bad299068 - -pgrouting_release: "3.4.1" -pgrouting_release_checksum: sha256:a4e034efee8cf67582b67033d9c3ff714a09d8f5425339624879df50aff3f642 - -pgtap_release: "1.2.0" -pgtap_release_checksum: sha256:9c7c3de67ea41638e14f06da5da57bac6f5bd03fea05c165a0ec862205a5c052 - -pg_cron_release: "1.4.2" -pg_cron_release_checksum: sha256:3652722ea98d94d8e27bf5e708dd7359f55a818a43550d046c5064c98876f1a8 - -pgaudit_release: "1.7.0" -pgaudit_release_checksum: sha256:8f4a73e451c88c567e516e6cba7dc1e23bc91686bb6f1f77f8f3126d428a8bd8 - -pgjwt_release: 9742dab1b2f297ad3811120db7b21451bca2d3c9 - -pgsql_http_release: "1.5.0" -pgsql_http_release_checksum: sha256:43efc9e82afcd110f205b86b8d28d1355d39b6b134161e9661a33a1346818f5d - -plpgsql_check_release: "2.2.5" -plpgsql_check_release_checksum: sha256:6c3a3c5faf3f9689425c6db8a6b20bf4cd5e7144a055e29538eae980c7232573 - -pg_safeupdate_release: "1.4" -pg_safeupdate_release_checksum: sha256:ff01d3d444d35924bd3d745c5695696292e2855042da4c30fe728fb3b6648122 - -timescaledb_release: "2.9.1" -timescaledb_release_checksum: sha256:883638f2e79d25ec88ee58f603f3c81c999b6364cb4c799919d363f04089b47b - -wal2json_release: "2_5" -wal2json_release_checksum: sha256:b516653575541cf221b99cf3f8be9b6821f6dbcfc125675c85f35090f824f00e - -supautils_release: "1.9.0" -supautils_release_checksum: sha256:bc2f2b6393f865e7db973630334e1ce8b561e8774e23cd14396192232fb59ad7 + arm64: sha256:29ba62d538b92d39952afe12ee2e1f4401250d678ff4b354ff2752f4321c87a0 + amd64: sha256:cb89fc5bf4485fb554e0d640d9684fae143a4b2d5fa443009bd29c59f9129e84 -pljava_release: master -pljava_release_checksum: sha256:e99b1c52f7b57f64c8986fe6ea4a6cc09d78e779c1643db060d0ac66c93be8b6 - -plv8_release: "3.1.5" -plv8_release_checksum: sha256:1e108d5df639e4c189e1c5bdfa2432a521c126ca89e7e5a969d46899ca7bf106 - -pg_plan_filter_release: 5081a7b5cb890876e67d8e7486b6a64c38c9a492 - -pg_net_release: "0.7.1" -pg_net_release_checksum: sha256:f403019fbffe5b3ec28816957ef81279dea1db5b008e3fb3bc39181a5e361940 - -rum_release: "1.3.13" -rum_release_checksum: sha256:6ab370532c965568df6210bd844ac6ba649f53055e48243525b0b7e5c4d69a7d - -pg_hashids_release: cd0e1b31d52b394a0df64079406a14a4f7387cd6 +adminapi_release: 0.84.1 +adminmgr_release: 0.25.0 vector_x86_deb: "https://packages.timber.io/vector/0.22.3/vector_0.22.3-1_amd64.deb" vector_arm_deb: "https://packages.timber.io/vector/0.22.3/vector_0.22.3-1_arm64.deb" - -libsodium_release: "1.0.18" -libsodium_release_checksum: sha256:6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1 - -pgsodium_release: "3.1.8" -pgsodium_release_checksum: sha256:4d027aeee5163f3f33740d269938a120d1593a41c3701c920d2a1de80aa97486 - -pg_graphql_release: "1.4.2" - -pg_jsonschema_release: "0.2.0" - -pg_stat_monitor_release: "1.1.1" -pg_stat_monitor_release_checksum: sha256:1756a02d5a6dd66b892d15920257c69a17a67d48d3d4e2f189b681b83001ec2a - -vault_release: "0.2.9" -vault_release_checksum: sha256:1e813216395c59bb94c92be47ce8b70ba19ccc0efbcdb1fb14ed6d34a42c6cdb - -groonga_release: "13.0.1" -groonga_release_checksum: sha256:1c2d1a6981c1ad3f02a11aff202b15ba30cb1c6147f1fa9195b519a2b728f8ba - -pgroonga_release: "3.0.7" -pgroonga_release_checksum: sha256:885ff3878cc30e9030e5fc56d561bc8b66df3ede1562c9d802bc0ea04fe5c203 - -wrappers_release: "0.1.18" - -hypopg_release: "1.3.1" -hypopg_release_checksum: sha256:e7f01ee0259dc1713f318a108f987663d60f3041948c2ada57a94b469565ca8e - -pgvector_release: "0.5.1" -pgvector_release_checksum: sha256:cc7a8e034a96e30a819911ac79d32f6bc47bdd1aa2de4d7d4904e26b83209dc8 - -pg_tle_release: "1.0.4" -pg_tle_release_checksum: sha256:679559584d83fb629c3b56825849fca4ff1fa3355b350aaaf8aa0b7b3460b08a diff --git a/common.vars.pkr.hcl b/common.vars.pkr.hcl deleted file mode 100644 index a3e3fd244..000000000 --- a/common.vars.pkr.hcl +++ /dev/null @@ -1 +0,0 @@ -postgres-version = "15.1.0.131" diff --git a/digitalOcean.json b/digitalOcean.json deleted file mode 100644 index 36396fc29..000000000 --- a/digitalOcean.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "variables": { - "do_token": "", - "image_name": "ubuntu-20-04-x64", - "region": "sgp1", - "snapshot_regions": "sgp1", - "snapshot_name": "supabase-postgres-13.3.0", - "ansible_arguments": "--skip-tags,update-only,--skip-tags,aws-only,-e,supabase_internal='false'" - }, - "builders": [ - { - "type": "digitalocean", - "api_token": "{{user `do_token`}}", - "image": "{{user `image_name`}}", - "region": "{{user `region`}}", - "snapshot_regions": "{{user `snapshot_regions`}}", - "size": "s-1vcpu-1gb", - "ssh_username": "root", - "snapshot_name": "{{user `snapshot_name`}}" - } - ], - "provisioners": [ - { - "type": "shell", - "inline": [ - "while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting for cloud-init...'; sleep 1; done" - ] - }, - { - "type": "ansible", - "user": "root", - "playbook_file": "ansible/playbook.yml", - "extra_arguments": "{{user `ansible_arguments`}}" - }, - { - "type": "shell", - "scripts": [ - "scripts/01-postgres_check.sh", - "scripts/90-cleanup.sh", - "scripts/91-log_cleanup.sh", - "scripts/99-img_check.sh" - ] - } - ] -} diff --git a/docker/Dockerfile b/docker/Dockerfile index 8d84ab1e3..116377b5d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -37,10 +37,11 @@ ENV DEB_BUILD_OPTIONS="nocheck parallel=$(nproc)" # Configure processor optimised build ARG CPPFLAGS="" ENV DEB_CPPFLAGS_APPEND="${CPPFLAGS} -fsigned-char" +ENV DEB_CFLAGS_APPEND="-g3" ARG DEB_BUILD_PROFILES="pkg.postgresql.nozstd" ENV DEB_BUILD_PROFILES="${DEB_BUILD_PROFILES}" -RUN apt-get build-dep -y postgresql-common pgdg-keyring && \ +RUN apt-get -o Acquire::GzipIndexes=false update && apt-get build-dep -y postgresql-common pgdg-keyring && \ apt-get source --compile postgresql-common pgdg-keyring && \ dpkg-scanpackages . > Packages && \ apt-get -o Acquire::GzipIndexes=false update diff --git a/docker/all-in-one/Dockerfile b/docker/all-in-one/Dockerfile deleted file mode 100644 index 48b2a1610..000000000 --- a/docker/all-in-one/Dockerfile +++ /dev/null @@ -1,259 +0,0 @@ -ARG postgres_version=15.1.0.83 - -ARG pgbouncer_release=1.18.0 -ARG postgrest_release=10.1.2 -ARG gotrue_release=2.47.0 -ARG kong_release=2.8.1 -ARG adminapi_release=0.48.0 -ARG adminmgr_release=0.9.0 -ARG vector_release=0.22.3 -ARG postgres_exporter_release=0.9.0 - -FROM supabase/postgres:${postgres_version} as base -ARG TARGETARCH -ARG postgresql_major - -FROM base as builder -# Install build dependencies -RUN apt-get update && apt-get install -y \ - postgresql-server-dev-${postgresql_major} \ - build-essential \ - checkinstall \ - pkg-config \ - cmake \ - && rm -rf /var/lib/apt/lists/* - -#################### -# Install pgbouncer -#################### -FROM builder as pgbouncer-source -# Download and extract -ARG pgbouncer_release -ADD "https://www.pgbouncer.org/downloads/files/$%7Bpgbouncer_release%7D/pgbouncer-$%7Bpgbouncer_release%7D.tar.gz" /tmp/pgbouncer.tar.gz -RUN tar -xvf /tmp/pgbouncer.tar.gz -C /tmp && \ - rm -rf /tmp/pgbouncer.tar.gz -# Install build dependencies -RUN apt-get update && apt-get install -y \ - libevent-dev \ - && rm -rf /var/lib/apt/lists/* -# Build from source -WORKDIR /tmp/pgbouncer-${pgbouncer_release} -RUN ./configure --prefix=/usr/local -RUN make -j$(nproc) -# Create debian package -RUN checkinstall -D --install=no --fstrans=no --backup=no --pakdir=/tmp --requires=libevent-2.1-7 --nodoc - -FROM base as pgbouncer -# Download pre-built packages -RUN apt-get update && apt-get install -y --no-install-recommends --download-only \ - pgbouncer \ - && rm -rf /var/lib/apt/lists/* -RUN mv /var/cache/apt/archives/*.deb /tmp/ - -#################### -# Install PostgREST -#################### -FROM postgrest/postgrest:v${postgrest_release} as pgrst - -#################### -# Install GoTrue -#################### -FROM supabase/gotrue:v${gotrue_release} as gotrue - -#################### -# Install Kong -#################### -FROM base as kong -ARG kong_release -ADD "https://download.konghq.com/gateway-2.x-ubuntu-focal/pool/all/k/kong/kong_$%7Bkong_release%7D_$%7BTARGETARCH%7D.deb" \ - /tmp/kong.deb - -#################### -# Install admin api -#################### -FROM base as adminapi -ARG adminapi_release -ADD "https://supabase-public-artifacts-bucket.s3.amazonaws.com/supabase-admin-api/v$%7Badminapi_release%7D/supabase-admin-api_$%7Badminapi_release%7D_linux_$%7BTARGETARCH%7D.tar.gz" /tmp/supabase-admin-api.tar.gz -RUN tar -xvf /tmp/supabase-admin-api.tar.gz -C /tmp && \ - rm -rf /tmp/supabase-admin-api.tar.gz - -#################### -# Install admin mgr -#################### -FROM base as adminmgr -ARG adminmgr_release -ADD "https://supabase-public-artifacts-bucket.s3.amazonaws.com/admin-mgr/v$%7Badminmgr_release%7D/admin-mgr_$%7Badminmgr_release%7D_linux_$%7BTARGETARCH%7D.tar.gz" /tmp/admin-mgr.tar.gz -RUN tar -xvf /tmp/admin-mgr.tar.gz -C /tmp && \ - rm -rf /tmp/admin-mgr.tar.gz - -#################### -# Install Prometheus Exporter -#################### -FROM base as exporter -ARG postgres_exporter_release -ADD "https://github.com/prometheus-community/postgres_exporter/releases/download/v$%7Bpostgres_exporter_release%7D/postgres_exporter-$%7Bpostgres_exporter_release%7D.linux-$%7BTARGETARCH%7D.tar.gz" /tmp/postgres_exporter.tar.gz -RUN tar -xvf /tmp/postgres_exporter.tar.gz -C /tmp --strip-components 1 && \ - rm -rf /tmp/postgres_exporter.tar.gz - -#################### -# Install vector -#################### -FROM base as vector -ARG vector_release -ADD "https://packages.timber.io/vector/$%7Bvector_release%7D/vector_$%7Bvector_release%7D-1_$%7BTARGETARCH%7D.deb" /tmp/vector.deb - -#################### -# Install supervisord -#################### -FROM base as supervisor -# Download pre-built packages -RUN apt-get update -y && apt-get install -y --no-install-recommends --download-only \ - supervisor \ - && rm -rf /var/lib/apt/lists/* -RUN mv /var/cache/apt/archives/*.deb /tmp/ - -#################### -# Create the final image for production -#################### -FROM base as production - -# Copy dependencies from previous build stages -COPY --from=pgbouncer /tmp/*.deb /tmp/ -COPY --from=vector /tmp/*.deb /tmp/ -COPY --from=kong /tmp/*.deb /tmp/ -COPY --from=supervisor /tmp/*.deb /tmp/ - -# Install runtime dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - /tmp/*.deb \ - # For health check - curl \ - # For parsing init payload - jq \ - # Security tools - fail2ban \ - # sudo - sudo \ - vim-tiny \ - less \ - # pg_egress_collect deps - tcpdump libio-async-perl \ - && rm -rf /var/lib/apt/lists/* /tmp/* \ - && mkdir -p /dist \ - && mkdir -p /data/opt && chmod go+rwx /data/opt - -# Copy single binary dependencies -COPY --from=pgrst /bin/postgrest /dist/ -COPY --from=gotrue /usr/local/bin/gotrue /dist/ -COPY --from=gotrue /usr/local/etc/gotrue /opt/gotrue/ -COPY --from=adminapi /tmp/supabase-admin-api /dist/ -COPY --chown=root:root --from=adminmgr /tmp/admin-mgr /dist/ -COPY --from=exporter /tmp/postgres_exporter /opt/postgres_exporter/ -COPY docker/all-in-one/opt/postgres_exporter /opt/postgres_exporter/ - -# Configuring dangling symlinks for binaries -RUN ln -s /data/opt/supabase-admin-api /opt/supabase-admin-api \ - && ln -s /data/opt/postgrest /opt/postgrest \ - && ln -s /data/opt/gotrue /opt/gotrue/gotrue \ - && ln -s /data/opt/admin-mgr /usr/bin/admin-mgr - -# Scripts for adminapi -COPY ansible/files/admin_api_scripts /root -COPY --chown=adminapi:adminapi docker/all-in-one/etc/adminapi /etc/adminapi -COPY docker/all-in-one/etc/sudoers.d /etc/sudoers.d/ - -# Script for pg_egress_collect -COPY --chown=adminapi:adminapi docker/all-in-one/opt/pg_egress_collect /opt/pg_egress_collect - -# Customizations for pgbouncer -COPY docker/all-in-one/etc/pgbouncer /etc/pgbouncer -COPY docker/all-in-one/etc/pgbouncer-custom /etc/pgbouncer-custom -COPY docker/all-in-one/etc/tmpfiles.d /etc/tmpfiles.d - -# Customizations for postgres -COPY --chown=postgres:postgres docker/all-in-one/etc/postgresql/pg_hba.conf /etc/postgresql/ -COPY --chown=postgres:postgres docker/all-in-one/etc/postgresql/logging.conf /etc/postgresql/ -COPY --chown=postgres:postgres docker/all-in-one/etc/postgresql-custom /etc/postgresql-custom -COPY --chown=postgres:postgres docker/all-in-one/etc/postgresql.schema.sql /etc/postgresql.schema.sql - -# Customizations for postgres_exporter -COPY --chown=postgres:postgres docker/all-in-one/opt/postgres_exporter/queries.yml /opt/postgres_exporter/queries.yml - -COPY docker/all-in-one/etc/fail2ban/filter.d /etc/fail2ban/filter.d/ -COPY docker/all-in-one/etc/fail2ban/jail.d /etc/fail2ban/jail.d/ - -# Customizations for postgrest -COPY --chown=postgrest:postgrest docker/all-in-one/etc/postgrest/bootstrap.sh /etc/postgrest/bootstrap.sh -COPY --chown=postgrest:postgrest docker/all-in-one/etc/postgrest/base.conf /etc/postgrest/base.conf -COPY --chown=postgrest:postgrest docker/all-in-one/etc/postgrest/generated.conf /etc/postgrest/generated.conf - -# Customizations for gotrue -COPY docker/all-in-one/etc/gotrue.env /etc/gotrue.env - -# Customizations for kong -COPY docker/all-in-one/etc/kong/kong.conf /etc/kong/kong.conf -COPY docker/all-in-one/etc/kong/kong.yml /etc/kong/kong.yml - -# Customizations for vector -COPY --chown=vector:vector docker/all-in-one/etc/vector/vector.yaml /etc/vector/vector.yaml - -# Customizations for supervisor -COPY docker/all-in-one/etc/supervisor /etc/supervisor - -# Customizations for supa-shutdown -COPY --chown=adminapi:adminapi docker/all-in-one/etc/supa-shutdown /etc/supa-shutdown -COPY docker/all-in-one/configure-shim.sh /usr/local/bin/configure-shim.sh - -# Configure service ports -ENV PGRST_SERVER_PORT=3000 -ENV PGRST_ADMIN_SERVER_PORT=3001 -EXPOSE ${PGRST_SERVER_PORT} - -ENV GOTRUE_SITE_URL=http://localhost:${PGRST_SERVER_PORT} -ENV GOTRUE_API_PORT=9999 -EXPOSE ${GOTRUE_API_PORT} - -ENV KONG_HTTP_PORT=8000 -ENV KONG_HTTPS_PORT=8443 -EXPOSE ${KONG_HTTP_PORT} ${KONG_HTTPS_PORT} - -ENV ADMIN_API_CERT_DIR=/etc/ssl/adminapi -ENV ADMIN_API_PORT=8085 -EXPOSE ${ADMIN_API_PORT} - -ENV PGBOUNCER_PORT=6543 -EXPOSE ${PGBOUNCER_PORT} - -ENV PGEXPORTER_PORT=9187 -EXPOSE ${PGEXPORTER_PORT} - -ENV VECTOR_API_PORT=9001 - -# Create system users -RUN useradd --create-home --shell /bin/bash postgrest && \ - useradd --create-home --shell /bin/bash gotrue && \ - useradd --create-home --shell /bin/bash pgbouncer -G postgres,ssl-cert && \ - # root,admin,kong,pgbouncer,postgres,postgrest,systemd-journal,wal-g - useradd --create-home --shell /bin/bash adminapi -G root,kong,pgbouncer,postgres,postgrest,wal-g && \ - usermod --append --shell /bin/bash -G postgres vector -RUN mkdir -p /etc/wal-g && \ - chown -R adminapi:adminapi /etc/wal-g && \ - chmod g+w /etc/wal-g -RUN mkdir -p /var/log/wal-g \ - && chown -R postgres:postgres /var/log/wal-g \ - && chmod +x /dist/admin-mgr \ - && chmod ug+s /dist/admin-mgr \ - && touch /etc/wal-g/config.json \ - && chown adminapi:adminapi /etc/wal-g/config.json \ - && echo '{}' > /etc/wal-g/config.json -RUN chown -R adminapi:adminapi /etc/adminapi - -# Add healthcheck and entrypoint scripts -COPY docker/all-in-one/healthcheck.sh /usr/local/bin/ -HEALTHCHECK --interval=3s --timeout=2s --start-period=4s --retries=10 CMD [ "healthcheck.sh" ] - -COPY docker/all-in-one/init /init -COPY docker/all-in-one/entrypoint.sh /usr/local/bin/ -COPY docker/all-in-one/postgres-entrypoint.sh /usr/local/bin/ -COPY docker/all-in-one/shutdown.sh /usr/local/bin/supa-shutdown.sh -ENTRYPOINT [ "entrypoint.sh" ] diff --git a/docker/all-in-one/README.md b/docker/all-in-one/README.md deleted file mode 100644 index 3b4e1c083..000000000 --- a/docker/all-in-one/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# Supabase All-in-One - -All Supabase backend services bundled in a single Docker image for quick local testing and edge deployment. - -## Build - -```bash -# cwd: repo root -docker build -f docker/all-in-one/Dockerfile -t supabase/all-in-one . -``` - -## Run - -```bash -docker run --rm -it \ - -e POSTGRES_PASSWORD=postgres \ - -e JWT_SECRET=super-secret-jwt-token-with-at-least-32-characters-long \ - -e ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE \ - -e SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJzZXJ2aWNlX3JvbGUiLAogICAgImlzcyI6ICJzdXBhYmFzZS1kZW1vIiwKICAgICJpYXQiOiAxNjQxNzY5MjAwLAogICAgImV4cCI6IDE3OTk1MzU2MDAKfQ.DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4Q \ - -e ADMIN_API_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoic3VwYWJhc2VfYWRtaW4iLCJpc3MiOiJzdXBhYmFzZS1kZW1vIiwiaWF0IjoxNjQxNzY5MjAwLCJleHAiOjE3OTk1MzU2MDB9.Y9mSNVuTw2TdfryoaqM5wySvwQemGGWfSe9ixcklVfM \ - -e DATA_VOLUME_MOUNTPOINT=/data \ - -e MACHINE_TYPE=shared_cpu_1x_512m \ - -p 5432:5432 \ - -p 8000:8000 \ - supabase/all-in-one -``` - -Use bind mount to start from an existing physical backup: `-v $(pwd)/data:/var/lib/postgresql/data` - -Alternatively, the container may be initialised using a payload tarball. - -```bash -docker run --rm \ - -e POSTGRES_PASSWORD=postgres \ - -e INIT_PAYLOAD_PRESIGNED_URL= \ - -p 5432:5432 \ - -p 8000:8000 \ - -it supabase/all-in-one -``` - -## Test - -```bash -curl -H "apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE" \ - localhost:8000/rest/v1/ | jq -``` - -## TODO - -- [x] optimise admin config -- [x] propagate shutdown signals -- [x] add http health checks -- [x] generate dynamic JWT -- [ ] ufw / nftables -- [x] log rotation -- [ ] egress metrics -- [x] vector -- [ ] apparmor -- [ ] wal-g diff --git a/docker/all-in-one/configure-shim.sh b/docker/all-in-one/configure-shim.sh deleted file mode 100755 index f42f1557a..000000000 --- a/docker/all-in-one/configure-shim.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -INITIAL_BINARY_PATH=$1 -SYMLINK_PATH=$2 - -SYMLINK_TARGET=$(readlink -m "$SYMLINK_PATH") - -if [ ! -f "$SYMLINK_TARGET" ]; then - cp "$INITIAL_BINARY_PATH" "$SYMLINK_TARGET" - - PERMS=$(stat -c "%a" "$INITIAL_BINARY_PATH") - chmod "$PERMS" "$SYMLINK_TARGET" - - OWNER_GROUP=$(stat -c "%u:%g" "$INITIAL_BINARY_PATH") - chown "$OWNER_GROUP" "$SYMLINK_TARGET" -fi diff --git a/docker/all-in-one/entrypoint.sh b/docker/all-in-one/entrypoint.sh deleted file mode 100755 index b9ae8a503..000000000 --- a/docker/all-in-one/entrypoint.sh +++ /dev/null @@ -1,250 +0,0 @@ -#!/bin/bash -set -eou pipefail - -PG_CONF=/etc/postgresql/postgresql.conf -SUPERVISOR_CONF=/etc/supervisor/supervisord.conf - -DATA_VOLUME_MOUNTPOINT=${DATA_VOLUME_MOUNTPOINT:-/data} -export CONFIGURED_FLAG_PATH=${CONFIGURED_FLAG_PATH:-$DATA_VOLUME_MOUNTPOINT/machine.configured} - -# Ref: https://gist.github.com/sj26/88e1c6584397bb7c13bd11108a579746 -function retry { - # Pass 0 for unlimited retries - local retries=$1 - shift - - local start=$EPOCHSECONDS - local count=0 - until "$@"; do - exit=$? - # Reset count if service has been running for more than 2 minutes - local elapsed=$((EPOCHSECONDS - start)) - if [ $elapsed -gt 120 ]; then - count=0 - fi - # Exponential backoff up to n tries - local wait=$((2 ** count)) - count=$((count + 1)) - if [ $count -ge "$retries" ] && [ "$retries" -gt 0 ]; then - echo "Retry $count/$retries exited $exit, no more retries left." - return $exit - fi - echo "Retry $count/$retries exited $exit, retrying in $wait seconds..." - sleep $wait - start=$EPOCHSECONDS - done - return 0 -} - -function configure_services { - # Start services after migrations are run - for file in /init/configure-*.sh; do - retry 0 "$file" - done -} - -function enable_swap { - fallocate -l 1G /mnt/swapfile - chmod 600 /mnt/swapfile - mkswap /mnt/swapfile - swapon /mnt/swapfile -} - -function create_lsn_checkpoint_file { - if [ ! -f "${DATA_VOLUME_MOUNTPOINT}/latest-lsn-checkpoint" ]; then - echo "0/0" > "${DATA_VOLUME_MOUNTPOINT}/latest-lsn-checkpoint" - chown postgres:postgres "${DATA_VOLUME_MOUNTPOINT}/latest-lsn-checkpoint" - chmod 0300 "${DATA_VOLUME_MOUNTPOINT}/latest-lsn-checkpoint" - fi -} - - -function setup_postgres { - tar -xzvf "$INIT_PAYLOAD_PATH" -C / ./etc/postgresql.schema.sql - mv /etc/postgresql.schema.sql /docker-entrypoint-initdb.d/migrations/99-schema.sql - - tar -xzvf "$INIT_PAYLOAD_PATH" -C / ./etc/postgresql-custom/pgsodium_root.key - echo "include = '/etc/postgresql-custom/postgresql-platform-defaults.conf'" >> $PG_CONF - - # TODO (darora): walg enablement is temporarily performed here until changes from https://github.com/supabase/postgres/pull/639 get picked up - # other things will still be needed in the future (auth_delay config) - sed -i \ - -e "s|#include = '/etc/postgresql-custom/wal-g.conf'|include = '/etc/postgresql-custom/wal-g.conf'|g" \ - -e "s|shared_preload_libraries = '\(.*\)'|shared_preload_libraries = '\1, auth_delay'|" \ - -e "/# Automatically generated optimizations/i auth_delay.milliseconds = '3000'" \ - "${PG_CONF}" - - # Setup ssl certs - mkdir -p /etc/ssl/certs/postgres - tar -xzvf "$INIT_PAYLOAD_PATH" -C /etc/ssl/certs/postgres/ --strip-components 2 ./ssl/server.crt - tar -xzvf "$INIT_PAYLOAD_PATH" -C /etc/ssl/certs/postgres/ --strip-components 2 ./ssl/ca.crt - tar -xzvf "$INIT_PAYLOAD_PATH" -C /etc/ssl/private/ --strip-components 2 ./ssl/server.key - # tar -xzvf "$INIT_PAYLOAD_PATH" -C /etc/ssl/certs/postgres/ ./ssl/server-intermediate.srl - - PGSSLROOTCERT=/etc/ssl/certs/postgres/ca.crt - PGSSLCERT=/etc/ssl/certs/postgres/server.crt - PGSSLKEY=/etc/ssl/private/server.key - chown root:postgres $PGSSLROOTCERT $PGSSLKEY $PGSSLCERT - chmod 640 $PGSSLROOTCERT $PGSSLKEY $PGSSLCERT - - # Change ssl back to on in postgres.conf - sed -i -e "s|ssl = off|ssl = on|g" \ - -e "s|ssl_ca_file = ''|ssl_ca_file = '$PGSSLROOTCERT'|g" \ - -e "s|ssl_cert_file = ''|ssl_cert_file = '$PGSSLCERT'|g" \ - -e "s|ssl_key_file = ''|ssl_key_file = '$PGSSLKEY'|g" \ - $PG_CONF - - if [ "${DATA_VOLUME_MOUNTPOINT}" ]; then - mkdir -p "${DATA_VOLUME_MOUNTPOINT}/opt" - /usr/local/bin/configure-shim.sh /dist/supabase-admin-api /opt/supabase-admin-api - /opt/supabase-admin-api optimize db --destination-config-file-path /etc/postgresql-custom/generated-optimizations.conf - - # Preserve postgresql configs across restarts - POSTGRESQL_CUSTOM_DIR="${DATA_VOLUME_MOUNTPOINT}/etc/postgresql-custom" - - mkdir -p "${POSTGRESQL_CUSTOM_DIR}" - - if [ ! -f "${CONFIGURED_FLAG_PATH}" ]; then - echo "Copying existing custom postgresql config from /etc/postgresql-custom to ${POSTGRESQL_CUSTOM_DIR}" - cp -R "/etc/postgresql-custom/." "${POSTGRESQL_CUSTOM_DIR}/" - fi - - rm -rf "/etc/postgresql-custom" - ln -s "${POSTGRESQL_CUSTOM_DIR}" "/etc/postgresql-custom" - chown -R postgres:postgres "/etc/postgresql-custom" - chown -R postgres:postgres "${POSTGRESQL_CUSTOM_DIR}" - chmod g+rx "${POSTGRESQL_CUSTOM_DIR}" - - # Preserve wal-g configs across restarts - WALG_CONF_DIR="${DATA_VOLUME_MOUNTPOINT}/etc/wal-g" - mkdir -p "${WALG_CONF_DIR}" - - if [ ! -f "${CONFIGURED_FLAG_PATH}" ]; then - echo "Copying existing custom wal-g config from /etc/wal-g to ${WALG_CONF_DIR}" - cp -R "/etc/wal-g/." "${WALG_CONF_DIR}/" - fi - - rm -rf "/etc/wal-g" - ln -s "${WALG_CONF_DIR}" "/etc/wal-g" - chown -R adminapi:adminapi "/etc/wal-g" - chown -R adminapi:adminapi "${WALG_CONF_DIR}" - chmod g+rx "/etc/wal-g" - chmod g+rx "${WALG_CONF_DIR}" - fi -} - -function setup_credentials { - # Load credentials from init json - tar -xzvf "$INIT_PAYLOAD_PATH" -C / ./tmp/init.json - export ANON_KEY=${ANON_KEY:-$(jq -r '.["anon_key"]' /tmp/init.json)} - export SERVICE_ROLE_KEY=${SERVICE_ROLE_KEY:-$(jq -r '.["service_key"]' /tmp/init.json)} - export ADMIN_API_KEY=${ADMIN_API_KEY:-$(jq -r '.["supabase_admin_key"]' /tmp/init.json)} - export JWT_SECRET=${JWT_SECRET:-$(jq -r '.["jwt_secret"]' /tmp/init.json)} -} - -function report_health { - if [ -z "${REPORTING_TOKEN:-}" ]; then - echo "Skipped health reporting: missing REPORTING_TOKEN" - exit 0 - fi - if [ -d "$ADMIN_API_CERT_DIR" ]; then - retry 10 curl -sSkf "https://localhost:$ADMIN_API_PORT/health-reporter/send" -X POST -H "apikey: $ADMIN_API_KEY" - else - retry 10 curl -sSf "http://localhost:$ADMIN_API_PORT/health-reporter/send" -X POST -H "apikey: $ADMIN_API_KEY" - fi -} - -function start_supervisor { - # Start health reporting - report_health & - - # Start supervisord - /usr/bin/supervisord -c $SUPERVISOR_CONF -} - -# Increase max number of open connections -ulimit -n 65536 - -# Update pgsodium root key -if [ "${PGSODIUM_ROOT_KEY:-}" ]; then - echo "${PGSODIUM_ROOT_KEY}" > /etc/postgresql-custom/pgsodium_root.key -fi - -# Update pgdata directory -if [ "${PGDATA_REAL:-}" ]; then - mkdir -p "${PGDATA_REAL}" - chown -R postgres:postgres "${PGDATA_REAL}" - chmod -R g+rx "${PGDATA_REAL}" -fi - -if [ "${PGDATA:-}" ]; then - if [ "${PGDATA_REAL:-}" ]; then - mkdir -p "$(dirname "${PGDATA}")" - rm -rf "${PGDATA}" - ln -s "${PGDATA_REAL}" "${PGDATA}" - chmod -R g+rx "${PGDATA}" - else - mkdir -p "$PGDATA" - chown postgres:postgres "$PGDATA" - fi - sed -i "s|data_directory = '.*'|data_directory = '$PGDATA'|g" $PG_CONF -fi - -# Download and extract init payload from s3 -export INIT_PAYLOAD_PATH=${INIT_PAYLOAD_PATH:-/tmp/payload.tar.gz} - -if [ "${INIT_PAYLOAD_PRESIGNED_URL:-}" ]; then - curl -fsSL "$INIT_PAYLOAD_PRESIGNED_URL" -o "/tmp/payload.tar.gz" || true - if [ -f "/tmp/payload.tar.gz" ] && [ "/tmp/payload.tar.gz" != "$INIT_PAYLOAD_PATH" ] ; then - mv "/tmp/payload.tar.gz" "$INIT_PAYLOAD_PATH" - fi -fi - -if [ "${DATA_VOLUME_MOUNTPOINT}" ]; then - BASE_LOGS_FOLDER="${DATA_VOLUME_MOUNTPOINT}/logs" - - for folder in "postgresql" "services" "wal-g"; do - mkdir -p "${BASE_LOGS_FOLDER}/${folder}" - rm -rf "/var/log/${folder}" - ln -s "${BASE_LOGS_FOLDER}/${folder}" "/var/log/${folder}" - done - - chown -R postgres:postgres "${BASE_LOGS_FOLDER}" -fi - -# Process init payload -if [ -f "$INIT_PAYLOAD_PATH" ]; then - setup_credentials - setup_postgres -else - echo "Skipped extracting init payload: $INIT_PAYLOAD_PATH does not exist" -fi - -mkdir -p /var/log/services - -SUPERVISOR_CONF=/etc/supervisor/supervisord.conf -find /etc/supervisor/ -type d -exec chmod 0770 {} + -find /etc/supervisor/ -type f -exec chmod 0660 {} + - -# Start services in the background -if [ -z "${POSTGRES_ONLY:-}" ]; then - sed -i "s| # - postgrest| - postgrest|g" /etc/adminapi/adminapi.yaml - sed -i "s|files = db-only/\*.conf|files = services/\*.conf db-only/\*.conf|g" $SUPERVISOR_CONF - configure_services -else - sed -i "s| - postgrest| # - postgrest|g" /etc/adminapi/adminapi.yaml - sed -i "s|files = services/\*.conf db-only/\*.conf|files = db-only/\*.conf|g" $SUPERVISOR_CONF - /init/configure-adminapi.sh -fi - -if [ "${AUTOSHUTDOWN_ENABLED:-}" ]; then - sed -i "s/autostart=.*/autostart=true/" /etc/supervisor/db-only/supa-shutdown.conf -fi - -if [ "${PLATFORM_DEPLOYMENT:-}" ]; then - enable_swap - create_lsn_checkpoint_file -fi - -touch "$CONFIGURED_FLAG_PATH" -start_supervisor diff --git a/docker/all-in-one/etc/adminapi/adminapi.yaml b/docker/all-in-one/etc/adminapi/adminapi.yaml deleted file mode 100644 index d694de6ba..000000000 --- a/docker/all-in-one/etc/adminapi/adminapi.yaml +++ /dev/null @@ -1,75 +0,0 @@ -port: 8085 -host: 0.0.0.0 -ref: {{ .ProjectRef }} -jwt_secret: {{ .JwtSecret }} -metric_collectors: - - filesystem - - meminfo - - netdev - - loadavg - - cpu - - diskstats -node_exporter_additional_args: - - "--collector.filesystem.ignored-mount-points=^/(boot|sys|dev|run).*" - - "--collector.netdev.device-exclude=lo" -# cert_path: /etc/ssl/adminapi/server.crt -# key_path: /etc/ssl/adminapi/server.key -upstream_metrics_refresh_duration: 60s -pgbouncer_endpoints: - - "postgres://pgbouncer:{{ .PgbouncerPassword }}@localhost:6543/pgbouncer" -fail2ban_socket: /var/run/fail2ban/fail2ban.sock -upstream_metrics_sources: - - name: system - url: "https://localhost:8085/metrics" - labels_to_attach: - - name: supabase_project_ref - value: {{ .ProjectRef }} - - name: service_type - value: db - skip_tls_verify: true - - name: postgresql - url: "http://localhost:9187/metrics" - labels_to_attach: - - name: supabase_project_ref - value: {{ .ProjectRef }} - - name: service_type - value: postgresql - - name: gotrue - url: "http://localhost:9122/metrics" - labels_to_attach: - - name: supabase_project_ref - value: {{ .ProjectRef }} - - name: service_type - value: gotrue -monitoring: - disk_usage: - enabled: true -upgrades_config: - region: us-east-1 - s3_bucket_name: supabase-internal-artifacts-prod-bucket - common_prefix: upgrades - destination_dir: /tmp -firewall: - enabled: true - internal_ports: - - 9187 - - 8085 - - 9122 - privileged_ports: - - 22 - privileged_ports_allowlist: - - 0.0.0.0/0 - filtered_ports: - - 5432 - - 6543 - unfiltered_ports: - - 80 - - 443 - managed_rules_file: /etc/nftables/supabase_managed.conf -pg_egress_collect_path: /tmp/pg_egress_collect.txt -health_reporting: - api_url: {{ .SupabaseUrl }} - project_token: {{ .ReportingToken }} - check_services: - # - postgres - # - postgrest diff --git a/docker/all-in-one/etc/fail2ban/filter.d/pgbouncer.conf b/docker/all-in-one/etc/fail2ban/filter.d/pgbouncer.conf deleted file mode 100644 index b2d59c1b3..000000000 --- a/docker/all-in-one/etc/fail2ban/filter.d/pgbouncer.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Definition] -failregex = ^.+@:.+error: password authentication failed$ diff --git a/docker/all-in-one/etc/fail2ban/filter.d/postgresql.conf b/docker/all-in-one/etc/fail2ban/filter.d/postgresql.conf deleted file mode 100644 index 4c708069d..000000000 --- a/docker/all-in-one/etc/fail2ban/filter.d/postgresql.conf +++ /dev/null @@ -1,8 +0,0 @@ -[Definition] -failregex = ^.*,.*,.*,.*,":.*password authentication failed for user.*$ -ignoreregex = ^.*,.*,.*,.*,"127\.0\.0\.1.*password authentication failed for user.*$ - ^.*,.*,.*,.*,":.*password authentication failed for user ""supabase_admin".*$ - ^.*,.*,.*,.*,":.*password authentication failed for user ""supabase_auth_admin".*$ - ^.*,.*,.*,.*,":.*password authentication failed for user ""supabase_storage_admin".*$ - ^.*,.*,.*,.*,":.*password authentication failed for user ""authenticator".*$ - ^.*,.*,.*,.*,":.*password authentication failed for user ""pgbouncer".*$ diff --git a/docker/all-in-one/etc/fail2ban/jail.d/jail.local b/docker/all-in-one/etc/fail2ban/jail.d/jail.local deleted file mode 100644 index 44e8210f1..000000000 --- a/docker/all-in-one/etc/fail2ban/jail.d/jail.local +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] - -banaction = nftables-multiport -banaction_allports = nftables-allports diff --git a/docker/all-in-one/etc/fail2ban/jail.d/pgbouncer.conf b/docker/all-in-one/etc/fail2ban/jail.d/pgbouncer.conf deleted file mode 100644 index c8b3c49c5..000000000 --- a/docker/all-in-one/etc/fail2ban/jail.d/pgbouncer.conf +++ /dev/null @@ -1,7 +0,0 @@ -[pgbouncer] -enabled = true -port = 6543 -protocol = tcp -filter = pgbouncer -logpath = /var/log/services/pgbouncer.log -maxretry = 3 diff --git a/docker/all-in-one/etc/fail2ban/jail.d/postgresql.conf b/docker/all-in-one/etc/fail2ban/jail.d/postgresql.conf deleted file mode 100644 index 0ec1819d6..000000000 --- a/docker/all-in-one/etc/fail2ban/jail.d/postgresql.conf +++ /dev/null @@ -1,8 +0,0 @@ -[postgresql] -enabled = true -port = 5432 -protocol = tcp -filter = postgresql -logpath = /var/log/postgresql/auth-failures.csv -maxretry = 3 -ignoreip = 192.168.0.0/16 172.17.1.0/20 diff --git a/docker/all-in-one/etc/fail2ban/jail.d/sshd.local b/docker/all-in-one/etc/fail2ban/jail.d/sshd.local deleted file mode 100644 index 703373833..000000000 --- a/docker/all-in-one/etc/fail2ban/jail.d/sshd.local +++ /dev/null @@ -1,3 +0,0 @@ -[sshd] - -enabled = false diff --git a/docker/all-in-one/etc/gotrue.env b/docker/all-in-one/etc/gotrue.env deleted file mode 100644 index eb1e1a3c6..000000000 --- a/docker/all-in-one/etc/gotrue.env +++ /dev/null @@ -1,9 +0,0 @@ -API_EXTERNAL_URL=api_external_url -GOTRUE_API_HOST=gotrue_api_host -GOTRUE_SITE_URL=gotrue_site_url -GOTRUE_DB_DRIVER=postgres -GOTRUE_DB_DATABASE_URL=postgres://supabase_auth_admin@localhost/postgres?sslmode=disable -GOTRUE_DB_MIGRATIONS_PATH=/opt/gotrue/migrations -GOTRUE_JWT_ADMIN_ROLES=supabase_admin,service_role -GOTRUE_JWT_AUD=authenticated -GOTRUE_JWT_SECRET=gotrue_jwt_secret diff --git a/docker/all-in-one/etc/kong/kong.conf b/docker/all-in-one/etc/kong/kong.conf deleted file mode 100644 index 312913510..000000000 --- a/docker/all-in-one/etc/kong/kong.conf +++ /dev/null @@ -1,35 +0,0 @@ -database = off -declarative_config = /etc/kong/kong.yml - -# plugins defined in the dockerfile -plugins = request-transformer,cors,key-auth,basic-auth,http-log,ip-restriction,rate-limiting - -admin_listen = off -proxy_listen = 0.0.0.0:80 reuseport backlog=16384, 0.0.0.0:443 http2 ssl reuseport backlog=16834 - -nginx_http_log_format = custom_log '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" $request_time $request_length' -nginx_http_client_body_buffer_size = 512k -proxy_access_log = off -dns_stale_ttl = 60 -nginx_proxy_proxy_max_temp_file_size = 0 -nginx_proxy_proxy_buffer_size = 128k -nginx_proxy_proxy_buffers = 4 256k -nginx_proxy_proxy_busy_buffers_size = 256k -nginx_proxy_proxy_read_timeout = 120s -nginx_proxy_proxy_ssl_verify = off -nginx_http_gzip=on -nginx_http_gzip_comp_level=6 -nginx_http_gzip_min_length=256 -nginx_http_gzip_proxied=any -nginx_http_gzip_vary=on -nginx_http_gzip_types=text/plain application/xml application/openapi+json application/json - -# the upstream requests will be timed out after 60s idle anyway -# this ensures that we're not unnecessarily cycling them -upstream_keepalive_max_requests = 0 -# the pool size can be (and ought to be) scaled up on larger instances -upstream_keepalive_pool_size = 500 - -nginx_events_use = epoll -# can be tuned to be higher on larger boxes (4096 is totally fine) -nginx_events_worker_connections = 1024 diff --git a/docker/all-in-one/etc/kong/kong.yml b/docker/all-in-one/etc/kong/kong.yml deleted file mode 100644 index 53ad4baef..000000000 --- a/docker/all-in-one/etc/kong/kong.yml +++ /dev/null @@ -1,88 +0,0 @@ -# ############################################################################################## -# Updating this file also requires a corresponding update in worker/src/lib/config-utils/kong.ts -# ############################################################################################## -_format_version: '1.1' -services: - - { - name: auth-v1-open, - url: 'http://localhost:9999/verify', - routes: [{ name: auth-v1-open, strip_path: true, paths: [/auth/v1/verify] }], - plugins: [{ name: cors }], - } - - { - name: auth-v1-open-callback, - url: 'http://localhost:9999/callback', - routes: [{ name: auth-v1-open-callback, strip_path: true, paths: [/auth/v1/callback] }], - plugins: [{ name: cors }], - } - - { - name: auth-v1-open-authorize, - url: 'http://localhost:9999/authorize', - routes: [{ name: auth-v1-open-authorize, strip_path: true, paths: [/auth/v1/authorize] }], - plugins: [{ name: cors }], - } - - { - name: auth-v1-open-saml, - url: 'http://localhost:9999/sso/saml/', - routes: [{ name: auth-v1-open-saml, strip_path: true, paths: [/auth/v1/sso/saml/] }], - plugins: [{ name: cors }], - } - - { - name: auth-v1, - url: 'http://localhost:9999/', - routes: [{ name: auth-v1, strip_path: true, paths: [/auth/v1/] }], - plugins: [{ name: cors }, { name: key-auth, config: { hide_credentials: false } }], - } - - { - name: rest-v1-admin, - url: 'http://localhost:3001/', - routes: [{ name: rest-admin-v1, strip_path: true, paths: [/rest-admin/v1/] }], - plugins: [{ name: cors }, { name: key-auth, config: { hide_credentials: true } }], - } - - { - name: rest-v1, - url: 'http://localhost:3000/', - routes: [{ name: rest-v1, strip_path: true, paths: [/rest/v1/] }], - plugins: [{ name: cors }, { name: key-auth, config: { hide_credentials: true } }], - } - - { - name: graphql-v1, - url: 'http://localhost:3000/rpc/graphql', - routes: [{ name: graphql-v1, strip_path: true, paths: [/graphql/v1] }], - plugins: - [ - { name: cors }, - { name: key-auth, config: { hide_credentials: true } }, - { - name: request-transformer, - config: { add: { headers: [Content-Profile:graphql_public] } }, - }, - ], - } - - { - name: admin-v1, - url: 'https://localhost:8085/', - routes: [{ name: admin-v1, strip_path: true, paths: [/admin/v1/] }], - plugins: [{ name: cors }, { name: key-auth, config: { hide_credentials: false } }], - } - - { - name: admin-v1-user-routes, - url: 'https://localhost:8085/privileged', - routes: [{ name: admin-v1-user-routes, strip_path: true, paths: [/customer/v1/privileged] }], - plugins: [{ name: cors }, { name: basic-auth, config: { hide_credentials: false } }], - } - - { - name: admin-v1-metrics, - url: 'https://localhost:8085/metrics/aggregated', - routes: [{ name: admin-v1-metrics, strip_path: true, paths: [/supabase-internal/metrics] }], - plugins: [{ name: cors }, { name: ip-restriction, config: { allow: [10.0.0.0/8] } }], - } -consumers: - - { username: anon-key, keyauth_credentials: [{ key: anon_key }] } - - { username: service_role-key, keyauth_credentials: [{ key: service_key }] } - - { username: supabase-admin-key, keyauth_credentials: [{ key: supabase_admin_key }] } -basicauth_credentials: - - consumer: service_role-key - username: 'service_role' - password: service_key -plugins: [] diff --git a/docker/all-in-one/etc/pgbouncer-custom/custom-overrides.ini b/docker/all-in-one/etc/pgbouncer-custom/custom-overrides.ini deleted file mode 100644 index e69de29bb..000000000 diff --git a/docker/all-in-one/etc/pgbouncer-custom/generated-optimizations.ini b/docker/all-in-one/etc/pgbouncer-custom/generated-optimizations.ini deleted file mode 100644 index e69de29bb..000000000 diff --git a/docker/all-in-one/etc/pgbouncer-custom/ssl-config.ini b/docker/all-in-one/etc/pgbouncer-custom/ssl-config.ini deleted file mode 100644 index 69a802500..000000000 --- a/docker/all-in-one/etc/pgbouncer-custom/ssl-config.ini +++ /dev/null @@ -1,4 +0,0 @@ -client_tls_sslmode = allow -client_tls_ca_file = /etc/ssl/certs/postgres/ca.crt -client_tls_key_file = /etc/ssl/private/server.key -client_tls_cert_file = /etc/ssl/certs/postgres/server.crt diff --git a/docker/all-in-one/etc/pgbouncer/pgbouncer.ini b/docker/all-in-one/etc/pgbouncer/pgbouncer.ini deleted file mode 100644 index 8f42ecf48..000000000 --- a/docker/all-in-one/etc/pgbouncer/pgbouncer.ini +++ /dev/null @@ -1,363 +0,0 @@ -;;; -;;; PgBouncer configuration file -;;; - -;; database name = connect string -;; -;; connect string params: -;; dbname= host= port= user= password= auth_user= -;; client_encoding= datestyle= timezone= -;; pool_size= reserve_pool= max_db_connections= -;; pool_mode= connect_query= application_name= -[databases] -* = host=localhost auth_user=pgbouncer - -;; foodb over Unix socket -;foodb = - -;; redirect bardb to bazdb on localhost -;bardb = host=localhost dbname=bazdb - -;; access to dest database will go with single user -;forcedb = host=localhost port=300 user=baz password=foo client_encoding=UNICODE datestyle=ISO connect_query='SELECT 1' - -;; use custom pool sizes -;nondefaultdb = pool_size=50 reserve_pool=10 - -;; use auth_user with auth_query if user not present in auth_file -;; auth_user must exist in auth_file -; foodb = auth_user=bar - -;; fallback connect string -;* = host=testserver - -;; User-specific configuration -[users] - -;user1 = pool_mode=transaction max_user_connections=10 - -;; Configuration section -[pgbouncer] - -;;; -;;; Administrative settings -;;; - -pidfile = /var/run/pgbouncer/pgbouncer.pid - -;;; -;;; Where to wait for clients -;;; - -;; IP address or * which means all IPs -listen_addr = 0.0.0.0 -listen_port = 6543 - -;; Unix socket is also used for -R. -;; On Debian it should be /var/run/postgresql -unix_socket_dir = /tmp -;unix_socket_mode = 0777 -;unix_socket_group = - -;;; -;;; TLS settings for accepting clients -;;; - -;; disable, allow, require, verify-ca, verify-full -;client_tls_sslmode = disable - -;; Path to file that contains trusted CA certs -;client_tls_ca_file = - -;; Private key and cert to present to clients. -;; Required for accepting TLS connections from clients. -;client_tls_key_file = -;client_tls_cert_file = - -;; fast, normal, secure, legacy, -;client_tls_ciphers = fast - -;; all, secure, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3 -;client_tls_protocols = secure - -;; none, auto, legacy -;client_tls_dheparams = auto - -;; none, auto, -;client_tls_ecdhcurve = auto - -;;; -;;; TLS settings for connecting to backend databases -;;; - -;; disable, allow, require, verify-ca, verify-full -;server_tls_sslmode = disable - -;; Path to that contains trusted CA certs -;server_tls_ca_file = - -;; Private key and cert to present to backend. -;; Needed only if backend server require client cert. -;server_tls_key_file = -;server_tls_cert_file = - -;; all, secure, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3 -;server_tls_protocols = secure - -;; fast, normal, secure, legacy, -;server_tls_ciphers = fast - -;;; -;;; Authentication settings -;;; - -;; any, trust, plain, md5, cert, hba, pam -auth_type = scram-sha-256 -auth_file = /etc/pgbouncer/userlist.txt - -;; Path to HBA-style auth config -;auth_hba_file = - -;; Query to use to fetch password from database. Result -;; must have 2 columns - username and password hash. -auth_query = SELECT * FROM pgbouncer.get_auth($1) - -;;; -;;; Users allowed into database 'pgbouncer' -;;; - -;; comma-separated list of users who are allowed to change settings -admin_users = pgbouncer - -;; comma-separated list of users who are just allowed to use SHOW command -stats_users = pgbouncer - -;;; -;;; Pooler personality questions -;;; - -;; When server connection is released back to pool: -;; session - after client disconnects (default) -;; transaction - after transaction finishes -;; statement - after statement finishes -pool_mode = transaction - -;; Query for cleaning connection immediately after releasing from -;; client. No need to put ROLLBACK here, pgbouncer does not reuse -;; connections where transaction is left open. -;server_reset_query = DISCARD ALL - -;; Whether server_reset_query should run in all pooling modes. If it -;; is off, server_reset_query is used only for session-pooling. -;server_reset_query_always = 0 - -;; Comma-separated list of parameters to ignore when given in startup -;; packet. Newer JDBC versions require the extra_float_digits here. -ignore_startup_parameters = extra_float_digits - -;; When taking idle server into use, this query is run first. -;server_check_query = select 1 - -;; If server was used more recently that this many seconds ago, -; skip the check query. Value 0 may or may not run in immediately. -;server_check_delay = 30 - -;; Close servers in session pooling mode after a RECONNECT, RELOAD, -;; etc. when they are idle instead of at the end of the session. -;server_fast_close = 0 - -;; Use as application_name on server. -;application_name_add_host = 0 - -;; Period for updating aggregated stats. -;stats_period = 60 - -;;; -;;; Connection limits -;;; - -;; Total number of clients that can connect -;max_client_conn = 100 - -;; Default pool size. 20 is good number when transaction pooling -;; is in use, in session pooling it needs to be the number of -;; max clients you want to handle at any moment -default_pool_size = 15 - -;; Minimum number of server connections to keep in pool. -;min_pool_size = 0 - -; how many additional connection to allow in case of trouble -;reserve_pool_size = 0 - -;; If a clients needs to wait more than this many seconds, use reserve -;; pool. -;reserve_pool_timeout = 5 - -;; Maximum number of server connections for a database -;max_db_connections = 0 - -;; Maximum number of server connections for a user -;max_user_connections = 0 - -;; If off, then server connections are reused in LIFO manner -;server_round_robin = 0 - -;;; -;;; Logging -;;; - -;; Syslog settings -;syslog = 0 -;syslog_facility = daemon -;syslog_ident = pgbouncer - -;; log if client connects or server connection is made -;log_connections = 1 - -;; log if and why connection was closed -;log_disconnections = 1 - -;; log error messages pooler sends to clients -;log_pooler_errors = 1 - -;; write aggregated stats into log -;log_stats = 1 - -;; Logging verbosity. Same as -v switch on command line. -;verbose = 0 - -;;; -;;; Timeouts -;;; - -;; Close server connection if its been connected longer. -;server_lifetime = 3600 - -;; Close server connection if its not been used in this time. Allows -;; to clean unnecessary connections from pool after peak. -;server_idle_timeout = 600 - -;; Cancel connection attempt if server does not answer takes longer. -;server_connect_timeout = 15 - -;; If server login failed (server_connect_timeout or auth failure) -;; then wait this many second. -;server_login_retry = 15 - -;; Dangerous. Server connection is closed if query does not return in -;; this time. Should be used to survive network problems, _not_ as -;; statement_timeout. (default: 0) -;query_timeout = 0 - -;; Dangerous. Client connection is closed if the query is not -;; assigned to a server in this time. Should be used to limit the -;; number of queued queries in case of a database or network -;; failure. (default: 120) -;query_wait_timeout = 120 - -;; Dangerous. Client connection is closed if no activity in this -;; time. Should be used to survive network problems. (default: 0) -;client_idle_timeout = 0 - -;; Disconnect clients who have not managed to log in after connecting -;; in this many seconds. -;client_login_timeout = 60 - -;; Clean automatically created database entries (via "*") if they stay -;; unused in this many seconds. -; autodb_idle_timeout = 3600 - -;; Close connections which are in "IDLE in transaction" state longer -;; than this many seconds. -;idle_transaction_timeout = 0 - -;; How long SUSPEND/-R waits for buffer flush before closing -;; connection. -;suspend_timeout = 10 - -;;; -;;; Low-level tuning options -;;; - -;; buffer for streaming packets -;pkt_buf = 4096 - -;; man 2 listen -;listen_backlog = 128 - -;; Max number pkt_buf to process in one event loop. -;sbuf_loopcnt = 5 - -;; Maximum PostgreSQL protocol packet size. -;max_packet_size = 2147483647 - -;; Set SO_REUSEPORT socket option -;so_reuseport = 0 - -;; networking options, for info: man 7 tcp - -;; Linux: Notify program about new connection only if there is also -;; data received. (Seconds to wait.) On Linux the default is 45, on -;; other OS'es 0. -;tcp_defer_accept = 0 - -;; In-kernel buffer size (Linux default: 4096) -;tcp_socket_buffer = 0 - -;; whether tcp keepalive should be turned on (0/1) -;tcp_keepalive = 1 - -;; The following options are Linux-specific. They also require -;; tcp_keepalive=1. - -;; Count of keepalive packets -;tcp_keepcnt = 0 - -;; How long the connection can be idle before sending keepalive -;; packets -;tcp_keepidle = 0 - -;; The time between individual keepalive probes -;tcp_keepintvl = 0 - -;; How long may transmitted data remain unacknowledged before TCP -;; connection is closed (in milliseconds) -;tcp_user_timeout = 0 - -;; DNS lookup caching time -;dns_max_ttl = 15 - -;; DNS zone SOA lookup period -;dns_zone_check_period = 0 - -;; DNS negative result caching time -;dns_nxdomain_ttl = 15 - -;; Custom resolv.conf file, to set custom DNS servers or other options -;; (default: empty = use OS settings) -;resolv_conf = /etc/pgbouncer/resolv.conf - -;;; -;;; Random stuff -;;; - -;; Hackish security feature. Helps against SQL injection: when PQexec -;; is disabled, multi-statement cannot be made. -;disable_pqexec = 0 - -;; Config file to use for next RELOAD/SIGHUP -;; By default contains config file from command line. -;conffile - -;; Windows service name to register as. job_name is alias for -;; service_name, used by some Skytools scripts. -;service_name = pgbouncer -;job_name = pgbouncer - -;; Read additional config from other file -;%include /etc/pgbouncer/pgbouncer-other.ini - -%include /etc/pgbouncer-custom/generated-optimizations.ini -%include /etc/pgbouncer-custom/custom-overrides.ini -# %include /etc/pgbouncer-custom/ssl-config.ini diff --git a/docker/all-in-one/etc/pgbouncer/userlist.txt b/docker/all-in-one/etc/pgbouncer/userlist.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/docker/all-in-one/etc/postgresql-custom/custom-overrides.conf b/docker/all-in-one/etc/postgresql-custom/custom-overrides.conf deleted file mode 100644 index e69de29bb..000000000 diff --git a/docker/all-in-one/etc/postgresql-custom/generated-optimizations.conf b/docker/all-in-one/etc/postgresql-custom/generated-optimizations.conf deleted file mode 100644 index e69de29bb..000000000 diff --git a/docker/all-in-one/etc/postgresql-custom/postgresql-platform-defaults.conf b/docker/all-in-one/etc/postgresql-custom/postgresql-platform-defaults.conf deleted file mode 100644 index e62a1de83..000000000 --- a/docker/all-in-one/etc/postgresql-custom/postgresql-platform-defaults.conf +++ /dev/null @@ -1,9 +0,0 @@ -# these get imported _after_ the user specified overrides -row_security = on -wal_level = logical -max_wal_senders = 10 -max_replication_slots = 5 -log_connections = on -statement_timeout = 120000 -jit = off -pgaudit.log = 'ddl' diff --git a/docker/all-in-one/etc/postgresql.schema.sql b/docker/all-in-one/etc/postgresql.schema.sql deleted file mode 100644 index 475b09bb9..000000000 --- a/docker/all-in-one/etc/postgresql.schema.sql +++ /dev/null @@ -1,16 +0,0 @@ -\set admin_pass `echo "${SUPABASE_ADMIN_PASSWORD:-$POSTGRES_PASSWORD}"` -\set pgrst_pass `echo "${AUTHENTICATOR_PASSWORD:-$POSTGRES_PASSWORD}"` -\set pgbouncer_pass `echo "${PGBOUNCER_PASSWORD:-$POSTGRES_PASSWORD}"` -\set auth_pass `echo "${SUPABASE_AUTH_ADMIN_PASSWORD:-$POSTGRES_PASSWORD}"` -\set storage_pass `echo "${SUPABASE_STORAGE_ADMIN_PASSWORD:-$POSTGRES_PASSWORD}"` -\set replication_pass `echo "${SUPABASE_REPLICATION_ADMIN_PASSWORD:-$POSTGRES_PASSWORD}"` -\set read_only_pass `echo "${SUPABASE_READ_ONLY_USER_PASSWORD:-$POSTGRES_PASSWORD}"` - -ALTER USER supabase_admin WITH PASSWORD :'admin_pass'; -ALTER USER authenticator WITH PASSWORD :'pgrst_pass'; -ALTER USER pgbouncer WITH PASSWORD :'pgbouncer_pass'; -ALTER USER supabase_auth_admin WITH PASSWORD :'auth_pass'; -ALTER USER supabase_storage_admin WITH PASSWORD :'storage_pass'; -ALTER USER supabase_replication_admin WITH PASSWORD :'replication_pass'; -ALTER ROLE supabase_read_only_user WITH PASSWORD :'read_only_pass'; -ALTER ROLE supabase_admin SET search_path TO "$user",public,auth,extensions; diff --git a/docker/all-in-one/etc/postgresql/logging.conf b/docker/all-in-one/etc/postgresql/logging.conf deleted file mode 100644 index b8d64da51..000000000 --- a/docker/all-in-one/etc/postgresql/logging.conf +++ /dev/null @@ -1,33 +0,0 @@ -# - Where to Log - - -log_destination = 'csvlog' # Valid values are combinations of - # stderr, csvlog, syslog, and eventlog, - # depending on platform. csvlog - # requires logging_collector to be on. - -# This is used when logging to stderr: -logging_collector = on # Enable capturing of stderr and csvlog - # into log files. Required to be on for - # csvlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -log_directory = '/var/log/postgresql' # directory where log files are written, - # can be absolute or relative to PGDATA -log_filename = 'postgresql.log' # log file name pattern, - # can include strftime() escapes -log_file_mode = 0640 # creation mode for log files, - # begin with 0 to use octal notation -log_rotation_age = 0 # Automatic rotation of logfiles will - # happen after that time. 0 disables. -log_rotation_size = 0 # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. -#log_truncate_on_rotation = off # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. diff --git a/docker/all-in-one/etc/postgresql/pg_hba.conf b/docker/all-in-one/etc/postgresql/pg_hba.conf deleted file mode 100755 index ec23777a2..000000000 --- a/docker/all-in-one/etc/postgresql/pg_hba.conf +++ /dev/null @@ -1,91 +0,0 @@ -# PostgreSQL Client Authentication Configuration File -# =================================================== -# -# Refer to the "Client Authentication" section in the PostgreSQL -# documentation for a complete description of this file. A short -# synopsis follows. -# -# This file controls: which hosts are allowed to connect, how clients -# are authenticated, which PostgreSQL user names they can use, which -# databases they can access. Records take one of these forms: -# -# local DATABASE USER METHOD [OPTIONS] -# host DATABASE USER ADDRESS METHOD [OPTIONS] -# hostssl DATABASE USER ADDRESS METHOD [OPTIONS] -# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS] -# hostgssenc DATABASE USER ADDRESS METHOD [OPTIONS] -# hostnogssenc DATABASE USER ADDRESS METHOD [OPTIONS] -# -# (The uppercase items must be replaced by actual values.) -# -# The first field is the connection type: "local" is a Unix-domain -# socket, "host" is either a plain or SSL-encrypted TCP/IP socket, -# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a -# non-SSL TCP/IP socket. Similarly, "hostgssenc" uses a -# GSSAPI-encrypted TCP/IP socket, while "hostnogssenc" uses a -# non-GSSAPI socket. -# -# DATABASE can be "all", "sameuser", "samerole", "replication", a -# database name, or a comma-separated list thereof. The "all" -# keyword does not match "replication". Access to replication -# must be enabled in a separate record (see example below). -# -# USER can be "all", a user name, a group name prefixed with "+", or a -# comma-separated list thereof. In both the DATABASE and USER fields -# you can also write a file name prefixed with "@" to include names -# from a separate file. -# -# ADDRESS specifies the set of hosts the record matches. It can be a -# host name, or it is made up of an IP address and a CIDR mask that is -# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that -# specifies the number of significant bits in the mask. A host name -# that starts with a dot (.) matches a suffix of the actual host name. -# Alternatively, you can write an IP address and netmask in separate -# columns to specify the set of hosts. Instead of a CIDR-address, you -# can write "samehost" to match any of the server's own IP addresses, -# or "samenet" to match any address in any subnet that the server is -# directly connected to. -# -# METHOD can be "trust", "reject", "md5", "password", "scram-sha-256", -# "gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert". -# Note that "password" sends passwords in clear text; "md5" or -# "scram-sha-256" are preferred since they send encrypted passwords. -# -# OPTIONS are a set of options for the authentication in the format -# NAME=VALUE. The available options depend on the different -# authentication methods -- refer to the "Client Authentication" -# section in the documentation for a list of which options are -# available for which authentication methods. -# -# Database and user names containing spaces, commas, quotes and other -# special characters must be quoted. Quoting one of the keywords -# "all", "sameuser", "samerole" or "replication" makes the name lose -# its special character, and just match a database or username with -# that name. -# -# This file is read on server startup and when the server receives a -# SIGHUP signal. If you edit the file on a running system, you have to -# SIGHUP the server for the changes to take effect, run "pg_ctl reload", -# or execute "SELECT pg_reload_conf()". -# -# Put your actual configuration here -# ---------------------------------- -# -# If you want to allow non-local connections, you need to add more -# "host" records. In that case you will also need to make PostgreSQL -# listen on a non-local interface via the listen_addresses -# configuration parameter, or via the -i or -h command line switches. - -# TYPE DATABASE USER ADDRESS METHOD - -# trust local connections -local all supabase_admin scram-sha-256 -local all all peer map=supabase_map -host all all 127.0.0.1/32 trust -host all all ::1/128 trust - -# IPv4 external connections -host all all 10.0.0.0/8 scram-sha-256 -host all all 172.16.0.0/12 scram-sha-256 -host all all 192.168.0.0/16 scram-sha-256 -host all all 0.0.0.0/0 scram-sha-256 diff --git a/docker/all-in-one/etc/postgrest/base.conf b/docker/all-in-one/etc/postgrest/base.conf deleted file mode 100644 index e5120ede6..000000000 --- a/docker/all-in-one/etc/postgrest/base.conf +++ /dev/null @@ -1,7 +0,0 @@ -server-port="pgrst_server_port" -admin-server-port="pgrst_admin_server_port" -db-schema="pgrst_db_schemas" -db-extra-search-path="pgrst_db_extra_search_path" -db-anon-role="pgrst_db_anon_role" -jwt-secret="pgrst_jwt_secret" -db-uri="postgres://authenticator@localhost:5432/postgres?application_name=postgrest" diff --git a/docker/all-in-one/etc/postgrest/bootstrap.sh b/docker/all-in-one/etc/postgrest/bootstrap.sh deleted file mode 100755 index 9ac21d201..000000000 --- a/docker/all-in-one/etc/postgrest/bootstrap.sh +++ /dev/null @@ -1,8 +0,0 @@ -#! /usr/bin/env bash -set -euo pipefail -set -x - -cd "$(dirname "$0")" -cat $@ > merged.conf - -/opt/postgrest merged.conf diff --git a/docker/all-in-one/etc/postgrest/generated.conf b/docker/all-in-one/etc/postgrest/generated.conf deleted file mode 100644 index e69de29bb..000000000 diff --git a/docker/all-in-one/etc/sudoers.d/adminapi b/docker/all-in-one/etc/sudoers.d/adminapi deleted file mode 100644 index ae2e4e11b..000000000 --- a/docker/all-in-one/etc/sudoers.d/adminapi +++ /dev/null @@ -1,25 +0,0 @@ -Cmnd_Alias KONG = /usr/bin/supervisorctl start services\:kong, /usr/bin/supervisorctl stop services\:kong, /usr/bin/supervisorctl restart services\:kong -Cmnd_Alias POSTGREST = /usr/bin/supervisorctl start services\:postgrest, /usr/bin/supervisorctl stop services\:postgrest, /usr/bin/supervisorctl restart services\:postgrest -Cmnd_Alias GOTRUE = /usr/bin/supervisorctl start services\:gotrue, /usr/bin/supervisorctl stop services\:gotrue, /usr/bin/supervisorctl restart services\:gotrue -Cmnd_Alias PGBOUNCER = /usr/bin/supervisorctl start pgbouncer, /usr/bin/supervisorctl stop pgbouncer, /usr/bin/supervisorctl restart pgbouncer - -%adminapi ALL= NOPASSWD: /root/grow_fs.sh -%adminapi ALL= NOPASSWD: /root/manage_readonly_mode.sh -%adminapi ALL= NOPASSWD: /etc/adminapi/pg_upgrade_scripts/prepare.sh -%adminapi ALL= NOPASSWD: /etc/adminapi/pg_upgrade_scripts/initiate.sh -%adminapi ALL= NOPASSWD: /etc/adminapi/pg_upgrade_scripts/complete.sh -%adminapi ALL= NOPASSWD: /etc/adminapi/pg_upgrade_scripts/check.sh -%adminapi ALL= NOPASSWD: /etc/adminapi/pg_upgrade_scripts/common.sh -%adminapi ALL= NOPASSWD: /etc/adminapi/pg_upgrade_scripts/pgsodium_getkey.sh -%adminapi ALL= NOPASSWD: /usr/bin/supervisorctl reread -%adminapi ALL= NOPASSWD: /usr/bin/supervisorctl update -%adminapi ALL= NOPASSWD: /usr/bin/supervisorctl restart postgresql -%adminapi ALL= NOPASSWD: /usr/bin/supervisorctl status postgresql -%adminapi ALL= NOPASSWD: /usr/bin/supervisorctl restart adminapi -%adminapi ALL= NOPASSWD: /usr/bin/supervisorctl restart services\:* -%adminapi ALL= NOPASSWD: /usr/sbin/nft -f /etc/nftables/supabase_managed.conf -%adminapi ALL= NOPASSWD: /usr/bin/admin-mgr -%adminapi ALL= NOPASSWD: KONG -%adminapi ALL= NOPASSWD: POSTGREST -%adminapi ALL= NOPASSWD: GOTRUE -%adminapi ALL= NOPASSWD: PGBOUNCER diff --git a/docker/all-in-one/etc/supa-shutdown/shutdown.conf b/docker/all-in-one/etc/supa-shutdown/shutdown.conf deleted file mode 100644 index 384b9357f..000000000 --- a/docker/all-in-one/etc/supa-shutdown/shutdown.conf +++ /dev/null @@ -1 +0,0 @@ -SHUTDOWN_IDLE_TIME_MINUTES= diff --git a/docker/all-in-one/etc/supervisor/db-only/adminapi.conf b/docker/all-in-one/etc/supervisor/db-only/adminapi.conf deleted file mode 100644 index 06db75257..000000000 --- a/docker/all-in-one/etc/supervisor/db-only/adminapi.conf +++ /dev/null @@ -1,9 +0,0 @@ -[program:adminapi] -command=/opt/supabase-admin-api -user=adminapi -autorestart=true -autostart=true -stdout_logfile=/var/log/services/adminapi.log -redirect_stderr=true -stdout_logfile_maxbytes=10MB -priority=50 diff --git a/docker/all-in-one/etc/supervisor/db-only/pg_egress_collect.conf b/docker/all-in-one/etc/supervisor/db-only/pg_egress_collect.conf deleted file mode 100644 index de166beab..000000000 --- a/docker/all-in-one/etc/supervisor/db-only/pg_egress_collect.conf +++ /dev/null @@ -1,9 +0,0 @@ -[program:pg_egress_collect] -command=/bin/bash -c "tcpdump -s 128 -Q out -nn -tt -vv -p -l 'tcp and (port 5432 or port 6543)' | perl /opt/pg_egress_collect/pg_egress_collect.pl" -user=root -autorestart=true -autostart=true -stdout_logfile=/var/log/services/pg_egress_collect.log -redirect_stderr=true -stdout_logfile_maxbytes=10MB -priority=50 diff --git a/docker/all-in-one/etc/supervisor/db-only/postgresql.conf b/docker/all-in-one/etc/supervisor/db-only/postgresql.conf deleted file mode 100644 index 99f224310..000000000 --- a/docker/all-in-one/etc/supervisor/db-only/postgresql.conf +++ /dev/null @@ -1,12 +0,0 @@ -[program:postgresql] -command=/usr/local/bin/postgres-entrypoint.sh postgres -D /etc/postgresql -user=postgres -stopsignal=INT -autorestart=true -autostart=true -priority=1 -# Inherit env vars from https://github.com/supabase/postgres/blob/develop/Dockerfile#L800 -environment=POSTGRES_PASSWORD="%(ENV_POSTGRES_PASSWORD)s",POSTGRES_HOST="%(ENV_POSTGRES_HOST)s" -stdout_logfile=/var/log/postgresql/init.log -redirect_stderr=true -stdout_logfile_maxbytes=10MB diff --git a/docker/all-in-one/etc/supervisor/db-only/supa-shutdown.conf b/docker/all-in-one/etc/supervisor/db-only/supa-shutdown.conf deleted file mode 100644 index 639a14486..000000000 --- a/docker/all-in-one/etc/supervisor/db-only/supa-shutdown.conf +++ /dev/null @@ -1,9 +0,0 @@ -[program:supa-shutdown] -command=/usr/local/bin/supa-shutdown.sh -user=root -autorestart=true -autostart=false -stdout_logfile=/var/log/services/supa-shutdown.log -redirect_stderr=true -stdout_logfile_maxbytes=10MB -priority=50 diff --git a/docker/all-in-one/etc/supervisor/services/exporter.conf b/docker/all-in-one/etc/supervisor/services/exporter.conf deleted file mode 100644 index 116dc7250..000000000 --- a/docker/all-in-one/etc/supervisor/services/exporter.conf +++ /dev/null @@ -1,10 +0,0 @@ -[program:exporter] -command=/opt/postgres_exporter/postgres_exporter --disable-settings-metrics --extend.query-path=/opt/postgres_exporter/queries.yml --disable-default-metrics -user=root -autorestart=true -autostart=true -environment=DATA_SOURCE_NAME="host=localhost dbname=postgres sslmode=disable user=supabase_admin pg_stat_statements.track=none application_name=postgres_exporter" -stdout_logfile=/var/log/services/exporter.log -redirect_stderr=true -stdout_logfile_maxbytes=10MB -priority=150 diff --git a/docker/all-in-one/etc/supervisor/services/fail2ban.conf b/docker/all-in-one/etc/supervisor/services/fail2ban.conf deleted file mode 100644 index 8000386dc..000000000 --- a/docker/all-in-one/etc/supervisor/services/fail2ban.conf +++ /dev/null @@ -1,9 +0,0 @@ -[program:fail2ban] -command=/usr/bin/fail2ban-client -f start -user=root -autorestart=true -autostart=true -stdout_logfile=/var/log/services/fail2ban.log -redirect_stderr=true -stdout_logfile_maxbytes=10MB -priority=200 diff --git a/docker/all-in-one/etc/supervisor/services/gotrue.conf b/docker/all-in-one/etc/supervisor/services/gotrue.conf deleted file mode 100644 index 8095cdec1..000000000 --- a/docker/all-in-one/etc/supervisor/services/gotrue.conf +++ /dev/null @@ -1,10 +0,0 @@ -[program:gotrue] -directory=/opt/gotrue -command=/opt/gotrue/gotrue --config /etc/gotrue.env -user=gotrue -startretries=30 -autorestart=true -autostart=true -stdout_logfile=/var/log/services/gotrue.log -redirect_stderr=true -stdout_logfile_maxbytes=10MB diff --git a/docker/all-in-one/etc/supervisor/services/group.conf b/docker/all-in-one/etc/supervisor/services/group.conf deleted file mode 100644 index ef6673d59..000000000 --- a/docker/all-in-one/etc/supervisor/services/group.conf +++ /dev/null @@ -1,3 +0,0 @@ -[group:services] -programs=gotrue,kong,postgrest -priority=100 diff --git a/docker/all-in-one/etc/supervisor/services/kong.conf b/docker/all-in-one/etc/supervisor/services/kong.conf deleted file mode 100644 index 906ec1a5e..000000000 --- a/docker/all-in-one/etc/supervisor/services/kong.conf +++ /dev/null @@ -1,9 +0,0 @@ -[program:kong] -command=/init/start-kong.sh -user=kong -autorestart=true -autostart=true -environment=KONG_NGINX_DAEMON="off" -stdout_logfile=/var/log/services/kong.log -redirect_stderr=true -stdout_logfile_maxbytes=10MB diff --git a/docker/all-in-one/etc/supervisor/services/pgbouncer.conf b/docker/all-in-one/etc/supervisor/services/pgbouncer.conf deleted file mode 100644 index 44fe93b5f..000000000 --- a/docker/all-in-one/etc/supervisor/services/pgbouncer.conf +++ /dev/null @@ -1,10 +0,0 @@ -[program:pgbouncer] -command=/usr/sbin/pgbouncer /etc/pgbouncer/pgbouncer.ini -user=pgbouncer -stopsignal=INT -autorestart=true -autostart=true -stdout_logfile=/var/log/services/pgbouncer.log -redirect_stderr=true -stdout_logfile_maxbytes=10MB -priority=150 diff --git a/docker/all-in-one/etc/supervisor/services/postgrest.conf b/docker/all-in-one/etc/supervisor/services/postgrest.conf deleted file mode 100644 index 874dd07b0..000000000 --- a/docker/all-in-one/etc/supervisor/services/postgrest.conf +++ /dev/null @@ -1,8 +0,0 @@ -[program:postgrest] -command=/etc/postgrest/bootstrap.sh /etc/postgrest/generated.conf /etc/postgrest/base.conf -user=postgrest -autorestart=true -autostart=true -stdout_logfile=/var/log/services/postgrest.log -redirect_stderr=true -stdout_logfile_maxbytes=10MB diff --git a/docker/all-in-one/etc/supervisor/supervisord.conf b/docker/all-in-one/etc/supervisor/supervisord.conf deleted file mode 100644 index b2604e201..000000000 --- a/docker/all-in-one/etc/supervisor/supervisord.conf +++ /dev/null @@ -1,170 +0,0 @@ -; Sample supervisor config file. -; -; For more information on the config file, please see: -; http://supervisord.org/configuration.html -; -; Notes: -; - Shell expansion ("~" or "$HOME") is not supported. Environment -; variables can be expanded using this syntax: "%(ENV_HOME)s". -; - Quotes around values are not supported, except in the case of -; the environment= options as shown below. -; - Comments must have a leading space: "a=b ;comment" not "a=b;comment". -; - Command will be truncated if it looks like a config file comment, e.g. -; "command=bash -c 'foo ; bar'" will truncate to "command=bash -c 'foo ". -; -; Warning: -; Paths throughout this example file use /tmp because it is available on most -; systems. You will likely need to change these to locations more appropriate -; for your system. Some systems periodically delete older files in /tmp. -; Notably, if the socket file defined in the [unix_http_server] section below -; is deleted, supervisorctl will be unable to connect to supervisord. - -[unix_http_server] -file=/tmp/supervisor.sock ; the path to the socket file -chmod=0760 ; socket file mode (default 0700) -chown=root:root ; socket file uid:gid owner -;username=user ; default is no username (open server) -;password=123 ; default is no password (open server) - -; Security Warning: -; The inet HTTP server is not enabled by default. The inet HTTP server is -; enabled by uncommenting the [inet_http_server] section below. The inet -; HTTP server is intended for use within a trusted environment only. It -; should only be bound to localhost or only accessible from within an -; isolated, trusted network. The inet HTTP server does not support any -; form of encryption. The inet HTTP server does not use authentication -; by default (see the username= and password= options to add authentication). -; Never expose the inet HTTP server to the public internet. - -;[inet_http_server] ; inet (TCP) server disabled by default -;port=127.0.0.1:9001 ; ip_address:port specifier, *:port for all iface -;username=user ; default is no username (open server) -;password=123 ; default is no password (open server) - -[supervisord] -logfile=/tmp/supervisord.log ; main log file; default $CWD/supervisord.log -logfile_maxbytes=50MB ; max main logfile bytes b4 rotation; default 50MB -logfile_backups=10 ; # of main logfile backups; 0 means none, default 10 -loglevel=info ; log level; default info; others: debug,warn,trace -pidfile=/tmp/supervisord.pid ; supervisord pidfile; default supervisord.pid -nodaemon=true ; start in foreground if true; default false -silent=false ; no logs to stdout if true; default false -minfds=1024 ; min. avail startup file descriptors; default 1024 -minprocs=200 ; min. avail process descriptors;default 200 -user=root ; setuid to this UNIX account at startup; recommended if root -;umask=022 ; process file creation umask; default 022 -;identifier=supervisor ; supervisord identifier, default is 'supervisor' -;directory=/tmp ; default is not to cd during start -;nocleanup=true ; don't clean up tempfiles at start; default false -;childlogdir=/tmp ; 'AUTO' child log dir, default $TEMP -;environment=KEY="value" ; key value pairs to add to environment -;strip_ansi=false ; strip ansi escape codes in logs; def. false - -; The rpcinterface:supervisor section must remain in the config file for -; RPC (supervisorctl/web interface) to work. Additional interfaces may be -; added by defining them in separate [rpcinterface:x] sections. - -[rpcinterface:supervisor] -supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface - -; The supervisorctl section configures how supervisorctl will connect to -; supervisord. configure it match the settings in either the unix_http_server -; or inet_http_server section. - -[supervisorctl] -serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket -;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket -;username=chris ; should be same as in [*_http_server] if set -;password=123 ; should be same as in [*_http_server] if set -;prompt=mysupervisor ; cmd line prompt (default "supervisor") -;history_file=~/.sc_history ; use readline history if available - -; The sample program section below shows all possible program subsection values. -; Create one or more 'real' program: sections to be able to control them under -; supervisor. - -;[program:theprogramname] -;command=/bin/cat ; the program (relative uses PATH, can take args) -;process_name=%(program_name)s ; process_name expr (default %(program_name)s) -;numprocs=1 ; number of processes copies to start (def 1) -;directory=/tmp ; directory to cwd to before exec (def no cwd) -;umask=022 ; umask for process (default None) -;priority=999 ; the relative start priority (default 999) -;autostart=true ; start at supervisord start (default: true) -;startsecs=1 ; # of secs prog must stay up to be running (def. 1) -;startretries=3 ; max # of serial start failures when starting (default 3) -;autorestart=unexpected ; when to restart if exited after running (def: unexpected) -;exitcodes=0 ; 'expected' exit codes used with autorestart (default 0) -;stopsignal=QUIT ; signal used to kill process (default TERM) -;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10) -;stopasgroup=false ; send stop signal to the UNIX process group (default false) -;killasgroup=false ; SIGKILL the UNIX process group (def false) -;user=chrism ; setuid to this UNIX account to run the program -;redirect_stderr=true ; redirect proc stderr to stdout (default false) -;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO -;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) -;stdout_logfile_backups=10 ; # of stdout logfile backups (0 means none, default 10) -;stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0) -;stdout_events_enabled=false ; emit events on stdout writes (default false) -;stdout_syslog=false ; send stdout to syslog with process name (default false) -;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO -;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) -;stderr_logfile_backups=10 ; # of stderr logfile backups (0 means none, default 10) -;stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0) -;stderr_events_enabled=false ; emit events on stderr writes (default false) -;stderr_syslog=false ; send stderr to syslog with process name (default false) -;environment=A="1",B="2" ; process environment additions (def no adds) -;serverurl=AUTO ; override serverurl computation (childutils) - -; The sample eventlistener section below shows all possible eventlistener -; subsection values. Create one or more 'real' eventlistener: sections to be -; able to handle event notifications sent by supervisord. - -;[eventlistener:theeventlistenername] -;command=/bin/eventlistener ; the program (relative uses PATH, can take args) -;process_name=%(program_name)s ; process_name expr (default %(program_name)s) -;numprocs=1 ; number of processes copies to start (def 1) -;events=EVENT ; event notif. types to subscribe to (req'd) -;buffer_size=10 ; event buffer queue size (default 10) -;directory=/tmp ; directory to cwd to before exec (def no cwd) -;umask=022 ; umask for process (default None) -;priority=-1 ; the relative start priority (default -1) -;autostart=true ; start at supervisord start (default: true) -;startsecs=1 ; # of secs prog must stay up to be running (def. 1) -;startretries=3 ; max # of serial start failures when starting (default 3) -;autorestart=unexpected ; autorestart if exited after running (def: unexpected) -;exitcodes=0 ; 'expected' exit codes used with autorestart (default 0) -;stopsignal=QUIT ; signal used to kill process (default TERM) -;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10) -;stopasgroup=false ; send stop signal to the UNIX process group (default false) -;killasgroup=false ; SIGKILL the UNIX process group (def false) -;user=chrism ; setuid to this UNIX account to run the program -;redirect_stderr=false ; redirect_stderr=true is not allowed for eventlisteners -;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO -;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) -;stdout_logfile_backups=10 ; # of stdout logfile backups (0 means none, default 10) -;stdout_events_enabled=false ; emit events on stdout writes (default false) -;stdout_syslog=false ; send stdout to syslog with process name (default false) -;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO -;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) -;stderr_logfile_backups=10 ; # of stderr logfile backups (0 means none, default 10) -;stderr_events_enabled=false ; emit events on stderr writes (default false) -;stderr_syslog=false ; send stderr to syslog with process name (default false) -;environment=A="1",B="2" ; process environment additions -;serverurl=AUTO ; override serverurl computation (childutils) - -; The sample group section below shows all possible group values. Create one -; or more 'real' group: sections to create "heterogeneous" process groups. - -;[group:thegroupname] -;programs=progname1,progname2 ; each refers to 'x' in [program:x] definitions -;priority=999 ; the relative start priority (default 999) - -; The [include] section can just contain the "files" setting. This -; setting can list multiple files (separated by whitespace or -; newlines). It can also contain wildcards. The filenames are -; interpreted as relative to this file. Included files *cannot* -; include files themselves. - -[include] -files = db-only/*.conf diff --git a/docker/all-in-one/etc/tmpfiles.d/pgbouncer.conf b/docker/all-in-one/etc/tmpfiles.d/pgbouncer.conf deleted file mode 100644 index d5d2cd49d..000000000 --- a/docker/all-in-one/etc/tmpfiles.d/pgbouncer.conf +++ /dev/null @@ -1,2 +0,0 @@ -# Directory for PostgreSQL sockets, lockfiles and stats tempfiles -d /run/pgbouncer 2775 pgbouncer postgres - - \ No newline at end of file diff --git a/docker/all-in-one/etc/vector/vector.yaml b/docker/all-in-one/etc/vector/vector.yaml deleted file mode 100644 index 0fdc99473..000000000 --- a/docker/all-in-one/etc/vector/vector.yaml +++ /dev/null @@ -1,264 +0,0 @@ -data_dir: /var/lib/vector -sources: - gotrue_log: - type: file - include: - - /var/log/services/gotrue.log - - postgrest_log: - type: file - include: - - /var/log/services/postgrest.log - - pgbouncer_log: - type: file - include: - - /var/log/services/pgbouncer.log - - postgres_log: - type: file - include: - - /var/log/postgresql/postgres*.csv - read_from: end - multiline: - start_pattern: '^20[0-9][0-9]-[0-1][0-9]-[0-3][0-9] [0-2][0-9]:[0-5][0-9]:[0-5][0-9].[0-9]{3} UTC,"' - mode: halt_before - condition_pattern: '^20[0-9][0-9]-[0-1][0-9]-[0-3][0-9] [0-2][0-9]:[0-5][0-9]:[0-5][0-9].[0-9]{3} UTC,"' - timeout_ms: 500 - -transforms: - csv_parse: - type: remap - inputs: - - postgres_log - source: |- - csv_data = parse_csv!(.message) - .metadata.parsed.timestamp = csv_data[0] - .metadata.parsed.user_name = csv_data[1] - .metadata.parsed.database_name = csv_data[2] - .metadata.parsed.process_id = to_int(csv_data[3]) ?? null - .metadata.parsed.connection_from = csv_data[4] - .metadata.parsed.session_id = csv_data[5] - .metadata.parsed.session_line_num = to_int(csv_data[6]) ?? null - .metadata.parsed.command_tag = csv_data[7] - .metadata.parsed.session_start_time = csv_data[8] - .metadata.parsed.virtual_transaction_id = csv_data[9] - .metadata.parsed.transaction_id = to_int(csv_data[10]) ?? null - .metadata.parsed.error_severity = csv_data[11] - .metadata.parsed.sql_state_code = csv_data[12] - .metadata.parsed.message = csv_data[13] - .metadata.parsed.detail = csv_data[14] - .metadata.parsed.hint = csv_data[15] - .metadata.parsed.internal_query = csv_data[16] - .metadata.parsed.internal_query_pos = to_int(csv_data[17]) ?? null - .metadata.parsed.context = csv_data[18] - .metadata.parsed.query = csv_data[19] - .metadata.parsed.query_pos = to_int(csv_data[20]) ?? null - .metadata.parsed.location = csv_data[21] - .metadata.parsed.application_name = csv_data[22] - .metadata.parsed.backend_type = csv_data[23] - .metadata.parsed.leader_pid = to_int(csv_data[24]) ?? null - .metadata.parsed.query_id = to_int(csv_data[25]) ?? null - - z_ts = replace!(.metadata.parsed.timestamp, " UTC", "Z") - iso8601_ts = replace(z_ts, " ", "T") - - .timestamp = iso8601_ts - - # Sends original csv log line duplicating data. Used for QA. - # .metadata.parsed_from = .message - - .message = del(.metadata.parsed.message) - .metadata.host = del(.host) - del(.file) - del(.source_type) - - drop_metrics: - type: filter - inputs: - - csv_parse - condition: > - .metadata.parsed.application_name != "postgres_exporter" && .metadata.parsed.application_name != "realtime_rls" && !contains!(.message, "disconnection: session time") - - add_project_ref: - type: add_fields - inputs: - - drop_metrics - fields: - project: {{ .ProjectRef }} - - auth_failures: - type: filter - inputs: - - postgres_log - condition: >- - contains!(.message, "password authentication failed for user") - - filter_pgbouncer_stats: - type: filter - inputs: - - pgbouncer_log - condition: >- - !starts_with!(.message, "stats:") && !starts_with!(.message, "kernel file descriptor limit") && !contains!(.message, "FIXME") - - filter_postgrest_stats: - type: filter - inputs: - - postgrest_log - condition: >- - !starts_with!(.message, "+") && !starts_with!(.message, "INFO:") && !contains!(.message, "Admin server listening") - - gotrue_to_object: - inputs: - - gotrue_log - type: remap - source: |2- - .project = "{{ .ProjectRef }}" - - .parsed, err = parse_json(.message) - if err == null { - .metadata = .parsed - .metadata.msg = .parsed.msg - .timestamp = del(.metadata.time) - } - del(.parsed) - .metadata.host = del(.host) - - del(.source_type) - del(.PRIORITY) - del(.SYSLOG_FACILITY) - del(.SYSLOG_IDENTIFIER) - del(._BOOT_ID) - del(._CAP_EFFECTIVE) - del(._CMDLINE) - del(._COMM) - del(._EXE) - del(._GID) - del(._MACHINE_ID) - del(._PID) - del(._SELINUX_CONTEXT) - del(._STREAM_ID) - del(._SYSTEMD_CGROUP) - del(._SYSTEMD_INVOCATION_ID) - del(._SYSTEMD_SLICE) - del(._SYSTEMD_UNIT) - del(._TRANSPORT) - del(._UID) - del(.__MONOTONIC_TIMESTAMP) - del(.__REALTIME_TIMESTAMP) - - postgrest_to_object: - inputs: - - filter_postgrest_stats - type: remap - source: |2- - .project = "{{ .ProjectRef }}" - - # removes timestamp embedded in log since Vector already sends it - .message = replace!(.message, r'^\d+/\w+/\d+:\d+:\d+:\d+\s\+\d+:\s', "") - .metadata.host = del(.host) - del(.source_type) - del(.PRIORITY) - del(.SYSLOG_FACILITY) - del(.SYSLOG_IDENTIFIER) - del(._BOOT_ID) - del(._CAP_EFFECTIVE) - del(._CMDLINE) - del(._COMM) - del(._EXE) - del(._GID) - del(._MACHINE_ID) - del(._PID) - del(._SELINUX_CONTEXT) - del(._STREAM_ID) - del(._SYSTEMD_CGROUP) - del(._SYSTEMD_INVOCATION_ID) - del(._SYSTEMD_SLICE) - del(._SYSTEMD_UNIT) - del(._TRANSPORT) - del(._UID) - del(.__MONOTONIC_TIMESTAMP) - del(.__REALTIME_TIMESTAMP) - - pgbouncer_to_object: - inputs: - - filter_pgbouncer_stats - type: remap - source: |2- - .project = "{{ .ProjectRef }}" - .metadata.host = del(.host) - del(.source_type) - del(.PRIORITY) - del(.SYSLOG_IDENTIFIER) - del(._BOOT_ID) - del(._CAP_EFFECTIVE) - del(._CMDLINE) - del(._COMM) - del(._EXE) - del(._GID) - del(._MACHINE_ID) - del(._PID) - del(._SELINUX_CONTEXT) - del(._SOURCE_REALTIME_TIMESTAMP) - del(._SYSTEMD_CGROUP) - del(._SYSTEMD_INVOCATION_ID) - del(._SYSTEMD_SLICE) - del(._SYSTEMD_UNIT) - del(._TRANSPORT) - del(._UID) - del(.__MONOTONIC_TIMESTAMP) - del(.__REALTIME_TIMESTAMP) -sinks: - http_gotrue: - type: "http" - inputs: - - gotrue_to_object - encoding: - codec: "json" - method: "post" - compression: none - request: - retry_max_duration_secs: 10 - uri: "https://{{ .LogflareHost }}/logs?api_key={{ .ApiKey }}&source={{ .GotrueSource }}" - - http_postgrest: - type: http - inputs: - - postgrest_to_object - encoding: - codec: "json" - method: "post" - compression: none - request: - retry_max_duration_secs: 10 - uri: "https://{{ .LogflareHost }}/logs?api_key={{ .ApiKey }}&source={{ .PostgrestSource }}" - - http_pgbouncer: - type: http - inputs: - - pgbouncer_to_object - encoding: - codec: json - compression: none - uri: "https://{{ .LogflareHost }}/logs?api_key={{ .ApiKey }}&source={{ .PgbouncerSource }}" - - http_postgres: - type: http - inputs: - - add_project_ref - encoding: - codec: "json" - method: "post" - compression: none - request: - retry_max_duration_secs: 10 - uri: "https://{{ .LogflareHost }}/logs?api_key={{ .ApiKey }}&source={{ .DbSource }}" - - file_postgres: - type: file - inputs: - - auth_failures - encoding: - codec: text - path: >- - /var/log/postgresql/auth-failures.csv diff --git a/docker/all-in-one/healthcheck.sh b/docker/all-in-one/healthcheck.sh deleted file mode 100755 index 49bc81377..000000000 --- a/docker/all-in-one/healthcheck.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -set -eou pipefail - -# database up -pg_isready -U postgres -h localhost -p 5432 - -if [ -f "/tmp/init.json" ]; then - ADMIN_API_KEY=${ADMIN_API_KEY:-$(jq -r '.["supabase_admin_key"]' /tmp/init.json)} -fi - -# adminapi up -if [ -d "$ADMIN_API_CERT_DIR" ]; then - curl -sSkf "https://localhost:$ADMIN_API_PORT/health" -H "apikey: $ADMIN_API_KEY" -else - curl -sSf "http://localhost:$ADMIN_API_PORT/health" -H "apikey: $ADMIN_API_KEY" -fi - -if [ "${POSTGRES_ONLY:-}" ]; then - exit 0 -fi - -# postgrest up -curl -sSfI "http://localhost:$PGRST_ADMIN_SERVER_PORT/ready" - -# gotrue up -curl -sSf "http://localhost:$GOTRUE_API_PORT/health" - -# kong up -kong health - -# pgbouncer up -printf \\0 > "/dev/tcp/localhost/$PGBOUNCER_PORT" - -# fail2ban up -fail2ban-client status - -# prometheus exporter up -curl -sSfI "http://localhost:$PGEXPORTER_PORT/metrics" - -# vector is up (if starting logflare) -# TODO: make this non-conditional once we set up local logflare for testinfra -if [ -n "${LOGFLARE_API_KEY:-}" ]; then - curl -sSfI "http://localhost:$VECTOR_API_PORT/health" -fi diff --git a/docker/all-in-one/init/configure-admin-mgr.sh b/docker/all-in-one/init/configure-admin-mgr.sh deleted file mode 100755 index b18cdbe74..000000000 --- a/docker/all-in-one/init/configure-admin-mgr.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -set -eou pipefail - -/usr/local/bin/configure-shim.sh /dist/admin-mgr /usr/bin/admin-mgr diff --git a/docker/all-in-one/init/configure-adminapi.sh b/docker/all-in-one/init/configure-adminapi.sh deleted file mode 100755 index fdda45e27..000000000 --- a/docker/all-in-one/init/configure-adminapi.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -set -eou pipefail - -ADMIN_API_CONF=/etc/adminapi/adminapi.yaml -touch /var/log/services/adminapi.log - -ADMINAPI_CUSTOM_DIR="${DATA_VOLUME_MOUNTPOINT}/etc/adminapi" - -/usr/local/bin/configure-shim.sh /dist/supabase-admin-api /opt/supabase-admin-api - -if [ "${DATA_VOLUME_MOUNTPOINT}" ]; then - mkdir -p "${ADMINAPI_CUSTOM_DIR}" - if [ ! -f "${CONFIGURED_FLAG_PATH}" ]; then - echo "Copying existing custom adminapi config from /etc/adminapi to ${ADMINAPI_CUSTOM_DIR}" - cp -R "/etc/adminapi/." "${ADMINAPI_CUSTOM_DIR}/" - fi - - rm -rf "/etc/adminapi" - ln -s "${ADMINAPI_CUSTOM_DIR}" "/etc/adminapi" - chown -R adminapi:adminapi "/etc/adminapi" - - chown -R adminapi:adminapi "${ADMINAPI_CUSTOM_DIR}" - chmod g+rx "${ADMINAPI_CUSTOM_DIR}" -fi - -if [ -f "${INIT_PAYLOAD_PATH:-}" ]; then - echo "init adminapi payload" - tar -xzvf "$INIT_PAYLOAD_PATH" -C / ./etc/adminapi/adminapi.yaml - chown adminapi:adminapi ./etc/adminapi/adminapi.yaml - - mkdir -p $ADMIN_API_CERT_DIR - tar -xzvf "$INIT_PAYLOAD_PATH" -C $ADMIN_API_CERT_DIR --strip-components 2 ./ssl/server.crt - tar -xzvf "$INIT_PAYLOAD_PATH" -C $ADMIN_API_CERT_DIR --strip-components 2 ./ssl/server.key - chown -R adminapi:root $ADMIN_API_CERT_DIR - chmod 700 -R $ADMIN_API_CERT_DIR -else - PROJECT_REF=${PROJECT_REF:-default} - PGBOUNCER_PASSWORD=${PGBOUNCER_PASSWORD:-$POSTGRES_PASSWORD} - SUPABASE_URL=${SUPABASE_URL:-https://api.supabase.io/system} - REPORTING_TOKEN=${REPORTING_TOKEN:-token} - - sed -i "s|{{ .JwtSecret }}|$JWT_SECRET|g" $ADMIN_API_CONF - sed -i "s|{{ .PgbouncerPassword }}|$PGBOUNCER_PASSWORD|g" $ADMIN_API_CONF - sed -i "s|{{ .ProjectRef }}|$PROJECT_REF|g" $ADMIN_API_CONF - sed -i "s|{{ .SupabaseUrl }}|$SUPABASE_URL|g" $ADMIN_API_CONF - sed -i "s|{{ .ReportingToken }}|$REPORTING_TOKEN|g" $ADMIN_API_CONF -fi - -# Allow adminapi to write to /etc and manage Postgres configs -chmod g+w /etc -chmod -R 0775 /etc/postgresql -chmod -R 0775 /etc/postgresql-custom - -# Update api port -sed -i "s|^port: .*$|port: ${ADMIN_API_PORT:-8085}|g" $ADMIN_API_CONF diff --git a/docker/all-in-one/init/configure-autoshutdown.sh b/docker/all-in-one/init/configure-autoshutdown.sh deleted file mode 100755 index 54a629b6f..000000000 --- a/docker/all-in-one/init/configure-autoshutdown.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -eou pipefail - -mkdir -p /etc/supa-shutdown - -AUTOSHUTDOWN_CUSTOM_DIR="${DATA_VOLUME_MOUNTPOINT}/supa-shutdown" -if [ "${DATA_VOLUME_MOUNTPOINT}" ]; then - mkdir -p "${AUTOSHUTDOWN_CUSTOM_DIR}" - - AUTOSHUTDOWN_CUSTOM_CONFIG_FILE_PATH="${AUTOSHUTDOWN_CUSTOM_DIR}/shutdown.conf" - if [ ! -f "${AUTOSHUTDOWN_CUSTOM_CONFIG_FILE_PATH}" ]; then - echo "Copying existing custom shutdown config from /etc/supa-shutdown to ${AUTOSHUTDOWN_CUSTOM_CONFIG_FILE_PATH}" - cp "/etc/supa-shutdown/shutdown.conf" "${AUTOSHUTDOWN_CUSTOM_CONFIG_FILE_PATH}" - fi - - rm -f "/etc/supa-shutdown/shutdown.conf" - ln -s "${AUTOSHUTDOWN_CUSTOM_CONFIG_FILE_PATH}" "/etc/supa-shutdown/shutdown.conf" - chown -R adminapi:adminapi "/etc/supa-shutdown/shutdown.conf" - chown -R adminapi:adminapi "${AUTOSHUTDOWN_CUSTOM_CONFIG_FILE_PATH}" -fi diff --git a/docker/all-in-one/init/configure-exporter.sh b/docker/all-in-one/init/configure-exporter.sh deleted file mode 100755 index 93498c4e6..000000000 --- a/docker/all-in-one/init/configure-exporter.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -set -eou pipefail - -touch /var/log/services/exporter.log - diff --git a/docker/all-in-one/init/configure-fail2ban.sh b/docker/all-in-one/init/configure-fail2ban.sh deleted file mode 100755 index 39b0a27a6..000000000 --- a/docker/all-in-one/init/configure-fail2ban.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -set -eou pipefail - -mkdir -p /var/run/fail2ban -touch /var/log/services/fail2ban.log -touch /var/log/postgresql/auth-failures.csv diff --git a/docker/all-in-one/init/configure-gotrue.sh b/docker/all-in-one/init/configure-gotrue.sh deleted file mode 100755 index fc586b932..000000000 --- a/docker/all-in-one/init/configure-gotrue.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -set -eou pipefail - -touch /var/log/services/gotrue.log - -/usr/local/bin/configure-shim.sh /dist/gotrue /opt/gotrue/gotrue - -sed -i "s|api_external_url|${API_EXTERNAL_URL:-http://localhost}|g" /etc/gotrue.env -sed -i "s|gotrue_api_host|${GOTRUE_API_HOST:-0.0.0.0}|g" /etc/gotrue.env -sed -i "s|gotrue_site_url|$GOTRUE_SITE_URL|g" /etc/gotrue.env -sed -i "s|gotrue_jwt_secret|$JWT_SECRET|g" /etc/gotrue.env - -if [ "${DATA_VOLUME_MOUNTPOINT}" ]; then - GOTRUE_CUSTOM_CONFIG_FILE_PATH="${DATA_VOLUME_MOUNTPOINT}/etc/gotrue.env" - if [ ! -f "${CONFIGURED_FLAG_PATH}" ]; then - echo "Copying existing GoTrue config from /etc/gotrue.env to ${GOTRUE_CUSTOM_CONFIG_FILE_PATH}" - cp "/etc/gotrue.env" "${GOTRUE_CUSTOM_CONFIG_FILE_PATH}" - fi - - rm -f "/etc/gotrue.env" - ln -s "${GOTRUE_CUSTOM_CONFIG_FILE_PATH}" "/etc/gotrue.env" - chown -R adminapi:adminapi "/etc/gotrue.env" - - chown -R adminapi:adminapi "${GOTRUE_CUSTOM_CONFIG_FILE_PATH}" - chmod g+rx "${GOTRUE_CUSTOM_CONFIG_FILE_PATH}" -fi - -if [ -f "${INIT_PAYLOAD_PATH:-}" ]; then - echo "init gotrue payload" - tar -xzvf "$INIT_PAYLOAD_PATH" -C / ./etc/gotrue.env - chown -R adminapi:adminapi /etc/gotrue.env -fi diff --git a/docker/all-in-one/init/configure-kong.sh b/docker/all-in-one/init/configure-kong.sh deleted file mode 100755 index 5b475678c..000000000 --- a/docker/all-in-one/init/configure-kong.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -set -eou pipefail - -KONG_CONF=/etc/kong/kong.yml -touch /var/log/services/kong.log - -if [ -f "${INIT_PAYLOAD_PATH:-}" ]; then - echo "init kong payload" - # Setup ssl termination - tar -xzvf "$INIT_PAYLOAD_PATH" -C / ./etc/kong/ - chown -R adminapi:adminapi ./etc/kong/kong.yml - chown -R adminapi:adminapi ./etc/kong/*pem - echo "ssl_cipher_suite = intermediate" >> /etc/kong/kong.conf - echo "ssl_cert = /etc/kong/fullChain.pem" >> /etc/kong/kong.conf - echo "ssl_cert_key = /etc/kong/privKey.pem" >> /etc/kong/kong.conf -else - # Default gateway config - export KONG_DNS_ORDER=LAST,A,CNAME - export KONG_PROXY_ERROR_LOG=syslog:server=unix:/dev/log - export KONG_ADMIN_ERROR_LOG=syslog:server=unix:/dev/log -fi - -# Inject project specific configuration -sed -i -e "s|anon_key|$ANON_KEY|g" \ - -e "s|service_key|$SERVICE_ROLE_KEY|g" \ - -e "s|supabase_admin_key|$ADMIN_API_KEY|g" \ - $KONG_CONF - -# Update kong ports -sed -i "s|:80 |:$KONG_HTTP_PORT |g" /etc/kong/kong.conf -sed -i "s|:443 |:$KONG_HTTPS_PORT |g" /etc/kong/kong.conf diff --git a/docker/all-in-one/init/configure-pg_egress_collect.sh b/docker/all-in-one/init/configure-pg_egress_collect.sh deleted file mode 100755 index c58f3635d..000000000 --- a/docker/all-in-one/init/configure-pg_egress_collect.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -set -eou pipefail - -PG_EGRESS_COLLECT_FILE=/tmp/pg_egress_collect.txt - -if [ "${DATA_VOLUME_MOUNTPOINT:-}" != "" ]; then - touch "${DATA_VOLUME_MOUNTPOINT}/pg_egress_collect.txt" - ln -s "${DATA_VOLUME_MOUNTPOINT}/pg_egress_collect.txt" $PG_EGRESS_COLLECT_FILE -fi diff --git a/docker/all-in-one/init/configure-pgbouncer.sh b/docker/all-in-one/init/configure-pgbouncer.sh deleted file mode 100755 index b2bebe28a..000000000 --- a/docker/all-in-one/init/configure-pgbouncer.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -set -eou pipefail - -touch /var/log/services/pgbouncer.log - -mkdir -p /var/run/pgbouncer -chown pgbouncer:postgres /var/run/pgbouncer - -PGBOUNCER_CONF=/etc/pgbouncer/pgbouncer.ini - -if [ -f "${INIT_PAYLOAD_PATH:-}" ]; then - echo "init pgbouncer payload" - sed -i -E "s|^# (%include /etc/pgbouncer-custom/ssl-config.ini)$|\1|g" $PGBOUNCER_CONF - - tar -xzvf "$INIT_PAYLOAD_PATH" -C /etc/pgbouncer/ --strip-components 3 ./etc/pgbouncer/userlist.txt - chown -R pgbouncer:pgbouncer /etc/pgbouncer/userlist.txt -fi - -if [ "${DATA_VOLUME_MOUNTPOINT}" ]; then - /opt/supabase-admin-api optimize pgbouncer --destination-config-file-path /etc/pgbouncer-custom/generated-optimizations.ini - - # Preserve pgbouncer configs across restarts - PGBOUNCER_DIR="${DATA_VOLUME_MOUNTPOINT}/etc/pgbouncer" - PGBOUNCER_CUSTOM_DIR="${DATA_VOLUME_MOUNTPOINT}/etc/pgbouncer-custom" - - mkdir -p "${PGBOUNCER_DIR}" - mkdir -p "${PGBOUNCER_CUSTOM_DIR}" - - if [ ! -f "${CONFIGURED_FLAG_PATH}" ]; then - echo "Copying existing custom pgbouncer config from /etc/pgbouncer-custom to ${PGBOUNCER_CUSTOM_DIR}" - cp -R "/etc/pgbouncer-custom/." "${PGBOUNCER_CUSTOM_DIR}/" - cp -R "/etc/pgbouncer/." "${PGBOUNCER_DIR}/" - fi - - rm -rf "/etc/pgbouncer-custom" - ln -s "${PGBOUNCER_CUSTOM_DIR}" "/etc/pgbouncer-custom" - chown -R pgbouncer:pgbouncer "/etc/pgbouncer-custom" - chown -R pgbouncer:pgbouncer "${PGBOUNCER_CUSTOM_DIR}" - chmod -R g+rx "${PGBOUNCER_CUSTOM_DIR}" - - rm -rf "/etc/pgbouncer" - ln -s "${PGBOUNCER_DIR}" "/etc/pgbouncer" - chown -R pgbouncer:pgbouncer "/etc/pgbouncer" - chown -R pgbouncer:pgbouncer "${PGBOUNCER_DIR}" - chmod -R g+rx "${PGBOUNCER_DIR}" -fi diff --git a/docker/all-in-one/init/configure-postgrest.sh b/docker/all-in-one/init/configure-postgrest.sh deleted file mode 100755 index 418e7bb9f..000000000 --- a/docker/all-in-one/init/configure-postgrest.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -set -eou pipefail - -touch /var/log/services/postgrest.log - -# Default in-database config -sed -i "s|pgrst_server_port|${PGRST_SERVER_PORT:-3000}|g" /etc/postgrest/base.conf -sed -i "s|pgrst_admin_server_port|${PGRST_ADMIN_SERVER_PORT:-3001}|g" /etc/postgrest/base.conf -sed -i "s|pgrst_db_schemas|${PGRST_DB_SCHEMAS:-public,storage,graphql_public}|g" /etc/postgrest/base.conf -sed -i "s|pgrst_db_extra_search_path|${PGRST_DB_SCHEMAS:-public,extensions}|g" /etc/postgrest/base.conf -sed -i "s|pgrst_db_anon_role|${PGRST_DB_ANON_ROLE:-anon}|g" /etc/postgrest/base.conf -sed -i "s|pgrst_jwt_secret|$JWT_SECRET|g" /etc/postgrest/base.conf - -/usr/local/bin/configure-shim.sh /dist/postgrest /opt/postgrest - -if [ "${DATA_VOLUME_MOUNTPOINT}" ]; then - POSTGREST_CUSTOM_DIR="${DATA_VOLUME_MOUNTPOINT}/etc/postgrest" - mkdir -p "${POSTGREST_CUSTOM_DIR}" - if [ ! -f "${CONFIGURED_FLAG_PATH}" ]; then - echo "Copying existing custom PostgREST config from /etc/postgrest/ to ${POSTGREST_CUSTOM_DIR}" - cp -R "/etc/postgrest/." "${POSTGREST_CUSTOM_DIR}/" - fi - - rm -rf "/etc/postgrest" - ln -s "${POSTGREST_CUSTOM_DIR}" "/etc/postgrest" - chown -R postgrest:postgrest "/etc/postgrest" - - chown -R postgrest:postgrest "${POSTGREST_CUSTOM_DIR}" - chmod g+rx "${POSTGREST_CUSTOM_DIR}" -fi - -if [ -f "${INIT_PAYLOAD_PATH:-}" ]; then - echo "init postgrest payload" - tar -xzvf "$INIT_PAYLOAD_PATH" -C / ./etc/postgrest/base.conf - chown -R postgrest:postgrest /etc/postgrest -fi - -PGRST_CONF=/etc/postgrest/generated.conf - -/opt/supabase-admin-api optimize postgrest --destination-config-file-path $PGRST_CONF -cat /etc/postgrest/base.conf >> $PGRST_CONF diff --git a/docker/all-in-one/init/configure-vector.sh b/docker/all-in-one/init/configure-vector.sh deleted file mode 100755 index 98444b0e6..000000000 --- a/docker/all-in-one/init/configure-vector.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -set -eou pipefail - -VECTOR_CONF=/etc/vector/vector.yaml -touch /var/log/services/vector.log - -if [ -f "${INIT_PAYLOAD_PATH:-}" ]; then - echo "init vector payload" - tar -xzvf "$INIT_PAYLOAD_PATH" -C /etc/vector/ --strip-components 2 ./tmp/init.json - PROJECT_REF=$(jq -r '.["project_ref"]' /etc/vector/init.json) - LOGFLARE_DB_SOURCE=$(jq -r '.["logflare_db_source"]' /etc/vector/init.json) - LOGFLARE_GOTRUE_SOURCE=$(jq -r '.["logflare_gotrue_source"]' /etc/vector/init.json) - LOGFLARE_POSTGREST_SOURCE=$(jq -r '.["logflare_postgrest_source"]' /etc/vector/init.json) - LOGFLARE_PGBOUNCER_SOURCE=$(jq -r '.["logflare_pgbouncer_source"]' /etc/vector/init.json) - LOGFLARE_API_KEY=$(jq -r '.["logflare_api_key"]' /etc/vector/init.json) -fi - -# Exit early if not starting logflare -if [ -z "${LOGFLARE_API_KEY:-}" ]; then - echo "Skipped starting vector: missing LOGFLARE_API_KEY" - exit 0 -fi - -# Add vector to support both db-only and services config -cat < /etc/supervisor/services/vector.conf - -[program:vector] -command=/usr/bin/vector --config-yaml /etc/vector/vector.yaml -user=root -autorestart=true -stdout_logfile=/var/log/services/vector.log -redirect_stderr=true -stdout_logfile_maxbytes=10MB -priority=250 - -EOF - -VECTOR_API_PORT=${VECTOR_API_PORT:-9001} -PROJECT_REF=${PROJECT_REF:-default} -LOGFLARE_HOST=${LOGFLARE_HOST:-api.logflare.app} -LOGFLARE_DB_SOURCE=${LOGFLARE_DB_SOURCE:-postgres.logs} -LOGFLARE_GOTRUE_SOURCE=${LOGFLARE_GOTRUE_SOURCE:-gotrue.logs.prod} -LOGFLARE_POSTGREST_SOURCE=${LOGFLARE_POSTGREST_SOURCE:-postgREST.logs.prod} -LOGFLARE_PGBOUNCER_SOURCE=${LOGFLARE_PGBOUNCER_SOURCE:-pgbouncer.logs.prod} - -sed -i "s|{{ .ApiPort }}|$VECTOR_API_PORT|g" $VECTOR_CONF -sed -i "s|{{ .ProjectRef }}|$PROJECT_REF|g" $VECTOR_CONF -sed -i "s|{{ .LogflareHost }}|$LOGFLARE_HOST|g" $VECTOR_CONF -sed -i "s|{{ .ApiKey }}|$LOGFLARE_API_KEY|g" $VECTOR_CONF -sed -i "s|{{ .DbSource }}|$LOGFLARE_DB_SOURCE|g" $VECTOR_CONF -sed -i "s|{{ .GotrueSource }}|$LOGFLARE_GOTRUE_SOURCE|g" $VECTOR_CONF -sed -i "s|{{ .PostgrestSource }}|$LOGFLARE_POSTGREST_SOURCE|g" $VECTOR_CONF -sed -i "s|{{ .PgbouncerSource }}|$LOGFLARE_PGBOUNCER_SOURCE|g" $VECTOR_CONF diff --git a/docker/all-in-one/init/start-kong.sh b/docker/all-in-one/init/start-kong.sh deleted file mode 100755 index 7418d26c4..000000000 --- a/docker/all-in-one/init/start-kong.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -eou pipefail - -# In the event of a restart, properly stop any running kong instances first -# Confirmed by running /usr/local/bin/kong health -trap '/usr/local/bin/kong quit' EXIT -/usr/local/bin/kong start diff --git a/docker/all-in-one/opt/pg_egress_collect/pg_egress_collect.pl b/docker/all-in-one/opt/pg_egress_collect/pg_egress_collect.pl deleted file mode 100644 index 2acc98aa6..000000000 --- a/docker/all-in-one/opt/pg_egress_collect/pg_egress_collect.pl +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env perl - -# This script receive tcpdump output through STDIN and does: -# -# 1. extract outgoing TCP packet length on the 1st non-loopback device port 5432 and 6543 -# 2. sum the length up to one minute -# 3. save the total length to file (default is /tmp/pg_egress_collect.txt) per minute -# -# Usage: -# -# tcpdump -s 128 -Q out -nn -tt -vv -p -l 'tcp and (port 5432 or port 6543)' | perl pg_egress_collect.pl -o /tmp/output.txt -# - -use POSIX; -use List::Util qw(sum); -use Getopt::Long 'HelpMessage'; -use IO::Async::Loop; -use IO::Async::Stream; -use IO::Async::Timer::Periodic; - -use strict; -use warnings; - -# total captured packets lenth in a time frame -my $captured_len = 0; - -# extract tcp packet length captured by tcpdump -# -# Sample input lines: -# -# 1674013833.940253 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60) -# 10.112.101.122.5432 > 220.235.16.223.62599: Flags [S.], cksum 0x5de3 (incorrect -> 0x63da), seq 2314200657, ack 2071735457, win 62643, options [mss 8961,sackOK,TS val 3358598837 ecr 1277499190,nop,wscale 7], length 0 -# 1674013833.989257 IP (tos 0x0, ttl 64, id 24975, offset 0, flags [DF], proto TCP (6), length 52) -# 10.112.101.122.5432 > 220.235.16.223.62599: Flags [.], cksum 0x5ddb (incorrect -> 0xa25b), seq 1, ack 9, win 490, options [nop,nop,TS val 3358598885 ecr 1277499232], length 0 -sub extract_packet_length { - my ($line) = @_; - - #print("debug: >> " . $line); - - if ($line =~ /^\s+\d+\.\d+\.\d+\.\d+\..*, length (\d+)$/) { - # extract tcp packet length and add it up - my $len = $1; - $captured_len += $len; - } -} - -# write total length to file -sub write_file { - my ($output) = @_; - - my $now = strftime "%F %T", localtime time; - print "[$now] write captured len $captured_len to $output\n"; - - open(my $fh, "+>", $output) or die "Could not open file '$output' $!"; - print $fh "$captured_len"; - close($fh) or die "Could not write file '$output' $!"; -} - -# main -sub main { - # get arguments - GetOptions( - "interval:i" => \(my $interval = 60), - "output:s" => \(my $output = "/tmp/pg_egress_collect.txt"), - "help" => sub { HelpMessage(0) }, - ) or HelpMessage(1); - - my $loop = IO::Async::Loop->new; - - # tcpdump extractor - my $extractor = IO::Async::Stream->new_for_stdin( - on_read => sub { - my ($self, $buffref, $eof) = @_; - - while($$buffref =~ s/^(.*\n)//) { - my $line = $1; - extract_packet_length($line); - } - - return 0; - }, - ); - - # schedule file writer per minute - my $writer = IO::Async::Timer::Periodic->new( - interval => $interval, - on_tick => sub { - write_file($output); - - # reset total captured length - $captured_len = 0; - }, - ); - $writer->start; - - print "pg_egress_collect started, egress data will be saved to $output at interval $interval seconds.\n"; - - $loop->add($extractor); - $loop->add($writer); - $loop->run; -} - -main(); - -__END__ - -=head1 NAME - -pg_egress_collect.pl - collect egress from tcpdump output, extract TCP packet length, aggregate in specified interval and write to output file. - -=head1 SYNOPSIS - -pg_egress_collect.pl [-i interval] [-o output] - -Options: - - -i, --interval interval - output file write interval, in seconds, default is 60 seconds - - -o, --output output - output file path, default is /tmp/pg_egress_collect.txt - - -h, --help - print this help message - -=cut diff --git a/docker/all-in-one/opt/postgres_exporter/queries.yml b/docker/all-in-one/opt/postgres_exporter/queries.yml deleted file mode 100644 index 543268b3a..000000000 --- a/docker/all-in-one/opt/postgres_exporter/queries.yml +++ /dev/null @@ -1,311 +0,0 @@ -pg_database: - master: true - cache_seconds: 60 - query: | - select sum(size_b) / (1024 * 1024) as size_mb - from (select sum(pg_database_size(pg_database.datname)) as size_b - from pg_database - union all - select sum(size) as size_b - from pg_ls_waldir()) s; - metrics: - - size_mb: - usage: "GAUGE" - description: "Disk space used by the database" - -pg_stat_bgwriter: - master: true - cache_seconds: 60 - query: | - select checkpoints_timed as checkpoints_timed_total, - checkpoints_req as checkpoints_req_total, - checkpoint_write_time as checkpoint_write_time_total, - checkpoint_sync_time as checkpoint_sync_time_total, - buffers_checkpoint as buffers_checkpoint_total, - buffers_clean as buffers_clean_total, - maxwritten_clean as maxwritten_clean_total, - buffers_backend as buffers_backend_total, - buffers_backend_fsync as buffers_backend_fsync_total, - buffers_alloc as buffers_alloc_total, - stats_reset - from pg_stat_bgwriter - metrics: - - checkpoints_timed_total: - usage: "COUNTER" - description: "Scheduled checkpoints performed" - - checkpoints_req_total: - usage: "COUNTER" - description: "Requested checkpoints performed" - - checkpoint_write_time_total: - usage: "COUNTER" - description: "Time spent writing checkpoint files to disk" - - checkpoint_sync_time_total: - usage: "COUNTER" - description: "Time spent synchronizing checkpoint files to disk" - - buffers_checkpoint_total: - usage: "COUNTER" - description: "Buffers written during checkpoints" - - buffers_clean_total: - usage: "COUNTER" - description: "Buffers written by bg writter" - - maxwritten_clean_total: - usage: "COUNTER" - description: "Number of times bg writer stopped a cleaning scan because it had written too many buffers" - - buffers_backend_total: - usage: "COUNTER" - description: "Buffers written directly by a backend" - - buffers_backend_fsync_total: - usage: "COUNTER" - description: "fsync calls executed by a backend directly" - - buffers_alloc_total: - usage: "COUNTER" - description: "Buffers allocated" - - stats_reset: - usage: "COUNTER" - description: "Most recent stat reset time" - -pg_stat_database: - master: true - cache_seconds: 60 - query: | - SELECT sum(numbackends) as num_backends, - sum(xact_commit) as xact_commit_total, - sum(xact_rollback) as xact_rollback_total, - sum(blks_read) as blks_read_total, - sum(blks_hit) as blks_hit_total, - sum(tup_returned) as tup_returned_total, - sum(tup_fetched) as tup_fetched_total, - sum(tup_inserted) as tup_inserted_total, - sum(tup_updated) as tup_updated_total, - sum(tup_deleted) as tup_deleted_total, - sum(conflicts) as conflicts_total, - sum(temp_files) as temp_files_total, - sum(temp_bytes) as temp_bytes_total, - sum(deadlocks) as deadlocks_total, - max(stats_reset) as most_recent_reset - FROM pg_stat_database - metrics: - - num_backends: - usage: "GAUGE" - description: "The number of active backends" - - xact_commit_total: - usage: "COUNTER" - description: "Transactions committed" - - xact_rollback_total: - usage: "COUNTER" - description: "Transactions rolled back" - - blks_read_total: - usage: "COUNTER" - description: "Number of disk blocks read" - - blks_hit_total: - usage: "COUNTER" - description: "Disk blocks found in buffer cache" - - tup_returned_total: - usage: "COUNTER" - description: "Rows returned by queries" - - tup_fetched_total: - usage: "COUNTER" - description: "Rows fetched by queries" - - tup_inserted_total: - usage: "COUNTER" - description: "Rows inserted" - - tup_updated_total: - usage: "COUNTER" - description: "Rows updated" - - tup_deleted_total: - usage: "COUNTER" - description: "Rows deleted" - - conflicts_total: - usage: "COUNTER" - description: "Queries canceled due to conflicts with recovery" - - temp_files_total: - usage: "COUNTER" - description: "Temp files created by queries" - - temp_bytes_total: - usage: "COUNTER" - description: "Temp data written by queries" - - deadlocks_total: - usage: "COUNTER" - description: "Deadlocks detected" - - most_recent_reset: - usage: "COUNTER" - description: "The most recent time one of the databases had its statistics reset" - -pg_stat_database_conflicts: - master: true - cache_seconds: 60 - query: | - SELECT sum(confl_tablespace) as confl_tablespace_total, - sum(confl_lock) as confl_lock_total, - sum(confl_snapshot) as confl_snapshot_total, - sum(confl_bufferpin) as confl_bufferpin_total, - sum(confl_deadlock) as confl_deadlock_total - from pg_stat_database_conflicts - metrics: - - confl_tablespace_total: - usage: "COUNTER" - description: "Queries cancelled due to dropped tablespaces" - - confl_lock_total: - usage: "COUNTER" - description: "Queries cancelled due to lock timeouts" - - confl_snapshot_total: - usage: "COUNTER" - description: "Queries cancelled due to old snapshots" - - confl_bufferpin_total: - usage: "COUNTER" - description: "Queries cancelled due to pinned buffers" - - confl_deadlock_total: - usage: "COUNTER" - description: "Queries cancelled due to deadlocks" - -pg_stat_statements: - master: true - cache_seconds: 60 - query: "SELECT sum(calls) as total_queries, sum(total_exec_time / 1000) as total_time_seconds FROM extensions.pg_stat_statements t1 JOIN pg_database t3 ON (t1.dbid=t3.oid)" - metrics: - - total_queries: - usage: "COUNTER" - description: "Number of times executed" - - total_time_seconds: - usage: "COUNTER" - description: "Total time spent, in seconds" - -auth_users: - master: true - cache_seconds: 60 - query: "select count(id) as user_count from auth.users" - metrics: - - user_count: - usage: "GAUGE" - description: "Number of users in the project db" - -auth_stats: - master: true - cache_seconds: 3600 - query: | - select - count(*) filter ( - where payload ->> 'action' = 'user_invited' - or (payload ->> 'action' in ('user_confirmation_requested', 'user_recovery_requested') - and payload ->> 'actor_username' like '%@%') - ) as total_auth_emails, - count(*) filter ( - where payload ->> 'action' in ('user_confirmation_requested', 'user_recovery_requested') - and payload ->> 'actor_username' not like '%@%' - ) as total_auth_texts - from - auth.audit_log_entries - metrics: - - total_auth_emails: - usage: "COUNTER" - description: "Total number of auth emails sent" - - total_auth_texts: - usage: "COUNTER" - description: "Total number of auth texts sent" - -realtime: - master: true - cache_seconds: 60 - query: "select count(1) as postgres_changes_total_subscriptions, count(distinct subscription_id) as postgres_changes_client_subscriptions from realtime.subscription" - metrics: - - postgres_changes_total_subscriptions: - usage: "GAUGE" - description: "Total subscription records listening for Postgres changes" - - postgres_changes_client_subscriptions: - usage: "GAUGE" - description: "Client subscriptions listening for Postgres changes" - -replication: - master: true - cache_seconds: 60 - query: "SELECT slot_name, pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn) AS realtime_lag_bytes, active AS realtime_slot_status FROM pg_replication_slots WHERE slot_name LIKE ANY (ARRAY['realtime', 'realtime_rls', 'supabase_realtime_replication_slot%'])" - metrics: - - realtime_slot_name: - usage: "LABEL" - description: "Replication Slot Name for Realtime" - - realtime_lag_bytes: - usage: "GAUGE" - description: "Replication Lag for Realtime" - - realtime_slot_status: - usage: "GAUGE" - description: "Replication Slot Active Status" - -storage: - master: true - cache_seconds: 60 - query: "select sum(size) / (1024 * 1024) as storage_size_mb from storage.get_size_by_bucket()" - metrics: - - storage_size_mb: - usage: "GAUGE" - description: "The total size used for all storage buckets, in mb" - -supabase_usage_metrics: - # pg_stat_statements collects metrics from all databases on the cluster, so querying just the master db should be sufficient - master: true - cache_seconds: 60 - query: | - select sum(calls) as user_queries_total - from extensions.pg_stat_statements - where query <> 'SELECT version()' - and query <> 'BEGIN ISOLATION LEVEL READ COMMITTED READ ONLY' - and query <> 'COMMIT' - and query <> 'SET client_encoding = ''UTF8''' - and query <> 'SET client_min_messages TO WARNING' - and query <> 'LISTEN "ddl_command_end"' - and query <> 'LISTEN "pgrst"' - and query <> 'SELECT * FROM migrations ORDER BY id' - and query <> 'SELECT COUNT(*) = $1 FROM pg_publication WHERE pubname = $2' - and query <> 'SELECT COUNT(*) >= $1 FROM pg_replication_slots WHERE slot_name = $2' - and query <> 'SELECT EXISTS (SELECT schema_migrations.* FROM schema_migrations AS schema_migrations WHERE version = $1)' - and query <> 'SELECT current_setting($1)::integer, current_setting($2)' - and query <> 'SELECT pg_advisory_unlock($1)' - and query <> 'SELECT pg_try_advisory_lock($1)' - and query <> 'SELECT slot_name, pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn) FROM pg_replication_slots' - and query <> 'SELECT typname::text, oid::int4, typarray::int4 FROM pg_type WHERE typname IN ($1,$2) ORDER BY typname' - and query <> 'select * from schema_migrations' - and query <> 'set local schema ''''' - and query <> 'SELECT SUM(pg_database_size(pg_database.datname)) / ($1 * $2) as size_mb FROM pg_database' - and query not like 'select set_config(%' - and query not like '%LATERAL (SELECT * FROM pg_namespace WHERE pg_namespace.oid = other.relnamespace) AS ns2%' - and query not like '%LEFT JOIN (pg_collation co JOIN pg_namespace nco ON co.collnamespace = nco.oid)%' - and query not like '%LEFT JOIN pg_description as d ON d.objoid = p.oid%' - and query not like '%LEFT JOIN pg_description as d on d.objoid = c.oid%' - and query not like '%-- CTE to replace information_schema.key_column_usage to remove owner limit%' - and query not like '%join pg_namespace sch on sch.oid = tbl.relnamespace%' - and query not like '%select setdatabase, unnest(setconfig) as setting from pg_catalog.pg_db_role_setting%' - and lower(trim(regexp_replace(regexp_replace(query, E'\n', ' ', 'g'), E'\\s+', ' ', 'g'))) not in - ('with rows as ( select id from net.http_request_queue order by id limit $1 ) delete from net.http_request_queue q using rows where q.id = rows.id returning q.id, q.method, q.url, timeout_milliseconds, array(select key || $2 || value from jsonb_each_text(q.headers)), q.body', - 'with rows as ( select ctid from net._http_response where created < now() - $1 order by created limit $2 ) delete from net._http_response r using rows where r.ctid = rows.ctid', - 'select exists ( select $2 from pg_catalog.pg_class c where c.relname = $1 and c.relkind = $3 )', - 'select description from pg_namespace n left join pg_description d on d.objoid = n.oid where n.nspname = $1', - 'select concat(schemaname, $1, tablename, $2, policyname) as policy from pg_policies order by 1 desc', - 'select concat(table_schema, $1, table_name) as table from information_schema.tables where table_schema not like $2 and table_schema <> $3 order by 1 desc', - 'select concat(conrelid::regclass, $1, conname) as fk from pg_constraint where contype = $2 order by 1 desc', - 'select datname from pg_database where datallowconn = $1 order by oid asc') - and query <> 'insert into schema_migrations (version) values ($1)' - -- temporarily included for older versions of pg_net - and query not like 'SELECT%FROM net.http_request_queue%' - and query not like 'DELETE FROM net.http_request_queue%' - and query not like '%source: project usage%' - metrics: - - user_queries_total: - usage: "COUNTER" - description: "The total number of user queries executed" - -pg_settings: - master: true - cache-seconds: 30 - query: "SELECT COUNT(*) as default_transaction_read_only FROM pg_settings WHERE name = 'default_transaction_read_only' AND setting = 'on';" - metrics: - - default_transaction_read_only: - usage: "GAUGE" - description: "Default transaction mode set to read only" - -pg_status: - master: true - cache-seconds: 60 - query: "SELECT CASE WHEN pg_is_in_recovery() = false THEN 0 ELSE 1 END as in_recovery" - metrics: - - in_recovery: - usage: "GAUGE" - description: "Database in recovery" diff --git a/docker/all-in-one/postgres-entrypoint.sh b/docker/all-in-one/postgres-entrypoint.sh deleted file mode 100755 index 04e447ea4..000000000 --- a/docker/all-in-one/postgres-entrypoint.sh +++ /dev/null @@ -1,358 +0,0 @@ -#!/usr/bin/env bash - -# Downloaded from https://github.com/docker-library/postgres/raw/master/15/bullseye/docker-entrypoint.sh -# Changes needed to make adminapi able to read the recovery.signal file: -# -44: chmod 00700 "$PGDATA" || : -# +44: chmod 00750 "$PGDATA" || : -# -# We're already including the original file in the base postgres Docker image. - -set -Eeo pipefail - -# usage: file_env VAR [DEFAULT] -# ie: file_env 'XYZ_DB_PASSWORD' 'example' -# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of -# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) -file_env() { - local var="$1" - local fileVar="${var}_FILE" - local def="${2:-}" - if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then - printf >&2 'error: both %s and %s are set (but are exclusive)\n' "$var" "$fileVar" - exit 1 - fi - local val="$def" - if [ "${!var:-}" ]; then - val="${!var}" - elif [ "${!fileVar:-}" ]; then - val="$(< "${!fileVar}")" - fi - export "$var"="$val" - unset "$fileVar" -} - -# check to see if this file is being run or sourced from another script -_is_sourced() { - # https://unix.stackexchange.com/a/215279 - [ "${#FUNCNAME[@]}" -ge 2 ] \ - && [ "${FUNCNAME[0]}" = '_is_sourced' ] \ - && [ "${FUNCNAME[1]}" = 'source' ] -} - -# used to create initial postgres directories and if run as root, ensure ownership to the "postgres" user -docker_create_db_directories() { - local user; user="$(id -u)" - - mkdir -p "$PGDATA" - # ignore failure since there are cases where we can't chmod (and PostgreSQL might fail later anyhow - it's picky about permissions of this directory) - chmod 00750 "$PGDATA" || : - - # ignore failure since it will be fine when using the image provided directory; see also https://github.com/docker-library/postgres/pull/289 - mkdir -p /var/run/postgresql || : - chmod 03775 /var/run/postgresql || : - - # Create the transaction log directory before initdb is run so the directory is owned by the correct user - if [ -n "${POSTGRES_INITDB_WALDIR:-}" ]; then - mkdir -p "$POSTGRES_INITDB_WALDIR" - if [ "$user" = '0' ]; then - find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' + - fi - chmod 700 "$POSTGRES_INITDB_WALDIR" - fi - - # allow the container to be started with `--user` - if [ "$user" = '0' ]; then - find "$PGDATA" \! -user postgres -exec chown postgres '{}' + - find /var/run/postgresql \! -user postgres -exec chown postgres '{}' + - fi -} - -# initialize empty PGDATA directory with new database via 'initdb' -# arguments to `initdb` can be passed via POSTGRES_INITDB_ARGS or as arguments to this function -# `initdb` automatically creates the "postgres", "template0", and "template1" dbnames -# this is also where the database user is created, specified by `POSTGRES_USER` env -docker_init_database_dir() { - # "initdb" is particular about the current user existing in "/etc/passwd", so we use "nss_wrapper" to fake that if necessary - # see https://github.com/docker-library/postgres/pull/253, https://github.com/docker-library/postgres/issues/359, https://cwrap.org/nss_wrapper.html - local uid; uid="$(id -u)" - if ! getent passwd "$uid" &> /dev/null; then - # see if we can find a suitable "libnss_wrapper.so" (https://salsa.debian.org/sssd-team/nss-wrapper/-/commit/b9925a653a54e24d09d9b498a2d913729f7abb15) - local wrapper - for wrapper in {/usr,}/lib{/*,}/libnss_wrapper.so; do - if [ -s "$wrapper" ]; then - NSS_WRAPPER_PASSWD="$(mktemp)" - NSS_WRAPPER_GROUP="$(mktemp)" - export LD_PRELOAD="$wrapper" NSS_WRAPPER_PASSWD NSS_WRAPPER_GROUP - local gid; gid="$(id -g)" - printf 'postgres:x:%s:%s:PostgreSQL:%s:/bin/false\n' "$uid" "$gid" "$PGDATA" > "$NSS_WRAPPER_PASSWD" - printf 'postgres:x:%s:\n' "$gid" > "$NSS_WRAPPER_GROUP" - break - fi - done - fi - - if [ -n "${POSTGRES_INITDB_WALDIR:-}" ]; then - set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@" - fi - - # --pwfile refuses to handle a properly-empty file (hence the "\n"): https://github.com/docker-library/postgres/issues/1025 - eval 'initdb --username="$POSTGRES_USER" --pwfile=<(printf "%s\n" "$POSTGRES_PASSWORD") '"$POSTGRES_INITDB_ARGS"' "$@"' - - # unset/cleanup "nss_wrapper" bits - if [[ "${LD_PRELOAD:-}" == */libnss_wrapper.so ]]; then - rm -f "$NSS_WRAPPER_PASSWD" "$NSS_WRAPPER_GROUP" - unset LD_PRELOAD NSS_WRAPPER_PASSWD NSS_WRAPPER_GROUP - fi -} - -# print large warning if POSTGRES_PASSWORD is long -# error if both POSTGRES_PASSWORD is empty and POSTGRES_HOST_AUTH_METHOD is not 'trust' -# print large warning if POSTGRES_HOST_AUTH_METHOD is set to 'trust' -# assumes database is not set up, ie: [ -z "$DATABASE_ALREADY_EXISTS" ] -docker_verify_minimum_env() { - # check password first so we can output the warning before postgres - # messes it up - if [ "${#POSTGRES_PASSWORD}" -ge 100 ]; then - cat >&2 <<-'EOWARN' - - WARNING: The supplied POSTGRES_PASSWORD is 100+ characters. - - This will not work if used via PGPASSWORD with "psql". - - https://www.postgresql.org/message-id/flat/E1Rqxp2-0004Qt-PL%40wrigleys.postgresql.org (BUG #6412) - https://github.com/docker-library/postgres/issues/507 - - EOWARN - fi - if [ -z "$POSTGRES_PASSWORD" ] && [ 'trust' != "$POSTGRES_HOST_AUTH_METHOD" ]; then - # The - option suppresses leading tabs but *not* spaces. :) - cat >&2 <<-'EOE' - Error: Database is uninitialized and superuser password is not specified. - You must specify POSTGRES_PASSWORD to a non-empty value for the - superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run". - - You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all - connections without a password. This is *not* recommended. - - See PostgreSQL documentation about "trust": - https://www.postgresql.org/docs/current/auth-trust.html - EOE - exit 1 - fi - if [ 'trust' = "$POSTGRES_HOST_AUTH_METHOD" ]; then - cat >&2 <<-'EOWARN' - ******************************************************************************** - WARNING: POSTGRES_HOST_AUTH_METHOD has been set to "trust". This will allow - anyone with access to the Postgres port to access your database without - a password, even if POSTGRES_PASSWORD is set. See PostgreSQL - documentation about "trust": - https://www.postgresql.org/docs/current/auth-trust.html - In Docker's default configuration, this is effectively any other - container on the same system. - - It is not recommended to use POSTGRES_HOST_AUTH_METHOD=trust. Replace - it with "-e POSTGRES_PASSWORD=password" instead to set a password in - "docker run". - ******************************************************************************** - EOWARN - fi -} - -# usage: docker_process_init_files [file [file [...]]] -# ie: docker_process_init_files /always-initdb.d/* -# process initializer files, based on file extensions and permissions -docker_process_init_files() { - # psql here for backwards compatibility "${psql[@]}" - psql=( docker_process_sql ) - - printf '\n' - local f - for f; do - case "$f" in - *.sh) - # https://github.com/docker-library/postgres/issues/450#issuecomment-393167936 - # https://github.com/docker-library/postgres/pull/452 - if [ -x "$f" ]; then - printf '%s: running %s\n' "$0" "$f" - "$f" - else - printf '%s: sourcing %s\n' "$0" "$f" - . "$f" - fi - ;; - *.sql) printf '%s: running %s\n' "$0" "$f"; docker_process_sql -f "$f"; printf '\n' ;; - *.sql.gz) printf '%s: running %s\n' "$0" "$f"; gunzip -c "$f" | docker_process_sql; printf '\n' ;; - *.sql.xz) printf '%s: running %s\n' "$0" "$f"; xzcat "$f" | docker_process_sql; printf '\n' ;; - *.sql.zst) printf '%s: running %s\n' "$0" "$f"; zstd -dc "$f" | docker_process_sql; printf '\n' ;; - *) printf '%s: ignoring %s\n' "$0" "$f" ;; - esac - printf '\n' - done -} - -# Execute sql script, passed via stdin (or -f flag of pqsl) -# usage: docker_process_sql [psql-cli-args] -# ie: docker_process_sql --dbname=mydb <<<'INSERT ...' -# ie: docker_process_sql -f my-file.sql -# ie: docker_process_sql > "$PGDATA/pg_hba.conf" -} - -# start socket-only postgresql server for setting up or running scripts -# all arguments will be passed along as arguments to `postgres` (via pg_ctl) -docker_temp_server_start() { - if [ "$1" = 'postgres' ]; then - shift - fi - - # internal start of server in order to allow setup using psql client - # does not listen on external TCP/IP and waits until start finishes - set -- "$@" -c listen_addresses='' -p "${PGPORT:-5432}" - - PGUSER="${PGUSER:-$POSTGRES_USER}" \ - pg_ctl -D "$PGDATA" \ - -o "$(printf '%q ' "$@")" \ - -w start -} - -# stop postgresql server after done setting up user and running scripts -docker_temp_server_stop() { - PGUSER="${PGUSER:-postgres}" \ - pg_ctl -D "$PGDATA" -m fast -w stop -} - -# check arguments for an option that would cause postgres to stop -# return true if there is one -_pg_want_help() { - local arg - for arg; do - case "$arg" in - # postgres --help | grep 'then exit' - # leaving out -C on purpose since it always fails and is unhelpful: - # postgres: could not access the server configuration file "/var/lib/postgresql/data/postgresql.conf": No such file or directory - -'?'|--help|--describe-config|-V|--version) - return 0 - ;; - esac - done - return 1 -} - -_main() { - # if first arg looks like a flag, assume we want to run postgres server - if [ "${1:0:1}" = '-' ]; then - set -- postgres "$@" - fi - - if [ "$1" = 'postgres' ] && ! _pg_want_help "$@"; then - docker_setup_env - # setup data directories and permissions (when run as root) - docker_create_db_directories - if [ "$(id -u)" = '0' ]; then - # then restart script as postgres user - exec gosu postgres "$BASH_SOURCE" "$@" - fi - - # only run initialization on an empty data directory - if [ -z "$DATABASE_ALREADY_EXISTS" ]; then - docker_verify_minimum_env - - # check dir permissions to reduce likelihood of half-initialized database - ls /docker-entrypoint-initdb.d/ > /dev/null - - docker_init_database_dir - pg_setup_hba_conf "$@" - - # PGPASSWORD is required for psql when authentication is required for 'local' connections via pg_hba.conf and is otherwise harmless - # e.g. when '--auth=md5' or '--auth-local=md5' is used in POSTGRES_INITDB_ARGS - export PGPASSWORD="${PGPASSWORD:-$POSTGRES_PASSWORD}" - docker_temp_server_start "$@" - - docker_setup_db - docker_process_init_files /docker-entrypoint-initdb.d/* - - docker_temp_server_stop - unset PGPASSWORD - - cat <<-'EOM' - - PostgreSQL init process complete; ready for start up. - - EOM - else - cat <<-'EOM' - - PostgreSQL Database directory appears to contain a database; Skipping initialization - - EOM - fi - fi - - exec "$@" -} - -if ! _is_sourced; then - _main "$@" -fi diff --git a/docker/all-in-one/shutdown.sh b/docker/all-in-one/shutdown.sh deleted file mode 100755 index 7f5bd0145..000000000 --- a/docker/all-in-one/shutdown.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/sh - -# This script provides a method of shutting down the machine/container when the database has been idle -# for a certain amount of time (configurable via the MAX_IDLE_TIME_MINUTES env var) -# -# It checks for any active (non-idle) connections and for any connections which have been idle for more than MAX_IDLE_TIME_MINUTES. -# If there are no active connections and no idle connections, it then checks if the last disconnection event happened more than MAX_IDLE_TIME_MINUTES ago. -# -# If all of these conditions are met, then Postgres is shut down, allowing it to wrap up any pending transactions (such as WAL shippipng) and gracefully exit. -# To terminate the machine/container, a SIGTERM signal is sent to the top-level process (supervisord) which will then shut down all other processes and exit. - -DEFAULT_MAX_IDLE_TIME_MINUTES=${MAX_IDLE_TIME_MINUTES:-5} -CONFIG_FILE_PATH=${CONFIG_FILE_PATH:-/etc/supa-shutdown/shutdown.conf} - -run_sql() { - psql -h localhost -U supabase_admin -d postgres "$@" -} - -check_activity() { - pg_isready -h localhost > /dev/null 2>&1 || (echo "Postgres is not ready yet" && exit 1) - - QUERY=$(cat </dev/null || echo 0) - NOW=$(date +%s) - TIME_SINCE_LAST_DISCONNECT="$((NOW - LAST_DISCONNECT_TIME))" - - if [ $TIME_SINCE_LAST_DISCONNECT -gt "$((MAX_IDLE_TIME_MINUTES * 60))" ]; then - echo "$(date): No active connections for $MAX_IDLE_TIME_MINUTES minutes. Shutting down." - - supervisorctl stop postgresql - - # Postgres ships the latest WAL file using archive_command during shutdown, in a blocking operation - # This is to ensure that the WAL file is shipped, just in case - sleep 1 - - /usr/bin/admin-mgr lsn-checkpoint-push || echo "Failed to push LSN checkpoint" - - kill -s TERM "$(supervisorctl pid)" - fi -} - -# Enable logging of disconnections so the script can check when the last disconnection happened -run_sql -c "ALTER SYSTEM SET log_disconnections = 'on';" -run_sql -c "SELECT pg_reload_conf();" - -sleep $((DEFAULT_MAX_IDLE_TIME_MINUTES * 60)) -while true; do - if [ -f "$CONFIG_FILE_PATH" ]; then - source "$CONFIG_FILE_PATH" - - if [ -z "$SHUTDOWN_IDLE_TIME_MINUTES" ]; then - MAX_IDLE_TIME_MINUTES="$DEFAULT_MAX_IDLE_TIME_MINUTES" - else - MAX_IDLE_TIME_MINUTES="$SHUTDOWN_IDLE_TIME_MINUTES" - fi - else - MAX_IDLE_TIME_MINUTES="$DEFAULT_MAX_IDLE_TIME_MINUTES" - fi - - check_activity - sleep 30 -done diff --git a/docker/nix/Dockerfile b/docker/nix/Dockerfile new file mode 100644 index 000000000..226907953 --- /dev/null +++ b/docker/nix/Dockerfile @@ -0,0 +1,16 @@ +FROM nixpkgs/nix-flakes + +RUN echo "substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com" >> /etc/nix/nix.conf + +RUN echo "trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=%" >> /etc/nix/nix.conf + + +USER $USER + +RUN mkdir -p /workspace + +COPY ./ /workspace + +RUN chmod +x /workspace/docker/nix/build_nix.sh + +RUN chown -R $USER:$USER /workspace \ No newline at end of file diff --git a/docker/nix/build_nix.sh b/docker/nix/build_nix.sh new file mode 100644 index 000000000..efaafbe89 --- /dev/null +++ b/docker/nix/build_nix.sh @@ -0,0 +1,40 @@ +#!/bin/env bash +set -eou pipefail + +nix --version +if [ -d "/workspace" ]; then + cd /workspace +fi + +SYSTEM=$(nix-instantiate --eval -E builtins.currentSystem | tr -d '"') + +nix build .#checks.$SYSTEM.psql_15 -L --no-link +nix build .#checks.$SYSTEM.psql_orioledb-17 -L --no-link +nix build .#checks.$SYSTEM.psql_17 -L --no-link +nix build .#psql_15/bin -o psql_15 -L +nix build .#psql_orioledb-17/bin -o psql_orioledb_17 -L +nix build .#psql_17/bin -o psql_17 -L +nix build .#wal-g-2 -o wal-g-2 -L +nix build .#wal-g-3 -o wal-g-3 -L + +# Copy to S3 +nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./wal-g-2 +nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./wal-g-3 +nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./psql_15 +nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./psql_orioledb_17 +nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./psql_17 + +if [ "$SYSTEM" = "aarch64-linux" ]; then + nix build .#postgresql_15_debug -o ./postgresql_15_debug + nix build .#postgresql_15_src -o ./postgresql_15_src + nix build .#postgresql_orioledb-17_debug -o ./postgresql_orioledb-17_debug + nix build .#postgresql_orioledb-17_src -o ./postgresql_orioledb-17_src + nix build .#postgresql_17_debug -o ./postgresql_17_debug + nix build .#postgresql_17_src -o ./postgresql_17_src + nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_15_debug-debug + nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_15_src + nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_orioledb-17_debug-debug + nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_orioledb-17_src + nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_17_debug-debug + nix copy --to s3://nix-postgres-artifacts?secret-key=nix-secret-key ./postgresql_17_src +fi diff --git a/ebssurrogate/files/unit-tests/unit-test-01.sql b/ebssurrogate/files/unit-tests/unit-test-01.sql deleted file mode 100644 index 0feb70e8b..000000000 --- a/ebssurrogate/files/unit-tests/unit-test-01.sql +++ /dev/null @@ -1,33 +0,0 @@ -BEGIN; -CREATE EXTENSION IF NOT EXISTS pgtap; -SELECT plan(8); - --- Check installed extensions -SELECT extensions_are( - ARRAY[ - 'plpgsql', - 'pg_stat_statements', - 'pgsodium', - 'pgtap', - 'pg_graphql', - 'pgcrypto', - 'pgjwt', - 'uuid-ossp', - 'supabase_vault' - ] -); - - --- Check schemas exists -SELECT has_schema('pg_toast'); -SELECT has_schema('pg_catalog'); -SELECT has_schema('information_schema'); -SELECT has_schema('public'); - --- Check that service_role can execute certain pgsodium functions -SELECT function_privs_are('pgsodium', 'crypto_aead_det_decrypt', array['bytea', 'bytea', 'uuid', 'bytea'], 'service_role', array['EXECUTE']); -SELECT function_privs_are('pgsodium', 'crypto_aead_det_encrypt', array['bytea', 'bytea', 'uuid', 'bytea'], 'service_role', array['EXECUTE']); -SELECT function_privs_are('pgsodium', 'crypto_aead_det_keygen', array[]::text[], 'service_role', array['EXECUTE']); - -SELECT * from finish(); -ROLLBACK; diff --git a/ebssurrogate/scripts/chroot-bootstrap.sh b/ebssurrogate/scripts/chroot-bootstrap-nix.sh similarity index 73% rename from ebssurrogate/scripts/chroot-bootstrap.sh rename to ebssurrogate/scripts/chroot-bootstrap-nix.sh index a30a806af..cda6bd2aa 100755 --- a/ebssurrogate/scripts/chroot-bootstrap.sh +++ b/ebssurrogate/scripts/chroot-bootstrap-nix.sh @@ -25,9 +25,6 @@ fi function update_install_packages { source /etc/os-release - if [ "${UBUNTU_CODENAME}" = "bionic" ]; then - sed -i 's/focal/bionic/g' /etc/apt/sources.list - fi # Update APT with new sources cat /etc/apt/sources.list @@ -78,31 +75,32 @@ function update_install_packages { if [ "${ARCH}" = "arm64" ]; then apt-get $APT_OPTIONS --yes install linux-aws initramfs-tools dosfstools fi - - if [ "${UBUNTU_CODENAME}" = "bionic" ]; then - echo "deb [trusted=yes] http://apt.llvm.org/bionic/ llvm-toolchain-bionic-12 main" >> /etc/apt/sources.list - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - - add-apt-repository --yes --update ppa:ubuntu-toolchain-r/test - - # Install cmake 3.12+ - wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add - - apt-add-repository --yes --update 'deb https://apt.kitware.com/ubuntu/ bionic main' - - apt-get $APT_OPTIONS update - fi } function setup_locale { +cat << EOF >> /etc/locale.gen +en_US.UTF-8 UTF-8 +EOF + cat << EOF > /etc/default/locale LANG="C.UTF-8" LC_CTYPE="C.UTF-8" EOF - localedef -i en_US -f UTF-8 en_US.UTF-8 -} - -# Disable IPV6 for ufw -function disable_ufw_ipv6 { - sed -i 's/IPV6=yes/IPV6=no/g' /etc/default/ufw + locale-gen en_US.UTF-8 +} + +function setup_postgesql_env { + # Create the directory if it doesn't exist + sudo mkdir -p /etc/environment.d + + # Define the contents of the PostgreSQL environment file + cat </dev/null +LOCALE_ARCHIVE=/usr/lib/locale/locale-archive +LANG="en_US.UTF-8" +LANGUAGE="en_US.UTF-8" +LC_ALL="en_US.UTF-8" +LC_CTYPE="en_US.UTF-8" +EOF } function install_packages_for_build { @@ -118,14 +116,10 @@ function install_packages_for_build { liblzo2-dev source /etc/os-release - if [ "${UBUNTU_CODENAME}" = "bionic" ]; then - apt-get install -y --no-install-recommends llvm-12-dev clang-12 cmake - apt-mark manual libllvm12:arm64 - else - apt-get install -y --no-install-recommends llvm-11-dev clang-11 - # Mark llvm as manual to prevent auto removal - apt-mark manual libllvm11:arm64 - fi + + apt-get install -y --no-install-recommends llvm-11-dev clang-11 + # Mark llvm as manual to prevent auto removal + apt-mark manual libllvm11:arm64 } function setup_apparmor { @@ -141,19 +135,7 @@ GRUB_DEFAULT=0 GRUB_TIMEOUT=0 GRUB_TIMEOUT_STYLE="hidden" GRUB_DISTRIBUTOR="Supabase postgresql" -GRUB_CMDLINE_LINUX_DEFAULT="nomodeset console=tty1 console=ttyS0 ipv6.disable=1" -EOF -} - -function setup_grub_conf_amd64 { - mkdir -p /etc/default/grub.d - -cat << EOF > /etc/default/grub.d/50-aws-settings.cfg -GRUB_RECORDFAIL_TIMEOUT=0 -GRUB_TIMEOUT=0 -GRUB_CMDLINE_LINUX_DEFAULT=" root=/dev/nvme0n1p2 rootfstype=ext4 rw noatime,nodiratime,discard console=tty1 console=ttyS0 ip=dhcp tsc=reliable net.ifnames=0 quiet module_blacklist=psmouse,input_leds,autofs4 ipv6.disable=1 nvme_core.io_timeout=4294967295 systemd.hostname=ubuntu ipv6.disable=1" -GRUB_TERMINAL=console -GRUB_DISABLE_LINUX_UUID=true +GRUB_CMDLINE_LINUX_DEFAULT="nomodeset console=tty1 console=ttyS0 ipv6.disable=0" EOF } @@ -223,6 +205,7 @@ function cleanup_cache { update_install_packages setup_locale +setup_postgesql_env #install_packages_for_build install_configure_grub setup_apparmor @@ -230,7 +213,6 @@ setup_hostname create_admin_account set_default_target setup_eth0_interface -disable_ufw_ipv6 disable_sshd_passwd_auth disable_fsck #setup_ccache diff --git a/ebssurrogate/scripts/qemu-bootstrap-nix.sh b/ebssurrogate/scripts/qemu-bootstrap-nix.sh new file mode 100755 index 000000000..ad5c2744c --- /dev/null +++ b/ebssurrogate/scripts/qemu-bootstrap-nix.sh @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +set -o errexit +set -o pipefail +set -o xtrace + +if [ $(dpkg --print-architecture) = "amd64" ]; then + ARCH="amd64" +else + ARCH="arm64" +fi + +function waitfor_boot_finished { + export DEBIAN_FRONTEND=noninteractive + + echo "args: ${ARGS}" + # Wait for cloudinit on the surrogate to complete before making progress + while [[ ! -f /var/lib/cloud/instance/boot-finished ]]; do + echo 'Waiting for cloud-init...' + sleep 1 + done +} + +function install_packages { + apt-get update && sudo apt-get install software-properties-common e2fsprogs nfs-common -y + add-apt-repository --yes --update ppa:ansible/ansible && sudo apt-get install ansible -y + ansible-galaxy collection install community.general +} + +function execute_playbook { + + tee /etc/ansible/ansible.cfg </dev/null +LOCALE_ARCHIVE=/usr/lib/locale/locale-archive +LANG="en_US.UTF-8" +LANGUAGE="en_US.UTF-8" +LC_ALL="en_US.UTF-8" +LC_CTYPE="en_US.UTF-8" +EOF +} + +function setup_locale { + cat <>/etc/locale.gen +en_US.UTF-8 UTF-8 +EOF + + cat </etc/default/locale +LANG="C.UTF-8" +LC_CTYPE="C.UTF-8" +EOF + locale-gen en_US.UTF-8 +} + +sed -i 's/- hosts: all/- hosts: localhost/' ansible/playbook.yml + +waitfor_boot_finished +install_packages +setup_postgesql_env +setup_locale +execute_playbook + +#################### +# stage 2 things +#################### + +function install_nix() { + sudo su -c "curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm \ + --extra-conf \"substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com\" \ + --extra-conf \"trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=\" " -s /bin/bash root + . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh + +} + +function execute_stage2_playbook { + sudo tee /etc/ansible/ansible.cfg < /mnt/root/supabase-release # Copy the nvme identification script into /sbin inside the chroot mkdir -p /mnt/sbin @@ -213,7 +216,10 @@ EOF # Run Ansible playbook #export ANSIBLE_LOG_PATH=/tmp/ansible.log && export ANSIBLE_DEBUG=True && export ANSIBLE_REMOTE_TEMP=/mnt/tmp export ANSIBLE_LOG_PATH=/tmp/ansible.log && export ANSIBLE_REMOTE_TEMP=/mnt/tmp - ansible-playbook -c chroot -i '/mnt,' /tmp/ansible-playbook/ansible/playbook.yml $ARGS + ansible-playbook -c chroot -i '/mnt,' /tmp/ansible-playbook/ansible/playbook.yml \ + --extra-vars '{"nixpkg_mode": true, "debpkg_mode": false, "stage2_nix": false} ' \ + --extra-vars "psql_version=psql_${POSTGRES_MAJOR_VERSION}" \ + $ARGS } function update_systemd_services { @@ -222,11 +228,10 @@ function update_systemd_services { rm -f /mnt/etc/systemd/system/multi-user.target.wants/vector.service ln -s /etc/systemd/system/vector.timer /mnt/etc/systemd/system/multi-user.target.wants/vector.timer - # Disable apparmor during first boot + # Disable services during first boot. rm -f /mnt/etc/systemd/system/sysinit.target.wants/apparmor.service - - # Disable postgresql service during first boot. rm -f /mnt/etc/systemd/system/multi-user.target.wants/postgresql.service + rm -f /mnt/etc/systemd/system/multi-user.target.wants/salt-minion.service # Disable auditd rm -f /mnt/etc/systemd/system/multi-user.target.wants/auditd.service diff --git a/flake.lock b/flake.lock new file mode 100644 index 000000000..2d05388c6 --- /dev/null +++ b/flake.lock @@ -0,0 +1,215 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nix-editor": { + "inputs": { + "nixpkgs": "nixpkgs", + "utils": "utils" + }, + "locked": { + "lastModified": 1703105021, + "narHash": "sha256-Ne9NG7x45a8aJyAN+yYWbr/6mQHBVVkwZZ72EZHHRqw=", + "owner": "snowfallorg", + "repo": "nix-editor", + "rev": "b5017f8d61753ce6a3a1a2aa7e474d59146a8ae3", + "type": "github" + }, + "original": { + "owner": "snowfallorg", + "repo": "nix-editor", + "type": "github" + } + }, + "nix2container": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1708764364, + "narHash": "sha256-+pOtDvmuVTg0Gi58hKDUyrNla5NbyUvt3Xs3gLR0Fws=", + "owner": "nlewo", + "repo": "nix2container", + "rev": "c891f90d2e3c48a6b33466c96e4851e0fc0cf455", + "type": "github" + }, + "original": { + "owner": "nlewo", + "repo": "nix2container", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1675673983, + "narHash": "sha256-8hzNh1jtiPxL5r3ICNzSmpSzV7kGb3KwX+FS5BWJUTo=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "5a350a8f31bb7ef0c6e79aea3795a890cf7743d4", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1697269602, + "narHash": "sha256-dSzV7Ud+JH4DPVD9od53EgDrxUVQOcSj4KGjggCDVJI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9cb540e9c1910d74a7e10736277f6eb9dff51c81", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1712666087, + "narHash": "sha256-WwjUkWsjlU8iUImbivlYxNyMB1L5YVqE8QotQdL9jWc=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "a76c4553d7e741e17f289224eda135423de0491d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1728538411, + "narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nix-editor": "nix-editor", + "nix2container": "nix2container", + "nixpkgs": "nixpkgs_3", + "rust-overlay": "rust-overlay" + } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1729045942, + "narHash": "sha256-HjmK0x5Zm2TK2vFpC7XBM2e3EDNVnAIuEoU2FkeN8xw=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "9de3cea452d2401d6f93c06ad985178a4e11d1fc", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 000000000..d49c9e3fa --- /dev/null +++ b/flake.nix @@ -0,0 +1,1468 @@ +{ + description = "Prototype tooling for deploying PostgreSQL"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + nix2container.url = "github:nlewo/nix2container"; + nix-editor.url = "github:snowfallorg/nix-editor"; + rust-overlay.url = "github:oxalica/rust-overlay"; + }; + + outputs = { self, nixpkgs, flake-utils, nix-editor, rust-overlay, nix2container, ... }: + let + gitRev = "vcs=${self.shortRev or "dirty"}+${builtins.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}"; + + ourSystems = with flake-utils.lib; [ + system.x86_64-linux + system.aarch64-linux + system.aarch64-darwin + ]; + in + flake-utils.lib.eachSystem ourSystems (system: + let + pgsqlDefaultPort = "5435"; + pgsqlSuperuser = "supabase_admin"; + + pkgs = import nixpkgs { + config = { + allowUnfree = true; + permittedInsecurePackages = [ + "v8-9.7.106.18" + ]; + }; + inherit system; + overlays = [ + # NOTE: add any needed overlays here. in theory we could + # pull them from the overlays/ directory automatically, but we don't + # want to have an arbitrary order, since it might matter. being + # explicit is better. + (final: prev: { + xmrig = throw "The xmrig package has been explicitly disabled in this flake."; + }) + (import rust-overlay) + (final: prev: { + cargo-pgrx = final.callPackage ./nix/cargo-pgrx/default.nix { + inherit (final) lib; + inherit (final) darwin; + inherit (final) fetchCrate; + inherit (final) openssl; + inherit (final) pkg-config; + inherit (final) makeRustPlatform; + inherit (final) stdenv; + inherit (final) rust-bin; + }; + + buildPgrxExtension = final.callPackage ./nix/cargo-pgrx/buildPgrxExtension.nix { + inherit (final) cargo-pgrx; + inherit (final) lib; + inherit (final) Security; + inherit (final) pkg-config; + inherit (final) makeRustPlatform; + inherit (final) stdenv; + inherit (final) writeShellScriptBin; + }; + + buildPgrxExtension_0_11_3 = prev.buildPgrxExtension.override { + cargo-pgrx = final.cargo-pgrx.cargo-pgrx_0_11_3; + }; + + buildPgrxExtension_0_12_6 = prev.buildPgrxExtension.override { + cargo-pgrx = final.cargo-pgrx.cargo-pgrx_0_12_6; + }; + + buildPgrxExtension_0_12_9 = prev.buildPgrxExtension.override { + cargo-pgrx = final.cargo-pgrx.cargo-pgrx_0_12_9; + }; + + }) + (final: prev: { + postgresql = final.callPackage ./nix/postgresql/default.nix { + inherit (final) lib stdenv fetchurl makeWrapper callPackage buildEnv newScope; + }; + }) + ]; + }; + # Define pythonEnv here + pythonEnv = pkgs.python3.withPackages (ps: with ps; [ + boto3 + docker + pytest + pytest-testinfra + requests + ec2instanceconnectcli + paramiko + ]); + sfcgal = pkgs.callPackage ./nix/ext/sfcgal/sfcgal.nix { }; + supabase-groonga = pkgs.callPackage ./nix/supabase-groonga.nix { }; + mecab-naist-jdic = pkgs.callPackage ./nix/ext/mecab-naist-jdic/default.nix { }; + inherit (pkgs.callPackage ./nix/wal-g.nix { }) wal-g-2 wal-g-3; + # Our list of PostgreSQL extensions which come from upstream Nixpkgs. + # These are maintained upstream and can easily be used here just by + # listing their name. Anytime the version of nixpkgs is upgraded, these + # may also bring in new versions of the extensions. + psqlExtensions = [ + /* pljava */ + /*"postgis"*/ + ]; + + #FIXME for now, timescaledb is not included in the orioledb version of supabase extensions, as there is an issue + # with building timescaledb with the orioledb patched version of postgresql + orioledbPsqlExtensions = [ + /* pljava */ + /*"timescaledb"*/ + ]; + + # Custom extensions that exist in our repository. These aren't upstream + # either because nobody has done the work, maintaining them here is + # easier and more expedient, or because they may not be suitable, or are + # too niche/one-off. + # + # Ideally, most of these should have copies upstream for third party + # use, but even if they did, keeping our own copies means that we can + # rollout new versions of these critical things easier without having to + # go through the upstream release engineering process. + ourExtensions = [ + ./nix/ext/rum.nix + ./nix/ext/timescaledb.nix + ./nix/ext/timescaledb-2.9.1.nix + ./nix/ext/pgroonga.nix + ./nix/ext/index_advisor.nix + ./nix/ext/wal2json.nix + ./nix/ext/pgmq.nix + ./nix/ext/pg_repack.nix + ./nix/ext/pg-safeupdate.nix + ./nix/ext/plpgsql-check.nix + ./nix/ext/pgjwt.nix + ./nix/ext/pgaudit.nix + ./nix/ext/postgis.nix + ./nix/ext/pgrouting.nix + ./nix/ext/pgtap.nix + ./nix/ext/pg_cron.nix + ./nix/ext/pgsql-http.nix + ./nix/ext/pg_plan_filter.nix + ./nix/ext/pg_net.nix + ./nix/ext/pg_hashids.nix + ./nix/ext/pgsodium.nix + ./nix/ext/pg_graphql.nix + ./nix/ext/pg_stat_monitor.nix + ./nix/ext/pg_jsonschema.nix + ./nix/ext/pgvector.nix + ./nix/ext/vault.nix + ./nix/ext/hypopg.nix + ./nix/ext/pg_tle.nix + ./nix/ext/wrappers/default.nix + ./nix/ext/supautils.nix + ./nix/ext/plv8.nix + ]; + + #Where we import and build the orioledb extension, we add on our custom extensions + # plus the orioledb option + #we're not using timescaledb or plv8 in the orioledb-17 version or pg 17 of supabase extensions + orioleFilteredExtensions = builtins.filter + ( + x: + x != ./nix/ext/timescaledb.nix && + x != ./nix/ext/timescaledb-2.9.1.nix && + x != ./nix/ext/plv8.nix + ) ourExtensions; + + orioledbExtensions = orioleFilteredExtensions ++ [ ./nix/ext/orioledb.nix ]; + dbExtensions17 = orioleFilteredExtensions; + getPostgresqlPackage = version: + pkgs.postgresql."postgresql_${version}"; + # Create a 'receipt' file for a given postgresql package. This is a way + # of adding a bit of metadata to the package, which can be used by other + # tools to inspect what the contents of the install are: the PSQL + # version, the installed extensions, et cetera. + # + # This takes two arguments: + # - pgbin: the postgresql package we are building on top of + # not a list of packages, but an attrset containing extension names + # mapped to versions. + # - ourExts: the list of extensions from upstream nixpkgs. This is not + # a list of packages, but an attrset containing extension names + # mapped to versions. + # + # The output is a package containing the receipt.json file, which can be + # merged with the PostgreSQL installation using 'symlinkJoin'. + makeReceipt = pgbin: ourExts: pkgs.writeTextFile { + name = "receipt"; + destination = "/receipt.json"; + text = builtins.toJSON { + revision = gitRev; + psql-version = pgbin.version; + nixpkgs = { + revision = nixpkgs.rev; + }; + extensions = ourExts; + + # NOTE this field can be used to do cache busting (e.g. + # force a rebuild of the psql packages) but also to helpfully inform + # tools what version of the schema is being used, for forwards and + # backwards compatibility + receipt-version = "1"; + }; + }; + + makeOurPostgresPkgs = version: + let + postgresql = getPostgresqlPackage version; + extensionsToUse = + if (builtins.elem version [ "orioledb-17" ]) + then orioledbExtensions + else if (builtins.elem version [ "17" ]) + then dbExtensions17 + else ourExtensions; + in + map (path: pkgs.callPackage path { inherit postgresql; }) extensionsToUse; + + # Create an attrset that contains all the extensions included in a server. + makeOurPostgresPkgsSet = version: + (builtins.listToAttrs (map + (drv: + { name = drv.pname; value = drv; } + ) + (makeOurPostgresPkgs version))) + // { recurseForDerivations = true; }; + + + # Create a binary distribution of PostgreSQL, given a version. + # + # NOTE: The version here does NOT refer to the exact PostgreSQL version; + # it refers to the *major number only*, which is used to select the + # correct version of the package from nixpkgs. This is because we want + # to be able to do so in an open ended way. As an example, the version + # "15" passed in will use the nixpkgs package "postgresql_15" as the + # basis for building extensions, etc. + makePostgresBin = version: + let + postgresql = getPostgresqlPackage version; + ourExts = map (ext: { name = ext.pname; version = ext.version; }) (makeOurPostgresPkgs version); + + pgbin = postgresql.withPackages (ps: + makeOurPostgresPkgs version + ); + in + pkgs.symlinkJoin { + inherit (pgbin) name version; + paths = [ pgbin (makeReceipt pgbin ourExts) ]; + }; + + # Create an attribute set, containing all the relevant packages for a + # PostgreSQL install, wrapped up with a bow on top. There are three + # packages: + # + # - bin: the postgresql package itself, with all the extensions + # installed, and a receipt.json file containing metadata about the + # install. + # - exts: an attrset containing all the extensions, mapped to their + # package names. + makePostgres = version: rec { + bin = makePostgresBin version; + exts = makeOurPostgresPkgsSet version; + recurseForDerivations = true; + }; + + makePostgresDevSetup = { pkgs, name, extraSubstitutions ? { } }: + let + paths = { + migrationsDir = builtins.path { + name = "migrations"; + path = ./migrations/db; + }; + postgresqlSchemaSql = builtins.path { + name = "postgresql-schema"; + path = ./nix/tools/postgresql_schema.sql; + }; + pgbouncerAuthSchemaSql = builtins.path { + name = "pgbouncer-auth-schema"; + path = ./ansible/files/pgbouncer_config/pgbouncer_auth_schema.sql; + }; + statExtensionSql = builtins.path { + name = "stat-extension"; + path = ./ansible/files/stat_extension.sql; + }; + pgconfigFile = builtins.path { + name = "postgresql.conf"; + path = ./ansible/files/postgresql_config/postgresql.conf.j2; + }; + supautilsConfigFile = builtins.path { + name = "supautils.conf"; + path = ./ansible/files/postgresql_config/supautils.conf.j2; + }; + loggingConfigFile = builtins.path { + name = "logging.conf"; + path = ./ansible/files/postgresql_config/postgresql-csvlog.conf; + }; + readReplicaConfigFile = builtins.path { + name = "readreplica.conf"; + path = ./ansible/files/postgresql_config/custom_read_replica.conf.j2; + }; + pgHbaConfigFile = builtins.path { + name = "pg_hba.conf"; + path = ./ansible/files/postgresql_config/pg_hba.conf.j2; + }; + pgIdentConfigFile = builtins.path { + name = "pg_ident.conf"; + path = ./ansible/files/postgresql_config/pg_ident.conf.j2; + }; + postgresqlExtensionCustomScriptsPath = builtins.path { + name = "extension-custom-scripts"; + path = ./ansible/files/postgresql_extension_custom_scripts; + }; + getkeyScript = builtins.path { + name = "pgsodium_getkey.sh"; + path = ./nix/tests/util/pgsodium_getkey.sh; + }; + }; + + localeArchive = + if pkgs.stdenv.isDarwin + then "${pkgs.darwin.locale}/share/locale" + else "${pkgs.glibcLocales}/lib/locale/locale-archive"; + + substitutions = { + SHELL_PATH = "${pkgs.bash}/bin/bash"; + PGSQL_DEFAULT_PORT = "${pgsqlDefaultPort}"; + PGSQL_SUPERUSER = "${pgsqlSuperuser}"; + PSQL15_BINDIR = "${basePackages.psql_15.bin}"; + PSQL17_BINDIR = "${basePackages.psql_17.bin}"; + PSQL_CONF_FILE = "${paths.pgconfigFile}"; + PSQLORIOLEDB17_BINDIR = "${basePackages.psql_orioledb-17.bin}"; + PGSODIUM_GETKEY = "${paths.getkeyScript}"; + READREPL_CONF_FILE = "${paths.readReplicaConfigFile}"; + LOGGING_CONF_FILE = "${paths.loggingConfigFile}"; + SUPAUTILS_CONF_FILE = "${paths.supautilsConfigFile}"; + PG_HBA = "${paths.pgHbaConfigFile}"; + PG_IDENT = "${paths.pgIdentConfigFile}"; + LOCALES = "${localeArchive}"; + EXTENSION_CUSTOM_SCRIPTS_DIR = "${paths.postgresqlExtensionCustomScriptsPath}"; + MECAB_LIB = "${basePackages.psql_15.exts.pgroonga}/lib/groonga/plugins/tokenizers/tokenizer_mecab.so"; + GROONGA_DIR = "${supabase-groonga}"; + MIGRATIONS_DIR = "${paths.migrationsDir}"; + POSTGRESQL_SCHEMA_SQL = "${paths.postgresqlSchemaSql}"; + PGBOUNCER_AUTH_SCHEMA_SQL = "${paths.pgbouncerAuthSchemaSql}"; + STAT_EXTENSION_SQL = "${paths.statExtensionSql}"; + CURRENT_SYSTEM = "${system}"; + } // extraSubstitutions; # Merge in any extra substitutions + in + pkgs.runCommand name + { + inherit (paths) migrationsDir postgresqlSchemaSql pgbouncerAuthSchemaSql statExtensionSql; + } '' + set -x + mkdir -p $out/bin $out/etc/postgresql-custom $out/etc/postgresql $out/extension-custom-scripts + + # Copy config files with error handling + cp ${paths.supautilsConfigFile} $out/etc/postgresql-custom/supautils.conf || { echo "Failed to copy supautils.conf"; exit 1; } + cp ${paths.pgconfigFile} $out/etc/postgresql/postgresql.conf || { echo "Failed to copy postgresql.conf"; exit 1; } + cp ${paths.loggingConfigFile} $out/etc/postgresql-custom/logging.conf || { echo "Failed to copy logging.conf"; exit 1; } + cp ${paths.readReplicaConfigFile} $out/etc/postgresql-custom/read-replica.conf || { echo "Failed to copy read-replica.conf"; exit 1; } + cp ${paths.pgHbaConfigFile} $out/etc/postgresql/pg_hba.conf || { echo "Failed to copy pg_hba.conf"; exit 1; } + cp ${paths.pgIdentConfigFile} $out/etc/postgresql/pg_ident.conf || { echo "Failed to copy pg_ident.conf"; exit 1; } + cp -r ${paths.postgresqlExtensionCustomScriptsPath}/* $out/extension-custom-scripts/ || { echo "Failed to copy custom scripts"; exit 1; } + + echo "Copy operation completed" + chmod 644 $out/etc/postgresql-custom/supautils.conf + chmod 644 $out/etc/postgresql/postgresql.conf + chmod 644 $out/etc/postgresql-custom/logging.conf + chmod 644 $out/etc/postgresql/pg_hba.conf + + substitute ${./nix/tools/run-server.sh.in} $out/bin/start-postgres-server \ + ${builtins.concatStringsSep " " (builtins.attrValues (builtins.mapAttrs + (name: value: "--subst-var-by '${name}' '${value}'") + substitutions + ))} + chmod +x $out/bin/start-postgres-server + ''; + + # The base set of packages that we export from this Nix Flake, that can + # be used with 'nix build'. Don't use the names listed below; check the + # name in 'nix flake show' in order to make sure exactly what name you + # want. + basePackages = + let + # Function to get the PostgreSQL version from the attribute name + getVersion = name: + let + match = builtins.match "psql_([0-9]+)" name; + in + if match == null then null else builtins.head match; + + # Define the available PostgreSQL versions + postgresVersions = { + psql_15 = makePostgres "15"; + psql_17 = makePostgres "17"; + psql_orioledb-17 = makePostgres "orioledb-17"; + }; + + # Find the active PostgreSQL version + activeVersion = getVersion (builtins.head (builtins.attrNames postgresVersions)); + + # Function to create the pg_regress package + makePgRegress = version: + let + postgresqlPackage = pkgs."postgresql_${version}"; + in + pkgs.callPackage ./nix/ext/pg_regress.nix { + postgresql = postgresqlPackage; + }; + postgresql_15 = getPostgresqlPackage "15"; + postgresql_17 = getPostgresqlPackage "17"; + postgresql_orioledb-17 = getPostgresqlPackage "orioledb-17"; + in + postgresVersions // { + supabase-groonga = supabase-groonga; + cargo-pgrx_0_11_3 = pkgs.cargo-pgrx.cargo-pgrx_0_11_3; + cargo-pgrx_0_12_6 = pkgs.cargo-pgrx.cargo-pgrx_0_12_6; + cargo-pgrx_0_12_9 = pkgs.cargo-pgrx.cargo-pgrx_0_12_9; + # PostgreSQL versions. + psql_15 = postgresVersions.psql_15; + psql_17 = postgresVersions.psql_17; + psql_orioledb-17 = postgresVersions.psql_orioledb-17; + wal-g-2 = wal-g-2; + wal-g-3 = wal-g-3; + sfcgal = sfcgal; + pg_prove = pkgs.perlPackages.TAPParserSourceHandlerpgTAP; + inherit postgresql_15 postgresql_17 postgresql_orioledb-17; + postgresql_15_debug = if pkgs.stdenv.isLinux then postgresql_15.debug else null; + postgresql_17_debug = if pkgs.stdenv.isLinux then postgresql_17.debug else null; + postgresql_orioledb-17_debug = if pkgs.stdenv.isLinux then postgresql_orioledb-17.debug else null; + postgresql_15_src = pkgs.stdenv.mkDerivation { + pname = "postgresql-15-src"; + version = postgresql_15.version; + + src = postgresql_15.src; + + nativeBuildInputs = [ pkgs.bzip2 ]; + + phases = [ "unpackPhase" "installPhase" ]; + + installPhase = '' + mkdir -p $out + cp -r . $out + ''; + + meta = with pkgs.lib; { + description = "PostgreSQL 15 source files"; + homepage = "https://www.postgresql.org/"; + license = licenses.postgresql; + platforms = platforms.all; + }; + }; + postgresql_17_src = pkgs.stdenv.mkDerivation { + pname = "postgresql-17-src"; + version = postgresql_17.version; + src = postgresql_17.src; + + nativeBuildInputs = [ pkgs.bzip2 ]; + + phases = [ "unpackPhase" "installPhase" ]; + + installPhase = '' + mkdir -p $out + cp -r . $out + ''; + meta = with pkgs.lib; { + description = "PostgreSQL 17 source files"; + homepage = "https://www.postgresql.org/"; + license = licenses.postgresql; + platforms = platforms.all; + }; + }; + postgresql_orioledb-17_src = pkgs.stdenv.mkDerivation { + pname = "postgresql-17-src"; + version = postgresql_orioledb-17.version; + + src = postgresql_orioledb-17.src; + + nativeBuildInputs = [ pkgs.bzip2 ]; + + phases = [ "unpackPhase" "installPhase" ]; + + installPhase = '' + mkdir -p $out + cp -r . $out + ''; + + meta = with pkgs.lib; { + description = "PostgreSQL 15 source files"; + homepage = "https://www.postgresql.org/"; + license = licenses.postgresql; + platforms = platforms.all; + }; + }; + mecab_naist_jdic = mecab-naist-jdic; + supabase_groonga = supabase-groonga; + pg_regress = makePgRegress activeVersion; + # Start a version of the server. + start-server = makePostgresDevSetup { + inherit pkgs; + name = "start-postgres-server"; + }; + + # Start a version of the client and runs migrations script on server. + start-client = + let + migrationsDir = ./migrations/db; + postgresqlSchemaSql = ./nix/tools/postgresql_schema.sql; + pgbouncerAuthSchemaSql = ./ansible/files/pgbouncer_config/pgbouncer_auth_schema.sql; + statExtensionSql = ./ansible/files/stat_extension.sql; + in + pkgs.runCommand "start-postgres-client" { } '' + mkdir -p $out/bin + substitute ${./nix/tools/run-client.sh.in} $out/bin/start-postgres-client \ + --subst-var-by 'PGSQL_DEFAULT_PORT' '${pgsqlDefaultPort}' \ + --subst-var-by 'PGSQL_SUPERUSER' '${pgsqlSuperuser}' \ + --subst-var-by 'PSQL15_BINDIR' '${basePackages.psql_15.bin}' \ + --subst-var-by 'PSQL17_BINDIR' '${basePackages.psql_17.bin}' \ + --subst-var-by 'PSQLORIOLEDB17_BINDIR' '${basePackages.psql_orioledb-17.bin}' \ + --subst-var-by 'MIGRATIONS_DIR' '${migrationsDir}' \ + --subst-var-by 'POSTGRESQL_SCHEMA_SQL' '${postgresqlSchemaSql}' \ + --subst-var-by 'PGBOUNCER_AUTH_SCHEMA_SQL' '${pgbouncerAuthSchemaSql}' \ + --subst-var-by 'STAT_EXTENSION_SQL' '${statExtensionSql}' + chmod +x $out/bin/start-postgres-client + ''; + + # Migrate between two data directories. + migrate-tool = + let + configFile = ./nix/tests/postgresql.conf.in; + getkeyScript = ./nix/tests/util/pgsodium_getkey.sh; + primingScript = ./nix/tests/prime.sql; + migrationData = ./nix/tests/migrations/data.sql; + in + pkgs.runCommand "migrate-postgres" { } '' + mkdir -p $out/bin + substitute ${./nix/tools/migrate-tool.sh.in} $out/bin/migrate-postgres \ + --subst-var-by 'PSQL15_BINDIR' '${basePackages.psql_15.bin}' \ + --subst-var-by 'PSQL_CONF_FILE' '${configFile}' \ + --subst-var-by 'PGSODIUM_GETKEY' '${getkeyScript}' \ + --subst-var-by 'PRIMING_SCRIPT' '${primingScript}' \ + --subst-var-by 'MIGRATION_DATA' '${migrationData}' + + chmod +x $out/bin/migrate-postgres + ''; + + start-replica = pkgs.runCommand "start-postgres-replica" { } '' + mkdir -p $out/bin + substitute ${./nix/tools/run-replica.sh.in} $out/bin/start-postgres-replica \ + --subst-var-by 'PGSQL_SUPERUSER' '${pgsqlSuperuser}' \ + --subst-var-by 'PSQL15_BINDIR' '${basePackages.psql_15.bin}' + chmod +x $out/bin/start-postgres-replica + ''; + pg-restore = + pkgs.runCommand "run-pg-restore" { } '' + mkdir -p $out/bin + substitute ${./nix/tools/run-restore.sh.in} $out/bin/pg-restore \ + --subst-var-by PSQL15_BINDIR '${basePackages.psql_15.bin}' + chmod +x $out/bin/pg-restore + ''; + sync-exts-versions = pkgs.runCommand "sync-exts-versions" { } '' + mkdir -p $out/bin + substitute ${./nix/tools/sync-exts-versions.sh.in} $out/bin/sync-exts-versions \ + --subst-var-by 'YQ' '${pkgs.yq}/bin/yq' \ + --subst-var-by 'JQ' '${pkgs.jq}/bin/jq' \ + --subst-var-by 'NIX_EDITOR' '${nix-editor.packages.${system}.nix-editor}/bin/nix-editor' \ + --subst-var-by 'NIXPREFETCHURL' '${pkgs.nixVersions.nix_2_20}/bin/nix-prefetch-url' \ + --subst-var-by 'NIX' '${pkgs.nixVersions.nix_2_20}/bin/nix' + chmod +x $out/bin/sync-exts-versions + ''; + + local-infra-bootstrap = pkgs.runCommand "local-infra-bootstrap" { } '' + mkdir -p $out/bin + substitute ${./nix/tools/local-infra-bootstrap.sh.in} $out/bin/local-infra-bootstrap + chmod +x $out/bin/local-infra-bootstrap + ''; + dbmate-tool = + let + migrationsDir = ./migrations/db; + ansibleVars = ./ansible/vars.yml; + pgbouncerAuthSchemaSql = ./ansible/files/pgbouncer_config/pgbouncer_auth_schema.sql; + statExtensionSql = ./ansible/files/stat_extension.sql; + in + pkgs.runCommand "dbmate-tool" + { + buildInputs = with pkgs; [ + overmind + dbmate + nix + jq + yq + ]; + nativeBuildInputs = with pkgs; [ + makeWrapper + ]; + } '' + mkdir -p $out/bin $out/migrations + cp -r ${migrationsDir}/* $out + substitute ${./nix/tools/dbmate-tool.sh.in} $out/bin/dbmate-tool \ + --subst-var-by 'PGSQL_DEFAULT_PORT' '${pgsqlDefaultPort}' \ + --subst-var-by 'MIGRATIONS_DIR' $out \ + --subst-var-by 'PGSQL_SUPERUSER' '${pgsqlSuperuser}' \ + --subst-var-by 'ANSIBLE_VARS' ${ansibleVars} \ + --subst-var-by 'CURRENT_SYSTEM' '${system}' \ + --subst-var-by 'PGBOUNCER_AUTH_SCHEMA_SQL' '${pgbouncerAuthSchemaSql}' \ + --subst-var-by 'STAT_EXTENSION_SQL' '${statExtensionSql}' + chmod +x $out/bin/dbmate-tool + wrapProgram $out/bin/dbmate-tool \ + --prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.overmind pkgs.dbmate pkgs.nix pkgs.jq pkgs.yq ]} + ''; + show-commands = pkgs.runCommand "show-commands" + { + nativeBuildInputs = [ pkgs.makeWrapper ]; + buildInputs = [ pkgs.nushell ]; + } '' + mkdir -p $out/bin + cat > $out/bin/show-commands << 'EOF' + #!${pkgs.nushell}/bin/nu + let json_output = (nix flake show --json --quiet --all-systems | from json) + let apps = ($json_output | get apps.${system}) + $apps | transpose name info | select name | each { |it| echo $"Run this app with: nix run .#($it.name)" } + EOF + chmod +x $out/bin/show-commands + wrapProgram $out/bin/show-commands \ + --prefix PATH : ${pkgs.nushell}/bin + ''; + update-readme = pkgs.runCommand "update-readme" + { + nativeBuildInputs = [ pkgs.makeWrapper ]; + buildInputs = [ pkgs.nushell ]; + } '' + mkdir -p $out/bin + cp ${./nix/tools/update_readme.nu} $out/bin/update-readme + chmod +x $out/bin/update-readme + wrapProgram $out/bin/update-readme \ + --prefix PATH : ${pkgs.nushell}/bin + ''; + # Script to run the AMI build and tests locally + build-test-ami = pkgs.runCommand "build-test-ami" + { + buildInputs = with pkgs; [ + packer + awscli2 + yq + jq + openssl + git + coreutils + aws-vault + ]; + } '' + mkdir -p $out/bin + cat > $out/bin/build-test-ami << 'EOL' + #!/usr/bin/env bash + set -euo pipefail + + show_help() { + cat << EOF + Usage: build-test-ami [--help] + + Build AMI images for PostgreSQL testing. + + This script will: + 1. Check for required tools and AWS authentication + 2. Build two AMI stages using Packer + 3. Clean up any temporary instances + 4. Output the final AMI name for use with run-testinfra + + Arguments: + postgres-version PostgreSQL major version to build (required) + + Options: + --help Show this help message and exit + + Requirements: + - AWS Vault profile must be set in AWS_VAULT environment variable + - Packer, AWS CLI, yq, jq, and OpenSSL must be installed + - Must be run from a git repository + + Example: + aws-vault exec -- nix run .#build-test-ami 15 + EOF + } + + # Handle help flag + if [[ "$#" -gt 0 && "$1" == "--help" ]]; then + show_help + exit 0 + fi + + export PATH="${pkgs.lib.makeBinPath (with pkgs; [ + packer + awscli2 + yq + jq + openssl + git + coreutils + aws-vault + ])}:$PATH" + + # Check for required tools + for cmd in packer aws-vault yq jq openssl; do + if ! command -v $cmd &> /dev/null; then + echo "Error: $cmd is required but not found" + exit 1 + fi + done + + # Check AWS Vault profile + if [ -z "''${AWS_VAULT:-}" ]; then + echo "Error: AWS_VAULT environment variable must be set with the profile name" + echo "Usage: aws-vault exec -- nix run .#build-test-ami " + exit 1 + fi + + # Set values + REGION="ap-southeast-1" + POSTGRES_VERSION="$1" + RANDOM_STRING=$(openssl rand -hex 8) + GIT_SHA=$(git rev-parse HEAD) + RUN_ID=$(date +%s) + + # Generate common-nix.vars.pkr.hcl + PG_VERSION=$(yq -r ".postgres_release[\"postgres$POSTGRES_VERSION\"]" ansible/vars.yml) + echo "postgres-version = \"$PG_VERSION\"" > common-nix.vars.pkr.hcl + + # Build AMI Stage 1 + packer init amazon-arm64-nix.pkr.hcl + packer build \ + -var "git-head-version=$GIT_SHA" \ + -var "packer-execution-id=$RUN_ID" \ + -var-file="development-arm.vars.pkr.hcl" \ + -var-file="common-nix.vars.pkr.hcl" \ + -var "ansible_arguments=" \ + -var "postgres-version=$RANDOM_STRING" \ + -var "region=$REGION" \ + -var 'ami_regions=["'"$REGION"'"]' \ + -var "force-deregister=true" \ + -var "ansible_arguments=-e postgresql_major=$POSTGRES_VERSION" \ + amazon-arm64-nix.pkr.hcl + + # Build AMI Stage 2 + packer init stage2-nix-psql.pkr.hcl + packer build \ + -var "git-head-version=$GIT_SHA" \ + -var "packer-execution-id=$RUN_ID" \ + -var "postgres_major_version=$POSTGRES_VERSION" \ + -var-file="development-arm.vars.pkr.hcl" \ + -var-file="common-nix.vars.pkr.hcl" \ + -var "postgres-version=$RANDOM_STRING" \ + -var "region=$REGION" \ + -var 'ami_regions=["'"$REGION"'"]' \ + -var "force-deregister=true" \ + -var "git_sha=$GIT_SHA" \ + stage2-nix-psql.pkr.hcl + + # Cleanup instances from AMI builds + cleanup_instances() { + echo "Terminating EC2 instances with tag testinfra-run-id=$RUN_ID..." + aws ec2 --region $REGION describe-instances \ + --filters "Name=tag:testinfra-run-id,Values=$RUN_ID" \ + --query "Reservations[].Instances[].InstanceId" \ + --output text | xargs -r aws ec2 terminate-instances \ + --region $REGION --instance-ids || true + } + + # Set up traps for various signals to ensure cleanup + trap cleanup_instances EXIT HUP INT QUIT TERM + + # Create and activate virtual environment + VENV_DIR=$(mktemp -d) + trap 'rm -rf "$VENV_DIR"' EXIT HUP INT QUIT TERM + python3 -m venv "$VENV_DIR" + source "$VENV_DIR/bin/activate" + + # Install required Python packages + echo "Installing required Python packages..." + pip install boto3 boto3-stubs[essential] docker ec2instanceconnectcli pytest paramiko requests + + # Run the tests with aws-vault + echo "Running tests for AMI: $RANDOM_STRING using AWS Vault profile: $AWS_VAULT_PROFILE" + aws-vault exec $AWS_VAULT_PROFILE -- pytest -vv -s testinfra/test_ami_nix.py + + # Deactivate virtual environment (cleanup is handled by trap) + deactivate + EOL + chmod +x $out/bin/build-test-ami + ''; + + run-testinfra = pkgs.runCommand "run-testinfra" + { + buildInputs = with pkgs; [ + aws-vault + python3 + python3Packages.pip + coreutils + ]; + } '' + mkdir -p $out/bin + cat > $out/bin/run-testinfra << 'EOL' + #!/usr/bin/env bash + set -euo pipefail + + show_help() { + cat << EOF + Usage: run-testinfra --ami-name NAME [--aws-vault-profile PROFILE] + + Run the testinfra tests locally against a specific AMI. + + This script will: + 1. Check if aws-vault is installed and configured + 2. Set up the required environment variables + 3. Create and activate a virtual environment + 4. Install required Python packages from pip + 5. Run the tests with aws-vault credentials + 6. Clean up the virtual environment + + Required flags: + --ami-name NAME The name of the AMI to test + + Optional flags: + --aws-vault-profile PROFILE AWS Vault profile to use (default: staging) + --help Show this help message and exit + + Requirements: + - aws-vault installed and configured + - Python 3 with pip + - Must be run from the repository root + + Examples: + run-testinfra --ami-name supabase-postgres-abc123 + run-testinfra --ami-name supabase-postgres-abc123 --aws-vault-profile production + EOF + } + + # Default values + AWS_VAULT_PROFILE="staging" + AMI_NAME="" + + # Parse arguments + while [[ $# -gt 0 ]]; do + case $1 in + --aws-vault-profile) + AWS_VAULT_PROFILE="$2" + shift 2 + ;; + --ami-name) + AMI_NAME="$2" + shift 2 + ;; + --help) + show_help + exit 0 + ;; + *) + echo "Error: Unexpected argument: $1" + show_help + exit 1 + ;; + esac + done + + # Check for required tools + if ! command -v aws-vault &> /dev/null; then + echo "Error: aws-vault is required but not found" + exit 1 + fi + + # Check for AMI name argument + if [ -z "$AMI_NAME" ]; then + echo "Error: --ami-name is required" + show_help + exit 1 + fi + + # Set environment variables + export AWS_REGION="ap-southeast-1" + export AWS_DEFAULT_REGION="ap-southeast-1" + export AMI_NAME="$AMI_NAME" # Export AMI_NAME for pytest + export RUN_ID="local-$(date +%s)" # Generate a unique RUN_ID + + # Function to terminate EC2 instances + terminate_instances() { + echo "Terminating EC2 instances with tag testinfra-run-id=$RUN_ID..." + aws-vault exec $AWS_VAULT_PROFILE -- aws ec2 --region ap-southeast-1 describe-instances \ + --filters "Name=tag:testinfra-run-id,Values=$RUN_ID" \ + --query "Reservations[].Instances[].InstanceId" \ + --output text | xargs -r aws-vault exec $AWS_VAULT_PROFILE -- aws ec2 terminate-instances \ + --region ap-southeast-1 --instance-ids || true + } + + # Set up traps for various signals to ensure cleanup + trap terminate_instances EXIT HUP INT QUIT TERM + + # Create and activate virtual environment + VENV_DIR=$(mktemp -d) + trap 'rm -rf "$VENV_DIR"' EXIT HUP INT QUIT TERM + python3 -m venv "$VENV_DIR" + source "$VENV_DIR/bin/activate" + + # Install required Python packages + echo "Installing required Python packages..." + pip install boto3 boto3-stubs[essential] docker ec2instanceconnectcli pytest paramiko requests + + # Function to run tests and ensure cleanup + run_tests() { + local exit_code=0 + echo "Running tests for AMI: $AMI_NAME using AWS Vault profile: $AWS_VAULT_PROFILE" + aws-vault exec "$AWS_VAULT_PROFILE" -- pytest -vv -s testinfra/test_ami_nix.py || exit_code=$? + return $exit_code + } + + # Run tests and capture exit code + run_tests + test_exit_code=$? + + # Deactivate virtual environment + deactivate + + # Explicitly call cleanup + terminate_instances + + # Exit with the test exit code + exit $test_exit_code + EOL + chmod +x $out/bin/run-testinfra + ''; + + cleanup-ami = pkgs.runCommand "cleanup-ami" + { + buildInputs = with pkgs; [ + awscli2 + aws-vault + ]; + } '' + mkdir -p $out/bin + cat > $out/bin/cleanup-ami << 'EOL' + #!/usr/bin/env bash + set -euo pipefail + + export PATH="${pkgs.lib.makeBinPath (with pkgs; [ + awscli2 + aws-vault + ])}:$PATH" + + # Check for required tools + for cmd in aws-vault; do + if ! command -v $cmd &> /dev/null; then + echo "Error: $cmd is required but not found" + exit 1 + fi + done + + # Check AWS Vault profile + if [ -z "''${AWS_VAULT:-}" ]; then + echo "Error: AWS_VAULT environment variable must be set with the profile name" + echo "Usage: aws-vault exec -- nix run .#cleanup-ami " + exit 1 + fi + + # Check for AMI name argument + if [ -z "''${1:-}" ]; then + echo "Error: AMI name must be provided" + echo "Usage: aws-vault exec -- nix run .#cleanup-ami " + exit 1 + fi + + AMI_NAME="$1" + REGION="ap-southeast-1" + + # Deregister AMIs + for AMI_PATTERN in "supabase-postgres-ci-ami-test-stage-1" "$AMI_NAME"; do + aws ec2 describe-images --region $REGION --owners self \ + --filters "Name=name,Values=$AMI_PATTERN" \ + --query 'Images[*].ImageId' --output text | while read -r ami_id; do + echo "Deregistering AMI: $ami_id" + aws ec2 deregister-image --region $REGION --image-id "$ami_id" || true + done + done + EOL + chmod +x $out/bin/cleanup-ami + ''; + + trigger-nix-build = pkgs.runCommand "trigger-nix-build" + { + buildInputs = with pkgs; [ + gh + git + coreutils + ]; + } '' + mkdir -p $out/bin + cat > $out/bin/trigger-nix-build << 'EOL' + #!/usr/bin/env bash + set -euo pipefail + + show_help() { + cat << EOF + Usage: trigger-nix-build [--help] + + Trigger the nix-build workflow for the current branch and watch its progress. + + This script will: + 1. Check if you're authenticated with GitHub + 2. Get the current branch and commit + 3. Verify you're on a standard branch (develop or release/*) or prompt for confirmation + 4. Trigger the nix-build workflow + 5. Watch the workflow progress until completion + + Options: + --help Show this help message and exit + + Requirements: + - GitHub CLI (gh) installed and authenticated + - Git installed + - Must be run from a git repository + + Example: + trigger-nix-build + EOF + } + + # Handle help flag + if [[ "$#" -gt 0 && "$1" == "--help" ]]; then + show_help + exit 0 + fi + + export PATH="${pkgs.lib.makeBinPath (with pkgs; [ + gh + git + coreutils + ])}:$PATH" + + # Check for required tools + for cmd in gh git; do + if ! command -v $cmd &> /dev/null; then + echo "Error: $cmd is required but not found" + exit 1 + fi + done + + # Check if user is authenticated with GitHub + if ! gh auth status &>/dev/null; then + echo "Error: Not authenticated with GitHub. Please run 'gh auth login' first." + exit 1 + fi + + # Get current branch and commit + BRANCH=$(git rev-parse --abbrev-ref HEAD) + COMMIT=$(git rev-parse HEAD) + + # Check if we're on a standard branch + if [[ "$BRANCH" != "develop" && ! "$BRANCH" =~ ^release/ ]]; then + echo "Warning: Running workflow from non-standard branch: $BRANCH" + echo "This is supported for testing purposes." + read -p "Continue? [y/N] " -n 1 -r + echo + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + echo "Aborted." + exit 1 + fi + fi + + # Trigger the workflow + echo "Triggering nix-build workflow for branch $BRANCH (commit: $COMMIT)" + gh workflow run nix-build.yml --ref "$BRANCH" + + # Wait for workflow to start and get the run ID + echo "Waiting for workflow to start..." + sleep 5 + + # Get the latest run ID for this workflow + RUN_ID=$(gh run list --workflow=nix-build.yml --limit 1 --json databaseId --jq '.[0].databaseId') + + if [ -z "$RUN_ID" ]; then + echo "Error: Could not find workflow run ID" + exit 1 + fi + + echo "Watching workflow run $RUN_ID..." + echo "The script will automatically exit when the workflow completes." + echo "Press Ctrl+C to stop watching (workflow will continue running)" + echo "----------------------------------------" + + # Try to watch the run, but handle network errors gracefully + while true; do + if gh run watch "$RUN_ID" --exit-status; then + break + else + echo "Network error while watching workflow. Retrying in 5 seconds..." + echo "You can also check the status manually with: gh run view $RUN_ID" + sleep 5 + fi + done + EOL + chmod +x $out/bin/trigger-nix-build + ''; + }; + + + # Create a testing harness for a PostgreSQL package. This is used for + # 'nix flake check', and works with any PostgreSQL package you hand it. + + makeCheckHarness = pgpkg: + let + sqlTests = ./nix/tests/smoke; + pg_prove = pkgs.perlPackages.TAPParserSourceHandlerpgTAP; + pg_regress = basePackages.pg_regress; + getkey-script = pkgs.stdenv.mkDerivation { + name = "pgsodium-getkey"; + buildCommand = '' + mkdir -p $out/bin + cat > $out/bin/pgsodium-getkey << 'EOF' + #!${pkgs.bash}/bin/bash + set -euo pipefail + + TMPDIR_BASE=$(mktemp -d) + + if [[ "$(uname)" == "Darwin" ]]; then + KEY_DIR="/private/tmp/pgsodium" + else + KEY_DIR="''${PGSODIUM_KEY_DIR:-$TMPDIR_BASE/pgsodium}" + fi + KEY_FILE="$KEY_DIR/pgsodium.key" + + if ! mkdir -p "$KEY_DIR" 2>/dev/null; then + echo "Error: Could not create key directory $KEY_DIR" >&2 + exit 1 + fi + chmod 1777 "$KEY_DIR" + + if [[ ! -f "$KEY_FILE" ]]; then + if ! (dd if=/dev/urandom bs=32 count=1 2>/dev/null | od -A n -t x1 | tr -d ' \n' > "$KEY_FILE"); then + if ! (openssl rand -hex 32 > "$KEY_FILE"); then + echo "00000000000000000000000000000000" > "$KEY_FILE" + echo "Warning: Using fallback key" >&2 + fi + fi + chmod 644 "$KEY_FILE" + fi + + if [[ -f "$KEY_FILE" && -r "$KEY_FILE" ]]; then + cat "$KEY_FILE" + else + echo "Error: Cannot read key file $KEY_FILE" >&2 + exit 1 + fi + EOF + chmod +x $out/bin/pgsodium-getkey + ''; + }; + + # Use the shared setup but with a test-specific name + start-postgres-server-bin = makePostgresDevSetup { + inherit pkgs; + name = "start-postgres-server-test"; + extraSubstitutions = { + PGSODIUM_GETKEY = "${getkey-script}/bin/pgsodium-getkey"; + }; + }; + + getVersionArg = pkg: + let + name = pkg.version; + in + if builtins.match "15.*" name != null then "15" + else if builtins.match "17.*" name != null then "17" + else if builtins.match "orioledb-17.*" name != null then "orioledb-17" + else throw "Unsupported PostgreSQL version: ${name}"; + + # Helper function to filter SQL files based on version + filterTestFiles = version: dir: + let + files = builtins.readDir dir; + isValidFile = name: + let + isVersionSpecific = builtins.match "z_.*" name != null; + matchesVersion = + if isVersionSpecific + then + if version == "orioledb-17" + then builtins.match "z_orioledb-17_.*" name != null + else if version == "17" + then builtins.match "z_17_.*" name != null + else builtins.match "z_15_.*" name != null + else true; + in + pkgs.lib.hasSuffix ".sql" name && matchesVersion; + in + pkgs.lib.filterAttrs (name: _: isValidFile name) files; + + # Get the major version for filtering + majorVersion = + let + version = builtins.trace "pgpkg.version is: ${pgpkg.version}" pgpkg.version; + _ = builtins.trace "Entering majorVersion logic"; + isOrioledbMatch = builtins.match "^17_[0-9]+$" version != null; + isSeventeenMatch = builtins.match "^17[.][0-9]+$" version != null; + result = + if isOrioledbMatch + then "orioledb-17" + else if isSeventeenMatch + then "17" + else "15"; + in + builtins.trace "Major version result: ${result}" result; # Trace the result # For "15.8" + + # Filter SQL test files + filteredSqlTests = filterTestFiles majorVersion ./nix/tests/sql; + + # Convert filtered tests to a sorted list of basenames (without extension) + testList = pkgs.lib.mapAttrsToList + (name: _: + builtins.substring 0 (pkgs.lib.stringLength name - 4) name + ) + filteredSqlTests; + sortedTestList = builtins.sort (a: b: a < b) testList; + + in + pkgs.runCommand "postgres-${pgpkg.version}-check-harness" + { + nativeBuildInputs = with pkgs; [ + coreutils + bash + perl + pgpkg + pg_prove + pg_regress + procps + start-postgres-server-bin + which + getkey-script + supabase-groonga + ]; + } '' + set -e + + #First we need to create a generic pg cluster for pgtap tests and run those + export GRN_PLUGINS_DIR=${supabase-groonga}/lib/groonga/plugins + PGTAP_CLUSTER=$(mktemp -d) + initdb --locale=C --username=supabase_admin -D "$PGTAP_CLUSTER" + substitute ${./nix/tests/postgresql.conf.in} "$PGTAP_CLUSTER"/postgresql.conf \ + --subst-var-by PGSODIUM_GETKEY_SCRIPT "${getkey-script}/bin/pgsodium-getkey" + echo "listen_addresses = '*'" >> "$PGTAP_CLUSTER"/postgresql.conf + echo "port = 5435" >> "$PGTAP_CLUSTER"/postgresql.conf + echo "host all all 127.0.0.1/32 trust" >> $PGTAP_CLUSTER/pg_hba.conf + echo "Checking shared_preload_libraries setting:" + grep -rn "shared_preload_libraries" "$PGTAP_CLUSTER"/postgresql.conf + # Remove timescaledb if running orioledb-17 check + echo "I AM ${pgpkg.version}====================================================" + if [[ "${pgpkg.version}" == *"17"* ]]; then + perl -pi -e 's/ timescaledb,//g' "$PGTAP_CLUSTER/postgresql.conf" + fi + #NOTE in the future we may also need to add the orioledb extension to the cluster when cluster is oriole + echo "PGTAP_CLUSTER directory contents:" + ls -la "$PGTAP_CLUSTER" + + # Check if postgresql.conf exists + if [ ! -f "$PGTAP_CLUSTER/postgresql.conf" ]; then + echo "postgresql.conf is missing!" + exit 1 + fi + + # PostgreSQL startup + if [[ "$(uname)" == "Darwin" ]]; then + pg_ctl -D "$PGTAP_CLUSTER" -l "$PGTAP_CLUSTER"/postgresql.log -o "-k "$PGTAP_CLUSTER" -p 5435 -d 5" start 2>&1 + else + mkdir -p "$PGTAP_CLUSTER/sockets" + pg_ctl -D "$PGTAP_CLUSTER" -l "$PGTAP_CLUSTER"/postgresql.log -o "-k $PGTAP_CLUSTER/sockets -p 5435 -d 5" start 2>&1 + fi || { + echo "pg_ctl failed to start PostgreSQL" + echo "Contents of postgresql.log:" + cat "$PGTAP_CLUSTER"/postgresql.log + exit 1 + } + for i in {1..60}; do + if pg_isready -h localhost -p 5435; then + echo "PostgreSQL is ready" + break + fi + sleep 1 + if [ $i -eq 60 ]; then + echo "PostgreSQL is not ready after 60 seconds" + echo "PostgreSQL status:" + pg_ctl -D "$PGTAP_CLUSTER" status + echo "PostgreSQL log content:" + cat "$PGTAP_CLUSTER"/postgresql.log + exit 1 + fi + done + createdb -p 5435 -h localhost --username=supabase_admin testing + if ! psql -p 5435 -h localhost --username=supabase_admin -d testing -v ON_ERROR_STOP=1 -Xaf ${./nix/tests/prime.sql}; then + echo "Error executing SQL file. PostgreSQL log content:" + cat "$PGTAP_CLUSTER"/postgresql.log + pg_ctl -D "$PGTAP_CLUSTER" stop + exit 1 + fi + SORTED_DIR=$(mktemp -d) + for t in $(printf "%s\n" ${builtins.concatStringsSep " " sortedTestList}); do + psql -p 5435 -h localhost --username=supabase_admin -d testing -f "${./nix/tests/sql}/$t.sql" || true + done + rm -rf "$SORTED_DIR" + pg_ctl -D "$PGTAP_CLUSTER" stop + rm -rf $PGTAP_CLUSTER + + # End of pgtap tests + # from here on out we are running pg_regress tests, we use a different cluster for this + # which is start by the start-postgres-server-bin script + # start-postgres-server-bin script closely matches our AMI setup, configurations and migrations + + # Ensure pgsodium key directory exists with proper permissions + if [[ "$(uname)" == "Darwin" ]]; then + mkdir -p /private/tmp/pgsodium + chmod 1777 /private/tmp/pgsodium + fi + unset GRN_PLUGINS_DIR + ${start-postgres-server-bin}/bin/start-postgres-server ${getVersionArg pgpkg} --daemonize + + for i in {1..60}; do + if pg_isready -h localhost -p 5435 -U supabase_admin -q; then + echo "PostgreSQL is ready" + break + fi + sleep 1 + if [ $i -eq 60 ]; then + echo "PostgreSQL failed to start" + exit 1 + fi + done + + if ! psql -p 5435 -h localhost --no-password --username=supabase_admin -d postgres -v ON_ERROR_STOP=1 -Xaf ${./nix/tests/prime.sql}; then + echo "Error executing SQL file" + exit 1 + fi + + mkdir -p $out/regression_output + if ! pg_regress \ + --use-existing \ + --dbname=postgres \ + --inputdir=${./nix/tests} \ + --outputdir=$out/regression_output \ + --host=localhost \ + --port=5435 \ + --user=supabase_admin \ + ${builtins.concatStringsSep " " sortedTestList}; then + echo "pg_regress tests failed" + cat $out/regression_output/regression.diffs + exit 1 + fi + + echo "Running migrations tests" + pg_prove -p 5435 -U supabase_admin -h localhost -d postgres -v ${./migrations/tests}/test.sql + + # Copy logs to output + for logfile in $(find /tmp -name postgresql.log -type f); do + cp "$logfile" $out/postgresql.log + done + exit 0 + ''; + in + rec { + # The list of all packages that can be built with 'nix build'. The list + # of names that can be used can be shown with 'nix flake show' + packages = flake-utils.lib.flattenTree basePackages // { + # Any extra packages we might want to include in our package + # set can go here. + inherit (pkgs); + }; + + # The list of exported 'checks' that are run with every run of 'nix + # flake check'. This is run in the CI system, as well. + checks = { + psql_15 = makeCheckHarness basePackages.psql_15.bin; + psql_17 = makeCheckHarness basePackages.psql_17.bin; + psql_orioledb-17 = makeCheckHarness basePackages.psql_orioledb-17.bin; + }; + + # Apps is a list of names of things that can be executed with 'nix run'; + # these are distinct from the things that can be built with 'nix build', + # so they need to be listed here too. + apps = + let + mkApp = attrName: binName: { + type = "app"; + program = "${basePackages."${attrName}"}/bin/${binName}"; + }; + in + { + start-server = mkApp "start-server" "start-postgres-server"; + start-client = mkApp "start-client" "start-postgres-client"; + start-replica = mkApp "start-replica" "start-postgres-replica"; + # migrate-postgres = mkApp "migrate-tool" "migrate-postgres"; + # sync-exts-versions = mkApp "sync-exts-versions" "sync-exts-versions"; + pg-restore = mkApp "pg-restore" "pg-restore"; + local-infra-bootstrap = mkApp "local-infra-bootstrap" "local-infra-bootstrap"; + dbmate-tool = mkApp "dbmate-tool" "dbmate-tool"; + update-readme = mkApp "update-readme" "update-readme"; + show-commands = mkApp "show-commands" "show-commands"; + build-test-ami = mkApp "build-test-ami" "build-test-ami"; + run-testinfra = mkApp "run-testinfra" "run-testinfra"; + cleanup-ami = mkApp "cleanup-ami" "cleanup-ami"; + trigger-nix-build = mkApp "trigger-nix-build" "trigger-nix-build"; + }; + + # 'devShells.default' lists the set of packages that are included in the + # ambient $PATH environment when you run 'nix develop'. This is useful + # for development and puts many convenient devtools instantly within + # reach. + + devShells = + let + mkCargoPgrxDevShell = { pgrxVersion, rustVersion }: pkgs.mkShell { + packages = with pkgs; [ + basePackages."cargo-pgrx_${pgrxVersion}" + (rust-bin.stable.${rustVersion}.default.override { + extensions = [ "rust-src" ]; + }) + ]; + shellHook = '' + export HISTFILE=.history + ''; + }; + in + { + default = pkgs.mkShell { + packages = with pkgs; [ + coreutils + just + nix-update + #pg_prove + shellcheck + ansible + ansible-lint + (packer.overrideAttrs (oldAttrs: { + version = "1.7.8"; + })) + + basePackages.start-server + basePackages.start-client + basePackages.start-replica + basePackages.migrate-tool + basePackages.sync-exts-versions + basePackages.build-test-ami + basePackages.run-testinfra + basePackages.cleanup-ami + dbmate + nushell + pythonEnv + ]; + shellHook = '' + export HISTFILE=.history + ''; + }; + cargo-pgrx_0_11_3 = mkCargoPgrxDevShell { + pgrxVersion = "0_11_3"; + rustVersion = "1.80.0"; + }; + cargo-pgrx_0_12_6 = mkCargoPgrxDevShell { + pgrxVersion = "0_12_6"; + rustVersion = "1.80.0"; + }; + }; + } + ); +} diff --git a/docker/cache/.gitkeep b/http/.gitkeep similarity index 100% rename from docker/cache/.gitkeep rename to http/.gitkeep diff --git a/legacy.vars.pkr.hcl b/legacy.vars.pkr.hcl deleted file mode 100644 index cf106c7c3..000000000 --- a/legacy.vars.pkr.hcl +++ /dev/null @@ -1,3 +0,0 @@ -ansible_arguments="--skip-tags install-supabase-internal,install-pgbouncer,legacy-incompatible,migrations,unit-tests,aws-only" -ami_name="builder-supabase-postgres-u18" -ami="ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-arm64-server-*" diff --git a/meta-data b/meta-data new file mode 100644 index 000000000..0551428a2 --- /dev/null +++ b/meta-data @@ -0,0 +1,2 @@ +instance-id: iid-local01 +local-hostname: packer-ubuntu diff --git a/migrations/Dockerfile.dbmate b/migrations/Dockerfile.dbmate new file mode 100644 index 000000000..29c80e6e5 --- /dev/null +++ b/migrations/Dockerfile.dbmate @@ -0,0 +1,23 @@ +FROM debian:bullseye-slim + +RUN apt-get update && apt-get install -y curl wget gnupg2 lsb-release + +RUN ARCH=$(dpkg --print-architecture); \ + case ${ARCH} in \ + amd64) DBMATE_ARCH="linux-amd64" ;; \ + arm64) DBMATE_ARCH="linux-arm64" ;; \ + *) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \ + esac && \ + curl -fsSL -o /usr/local/bin/dbmate \ + https://github.com/amacneil/dbmate/releases/latest/download/dbmate-${DBMATE_ARCH} && \ + chmod +x /usr/local/bin/dbmate + +RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - +RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list +RUN apt-get update && apt-get install -y postgresql-client-%VERSION% + +ENV PATH="/usr/lib/postgresql/%VERSION%/bin:${PATH}" + +RUN dbmate --version + +ENTRYPOINT ["dbmate"] diff --git a/migrations/README.md b/migrations/README.md index bfd7308d4..cab371553 100644 --- a/migrations/README.md +++ b/migrations/README.md @@ -1,3 +1,36 @@ +# Usage + +from the root of the `supabase/postgres` project, you can run the following commands: + + +```shell +Usage: nix run .#dbmate-tool -- [options] + +Options: + -v, --version [15|16|orioledb-17|all] Specify the PostgreSQL version to use (required defaults to --version all) + -p, --port PORT Specify the port number to use (default: 5435) + -h, --help Show this help message + +Description: + Runs 'dbmate up' against a locally running the version of database you specify. Or 'all' to run against all versions. + NOTE: To create a migration, you must run 'nix develop' and then 'dbmate new ' to create a new migration file. + +Examples: + nix run .#dbmate-tool + nix run .#dbmate-tool -- --version 15 + nix run .#dbmate-tool -- --version 16 --port 5433 + +``` + +This can also be run from a github "flake url" for example: + +```shell +nix run github:supabase/postgres#dbmate-tool -- --version 15 + +or + +nix run github:supabase/postgres/mybranch#dbmate-tool -- --version 15 +``` # supabase/migrations `supabase/migrations` is a consolidation of SQL migrations from: @@ -9,6 +42,8 @@ aiming to provide a single source of truth for migrations on the platform that can be depended upon by those components. For more information on goals see [the RFC](https://www.notion.so/supabase/Centralize-SQL-Migrations-cd3847ae027d4f2bba9defb2cc82f69a) + + ## How it was Created Migrations were pulled (in order) from: @@ -20,10 +55,12 @@ For compatibility with hosted projects, we include [migrate.sh](migrate.sh) that 1. Run all `db/init-scripts` with `postgres` superuser role. 2. Run all `db/migrations` with `supabase_admin` superuser role. -3. Finalize role passwords with `/etc/postgres.schema.sql` if present. +3. Finalize role passwords with `/etc/postgresql.schema.sql` if present. Additionally, [supabase/postgres](https://github.com/supabase/postgres/blob/develop/ansible/playbook-docker.yml#L9) image contains several migration scripts to configure default extensions. These are run first by docker entrypoint and included in ami by ansible. + + ## Guidelines - Migrations are append only. Never edit existing migrations once they are on master. @@ -41,20 +78,35 @@ Additionally, [supabase/postgres](https://github.com/supabase/postgres/blob/deve ### Add a Migration +First, start a local postgres server in another terminal window: + ```shell -# Start the database server -docker-compose up +# Start the database server in another window +nix run .#start-server 15 +``` -# create a new migration -dbmate new '' +Then, in your main terminal window, run: + +```shell + +nix develop ``` +in the root of `supabase/postgres`. -Then, populate the migration at `./db/migrations/xxxxxxxxx_` and make sure it execute sucessfully with +Next run: +``` shell +# Create a new migration (make sure to specify the migrations directory) +dbmate --migrations-dir="migrations/db/migrations" new '' +``` + +Then, execute the migration at `./migrations/db/xxxxxxxxx_` and make sure it runs successfully with: ```shell -dbmate up +dbmate --no-dump-schema --migrations-dir"migrations/db/migrations" up ``` +Note: Migrations are applied using the `supabase_admin` superuser role, as specified in the "How it was Created" section above. + ### Adding a migration with docker-compose dbmate can optionally be run locally using docker: @@ -72,7 +124,32 @@ Then, populate the migration at `./db/migrations/xxxxxxxxx_` and m ```shell docker-compose run --rm dbmate up ``` +### Updating schema.sql for each major version + +After making changes to migrations, you should update the schema.sql files for each major version of PostgreSQL: + +```shell +# First, stop any running PostgreSQL servers +# Then from the root of supabase/postgres run: +nix run .#dbmate-tool -- --version all +``` + +This will create automatically schema.sql file for each major version of PostgreSQL and OrioleDB (the files are named like `schema-`, `schema-oriole-`). Commit these changes to your repository and push to your branch. The workflow in `.github/workflows/test.yml` will re-run this command in CI, and perform a git diff to verify the idempotency of the migrations, and that the latest changes have been committed. ## Testing -Migrations are tested in CI to ensure they do not raise an exception against previously released `supabase/postgres` docker images. The full version matrix is at [test.yml](./.github/workflows/test.yml) in the `supabase-version` variable. +In addition to ci test mentioned above, you can test migrations locally by running the following test for each major version of postgres one at a time. + +Examples: + +``` +nix build .#checks.aarch64-darwin.psql_15 -L +nix build .#checks.aarch64-darwin.psql_17 -L +nix build .#checks.aarch64-darwin.psql_orioledb-17 -L +``` + +(Note that the evaluation and nix build of the postgres packages "bundle" of each major version must succeed here, even though we run one version at a time. If you made changes to postgres or extensions, or wrappers those may rebuild here when you run this. Otherwise they will usually download the prebuilt version from the supabase nix binary cache) + +At the end of these commands, you will see the output of both `pg_regress` tests, and migration tests + +see [Adding Tests](https://github.com/supabase/postgres/blob/develop/nix/docs/adding-tests.md) for more information. diff --git a/migrations/db/init-scripts/00000000000000-initial-schema.sql b/migrations/db/init-scripts/00000000000000-initial-schema.sql index a98f0144d..71b6ab06a 100644 --- a/migrations/db/init-scripts/00000000000000-initial-schema.sql +++ b/migrations/db/init-scripts/00000000000000-initial-schema.sql @@ -5,7 +5,6 @@ create publication supabase_realtime; -- Supabase super admin -create user supabase_admin; alter user supabase_admin with superuser createdb createrole replication bypassrls; -- Supabase replication user @@ -19,7 +18,17 @@ grant pg_read_all_data to supabase_read_only_user; create schema if not exists extensions; create extension if not exists "uuid-ossp" with schema extensions; create extension if not exists pgcrypto with schema extensions; -create extension if not exists pgjwt with schema extensions; +do $$ +begin + if exists (select 1 from pg_available_extensions where name = 'pgjwt') then + if not exists (select 1 from pg_extension where extname = 'pgjwt') then + if current_setting('server_version_num')::int / 10000 = 15 then + create extension if not exists pgjwt with schema "extensions" cascade; + end if; + end if; + end if; +end $$; + -- Set up auth roles for the developer create role anon nologin noinherit; diff --git a/migrations/db/init-scripts/README.md b/migrations/db/init-scripts/README.md new file mode 100644 index 000000000..c12fe3b8f --- /dev/null +++ b/migrations/db/init-scripts/README.md @@ -0,0 +1,7 @@ + +The effects of these migrations are tested on: + +- [nix/tests/sql/auth.out](../../../nix/tests/expected/auth.out) +- [nix/tests/sql/storage.out](../../../nix/tests/expected/storage.out) +- [nix/tests/sql/roles.out](../../../nix/tests/expected/roles.out) +- [nix/tests/sql/evtrigs.out](../../../nix/tests/expected/evtrigs.out) diff --git a/migrations/db/migrate.sh b/migrations/db/migrate.sh index 1882978ed..0a84d1e6c 100755 --- a/migrations/db/migrate.sh +++ b/migrations/db/migrate.sh @@ -28,6 +28,16 @@ fi db=$( cd -- "$( dirname -- "$0" )" > /dev/null 2>&1 && pwd ) if [ -z "${USE_DBMATE:-}" ]; then + psql -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U supabase_admin < 0 + and a.attrelid = c.oid + ) = array['created_at', 'is_partitioned', 'is_unlogged', 'queue_name']::text[] + ) then + -- Insert data into pgmq.meta for all tables matching the naming pattern 'pgmq.q_' + insert into pgmq.meta (queue_name, is_partitioned, is_unlogged, created_at) + select + substring(c.relname from 3) as queue_name, + false as is_partitioned, + case when c.relpersistence = 'u' then true else false end as is_unlogged, + now() as created_at + from + pg_catalog.pg_class c + join pg_catalog.pg_namespace n + on c.relnamespace = n.oid + where + n.nspname = 'pgmq' + and c.relname like 'q_%' + and c.relkind in ('r', 'p', 'u') + on conflict (queue_name) do nothing; + end if; +end $$; + +-- For logical backups we detach the queue and archive tables from the pgmq extension +-- prior to pausing. Once detached, pgmq.drop_queue breaks. This re-attaches them +-- when a project is unpaused and allows pgmq.drop_queue to work normally. +do $$ +declare + ext_exists boolean; + tbl record; +begin + -- check if pgmq extension is installed + select exists(select 1 from pg_extension where extname = 'pgmq') into ext_exists; + + if ext_exists then + for tbl in + select c.relname as table_name + from pg_class c + join pg_namespace n on c.relnamespace = n.oid + where n.nspname = 'pgmq' + and c.relkind in ('r', 'u') -- include ordinary and unlogged tables + and (c.relname like 'q\_%' or c.relname like 'a\_%') + and c.oid not in ( + select d.objid + from pg_depend d + join pg_extension e on d.refobjid = e.oid + where e.extname = 'pgmq' + and d.classid = 'pg_class'::regclass + and d.deptype = 'e' + ) + loop + execute format('alter extension pgmq add table pgmq.%I', tbl.table_name); + end loop; + end if; +end; +$$; + + +-- migrate:down diff --git a/migrations/db/migrations/20250205060043_disable_log_statement_on_internal_roles.sql b/migrations/db/migrations/20250205060043_disable_log_statement_on_internal_roles.sql new file mode 100644 index 000000000..822a7587e --- /dev/null +++ b/migrations/db/migrations/20250205060043_disable_log_statement_on_internal_roles.sql @@ -0,0 +1,6 @@ +-- migrate:up +alter role supabase_admin set log_statement = none; +alter role supabase_auth_admin set log_statement = none; +alter role supabase_storage_admin set log_statement = none; + +-- migrate:down diff --git a/migrations/db/migrations/20250205144616_move_orioledb_to_extensions_schema.sql b/migrations/db/migrations/20250205144616_move_orioledb_to_extensions_schema.sql new file mode 100644 index 000000000..259a6b0e5 --- /dev/null +++ b/migrations/db/migrations/20250205144616_move_orioledb_to_extensions_schema.sql @@ -0,0 +1,26 @@ +-- migrate:up +do $$ +declare + ext_schema text; + extensions_schema_exists boolean; +begin + -- check if the "extensions" schema exists + select exists ( + select 1 from pg_namespace where nspname = 'extensions' + ) into extensions_schema_exists; + + if extensions_schema_exists then + -- check if the "orioledb" extension is in the "public" schema + select nspname into ext_schema + from pg_extension e + join pg_namespace n on e.extnamespace = n.oid + where extname = 'orioledb'; + + if ext_schema = 'public' then + execute 'alter extension orioledb set schema extensions'; + end if; + end if; +end $$; + +-- migrate:down + diff --git a/migrations/db/migrations/20250218031949_pgsodium_mask_role.sql b/migrations/db/migrations/20250218031949_pgsodium_mask_role.sql new file mode 100644 index 000000000..f44fa9866 --- /dev/null +++ b/migrations/db/migrations/20250218031949_pgsodium_mask_role.sql @@ -0,0 +1,31 @@ +-- migrate:up + +DO $$ +BEGIN + IF EXISTS (SELECT FROM pg_extension WHERE extname = 'pgsodium') THEN + CREATE OR REPLACE FUNCTION pgsodium.mask_role(masked_role regrole, source_name text, view_name text) + RETURNS void + LANGUAGE plpgsql + SECURITY DEFINER + SET search_path TO '' + AS $function$ + BEGIN + EXECUTE format( + 'GRANT SELECT ON pgsodium.key TO %s', + masked_role); + + EXECUTE format( + 'GRANT pgsodium_keyiduser, pgsodium_keyholder TO %s', + masked_role); + + EXECUTE format( + 'GRANT ALL ON %I TO %s', + view_name, + masked_role); + RETURN; + END + $function$; + END IF; +END $$; + +-- migrate:down diff --git a/migrations/db/migrations/20250220051611_pg_net_perms_fix.sql b/migrations/db/migrations/20250220051611_pg_net_perms_fix.sql new file mode 100644 index 000000000..cc8ffc2c7 --- /dev/null +++ b/migrations/db/migrations/20250220051611_pg_net_perms_fix.sql @@ -0,0 +1,64 @@ +-- migrate:up +CREATE OR REPLACE FUNCTION extensions.grant_pg_net_access() +RETURNS event_trigger +LANGUAGE plpgsql +AS $$ +BEGIN + IF EXISTS ( + SELECT 1 + FROM pg_event_trigger_ddl_commands() AS ev + JOIN pg_extension AS ext + ON ev.objid = ext.oid + WHERE ext.extname = 'pg_net' + ) + THEN + IF NOT EXISTS ( + SELECT 1 + FROM pg_roles + WHERE rolname = 'supabase_functions_admin' + ) + THEN + CREATE USER supabase_functions_admin NOINHERIT CREATEROLE LOGIN NOREPLICATION; + END IF; + + GRANT USAGE ON SCHEMA net TO supabase_functions_admin, postgres, anon, authenticated, service_role; + + IF EXISTS ( + SELECT FROM pg_extension + WHERE extname = 'pg_net' + -- all versions in use on existing projects as of 2025-02-20 + -- version 0.12.0 onwards don't need these applied + AND extversion IN ('0.2', '0.6', '0.7', '0.7.1', '0.8', '0.10.0', '0.11.0') + ) THEN + ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER; + ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER; + + ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net; + ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net; + + REVOKE ALL ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC; + REVOKE ALL ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC; + + GRANT EXECUTE ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role; + GRANT EXECUTE ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role; + END IF; + END IF; +END; +$$; + +DO $$ +BEGIN + IF EXISTS (SELECT FROM pg_extension WHERE extname = 'pg_net') + THEN + ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY INVOKER; + ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY INVOKER; + + REVOKE EXECUTE ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) FROM supabase_functions_admin, postgres, anon, authenticated, service_role; + REVOKE EXECUTE ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) FROM supabase_functions_admin, postgres, anon, authenticated, service_role; + + GRANT ALL ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) TO PUBLIC; + GRANT ALL ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) TO PUBLIC; + END IF; +END $$; + +-- migrate:down diff --git a/migrations/db/migrations/20250312095419_pgbouncer_ownership.sql b/migrations/db/migrations/20250312095419_pgbouncer_ownership.sql new file mode 100644 index 000000000..b8cf7073b --- /dev/null +++ b/migrations/db/migrations/20250312095419_pgbouncer_ownership.sql @@ -0,0 +1,5 @@ +-- migrate:up +alter function pgbouncer.get_auth owner to supabase_admin; +grant execute on function pgbouncer.get_auth(p_usename text) to postgres; + +-- migrate:down diff --git a/migrations/db/migrations/20250402065937_alter_internal_event_triggers_owner_to_supabase_admin.sql b/migrations/db/migrations/20250402065937_alter_internal_event_triggers_owner_to_supabase_admin.sql new file mode 100644 index 000000000..9308f07d4 --- /dev/null +++ b/migrations/db/migrations/20250402065937_alter_internal_event_triggers_owner_to_supabase_admin.sql @@ -0,0 +1,10 @@ +-- migrate:up +drop event trigger if exists issue_pg_net_access; + +alter function extensions.grant_pg_net_access owner to supabase_admin; + +CREATE EVENT TRIGGER issue_pg_net_access ON ddl_command_end + WHEN TAG IN ('CREATE EXTENSION') + EXECUTE FUNCTION extensions.grant_pg_net_access(); + +-- migrate:down diff --git a/migrations/db/migrations/20250417190610_update_pgbouncer_get_auth.sql b/migrations/db/migrations/20250417190610_update_pgbouncer_get_auth.sql new file mode 100644 index 000000000..5e6e6a582 --- /dev/null +++ b/migrations/db/migrations/20250417190610_update_pgbouncer_get_auth.sql @@ -0,0 +1,24 @@ +-- migrate:up + +create or replace function pgbouncer.get_auth(p_usename text) returns table (username text, password text) + language plpgsql security definer + as $$ +begin + raise debug 'PgBouncer auth request: %', p_usename; + + return query + select + rolname::text, + case when rolvaliduntil < now() + then null + else rolpassword::text + end + from pg_authid + where rolname=$1 and rolcanlogin; +end; +$$; + +-- from migrations/db/migrations/20250312095419_pgbouncer_ownership.sql +grant execute on function pgbouncer.get_auth(p_usename text) to postgres; + +-- migrate:down diff --git a/migrations/db/migrations/20250421084701_revoke_admin_roles_from_postgres.sql b/migrations/db/migrations/20250421084701_revoke_admin_roles_from_postgres.sql new file mode 100644 index 000000000..4c5c48b79 --- /dev/null +++ b/migrations/db/migrations/20250421084701_revoke_admin_roles_from_postgres.sql @@ -0,0 +1,10 @@ +-- migrate:up +revoke supabase_storage_admin from postgres; +revoke create on schema storage from postgres; +revoke all on storage.migrations from anon, authenticated, service_role, postgres; + +revoke supabase_auth_admin from postgres; +revoke create on schema auth from postgres; +revoke all on auth.schema_migrations from dashboard_user, postgres; + +-- migrate:down diff --git a/migrations/docker-compose.yaml b/migrations/docker-compose.yaml index a45975242..1b3e8b143 100644 --- a/migrations/docker-compose.yaml +++ b/migrations/docker-compose.yaml @@ -6,22 +6,15 @@ version: "3.8" services: db: - image: supabase/postgres:15.1.0.45 + image: supabase_postgres restart: "no" - ports: - - 5478:5432 healthcheck: test: pg_isready -U postgres -h localhost interval: 2s timeout: 2s retries: 10 environment: - POSTGRES_HOST: /var/run/postgresql POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} - volumes: - - ./db/init-scripts:/docker-entrypoint-initdb.d/init-scripts - - ./db/migrations:/docker-entrypoint-initdb.d/migrations - - ./db/migrate.sh:/docker-entrypoint-initdb.d/migrate.sh pg_prove: image: horrendo/pg_prove @@ -40,7 +33,9 @@ services: command: pg_prove /tests/test.sql dbmate: - image: amacneil/dbmate:1.16.2 + build: + context: . + dockerfile: Dockerfile.dbmate depends_on: db: condition: service_healthy diff --git a/migrations/schema-15.sql b/migrations/schema-15.sql new file mode 100644 index 000000000..5a38517ba --- /dev/null +++ b/migrations/schema-15.sql @@ -0,0 +1,1013 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 15.8 +-- Dumped by pg_dump version 15.8 + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +-- +-- Name: auth; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA auth; + + +-- +-- Name: extensions; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA extensions; + + +-- +-- Name: graphql; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA graphql; + + +-- +-- Name: graphql_public; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA graphql_public; + + +-- +-- Name: pgbouncer; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA pgbouncer; + + +-- +-- Name: realtime; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA realtime; + + +-- +-- Name: storage; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA storage; + + +-- +-- Name: vault; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA vault; + + +-- +-- Name: pg_graphql; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS pg_graphql WITH SCHEMA graphql; + + +-- +-- Name: EXTENSION pg_graphql; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION pg_graphql IS 'pg_graphql: GraphQL support'; + + +-- +-- Name: pg_stat_statements; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS pg_stat_statements WITH SCHEMA extensions; + + +-- +-- Name: EXTENSION pg_stat_statements; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION pg_stat_statements IS 'track planning and execution statistics of all SQL statements executed'; + + +-- +-- Name: pgcrypto; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA extensions; + + +-- +-- Name: EXTENSION pgcrypto; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION pgcrypto IS 'cryptographic functions'; + + +-- +-- Name: pgjwt; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS pgjwt WITH SCHEMA extensions; + + +-- +-- Name: EXTENSION pgjwt; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION pgjwt IS 'JSON Web Token API for Postgresql'; + + +-- +-- Name: supabase_vault; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS supabase_vault WITH SCHEMA vault; + + +-- +-- Name: EXTENSION supabase_vault; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION supabase_vault IS 'Supabase Vault Extension'; + + +-- +-- Name: uuid-ossp; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA extensions; + + +-- +-- Name: EXTENSION "uuid-ossp"; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION "uuid-ossp" IS 'generate universally unique identifiers (UUIDs)'; + + +-- +-- Name: email(); Type: FUNCTION; Schema: auth; Owner: - +-- + +CREATE FUNCTION auth.email() RETURNS text + LANGUAGE sql STABLE + AS $$ + select nullif(current_setting('request.jwt.claim.email', true), '')::text; +$$; + + +-- +-- Name: role(); Type: FUNCTION; Schema: auth; Owner: - +-- + +CREATE FUNCTION auth.role() RETURNS text + LANGUAGE sql STABLE + AS $$ + select nullif(current_setting('request.jwt.claim.role', true), '')::text; +$$; + + +-- +-- Name: uid(); Type: FUNCTION; Schema: auth; Owner: - +-- + +CREATE FUNCTION auth.uid() RETURNS uuid + LANGUAGE sql STABLE + AS $$ + select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid; +$$; + + +-- +-- Name: grant_pg_cron_access(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.grant_pg_cron_access() RETURNS event_trigger + LANGUAGE plpgsql + AS $$ +BEGIN + IF EXISTS ( + SELECT + FROM pg_event_trigger_ddl_commands() AS ev + JOIN pg_extension AS ext + ON ev.objid = ext.oid + WHERE ext.extname = 'pg_cron' + ) + THEN + grant usage on schema cron to postgres with grant option; + + alter default privileges in schema cron grant all on tables to postgres with grant option; + alter default privileges in schema cron grant all on functions to postgres with grant option; + alter default privileges in schema cron grant all on sequences to postgres with grant option; + + alter default privileges for user supabase_admin in schema cron grant all + on sequences to postgres with grant option; + alter default privileges for user supabase_admin in schema cron grant all + on tables to postgres with grant option; + alter default privileges for user supabase_admin in schema cron grant all + on functions to postgres with grant option; + + grant all privileges on all tables in schema cron to postgres with grant option; + revoke all on table cron.job from postgres; + grant select on table cron.job to postgres with grant option; + END IF; +END; +$$; + + +-- +-- Name: FUNCTION grant_pg_cron_access(); Type: COMMENT; Schema: extensions; Owner: - +-- + +COMMENT ON FUNCTION extensions.grant_pg_cron_access() IS 'Grants access to pg_cron'; + + +-- +-- Name: grant_pg_graphql_access(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.grant_pg_graphql_access() RETURNS event_trigger + LANGUAGE plpgsql + AS $_$ +DECLARE + func_is_graphql_resolve bool; +BEGIN + func_is_graphql_resolve = ( + SELECT n.proname = 'resolve' + FROM pg_event_trigger_ddl_commands() AS ev + LEFT JOIN pg_catalog.pg_proc AS n + ON ev.objid = n.oid + ); + + IF func_is_graphql_resolve + THEN + -- Update public wrapper to pass all arguments through to the pg_graphql resolve func + DROP FUNCTION IF EXISTS graphql_public.graphql; + create or replace function graphql_public.graphql( + "operationName" text default null, + query text default null, + variables jsonb default null, + extensions jsonb default null + ) + returns jsonb + language sql + as $$ + select graphql.resolve( + query := query, + variables := coalesce(variables, '{}'), + "operationName" := "operationName", + extensions := extensions + ); + $$; + + -- This hook executes when `graphql.resolve` is created. That is not necessarily the last + -- function in the extension so we need to grant permissions on existing entities AND + -- update default permissions to any others that are created after `graphql.resolve` + grant usage on schema graphql to postgres, anon, authenticated, service_role; + grant select on all tables in schema graphql to postgres, anon, authenticated, service_role; + grant execute on all functions in schema graphql to postgres, anon, authenticated, service_role; + grant all on all sequences in schema graphql to postgres, anon, authenticated, service_role; + alter default privileges in schema graphql grant all on tables to postgres, anon, authenticated, service_role; + alter default privileges in schema graphql grant all on functions to postgres, anon, authenticated, service_role; + alter default privileges in schema graphql grant all on sequences to postgres, anon, authenticated, service_role; + + -- Allow postgres role to allow granting usage on graphql and graphql_public schemas to custom roles + grant usage on schema graphql_public to postgres with grant option; + grant usage on schema graphql to postgres with grant option; + END IF; + +END; +$_$; + + +-- +-- Name: FUNCTION grant_pg_graphql_access(); Type: COMMENT; Schema: extensions; Owner: - +-- + +COMMENT ON FUNCTION extensions.grant_pg_graphql_access() IS 'Grants access to pg_graphql'; + + +-- +-- Name: grant_pg_net_access(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.grant_pg_net_access() RETURNS event_trigger + LANGUAGE plpgsql + AS $$ +BEGIN + IF EXISTS ( + SELECT 1 + FROM pg_event_trigger_ddl_commands() AS ev + JOIN pg_extension AS ext + ON ev.objid = ext.oid + WHERE ext.extname = 'pg_net' + ) + THEN + IF NOT EXISTS ( + SELECT 1 + FROM pg_roles + WHERE rolname = 'supabase_functions_admin' + ) + THEN + CREATE USER supabase_functions_admin NOINHERIT CREATEROLE LOGIN NOREPLICATION; + END IF; + + GRANT USAGE ON SCHEMA net TO supabase_functions_admin, postgres, anon, authenticated, service_role; + + IF EXISTS ( + SELECT FROM pg_extension + WHERE extname = 'pg_net' + -- all versions in use on existing projects as of 2025-02-20 + -- version 0.12.0 onwards don't need these applied + AND extversion IN ('0.2', '0.6', '0.7', '0.7.1', '0.8', '0.10.0', '0.11.0') + ) THEN + ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER; + ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER; + + ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net; + ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net; + + REVOKE ALL ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC; + REVOKE ALL ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC; + + GRANT EXECUTE ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role; + GRANT EXECUTE ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role; + END IF; + END IF; +END; +$$; + + +-- +-- Name: FUNCTION grant_pg_net_access(); Type: COMMENT; Schema: extensions; Owner: - +-- + +COMMENT ON FUNCTION extensions.grant_pg_net_access() IS 'Grants access to pg_net'; + + +-- +-- Name: pgrst_ddl_watch(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.pgrst_ddl_watch() RETURNS event_trigger + LANGUAGE plpgsql + AS $$ +DECLARE + cmd record; +BEGIN + FOR cmd IN SELECT * FROM pg_event_trigger_ddl_commands() + LOOP + IF cmd.command_tag IN ( + 'CREATE SCHEMA', 'ALTER SCHEMA' + , 'CREATE TABLE', 'CREATE TABLE AS', 'SELECT INTO', 'ALTER TABLE' + , 'CREATE FOREIGN TABLE', 'ALTER FOREIGN TABLE' + , 'CREATE VIEW', 'ALTER VIEW' + , 'CREATE MATERIALIZED VIEW', 'ALTER MATERIALIZED VIEW' + , 'CREATE FUNCTION', 'ALTER FUNCTION' + , 'CREATE TRIGGER' + , 'CREATE TYPE', 'ALTER TYPE' + , 'CREATE RULE' + , 'COMMENT' + ) + -- don't notify in case of CREATE TEMP table or other objects created on pg_temp + AND cmd.schema_name is distinct from 'pg_temp' + THEN + NOTIFY pgrst, 'reload schema'; + END IF; + END LOOP; +END; $$; + + +-- +-- Name: pgrst_drop_watch(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.pgrst_drop_watch() RETURNS event_trigger + LANGUAGE plpgsql + AS $$ +DECLARE + obj record; +BEGIN + FOR obj IN SELECT * FROM pg_event_trigger_dropped_objects() + LOOP + IF obj.object_type IN ( + 'schema' + , 'table' + , 'foreign table' + , 'view' + , 'materialized view' + , 'function' + , 'trigger' + , 'type' + , 'rule' + ) + AND obj.is_temporary IS false -- no pg_temp objects + THEN + NOTIFY pgrst, 'reload schema'; + END IF; + END LOOP; +END; $$; + + +-- +-- Name: set_graphql_placeholder(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.set_graphql_placeholder() RETURNS event_trigger + LANGUAGE plpgsql + AS $_$ + DECLARE + graphql_is_dropped bool; + BEGIN + graphql_is_dropped = ( + SELECT ev.schema_name = 'graphql_public' + FROM pg_event_trigger_dropped_objects() AS ev + WHERE ev.schema_name = 'graphql_public' + ); + + IF graphql_is_dropped + THEN + create or replace function graphql_public.graphql( + "operationName" text default null, + query text default null, + variables jsonb default null, + extensions jsonb default null + ) + returns jsonb + language plpgsql + as $$ + DECLARE + server_version float; + BEGIN + server_version = (SELECT (SPLIT_PART((select version()), ' ', 2))::float); + + IF server_version >= 14 THEN + RETURN jsonb_build_object( + 'errors', jsonb_build_array( + jsonb_build_object( + 'message', 'pg_graphql extension is not enabled.' + ) + ) + ); + ELSE + RETURN jsonb_build_object( + 'errors', jsonb_build_array( + jsonb_build_object( + 'message', 'pg_graphql is only available on projects running Postgres 14 onwards.' + ) + ) + ); + END IF; + END; + $$; + END IF; + + END; +$_$; + + +-- +-- Name: FUNCTION set_graphql_placeholder(); Type: COMMENT; Schema: extensions; Owner: - +-- + +COMMENT ON FUNCTION extensions.set_graphql_placeholder() IS 'Reintroduces placeholder function for graphql_public.graphql'; + + +-- +-- Name: get_auth(text); Type: FUNCTION; Schema: pgbouncer; Owner: - +-- + +CREATE FUNCTION pgbouncer.get_auth(p_usename text) RETURNS TABLE(username text, password text) + LANGUAGE plpgsql SECURITY DEFINER + AS $_$ +begin + raise debug 'PgBouncer auth request: %', p_usename; + + return query + select + rolname::text, + case when rolvaliduntil < now() + then null + else rolpassword::text + end + from pg_authid + where rolname=$1 and rolcanlogin; +end; +$_$; + + +-- +-- Name: extension(text); Type: FUNCTION; Schema: storage; Owner: - +-- + +CREATE FUNCTION storage.extension(name text) RETURNS text + LANGUAGE plpgsql + AS $$ +DECLARE +_parts text[]; +_filename text; +BEGIN + select string_to_array(name, '/') into _parts; + select _parts[array_length(_parts,1)] into _filename; + -- @todo return the last part instead of 2 + return split_part(_filename, '.', 2); +END +$$; + + +-- +-- Name: filename(text); Type: FUNCTION; Schema: storage; Owner: - +-- + +CREATE FUNCTION storage.filename(name text) RETURNS text + LANGUAGE plpgsql + AS $$ +DECLARE +_parts text[]; +BEGIN + select string_to_array(name, '/') into _parts; + return _parts[array_length(_parts,1)]; +END +$$; + + +-- +-- Name: foldername(text); Type: FUNCTION; Schema: storage; Owner: - +-- + +CREATE FUNCTION storage.foldername(name text) RETURNS text[] + LANGUAGE plpgsql + AS $$ +DECLARE +_parts text[]; +BEGIN + select string_to_array(name, '/') into _parts; + return _parts[1:array_length(_parts,1)-1]; +END +$$; + + +-- +-- Name: search(text, text, integer, integer, integer); Type: FUNCTION; Schema: storage; Owner: - +-- + +CREATE FUNCTION storage.search(prefix text, bucketname text, limits integer DEFAULT 100, levels integer DEFAULT 1, offsets integer DEFAULT 0) RETURNS TABLE(name text, id uuid, updated_at timestamp with time zone, created_at timestamp with time zone, last_accessed_at timestamp with time zone, metadata jsonb) + LANGUAGE plpgsql + AS $$ +DECLARE +_bucketId text; +BEGIN + -- will be replaced by migrations when server starts + -- saving space for cloud-init +END +$$; + + +SET default_tablespace = ''; + +SET default_table_access_method = heap; + +-- +-- Name: audit_log_entries; Type: TABLE; Schema: auth; Owner: - +-- + +CREATE TABLE auth.audit_log_entries ( + instance_id uuid, + id uuid NOT NULL, + payload json, + created_at timestamp with time zone +); + + +-- +-- Name: TABLE audit_log_entries; Type: COMMENT; Schema: auth; Owner: - +-- + +COMMENT ON TABLE auth.audit_log_entries IS 'Auth: Audit trail for user actions.'; + + +-- +-- Name: instances; Type: TABLE; Schema: auth; Owner: - +-- + +CREATE TABLE auth.instances ( + id uuid NOT NULL, + uuid uuid, + raw_base_config text, + created_at timestamp with time zone, + updated_at timestamp with time zone +); + + +-- +-- Name: TABLE instances; Type: COMMENT; Schema: auth; Owner: - +-- + +COMMENT ON TABLE auth.instances IS 'Auth: Manages users across multiple sites.'; + + +-- +-- Name: refresh_tokens; Type: TABLE; Schema: auth; Owner: - +-- + +CREATE TABLE auth.refresh_tokens ( + instance_id uuid, + id bigint NOT NULL, + token character varying(255), + user_id character varying(255), + revoked boolean, + created_at timestamp with time zone, + updated_at timestamp with time zone +); + + +-- +-- Name: TABLE refresh_tokens; Type: COMMENT; Schema: auth; Owner: - +-- + +COMMENT ON TABLE auth.refresh_tokens IS 'Auth: Store of tokens used to refresh JWT tokens once they expire.'; + + +-- +-- Name: refresh_tokens_id_seq; Type: SEQUENCE; Schema: auth; Owner: - +-- + +CREATE SEQUENCE auth.refresh_tokens_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: refresh_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: auth; Owner: - +-- + +ALTER SEQUENCE auth.refresh_tokens_id_seq OWNED BY auth.refresh_tokens.id; + + +-- +-- Name: schema_migrations; Type: TABLE; Schema: auth; Owner: - +-- + +CREATE TABLE auth.schema_migrations ( + version character varying(255) NOT NULL +); + + +-- +-- Name: TABLE schema_migrations; Type: COMMENT; Schema: auth; Owner: - +-- + +COMMENT ON TABLE auth.schema_migrations IS 'Auth: Manages updates to the auth system.'; + + +-- +-- Name: users; Type: TABLE; Schema: auth; Owner: - +-- + +CREATE TABLE auth.users ( + instance_id uuid, + id uuid NOT NULL, + aud character varying(255), + role character varying(255), + email character varying(255), + encrypted_password character varying(255), + confirmed_at timestamp with time zone, + invited_at timestamp with time zone, + confirmation_token character varying(255), + confirmation_sent_at timestamp with time zone, + recovery_token character varying(255), + recovery_sent_at timestamp with time zone, + email_change_token character varying(255), + email_change character varying(255), + email_change_sent_at timestamp with time zone, + last_sign_in_at timestamp with time zone, + raw_app_meta_data jsonb, + raw_user_meta_data jsonb, + is_super_admin boolean, + created_at timestamp with time zone, + updated_at timestamp with time zone +); + + +-- +-- Name: TABLE users; Type: COMMENT; Schema: auth; Owner: - +-- + +COMMENT ON TABLE auth.users IS 'Auth: Stores user login data within a secure schema.'; + + +-- +-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.schema_migrations ( + version character varying(128) NOT NULL +); + + +-- +-- Name: buckets; Type: TABLE; Schema: storage; Owner: - +-- + +CREATE TABLE storage.buckets ( + id text NOT NULL, + name text NOT NULL, + owner uuid, + created_at timestamp with time zone DEFAULT now(), + updated_at timestamp with time zone DEFAULT now() +); + + +-- +-- Name: migrations; Type: TABLE; Schema: storage; Owner: - +-- + +CREATE TABLE storage.migrations ( + id integer NOT NULL, + name character varying(100) NOT NULL, + hash character varying(40) NOT NULL, + executed_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP +); + + +-- +-- Name: objects; Type: TABLE; Schema: storage; Owner: - +-- + +CREATE TABLE storage.objects ( + id uuid DEFAULT extensions.uuid_generate_v4() NOT NULL, + bucket_id text, + name text, + owner uuid, + created_at timestamp with time zone DEFAULT now(), + updated_at timestamp with time zone DEFAULT now(), + last_accessed_at timestamp with time zone DEFAULT now(), + metadata jsonb +); + + +-- +-- Name: refresh_tokens id; Type: DEFAULT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.refresh_tokens ALTER COLUMN id SET DEFAULT nextval('auth.refresh_tokens_id_seq'::regclass); + + +-- +-- Name: audit_log_entries audit_log_entries_pkey; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.audit_log_entries + ADD CONSTRAINT audit_log_entries_pkey PRIMARY KEY (id); + + +-- +-- Name: instances instances_pkey; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.instances + ADD CONSTRAINT instances_pkey PRIMARY KEY (id); + + +-- +-- Name: refresh_tokens refresh_tokens_pkey; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.refresh_tokens + ADD CONSTRAINT refresh_tokens_pkey PRIMARY KEY (id); + + +-- +-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.schema_migrations + ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version); + + +-- +-- Name: users users_email_key; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.users + ADD CONSTRAINT users_email_key UNIQUE (email); + + +-- +-- Name: users users_pkey; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.users + ADD CONSTRAINT users_pkey PRIMARY KEY (id); + + +-- +-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.schema_migrations + ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version); + + +-- +-- Name: buckets buckets_pkey; Type: CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.buckets + ADD CONSTRAINT buckets_pkey PRIMARY KEY (id); + + +-- +-- Name: migrations migrations_name_key; Type: CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.migrations + ADD CONSTRAINT migrations_name_key UNIQUE (name); + + +-- +-- Name: migrations migrations_pkey; Type: CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.migrations + ADD CONSTRAINT migrations_pkey PRIMARY KEY (id); + + +-- +-- Name: objects objects_pkey; Type: CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.objects + ADD CONSTRAINT objects_pkey PRIMARY KEY (id); + + +-- +-- Name: audit_logs_instance_id_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX audit_logs_instance_id_idx ON auth.audit_log_entries USING btree (instance_id); + + +-- +-- Name: refresh_tokens_instance_id_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX refresh_tokens_instance_id_idx ON auth.refresh_tokens USING btree (instance_id); + + +-- +-- Name: refresh_tokens_instance_id_user_id_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX refresh_tokens_instance_id_user_id_idx ON auth.refresh_tokens USING btree (instance_id, user_id); + + +-- +-- Name: refresh_tokens_token_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX refresh_tokens_token_idx ON auth.refresh_tokens USING btree (token); + + +-- +-- Name: users_instance_id_email_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX users_instance_id_email_idx ON auth.users USING btree (instance_id, email); + + +-- +-- Name: users_instance_id_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX users_instance_id_idx ON auth.users USING btree (instance_id); + + +-- +-- Name: bname; Type: INDEX; Schema: storage; Owner: - +-- + +CREATE UNIQUE INDEX bname ON storage.buckets USING btree (name); + + +-- +-- Name: bucketid_objname; Type: INDEX; Schema: storage; Owner: - +-- + +CREATE UNIQUE INDEX bucketid_objname ON storage.objects USING btree (bucket_id, name); + + +-- +-- Name: name_prefix_search; Type: INDEX; Schema: storage; Owner: - +-- + +CREATE INDEX name_prefix_search ON storage.objects USING btree (name text_pattern_ops); + + +-- +-- Name: buckets buckets_owner_fkey; Type: FK CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.buckets + ADD CONSTRAINT buckets_owner_fkey FOREIGN KEY (owner) REFERENCES auth.users(id); + + +-- +-- Name: objects objects_bucketId_fkey; Type: FK CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.objects + ADD CONSTRAINT "objects_bucketId_fkey" FOREIGN KEY (bucket_id) REFERENCES storage.buckets(id); + + +-- +-- Name: objects objects_owner_fkey; Type: FK CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.objects + ADD CONSTRAINT objects_owner_fkey FOREIGN KEY (owner) REFERENCES auth.users(id); + + +-- +-- Name: objects; Type: ROW SECURITY; Schema: storage; Owner: - +-- + +ALTER TABLE storage.objects ENABLE ROW LEVEL SECURITY; + +-- +-- Name: supabase_realtime; Type: PUBLICATION; Schema: -; Owner: - +-- + +CREATE PUBLICATION supabase_realtime WITH (publish = 'insert, update, delete, truncate'); + + +-- +-- Name: issue_graphql_placeholder; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER issue_graphql_placeholder ON sql_drop + WHEN TAG IN ('DROP EXTENSION') + EXECUTE FUNCTION extensions.set_graphql_placeholder(); + + +-- +-- Name: issue_pg_cron_access; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER issue_pg_cron_access ON ddl_command_end + WHEN TAG IN ('CREATE EXTENSION') + EXECUTE FUNCTION extensions.grant_pg_cron_access(); + + +-- +-- Name: issue_pg_graphql_access; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER issue_pg_graphql_access ON ddl_command_end + WHEN TAG IN ('CREATE FUNCTION') + EXECUTE FUNCTION extensions.grant_pg_graphql_access(); + + +-- +-- Name: issue_pg_net_access; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER issue_pg_net_access ON ddl_command_end + WHEN TAG IN ('CREATE EXTENSION') + EXECUTE FUNCTION extensions.grant_pg_net_access(); + + +-- +-- Name: pgrst_ddl_watch; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER pgrst_ddl_watch ON ddl_command_end + EXECUTE FUNCTION extensions.pgrst_ddl_watch(); + + +-- +-- Name: pgrst_drop_watch; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER pgrst_drop_watch ON sql_drop + EXECUTE FUNCTION extensions.pgrst_drop_watch(); + + +-- +-- PostgreSQL database dump complete +-- + diff --git a/migrations/schema-17.sql b/migrations/schema-17.sql new file mode 100644 index 000000000..f120b1b27 --- /dev/null +++ b/migrations/schema-17.sql @@ -0,0 +1,1000 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 17.4 +-- Dumped by pg_dump version 17.4 + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET transaction_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +-- +-- Name: auth; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA auth; + + +-- +-- Name: extensions; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA extensions; + + +-- +-- Name: graphql; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA graphql; + + +-- +-- Name: graphql_public; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA graphql_public; + + +-- +-- Name: pgbouncer; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA pgbouncer; + + +-- +-- Name: realtime; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA realtime; + + +-- +-- Name: storage; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA storage; + + +-- +-- Name: vault; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA vault; + + +-- +-- Name: pg_graphql; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS pg_graphql WITH SCHEMA graphql; + + +-- +-- Name: EXTENSION pg_graphql; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION pg_graphql IS 'pg_graphql: GraphQL support'; + + +-- +-- Name: pg_stat_statements; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS pg_stat_statements WITH SCHEMA extensions; + + +-- +-- Name: EXTENSION pg_stat_statements; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION pg_stat_statements IS 'track planning and execution statistics of all SQL statements executed'; + + +-- +-- Name: pgcrypto; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA extensions; + + +-- +-- Name: EXTENSION pgcrypto; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION pgcrypto IS 'cryptographic functions'; + + +-- +-- Name: supabase_vault; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS supabase_vault WITH SCHEMA vault; + + +-- +-- Name: EXTENSION supabase_vault; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION supabase_vault IS 'Supabase Vault Extension'; + + +-- +-- Name: uuid-ossp; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA extensions; + + +-- +-- Name: EXTENSION "uuid-ossp"; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION "uuid-ossp" IS 'generate universally unique identifiers (UUIDs)'; + + +-- +-- Name: email(); Type: FUNCTION; Schema: auth; Owner: - +-- + +CREATE FUNCTION auth.email() RETURNS text + LANGUAGE sql STABLE + AS $$ + select nullif(current_setting('request.jwt.claim.email', true), '')::text; +$$; + + +-- +-- Name: role(); Type: FUNCTION; Schema: auth; Owner: - +-- + +CREATE FUNCTION auth.role() RETURNS text + LANGUAGE sql STABLE + AS $$ + select nullif(current_setting('request.jwt.claim.role', true), '')::text; +$$; + + +-- +-- Name: uid(); Type: FUNCTION; Schema: auth; Owner: - +-- + +CREATE FUNCTION auth.uid() RETURNS uuid + LANGUAGE sql STABLE + AS $$ + select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid; +$$; + + +-- +-- Name: grant_pg_cron_access(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.grant_pg_cron_access() RETURNS event_trigger + LANGUAGE plpgsql + AS $$ +BEGIN + IF EXISTS ( + SELECT + FROM pg_event_trigger_ddl_commands() AS ev + JOIN pg_extension AS ext + ON ev.objid = ext.oid + WHERE ext.extname = 'pg_cron' + ) + THEN + grant usage on schema cron to postgres with grant option; + + alter default privileges in schema cron grant all on tables to postgres with grant option; + alter default privileges in schema cron grant all on functions to postgres with grant option; + alter default privileges in schema cron grant all on sequences to postgres with grant option; + + alter default privileges for user supabase_admin in schema cron grant all + on sequences to postgres with grant option; + alter default privileges for user supabase_admin in schema cron grant all + on tables to postgres with grant option; + alter default privileges for user supabase_admin in schema cron grant all + on functions to postgres with grant option; + + grant all privileges on all tables in schema cron to postgres with grant option; + revoke all on table cron.job from postgres; + grant select on table cron.job to postgres with grant option; + END IF; +END; +$$; + + +-- +-- Name: FUNCTION grant_pg_cron_access(); Type: COMMENT; Schema: extensions; Owner: - +-- + +COMMENT ON FUNCTION extensions.grant_pg_cron_access() IS 'Grants access to pg_cron'; + + +-- +-- Name: grant_pg_graphql_access(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.grant_pg_graphql_access() RETURNS event_trigger + LANGUAGE plpgsql + AS $_$ +DECLARE + func_is_graphql_resolve bool; +BEGIN + func_is_graphql_resolve = ( + SELECT n.proname = 'resolve' + FROM pg_event_trigger_ddl_commands() AS ev + LEFT JOIN pg_catalog.pg_proc AS n + ON ev.objid = n.oid + ); + + IF func_is_graphql_resolve + THEN + -- Update public wrapper to pass all arguments through to the pg_graphql resolve func + DROP FUNCTION IF EXISTS graphql_public.graphql; + create or replace function graphql_public.graphql( + "operationName" text default null, + query text default null, + variables jsonb default null, + extensions jsonb default null + ) + returns jsonb + language sql + as $$ + select graphql.resolve( + query := query, + variables := coalesce(variables, '{}'), + "operationName" := "operationName", + extensions := extensions + ); + $$; + + -- This hook executes when `graphql.resolve` is created. That is not necessarily the last + -- function in the extension so we need to grant permissions on existing entities AND + -- update default permissions to any others that are created after `graphql.resolve` + grant usage on schema graphql to postgres, anon, authenticated, service_role; + grant select on all tables in schema graphql to postgres, anon, authenticated, service_role; + grant execute on all functions in schema graphql to postgres, anon, authenticated, service_role; + grant all on all sequences in schema graphql to postgres, anon, authenticated, service_role; + alter default privileges in schema graphql grant all on tables to postgres, anon, authenticated, service_role; + alter default privileges in schema graphql grant all on functions to postgres, anon, authenticated, service_role; + alter default privileges in schema graphql grant all on sequences to postgres, anon, authenticated, service_role; + + -- Allow postgres role to allow granting usage on graphql and graphql_public schemas to custom roles + grant usage on schema graphql_public to postgres with grant option; + grant usage on schema graphql to postgres with grant option; + END IF; + +END; +$_$; + + +-- +-- Name: FUNCTION grant_pg_graphql_access(); Type: COMMENT; Schema: extensions; Owner: - +-- + +COMMENT ON FUNCTION extensions.grant_pg_graphql_access() IS 'Grants access to pg_graphql'; + + +-- +-- Name: grant_pg_net_access(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.grant_pg_net_access() RETURNS event_trigger + LANGUAGE plpgsql + AS $$ +BEGIN + IF EXISTS ( + SELECT 1 + FROM pg_event_trigger_ddl_commands() AS ev + JOIN pg_extension AS ext + ON ev.objid = ext.oid + WHERE ext.extname = 'pg_net' + ) + THEN + IF NOT EXISTS ( + SELECT 1 + FROM pg_roles + WHERE rolname = 'supabase_functions_admin' + ) + THEN + CREATE USER supabase_functions_admin NOINHERIT CREATEROLE LOGIN NOREPLICATION; + END IF; + + GRANT USAGE ON SCHEMA net TO supabase_functions_admin, postgres, anon, authenticated, service_role; + + IF EXISTS ( + SELECT FROM pg_extension + WHERE extname = 'pg_net' + -- all versions in use on existing projects as of 2025-02-20 + -- version 0.12.0 onwards don't need these applied + AND extversion IN ('0.2', '0.6', '0.7', '0.7.1', '0.8', '0.10.0', '0.11.0') + ) THEN + ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER; + ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER; + + ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net; + ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net; + + REVOKE ALL ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC; + REVOKE ALL ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC; + + GRANT EXECUTE ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role; + GRANT EXECUTE ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role; + END IF; + END IF; +END; +$$; + + +-- +-- Name: FUNCTION grant_pg_net_access(); Type: COMMENT; Schema: extensions; Owner: - +-- + +COMMENT ON FUNCTION extensions.grant_pg_net_access() IS 'Grants access to pg_net'; + + +-- +-- Name: pgrst_ddl_watch(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.pgrst_ddl_watch() RETURNS event_trigger + LANGUAGE plpgsql + AS $$ +DECLARE + cmd record; +BEGIN + FOR cmd IN SELECT * FROM pg_event_trigger_ddl_commands() + LOOP + IF cmd.command_tag IN ( + 'CREATE SCHEMA', 'ALTER SCHEMA' + , 'CREATE TABLE', 'CREATE TABLE AS', 'SELECT INTO', 'ALTER TABLE' + , 'CREATE FOREIGN TABLE', 'ALTER FOREIGN TABLE' + , 'CREATE VIEW', 'ALTER VIEW' + , 'CREATE MATERIALIZED VIEW', 'ALTER MATERIALIZED VIEW' + , 'CREATE FUNCTION', 'ALTER FUNCTION' + , 'CREATE TRIGGER' + , 'CREATE TYPE', 'ALTER TYPE' + , 'CREATE RULE' + , 'COMMENT' + ) + -- don't notify in case of CREATE TEMP table or other objects created on pg_temp + AND cmd.schema_name is distinct from 'pg_temp' + THEN + NOTIFY pgrst, 'reload schema'; + END IF; + END LOOP; +END; $$; + + +-- +-- Name: pgrst_drop_watch(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.pgrst_drop_watch() RETURNS event_trigger + LANGUAGE plpgsql + AS $$ +DECLARE + obj record; +BEGIN + FOR obj IN SELECT * FROM pg_event_trigger_dropped_objects() + LOOP + IF obj.object_type IN ( + 'schema' + , 'table' + , 'foreign table' + , 'view' + , 'materialized view' + , 'function' + , 'trigger' + , 'type' + , 'rule' + ) + AND obj.is_temporary IS false -- no pg_temp objects + THEN + NOTIFY pgrst, 'reload schema'; + END IF; + END LOOP; +END; $$; + + +-- +-- Name: set_graphql_placeholder(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.set_graphql_placeholder() RETURNS event_trigger + LANGUAGE plpgsql + AS $_$ + DECLARE + graphql_is_dropped bool; + BEGIN + graphql_is_dropped = ( + SELECT ev.schema_name = 'graphql_public' + FROM pg_event_trigger_dropped_objects() AS ev + WHERE ev.schema_name = 'graphql_public' + ); + + IF graphql_is_dropped + THEN + create or replace function graphql_public.graphql( + "operationName" text default null, + query text default null, + variables jsonb default null, + extensions jsonb default null + ) + returns jsonb + language plpgsql + as $$ + DECLARE + server_version float; + BEGIN + server_version = (SELECT (SPLIT_PART((select version()), ' ', 2))::float); + + IF server_version >= 14 THEN + RETURN jsonb_build_object( + 'errors', jsonb_build_array( + jsonb_build_object( + 'message', 'pg_graphql extension is not enabled.' + ) + ) + ); + ELSE + RETURN jsonb_build_object( + 'errors', jsonb_build_array( + jsonb_build_object( + 'message', 'pg_graphql is only available on projects running Postgres 14 onwards.' + ) + ) + ); + END IF; + END; + $$; + END IF; + + END; +$_$; + + +-- +-- Name: FUNCTION set_graphql_placeholder(); Type: COMMENT; Schema: extensions; Owner: - +-- + +COMMENT ON FUNCTION extensions.set_graphql_placeholder() IS 'Reintroduces placeholder function for graphql_public.graphql'; + + +-- +-- Name: get_auth(text); Type: FUNCTION; Schema: pgbouncer; Owner: - +-- + +CREATE FUNCTION pgbouncer.get_auth(p_usename text) RETURNS TABLE(username text, password text) + LANGUAGE plpgsql SECURITY DEFINER + AS $_$ +begin + raise debug 'PgBouncer auth request: %', p_usename; + + return query + select + rolname::text, + case when rolvaliduntil < now() + then null + else rolpassword::text + end + from pg_authid + where rolname=$1 and rolcanlogin; +end; +$_$; + + +-- +-- Name: extension(text); Type: FUNCTION; Schema: storage; Owner: - +-- + +CREATE FUNCTION storage.extension(name text) RETURNS text + LANGUAGE plpgsql + AS $$ +DECLARE +_parts text[]; +_filename text; +BEGIN + select string_to_array(name, '/') into _parts; + select _parts[array_length(_parts,1)] into _filename; + -- @todo return the last part instead of 2 + return split_part(_filename, '.', 2); +END +$$; + + +-- +-- Name: filename(text); Type: FUNCTION; Schema: storage; Owner: - +-- + +CREATE FUNCTION storage.filename(name text) RETURNS text + LANGUAGE plpgsql + AS $$ +DECLARE +_parts text[]; +BEGIN + select string_to_array(name, '/') into _parts; + return _parts[array_length(_parts,1)]; +END +$$; + + +-- +-- Name: foldername(text); Type: FUNCTION; Schema: storage; Owner: - +-- + +CREATE FUNCTION storage.foldername(name text) RETURNS text[] + LANGUAGE plpgsql + AS $$ +DECLARE +_parts text[]; +BEGIN + select string_to_array(name, '/') into _parts; + return _parts[1:array_length(_parts,1)-1]; +END +$$; + + +-- +-- Name: search(text, text, integer, integer, integer); Type: FUNCTION; Schema: storage; Owner: - +-- + +CREATE FUNCTION storage.search(prefix text, bucketname text, limits integer DEFAULT 100, levels integer DEFAULT 1, offsets integer DEFAULT 0) RETURNS TABLE(name text, id uuid, updated_at timestamp with time zone, created_at timestamp with time zone, last_accessed_at timestamp with time zone, metadata jsonb) + LANGUAGE plpgsql + AS $$ +DECLARE +_bucketId text; +BEGIN + -- will be replaced by migrations when server starts + -- saving space for cloud-init +END +$$; + + +SET default_tablespace = ''; + +SET default_table_access_method = heap; + +-- +-- Name: audit_log_entries; Type: TABLE; Schema: auth; Owner: - +-- + +CREATE TABLE auth.audit_log_entries ( + instance_id uuid, + id uuid NOT NULL, + payload json, + created_at timestamp with time zone +); + + +-- +-- Name: TABLE audit_log_entries; Type: COMMENT; Schema: auth; Owner: - +-- + +COMMENT ON TABLE auth.audit_log_entries IS 'Auth: Audit trail for user actions.'; + + +-- +-- Name: instances; Type: TABLE; Schema: auth; Owner: - +-- + +CREATE TABLE auth.instances ( + id uuid NOT NULL, + uuid uuid, + raw_base_config text, + created_at timestamp with time zone, + updated_at timestamp with time zone +); + + +-- +-- Name: TABLE instances; Type: COMMENT; Schema: auth; Owner: - +-- + +COMMENT ON TABLE auth.instances IS 'Auth: Manages users across multiple sites.'; + + +-- +-- Name: refresh_tokens; Type: TABLE; Schema: auth; Owner: - +-- + +CREATE TABLE auth.refresh_tokens ( + instance_id uuid, + id bigint NOT NULL, + token character varying(255), + user_id character varying(255), + revoked boolean, + created_at timestamp with time zone, + updated_at timestamp with time zone +); + + +-- +-- Name: TABLE refresh_tokens; Type: COMMENT; Schema: auth; Owner: - +-- + +COMMENT ON TABLE auth.refresh_tokens IS 'Auth: Store of tokens used to refresh JWT tokens once they expire.'; + + +-- +-- Name: refresh_tokens_id_seq; Type: SEQUENCE; Schema: auth; Owner: - +-- + +CREATE SEQUENCE auth.refresh_tokens_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: refresh_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: auth; Owner: - +-- + +ALTER SEQUENCE auth.refresh_tokens_id_seq OWNED BY auth.refresh_tokens.id; + + +-- +-- Name: schema_migrations; Type: TABLE; Schema: auth; Owner: - +-- + +CREATE TABLE auth.schema_migrations ( + version character varying(255) NOT NULL +); + + +-- +-- Name: TABLE schema_migrations; Type: COMMENT; Schema: auth; Owner: - +-- + +COMMENT ON TABLE auth.schema_migrations IS 'Auth: Manages updates to the auth system.'; + + +-- +-- Name: users; Type: TABLE; Schema: auth; Owner: - +-- + +CREATE TABLE auth.users ( + instance_id uuid, + id uuid NOT NULL, + aud character varying(255), + role character varying(255), + email character varying(255), + encrypted_password character varying(255), + confirmed_at timestamp with time zone, + invited_at timestamp with time zone, + confirmation_token character varying(255), + confirmation_sent_at timestamp with time zone, + recovery_token character varying(255), + recovery_sent_at timestamp with time zone, + email_change_token character varying(255), + email_change character varying(255), + email_change_sent_at timestamp with time zone, + last_sign_in_at timestamp with time zone, + raw_app_meta_data jsonb, + raw_user_meta_data jsonb, + is_super_admin boolean, + created_at timestamp with time zone, + updated_at timestamp with time zone +); + + +-- +-- Name: TABLE users; Type: COMMENT; Schema: auth; Owner: - +-- + +COMMENT ON TABLE auth.users IS 'Auth: Stores user login data within a secure schema.'; + + +-- +-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.schema_migrations ( + version character varying(128) NOT NULL +); + + +-- +-- Name: buckets; Type: TABLE; Schema: storage; Owner: - +-- + +CREATE TABLE storage.buckets ( + id text NOT NULL, + name text NOT NULL, + owner uuid, + created_at timestamp with time zone DEFAULT now(), + updated_at timestamp with time zone DEFAULT now() +); + + +-- +-- Name: migrations; Type: TABLE; Schema: storage; Owner: - +-- + +CREATE TABLE storage.migrations ( + id integer NOT NULL, + name character varying(100) NOT NULL, + hash character varying(40) NOT NULL, + executed_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP +); + + +-- +-- Name: objects; Type: TABLE; Schema: storage; Owner: - +-- + +CREATE TABLE storage.objects ( + id uuid DEFAULT extensions.uuid_generate_v4() NOT NULL, + bucket_id text, + name text, + owner uuid, + created_at timestamp with time zone DEFAULT now(), + updated_at timestamp with time zone DEFAULT now(), + last_accessed_at timestamp with time zone DEFAULT now(), + metadata jsonb +); + + +-- +-- Name: refresh_tokens id; Type: DEFAULT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.refresh_tokens ALTER COLUMN id SET DEFAULT nextval('auth.refresh_tokens_id_seq'::regclass); + + +-- +-- Name: audit_log_entries audit_log_entries_pkey; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.audit_log_entries + ADD CONSTRAINT audit_log_entries_pkey PRIMARY KEY (id); + + +-- +-- Name: instances instances_pkey; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.instances + ADD CONSTRAINT instances_pkey PRIMARY KEY (id); + + +-- +-- Name: refresh_tokens refresh_tokens_pkey; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.refresh_tokens + ADD CONSTRAINT refresh_tokens_pkey PRIMARY KEY (id); + + +-- +-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.schema_migrations + ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version); + + +-- +-- Name: users users_email_key; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.users + ADD CONSTRAINT users_email_key UNIQUE (email); + + +-- +-- Name: users users_pkey; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.users + ADD CONSTRAINT users_pkey PRIMARY KEY (id); + + +-- +-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.schema_migrations + ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version); + + +-- +-- Name: buckets buckets_pkey; Type: CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.buckets + ADD CONSTRAINT buckets_pkey PRIMARY KEY (id); + + +-- +-- Name: migrations migrations_name_key; Type: CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.migrations + ADD CONSTRAINT migrations_name_key UNIQUE (name); + + +-- +-- Name: migrations migrations_pkey; Type: CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.migrations + ADD CONSTRAINT migrations_pkey PRIMARY KEY (id); + + +-- +-- Name: objects objects_pkey; Type: CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.objects + ADD CONSTRAINT objects_pkey PRIMARY KEY (id); + + +-- +-- Name: audit_logs_instance_id_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX audit_logs_instance_id_idx ON auth.audit_log_entries USING btree (instance_id); + + +-- +-- Name: refresh_tokens_instance_id_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX refresh_tokens_instance_id_idx ON auth.refresh_tokens USING btree (instance_id); + + +-- +-- Name: refresh_tokens_instance_id_user_id_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX refresh_tokens_instance_id_user_id_idx ON auth.refresh_tokens USING btree (instance_id, user_id); + + +-- +-- Name: refresh_tokens_token_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX refresh_tokens_token_idx ON auth.refresh_tokens USING btree (token); + + +-- +-- Name: users_instance_id_email_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX users_instance_id_email_idx ON auth.users USING btree (instance_id, email); + + +-- +-- Name: users_instance_id_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX users_instance_id_idx ON auth.users USING btree (instance_id); + + +-- +-- Name: bname; Type: INDEX; Schema: storage; Owner: - +-- + +CREATE UNIQUE INDEX bname ON storage.buckets USING btree (name); + + +-- +-- Name: bucketid_objname; Type: INDEX; Schema: storage; Owner: - +-- + +CREATE UNIQUE INDEX bucketid_objname ON storage.objects USING btree (bucket_id, name); + + +-- +-- Name: name_prefix_search; Type: INDEX; Schema: storage; Owner: - +-- + +CREATE INDEX name_prefix_search ON storage.objects USING btree (name text_pattern_ops); + + +-- +-- Name: buckets buckets_owner_fkey; Type: FK CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.buckets + ADD CONSTRAINT buckets_owner_fkey FOREIGN KEY (owner) REFERENCES auth.users(id); + + +-- +-- Name: objects objects_bucketId_fkey; Type: FK CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.objects + ADD CONSTRAINT "objects_bucketId_fkey" FOREIGN KEY (bucket_id) REFERENCES storage.buckets(id); + + +-- +-- Name: objects objects_owner_fkey; Type: FK CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.objects + ADD CONSTRAINT objects_owner_fkey FOREIGN KEY (owner) REFERENCES auth.users(id); + + +-- +-- Name: objects; Type: ROW SECURITY; Schema: storage; Owner: - +-- + +ALTER TABLE storage.objects ENABLE ROW LEVEL SECURITY; + +-- +-- Name: supabase_realtime; Type: PUBLICATION; Schema: -; Owner: - +-- + +CREATE PUBLICATION supabase_realtime WITH (publish = 'insert, update, delete, truncate'); + + +-- +-- Name: issue_graphql_placeholder; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER issue_graphql_placeholder ON sql_drop + WHEN TAG IN ('DROP EXTENSION') + EXECUTE FUNCTION extensions.set_graphql_placeholder(); + + +-- +-- Name: issue_pg_cron_access; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER issue_pg_cron_access ON ddl_command_end + WHEN TAG IN ('CREATE EXTENSION') + EXECUTE FUNCTION extensions.grant_pg_cron_access(); + + +-- +-- Name: issue_pg_graphql_access; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER issue_pg_graphql_access ON ddl_command_end + WHEN TAG IN ('CREATE FUNCTION') + EXECUTE FUNCTION extensions.grant_pg_graphql_access(); + + +-- +-- Name: issue_pg_net_access; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER issue_pg_net_access ON ddl_command_end + WHEN TAG IN ('CREATE EXTENSION') + EXECUTE FUNCTION extensions.grant_pg_net_access(); + + +-- +-- Name: pgrst_ddl_watch; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER pgrst_ddl_watch ON ddl_command_end + EXECUTE FUNCTION extensions.pgrst_ddl_watch(); + + +-- +-- Name: pgrst_drop_watch; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER pgrst_drop_watch ON sql_drop + EXECUTE FUNCTION extensions.pgrst_drop_watch(); + + +-- +-- PostgreSQL database dump complete +-- + diff --git a/migrations/schema-orioledb-17.sql b/migrations/schema-orioledb-17.sql new file mode 100644 index 000000000..8c5d32c39 --- /dev/null +++ b/migrations/schema-orioledb-17.sql @@ -0,0 +1,1014 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 17.0 +-- Dumped by pg_dump version 17.0 + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET transaction_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +-- +-- Name: auth; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA auth; + + +-- +-- Name: extensions; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA extensions; + + +-- +-- Name: graphql; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA graphql; + + +-- +-- Name: graphql_public; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA graphql_public; + + +-- +-- Name: pgbouncer; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA pgbouncer; + + +-- +-- Name: realtime; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA realtime; + + +-- +-- Name: storage; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA storage; + + +-- +-- Name: vault; Type: SCHEMA; Schema: -; Owner: - +-- + +CREATE SCHEMA vault; + + +-- +-- Name: orioledb; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS orioledb WITH SCHEMA extensions; + + +-- +-- Name: EXTENSION orioledb; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION orioledb IS 'OrioleDB -- the next generation transactional engine'; + + +-- +-- Name: pg_graphql; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS pg_graphql WITH SCHEMA graphql; + + +-- +-- Name: EXTENSION pg_graphql; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION pg_graphql IS 'pg_graphql: GraphQL support'; + + +-- +-- Name: pg_stat_statements; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS pg_stat_statements WITH SCHEMA extensions; + + +-- +-- Name: EXTENSION pg_stat_statements; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION pg_stat_statements IS 'track planning and execution statistics of all SQL statements executed'; + + +-- +-- Name: pgcrypto; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA extensions; + + +-- +-- Name: EXTENSION pgcrypto; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION pgcrypto IS 'cryptographic functions'; + + +-- +-- Name: supabase_vault; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS supabase_vault WITH SCHEMA vault; + + +-- +-- Name: EXTENSION supabase_vault; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION supabase_vault IS 'Supabase Vault Extension'; + + +-- +-- Name: uuid-ossp; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA extensions; + + +-- +-- Name: EXTENSION "uuid-ossp"; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION "uuid-ossp" IS 'generate universally unique identifiers (UUIDs)'; + + +-- +-- Name: email(); Type: FUNCTION; Schema: auth; Owner: - +-- + +CREATE FUNCTION auth.email() RETURNS text + LANGUAGE sql STABLE + AS $$ + select nullif(current_setting('request.jwt.claim.email', true), '')::text; +$$; + + +-- +-- Name: role(); Type: FUNCTION; Schema: auth; Owner: - +-- + +CREATE FUNCTION auth.role() RETURNS text + LANGUAGE sql STABLE + AS $$ + select nullif(current_setting('request.jwt.claim.role', true), '')::text; +$$; + + +-- +-- Name: uid(); Type: FUNCTION; Schema: auth; Owner: - +-- + +CREATE FUNCTION auth.uid() RETURNS uuid + LANGUAGE sql STABLE + AS $$ + select nullif(current_setting('request.jwt.claim.sub', true), '')::uuid; +$$; + + +-- +-- Name: grant_pg_cron_access(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.grant_pg_cron_access() RETURNS event_trigger + LANGUAGE plpgsql + AS $$ +BEGIN + IF EXISTS ( + SELECT + FROM pg_event_trigger_ddl_commands() AS ev + JOIN pg_extension AS ext + ON ev.objid = ext.oid + WHERE ext.extname = 'pg_cron' + ) + THEN + grant usage on schema cron to postgres with grant option; + + alter default privileges in schema cron grant all on tables to postgres with grant option; + alter default privileges in schema cron grant all on functions to postgres with grant option; + alter default privileges in schema cron grant all on sequences to postgres with grant option; + + alter default privileges for user supabase_admin in schema cron grant all + on sequences to postgres with grant option; + alter default privileges for user supabase_admin in schema cron grant all + on tables to postgres with grant option; + alter default privileges for user supabase_admin in schema cron grant all + on functions to postgres with grant option; + + grant all privileges on all tables in schema cron to postgres with grant option; + revoke all on table cron.job from postgres; + grant select on table cron.job to postgres with grant option; + END IF; +END; +$$; + + +-- +-- Name: FUNCTION grant_pg_cron_access(); Type: COMMENT; Schema: extensions; Owner: - +-- + +COMMENT ON FUNCTION extensions.grant_pg_cron_access() IS 'Grants access to pg_cron'; + + +-- +-- Name: grant_pg_graphql_access(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.grant_pg_graphql_access() RETURNS event_trigger + LANGUAGE plpgsql + AS $_$ +DECLARE + func_is_graphql_resolve bool; +BEGIN + func_is_graphql_resolve = ( + SELECT n.proname = 'resolve' + FROM pg_event_trigger_ddl_commands() AS ev + LEFT JOIN pg_catalog.pg_proc AS n + ON ev.objid = n.oid + ); + + IF func_is_graphql_resolve + THEN + -- Update public wrapper to pass all arguments through to the pg_graphql resolve func + DROP FUNCTION IF EXISTS graphql_public.graphql; + create or replace function graphql_public.graphql( + "operationName" text default null, + query text default null, + variables jsonb default null, + extensions jsonb default null + ) + returns jsonb + language sql + as $$ + select graphql.resolve( + query := query, + variables := coalesce(variables, '{}'), + "operationName" := "operationName", + extensions := extensions + ); + $$; + + -- This hook executes when `graphql.resolve` is created. That is not necessarily the last + -- function in the extension so we need to grant permissions on existing entities AND + -- update default permissions to any others that are created after `graphql.resolve` + grant usage on schema graphql to postgres, anon, authenticated, service_role; + grant select on all tables in schema graphql to postgres, anon, authenticated, service_role; + grant execute on all functions in schema graphql to postgres, anon, authenticated, service_role; + grant all on all sequences in schema graphql to postgres, anon, authenticated, service_role; + alter default privileges in schema graphql grant all on tables to postgres, anon, authenticated, service_role; + alter default privileges in schema graphql grant all on functions to postgres, anon, authenticated, service_role; + alter default privileges in schema graphql grant all on sequences to postgres, anon, authenticated, service_role; + + -- Allow postgres role to allow granting usage on graphql and graphql_public schemas to custom roles + grant usage on schema graphql_public to postgres with grant option; + grant usage on schema graphql to postgres with grant option; + END IF; + +END; +$_$; + + +-- +-- Name: FUNCTION grant_pg_graphql_access(); Type: COMMENT; Schema: extensions; Owner: - +-- + +COMMENT ON FUNCTION extensions.grant_pg_graphql_access() IS 'Grants access to pg_graphql'; + + +-- +-- Name: grant_pg_net_access(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.grant_pg_net_access() RETURNS event_trigger + LANGUAGE plpgsql + AS $$ +BEGIN + IF EXISTS ( + SELECT 1 + FROM pg_event_trigger_ddl_commands() AS ev + JOIN pg_extension AS ext + ON ev.objid = ext.oid + WHERE ext.extname = 'pg_net' + ) + THEN + IF NOT EXISTS ( + SELECT 1 + FROM pg_roles + WHERE rolname = 'supabase_functions_admin' + ) + THEN + CREATE USER supabase_functions_admin NOINHERIT CREATEROLE LOGIN NOREPLICATION; + END IF; + + GRANT USAGE ON SCHEMA net TO supabase_functions_admin, postgres, anon, authenticated, service_role; + + IF EXISTS ( + SELECT FROM pg_extension + WHERE extname = 'pg_net' + -- all versions in use on existing projects as of 2025-02-20 + -- version 0.12.0 onwards don't need these applied + AND extversion IN ('0.2', '0.6', '0.7', '0.7.1', '0.8', '0.10.0', '0.11.0') + ) THEN + ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER; + ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER; + + ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net; + ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net; + + REVOKE ALL ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC; + REVOKE ALL ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC; + + GRANT EXECUTE ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role; + GRANT EXECUTE ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role; + END IF; + END IF; +END; +$$; + + +-- +-- Name: FUNCTION grant_pg_net_access(); Type: COMMENT; Schema: extensions; Owner: - +-- + +COMMENT ON FUNCTION extensions.grant_pg_net_access() IS 'Grants access to pg_net'; + + +-- +-- Name: pgrst_ddl_watch(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.pgrst_ddl_watch() RETURNS event_trigger + LANGUAGE plpgsql + AS $$ +DECLARE + cmd record; +BEGIN + FOR cmd IN SELECT * FROM pg_event_trigger_ddl_commands() + LOOP + IF cmd.command_tag IN ( + 'CREATE SCHEMA', 'ALTER SCHEMA' + , 'CREATE TABLE', 'CREATE TABLE AS', 'SELECT INTO', 'ALTER TABLE' + , 'CREATE FOREIGN TABLE', 'ALTER FOREIGN TABLE' + , 'CREATE VIEW', 'ALTER VIEW' + , 'CREATE MATERIALIZED VIEW', 'ALTER MATERIALIZED VIEW' + , 'CREATE FUNCTION', 'ALTER FUNCTION' + , 'CREATE TRIGGER' + , 'CREATE TYPE', 'ALTER TYPE' + , 'CREATE RULE' + , 'COMMENT' + ) + -- don't notify in case of CREATE TEMP table or other objects created on pg_temp + AND cmd.schema_name is distinct from 'pg_temp' + THEN + NOTIFY pgrst, 'reload schema'; + END IF; + END LOOP; +END; $$; + + +-- +-- Name: pgrst_drop_watch(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.pgrst_drop_watch() RETURNS event_trigger + LANGUAGE plpgsql + AS $$ +DECLARE + obj record; +BEGIN + FOR obj IN SELECT * FROM pg_event_trigger_dropped_objects() + LOOP + IF obj.object_type IN ( + 'schema' + , 'table' + , 'foreign table' + , 'view' + , 'materialized view' + , 'function' + , 'trigger' + , 'type' + , 'rule' + ) + AND obj.is_temporary IS false -- no pg_temp objects + THEN + NOTIFY pgrst, 'reload schema'; + END IF; + END LOOP; +END; $$; + + +-- +-- Name: set_graphql_placeholder(); Type: FUNCTION; Schema: extensions; Owner: - +-- + +CREATE FUNCTION extensions.set_graphql_placeholder() RETURNS event_trigger + LANGUAGE plpgsql + AS $_$ + DECLARE + graphql_is_dropped bool; + BEGIN + graphql_is_dropped = ( + SELECT ev.schema_name = 'graphql_public' + FROM pg_event_trigger_dropped_objects() AS ev + WHERE ev.schema_name = 'graphql_public' + ); + + IF graphql_is_dropped + THEN + create or replace function graphql_public.graphql( + "operationName" text default null, + query text default null, + variables jsonb default null, + extensions jsonb default null + ) + returns jsonb + language plpgsql + as $$ + DECLARE + server_version float; + BEGIN + server_version = (SELECT (SPLIT_PART((select version()), ' ', 2))::float); + + IF server_version >= 14 THEN + RETURN jsonb_build_object( + 'errors', jsonb_build_array( + jsonb_build_object( + 'message', 'pg_graphql extension is not enabled.' + ) + ) + ); + ELSE + RETURN jsonb_build_object( + 'errors', jsonb_build_array( + jsonb_build_object( + 'message', 'pg_graphql is only available on projects running Postgres 14 onwards.' + ) + ) + ); + END IF; + END; + $$; + END IF; + + END; +$_$; + + +-- +-- Name: FUNCTION set_graphql_placeholder(); Type: COMMENT; Schema: extensions; Owner: - +-- + +COMMENT ON FUNCTION extensions.set_graphql_placeholder() IS 'Reintroduces placeholder function for graphql_public.graphql'; + + +-- +-- Name: get_auth(text); Type: FUNCTION; Schema: pgbouncer; Owner: - +-- + +CREATE FUNCTION pgbouncer.get_auth(p_usename text) RETURNS TABLE(username text, password text) + LANGUAGE plpgsql SECURITY DEFINER + AS $_$ +begin + raise debug 'PgBouncer auth request: %', p_usename; + + return query + select + rolname::text, + case when rolvaliduntil < now() + then null + else rolpassword::text + end + from pg_authid + where rolname=$1 and rolcanlogin; +end; +$_$; + + +-- +-- Name: extension(text); Type: FUNCTION; Schema: storage; Owner: - +-- + +CREATE FUNCTION storage.extension(name text) RETURNS text + LANGUAGE plpgsql + AS $$ +DECLARE +_parts text[]; +_filename text; +BEGIN + select string_to_array(name, '/') into _parts; + select _parts[array_length(_parts,1)] into _filename; + -- @todo return the last part instead of 2 + return split_part(_filename, '.', 2); +END +$$; + + +-- +-- Name: filename(text); Type: FUNCTION; Schema: storage; Owner: - +-- + +CREATE FUNCTION storage.filename(name text) RETURNS text + LANGUAGE plpgsql + AS $$ +DECLARE +_parts text[]; +BEGIN + select string_to_array(name, '/') into _parts; + return _parts[array_length(_parts,1)]; +END +$$; + + +-- +-- Name: foldername(text); Type: FUNCTION; Schema: storage; Owner: - +-- + +CREATE FUNCTION storage.foldername(name text) RETURNS text[] + LANGUAGE plpgsql + AS $$ +DECLARE +_parts text[]; +BEGIN + select string_to_array(name, '/') into _parts; + return _parts[1:array_length(_parts,1)-1]; +END +$$; + + +-- +-- Name: search(text, text, integer, integer, integer); Type: FUNCTION; Schema: storage; Owner: - +-- + +CREATE FUNCTION storage.search(prefix text, bucketname text, limits integer DEFAULT 100, levels integer DEFAULT 1, offsets integer DEFAULT 0) RETURNS TABLE(name text, id uuid, updated_at timestamp with time zone, created_at timestamp with time zone, last_accessed_at timestamp with time zone, metadata jsonb) + LANGUAGE plpgsql + AS $$ +DECLARE +_bucketId text; +BEGIN + -- will be replaced by migrations when server starts + -- saving space for cloud-init +END +$$; + + +SET default_tablespace = ''; + +SET default_table_access_method = orioledb; + +-- +-- Name: audit_log_entries; Type: TABLE; Schema: auth; Owner: - +-- + +CREATE TABLE auth.audit_log_entries ( + instance_id uuid, + id uuid NOT NULL, + payload json, + created_at timestamp with time zone +); + + +-- +-- Name: TABLE audit_log_entries; Type: COMMENT; Schema: auth; Owner: - +-- + +COMMENT ON TABLE auth.audit_log_entries IS 'Auth: Audit trail for user actions.'; + + +-- +-- Name: instances; Type: TABLE; Schema: auth; Owner: - +-- + +CREATE TABLE auth.instances ( + id uuid NOT NULL, + uuid uuid, + raw_base_config text, + created_at timestamp with time zone, + updated_at timestamp with time zone +); + + +-- +-- Name: TABLE instances; Type: COMMENT; Schema: auth; Owner: - +-- + +COMMENT ON TABLE auth.instances IS 'Auth: Manages users across multiple sites.'; + + +-- +-- Name: refresh_tokens; Type: TABLE; Schema: auth; Owner: - +-- + +CREATE TABLE auth.refresh_tokens ( + instance_id uuid, + id bigint NOT NULL, + token character varying(255), + user_id character varying(255), + revoked boolean, + created_at timestamp with time zone, + updated_at timestamp with time zone +); + + +-- +-- Name: TABLE refresh_tokens; Type: COMMENT; Schema: auth; Owner: - +-- + +COMMENT ON TABLE auth.refresh_tokens IS 'Auth: Store of tokens used to refresh JWT tokens once they expire.'; + + +-- +-- Name: refresh_tokens_id_seq; Type: SEQUENCE; Schema: auth; Owner: - +-- + +CREATE SEQUENCE auth.refresh_tokens_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: refresh_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: auth; Owner: - +-- + +ALTER SEQUENCE auth.refresh_tokens_id_seq OWNED BY auth.refresh_tokens.id; + + +-- +-- Name: schema_migrations; Type: TABLE; Schema: auth; Owner: - +-- + +CREATE TABLE auth.schema_migrations ( + version character varying(255) NOT NULL +); + + +-- +-- Name: TABLE schema_migrations; Type: COMMENT; Schema: auth; Owner: - +-- + +COMMENT ON TABLE auth.schema_migrations IS 'Auth: Manages updates to the auth system.'; + + +-- +-- Name: users; Type: TABLE; Schema: auth; Owner: - +-- + +CREATE TABLE auth.users ( + instance_id uuid, + id uuid NOT NULL, + aud character varying(255), + role character varying(255), + email character varying(255), + encrypted_password character varying(255), + confirmed_at timestamp with time zone, + invited_at timestamp with time zone, + confirmation_token character varying(255), + confirmation_sent_at timestamp with time zone, + recovery_token character varying(255), + recovery_sent_at timestamp with time zone, + email_change_token character varying(255), + email_change character varying(255), + email_change_sent_at timestamp with time zone, + last_sign_in_at timestamp with time zone, + raw_app_meta_data jsonb, + raw_user_meta_data jsonb, + is_super_admin boolean, + created_at timestamp with time zone, + updated_at timestamp with time zone +); + + +-- +-- Name: TABLE users; Type: COMMENT; Schema: auth; Owner: - +-- + +COMMENT ON TABLE auth.users IS 'Auth: Stores user login data within a secure schema.'; + + +-- +-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.schema_migrations ( + version character varying(128) NOT NULL +); + + +-- +-- Name: buckets; Type: TABLE; Schema: storage; Owner: - +-- + +CREATE TABLE storage.buckets ( + id text NOT NULL, + name text NOT NULL, + owner uuid, + created_at timestamp with time zone DEFAULT now(), + updated_at timestamp with time zone DEFAULT now() +); + + +-- +-- Name: migrations; Type: TABLE; Schema: storage; Owner: - +-- + +CREATE TABLE storage.migrations ( + id integer NOT NULL, + name character varying(100) NOT NULL, + hash character varying(40) NOT NULL, + executed_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP +); + + +-- +-- Name: objects; Type: TABLE; Schema: storage; Owner: - +-- + +CREATE TABLE storage.objects ( + id uuid DEFAULT extensions.uuid_generate_v4() NOT NULL, + bucket_id text, + name text, + owner uuid, + created_at timestamp with time zone DEFAULT now(), + updated_at timestamp with time zone DEFAULT now(), + last_accessed_at timestamp with time zone DEFAULT now(), + metadata jsonb +); + + +-- +-- Name: refresh_tokens id; Type: DEFAULT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.refresh_tokens ALTER COLUMN id SET DEFAULT nextval('auth.refresh_tokens_id_seq'::regclass); + + +-- +-- Name: audit_log_entries audit_log_entries_pkey; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.audit_log_entries + ADD CONSTRAINT audit_log_entries_pkey PRIMARY KEY (id); + + +-- +-- Name: instances instances_pkey; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.instances + ADD CONSTRAINT instances_pkey PRIMARY KEY (id); + + +-- +-- Name: refresh_tokens refresh_tokens_pkey; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.refresh_tokens + ADD CONSTRAINT refresh_tokens_pkey PRIMARY KEY (id); + + +-- +-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.schema_migrations + ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version); + + +-- +-- Name: users users_email_key; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.users + ADD CONSTRAINT users_email_key UNIQUE (email); + + +-- +-- Name: users users_pkey; Type: CONSTRAINT; Schema: auth; Owner: - +-- + +ALTER TABLE ONLY auth.users + ADD CONSTRAINT users_pkey PRIMARY KEY (id); + + +-- +-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.schema_migrations + ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version); + + +-- +-- Name: buckets buckets_pkey; Type: CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.buckets + ADD CONSTRAINT buckets_pkey PRIMARY KEY (id); + + +-- +-- Name: migrations migrations_name_key; Type: CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.migrations + ADD CONSTRAINT migrations_name_key UNIQUE (name); + + +-- +-- Name: migrations migrations_pkey; Type: CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.migrations + ADD CONSTRAINT migrations_pkey PRIMARY KEY (id); + + +-- +-- Name: objects objects_pkey; Type: CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.objects + ADD CONSTRAINT objects_pkey PRIMARY KEY (id); + + +-- +-- Name: audit_logs_instance_id_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX audit_logs_instance_id_idx ON auth.audit_log_entries USING btree (instance_id); + + +-- +-- Name: refresh_tokens_instance_id_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX refresh_tokens_instance_id_idx ON auth.refresh_tokens USING btree (instance_id); + + +-- +-- Name: refresh_tokens_instance_id_user_id_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX refresh_tokens_instance_id_user_id_idx ON auth.refresh_tokens USING btree (instance_id, user_id); + + +-- +-- Name: refresh_tokens_token_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX refresh_tokens_token_idx ON auth.refresh_tokens USING btree (token); + + +-- +-- Name: users_instance_id_email_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX users_instance_id_email_idx ON auth.users USING btree (instance_id, email); + + +-- +-- Name: users_instance_id_idx; Type: INDEX; Schema: auth; Owner: - +-- + +CREATE INDEX users_instance_id_idx ON auth.users USING btree (instance_id); + + +-- +-- Name: bname; Type: INDEX; Schema: storage; Owner: - +-- + +CREATE UNIQUE INDEX bname ON storage.buckets USING btree (name); + + +-- +-- Name: bucketid_objname; Type: INDEX; Schema: storage; Owner: - +-- + +CREATE UNIQUE INDEX bucketid_objname ON storage.objects USING btree (bucket_id, name); + + +-- +-- Name: name_prefix_search; Type: INDEX; Schema: storage; Owner: - +-- + +CREATE INDEX name_prefix_search ON storage.objects USING btree (name text_pattern_ops); + + +-- +-- Name: buckets buckets_owner_fkey; Type: FK CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.buckets + ADD CONSTRAINT buckets_owner_fkey FOREIGN KEY (owner) REFERENCES auth.users(id); + + +-- +-- Name: objects objects_bucketId_fkey; Type: FK CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.objects + ADD CONSTRAINT "objects_bucketId_fkey" FOREIGN KEY (bucket_id) REFERENCES storage.buckets(id); + + +-- +-- Name: objects objects_owner_fkey; Type: FK CONSTRAINT; Schema: storage; Owner: - +-- + +ALTER TABLE ONLY storage.objects + ADD CONSTRAINT objects_owner_fkey FOREIGN KEY (owner) REFERENCES auth.users(id); + + +-- +-- Name: objects; Type: ROW SECURITY; Schema: storage; Owner: - +-- + +ALTER TABLE storage.objects ENABLE ROW LEVEL SECURITY; + +-- +-- Name: supabase_realtime; Type: PUBLICATION; Schema: -; Owner: - +-- + +CREATE PUBLICATION supabase_realtime WITH (publish = 'insert, update, delete, truncate'); + + +-- +-- Name: issue_graphql_placeholder; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER issue_graphql_placeholder ON sql_drop + WHEN TAG IN ('DROP EXTENSION') + EXECUTE FUNCTION extensions.set_graphql_placeholder(); + + +-- +-- Name: issue_pg_cron_access; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER issue_pg_cron_access ON ddl_command_end + WHEN TAG IN ('CREATE EXTENSION') + EXECUTE FUNCTION extensions.grant_pg_cron_access(); + + +-- +-- Name: issue_pg_graphql_access; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER issue_pg_graphql_access ON ddl_command_end + WHEN TAG IN ('CREATE FUNCTION') + EXECUTE FUNCTION extensions.grant_pg_graphql_access(); + + +-- +-- Name: issue_pg_net_access; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER issue_pg_net_access ON ddl_command_end + WHEN TAG IN ('CREATE EXTENSION') + EXECUTE FUNCTION extensions.grant_pg_net_access(); + + +-- +-- Name: pgrst_ddl_watch; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER pgrst_ddl_watch ON ddl_command_end + EXECUTE FUNCTION extensions.pgrst_ddl_watch(); + + +-- +-- Name: pgrst_drop_watch; Type: EVENT TRIGGER; Schema: -; Owner: - +-- + +CREATE EVENT TRIGGER pgrst_drop_watch ON sql_drop + EXECUTE FUNCTION extensions.pgrst_drop_watch(); + + +-- +-- PostgreSQL database dump complete +-- + diff --git a/migrations/schema.sql b/migrations/schema.sql index d1c4c44fd..cb031f797 100644 --- a/migrations/schema.sql +++ b/migrations/schema.sql @@ -44,27 +44,6 @@ CREATE SCHEMA graphql_public; CREATE SCHEMA pgbouncer; --- --- Name: pgsodium; Type: SCHEMA; Schema: -; Owner: - --- - -CREATE SCHEMA pgsodium; - - --- --- Name: pgsodium; Type: EXTENSION; Schema: -; Owner: - --- - -CREATE EXTENSION IF NOT EXISTS pgsodium WITH SCHEMA pgsodium; - - --- --- Name: EXTENSION pgsodium; Type: COMMENT; Schema: -; Owner: - --- - -COMMENT ON EXTENSION pgsodium IS 'Pgsodium is a modern cryptography library for Postgres.'; - - -- -- Name: realtime; Type: SCHEMA; Schema: -; Owner: - -- @@ -210,17 +189,14 @@ $$; CREATE FUNCTION extensions.grant_pg_cron_access() RETURNS event_trigger LANGUAGE plpgsql AS $$ -DECLARE - schema_is_cron bool; BEGIN - schema_is_cron = ( - SELECT n.nspname = 'cron' + IF EXISTS ( + SELECT FROM pg_event_trigger_ddl_commands() AS ev - LEFT JOIN pg_catalog.pg_namespace AS n - ON ev.objid = n.oid - ); - - IF schema_is_cron + JOIN pg_extension AS ext + ON ev.objid = ext.oid + WHERE ext.extname = 'pg_cron' + ) THEN grant usage on schema cron to postgres with grant option; @@ -236,9 +212,9 @@ BEGIN on functions to postgres with grant option; grant all privileges on all tables in schema cron to postgres with grant option; - + revoke all on table cron.job from postgres; + grant select on table cron.job to postgres with grant option; END IF; - END; $$; @@ -577,28 +553,6 @@ END $$; --- --- Name: secrets_encrypt_secret_secret(); Type: FUNCTION; Schema: vault; Owner: - --- - -CREATE FUNCTION vault.secrets_encrypt_secret_secret() RETURNS trigger - LANGUAGE plpgsql - AS $$ - BEGIN - new.secret = CASE WHEN new.secret IS NULL THEN NULL ELSE - CASE WHEN new.key_id IS NULL THEN NULL ELSE pg_catalog.encode( - pgsodium.crypto_aead_det_encrypt( - pg_catalog.convert_to(new.secret, 'utf8'), - pg_catalog.convert_to((new.id::text || new.description::text || new.created_at::text || new.updated_at::text)::text, 'utf8'), - new.key_id::uuid, - new.nonce - ), - 'base64') END END; - RETURN new; - END; - $$; - - SET default_tablespace = ''; SET default_table_access_method = heap; @@ -740,7 +694,7 @@ COMMENT ON TABLE auth.users IS 'Auth: Stores user login data within a secure sch -- CREATE TABLE public.schema_migrations ( - version character varying(255) NOT NULL + version character varying(128) NOT NULL ); @@ -785,30 +739,6 @@ CREATE TABLE storage.objects ( ); --- --- Name: decrypted_secrets; Type: VIEW; Schema: vault; Owner: - --- - -CREATE VIEW vault.decrypted_secrets AS - SELECT secrets.id, - secrets.name, - secrets.description, - secrets.secret, - CASE - WHEN (secrets.secret IS NULL) THEN NULL::text - ELSE - CASE - WHEN (secrets.key_id IS NULL) THEN NULL::text - ELSE convert_from(pgsodium.crypto_aead_det_decrypt(decode(secrets.secret, 'base64'::text), convert_to(((((secrets.id)::text || secrets.description) || (secrets.created_at)::text) || (secrets.updated_at)::text), 'utf8'::name), secrets.key_id, secrets.nonce), 'utf8'::name) - END - END AS decrypted_secret, - secrets.key_id, - secrets.nonce, - secrets.created_at, - secrets.updated_at - FROM vault.secrets; - - -- -- Name: refresh_tokens id; Type: DEFAULT; Schema: auth; Owner: - -- @@ -1018,7 +948,7 @@ CREATE EVENT TRIGGER issue_graphql_placeholder ON sql_drop -- CREATE EVENT TRIGGER issue_pg_cron_access ON ddl_command_end - WHEN TAG IN ('CREATE SCHEMA') + WHEN TAG IN ('CREATE EXTENSION') EXECUTE FUNCTION extensions.grant_pg_cron_access(); diff --git a/migrations/tests/database/exists.sql b/migrations/tests/database/exists.sql index 54b2a3861..bc19cd32f 100644 --- a/migrations/tests/database/exists.sql +++ b/migrations/tests/database/exists.sql @@ -1,6 +1,7 @@ SELECT has_schema('public'); SELECT has_schema('auth'); +SELECT has_schema('pgbouncer'); SELECT has_schema('extensions'); SELECT has_schema('graphql'); SELECT has_schema('graphql_public'); diff --git a/migrations/tests/database/privs.sql b/migrations/tests/database/privs.sql index 217da662a..ea4f1318a 100644 --- a/migrations/tests/database/privs.sql +++ b/migrations/tests/database/privs.sql @@ -1,12 +1,7 @@ - SELECT database_privs_are( 'postgres', 'postgres', ARRAY['CONNECT', 'TEMPORARY', 'CREATE'] ); -SELECT function_privs_are('pgsodium', 'crypto_aead_det_decrypt', array['bytea', 'bytea', 'uuid', 'bytea'], 'service_role', array['EXECUTE']); -SELECT function_privs_are('pgsodium', 'crypto_aead_det_encrypt', array['bytea', 'bytea', 'uuid', 'bytea'], 'service_role', array['EXECUTE']); -SELECT function_privs_are('pgsodium', 'crypto_aead_det_keygen', array[]::text[], 'service_role', array['EXECUTE']); - -- Verify public schema privileges SELECT schema_privs_are('public', 'postgres', array['CREATE', 'USAGE']); SELECT schema_privs_are('public', 'anon', array['USAGE']); @@ -28,3 +23,7 @@ SELECT schema_privs_are('extensions', 'postgres', array['CREATE', 'USAGE']); SELECT schema_privs_are('extensions', 'anon', array['USAGE']); SELECT schema_privs_are('extensions', 'authenticated', array['USAGE']); SELECT schema_privs_are('extensions', 'service_role', array['USAGE']); + +-- Role memberships +SELECT is_member_of('pg_read_all_data', 'postgres'); +SELECT is_member_of('pg_signal_backend', 'postgres'); diff --git a/migrations/tests/extensions/01-postgis.sql b/migrations/tests/extensions/01-postgis.sql index e843a7bfd..6c3e154e3 100644 --- a/migrations/tests/extensions/01-postgis.sql +++ b/migrations/tests/extensions/01-postgis.sql @@ -1,43 +1,38 @@ -BEGIN; -create extension if not exists postgis_sfcgal with schema "extensions" cascade; -ROLLBACK; +begin; +do $_$ +begin + if not exists (select 1 from pg_extension where extname = 'orioledb') then + -- create postgis tiger as supabase_admin + create extension if not exists postgis_tiger_geocoder cascade; -BEGIN; -create extension if not exists postgis_raster with schema "extensions" cascade; -ROLLBACK; + -- \ir ansible/files/postgresql_extension_custom_scripts/postgis_tiger_geocoder/after-create.sql + grant usage on schema tiger, tiger_data to postgres with grant option; + grant all privileges on all tables in schema tiger, tiger_data to postgres with grant option; + grant all privileges on all routines in schema tiger, tiger_data to postgres with grant option; + grant all privileges on all sequences in schema tiger, tiger_data to postgres with grant option; + alter default privileges in schema tiger, tiger_data grant all on tables to postgres with grant option; + alter default privileges in schema tiger, tiger_data grant all on routines to postgres with grant option; + alter default privileges in schema tiger, tiger_data grant all on sequences to postgres with grant option; + SET search_path TO extensions, public, tiger, tiger_data; + -- postgres role should have access + set local role postgres; + perform tiger.pprint_addy(tiger.pagc_normalize_address('710 E Ben White Blvd, Austin, TX 78704')); -BEGIN; --- create postgis tiger as supabase_admin -create extension if not exists address_standardizer with schema extensions; -create extension if not exists postgis_tiger_geocoder cascade; + -- other roles can be granted access + grant usage on schema tiger, tiger_data to authenticated; + grant select on all tables in schema tiger, tiger_data to authenticated; + grant execute on all routines in schema tiger, tiger_data to authenticated; --- \ir ansible/files/postgresql_extension_custom_scripts/postgis_tiger_geocoder/after-create.sql -grant usage on schema tiger, tiger_data to postgres with grant option; -grant all privileges on all tables in schema tiger, tiger_data to postgres with grant option; -grant all privileges on all routines in schema tiger, tiger_data to postgres with grant option; -grant all privileges on all sequences in schema tiger, tiger_data to postgres with grant option; -alter default privileges in schema tiger, tiger_data grant all on tables to postgres with grant option; -alter default privileges in schema tiger, tiger_data grant all on routines to postgres with grant option; -alter default privileges in schema tiger, tiger_data grant all on sequences to postgres with grant option; + -- authenticated role should have access now + set local role authenticated; + perform tiger.pprint_addy(tiger.pagc_normalize_address('710 E Ben White Blvd, Austin, TX 78704')); + reset role; --- postgres role should have access -set local role postgres; -select tiger.pprint_addy(tiger.pagc_normalize_address('710 E Ben White Blvd, Austin, TX 78704')); - --- other roles can be granted access -grant usage on schema tiger, tiger_data to authenticated; -grant select on all tables in schema tiger, tiger_data to authenticated; -grant execute on all routines in schema tiger, tiger_data to authenticated; - --- authenticated role should have access now -set local role authenticated; -select tiger.pprint_addy(tiger.pagc_normalize_address('710 E Ben White Blvd, Austin, TX 78704')); -ROLLBACK; - -BEGIN; --- address standardizer creates a table in extensions schema, owned by supabase_admin -create extension if not exists address_standardizer_data_us with schema extensions; --- postgres role should have access -set local role postgres; -select * from extensions.us_lex; -ROLLBACK; + -- postgres role should have access to address_standardizer_data_us + set local role postgres; + perform 1 from us_lex; + reset role; + end if; +end +$_$; +rollback; diff --git a/migrations/tests/extensions/02-pgrouting.sql b/migrations/tests/extensions/02-pgrouting.sql index 27dec0b55..f8d478657 100644 --- a/migrations/tests/extensions/02-pgrouting.sql +++ b/migrations/tests/extensions/02-pgrouting.sql @@ -1,3 +1,9 @@ -BEGIN; -create extension if not exists pgrouting with schema "extensions" cascade; -ROLLBACK; +begin; +do $_$ +begin + if not exists (select 1 from pg_extension where extname = 'orioledb') then + create extension if not exists pgrouting with schema "extensions" cascade; + end if; +end +$_$; +rollback; diff --git a/migrations/tests/extensions/06-pgjwt.sql b/migrations/tests/extensions/06-pgjwt.sql index 36782fd05..31716d37d 100644 --- a/migrations/tests/extensions/06-pgjwt.sql +++ b/migrations/tests/extensions/06-pgjwt.sql @@ -1,3 +1,10 @@ BEGIN; -create extension if not exists pgjwt with schema "extensions" cascade; +do $$ +begin + if exists (select 1 from pg_available_extensions where name = 'pgjwt') then + if not exists (select 1 from pg_extension where extname = 'pgjwt') then + create extension if not exists pgjwt with schema "extensions" cascade; + end if; + end if; +end $$; ROLLBACK; diff --git a/migrations/tests/extensions/10-timescaledb.sql b/migrations/tests/extensions/10-timescaledb.sql index acf32b8d2..71fc3b19c 100644 --- a/migrations/tests/extensions/10-timescaledb.sql +++ b/migrations/tests/extensions/10-timescaledb.sql @@ -1,3 +1,9 @@ -BEGIN; -create extension if not exists timescaledb with schema "extensions"; -ROLLBACK; +begin; +do $_$ +begin + if current_setting('server_version_num')::integer >= 150000 and current_setting('server_version_num')::integer < 160000 then + create extension if not exists timescaledb with schema "extensions"; + end if; +end +$_$; +rollback; diff --git a/migrations/tests/extensions/13-plv8.sql b/migrations/tests/extensions/13-plv8.sql index a40792504..8ce134a05 100644 --- a/migrations/tests/extensions/13-plv8.sql +++ b/migrations/tests/extensions/13-plv8.sql @@ -1,3 +1,9 @@ -BEGIN; -create extension if not exists plv8 with schema "pg_catalog"; -ROLLBACK; +begin; +do $_$ +begin + if current_setting('server_version_num')::integer >= 150000 and current_setting('server_version_num')::integer < 160000 then + create extension if not exists plv8 with schema "pg_catalog"; + end if; +end +$_$; +rollback; diff --git a/migrations/tests/extensions/27-pg_repack.sql b/migrations/tests/extensions/27-pg_repack.sql new file mode 100644 index 000000000..200cf782b --- /dev/null +++ b/migrations/tests/extensions/27-pg_repack.sql @@ -0,0 +1,3 @@ +BEGIN; +create extension if not exists pg_repack with schema "extensions"; +ROLLBACK; diff --git a/migrations/tests/extensions/test.sql b/migrations/tests/extensions/test.sql index 820a86070..7e0d1f38d 100644 --- a/migrations/tests/extensions/test.sql +++ b/migrations/tests/extensions/test.sql @@ -25,5 +25,6 @@ \ir 24-pgroonga.sql \ir 25-wrappers.sql \ir 26-hypopg.sql +\ir 27-pg_repack.sql \ir 28-pgvector.sql \ir 29-pg_tle.sql diff --git a/migrations/tests/test.sql b/migrations/tests/test.sql index 6bd7f23a2..9682b4a2b 100644 --- a/migrations/tests/test.sql +++ b/migrations/tests/test.sql @@ -1,3 +1,13 @@ +-- Check and create OrioleDB if available +DO $$ +BEGIN + IF EXISTS (SELECT 1 FROM pg_available_extensions WHERE name = 'orioledb') THEN + IF NOT EXISTS (SELECT 1 FROM pg_extension WHERE extname = 'orioledb') THEN + CREATE EXTENSION orioledb; + END IF; + END IF; +END $$; + -- Create all extensions \ir extensions/test.sql @@ -5,7 +15,7 @@ BEGIN; CREATE EXTENSION IF NOT EXISTS pgtap; -SELECT plan(34); +SELECT no_plan(); \ir fixtures.sql \ir database/test.sql diff --git a/nix/cargo-pgrx/buildPgrxExtension.nix b/nix/cargo-pgrx/buildPgrxExtension.nix new file mode 100644 index 000000000..89293ab62 --- /dev/null +++ b/nix/cargo-pgrx/buildPgrxExtension.nix @@ -0,0 +1,161 @@ +# preBuildAndTest and some small other bits +# taken from https://github.com/tcdi/pgrx/blob/v0.9.4/nix/extension.nix +# (but now heavily modified) +# which uses MIT License with the following license file +# +# MIT License +# +# Portions Copyright 2019-2021 ZomboDB, LLC. +# Portions Copyright 2021-2022 Technology Concepts & Design, Inc. . +# All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +{ lib +, cargo-pgrx +, pkg-config +, rustPlatform +, stdenv +, Security +, writeShellScriptBin +}: + +# The idea behind: Use it mostly like rustPlatform.buildRustPackage and so +# we hand most of the arguments down. +# +# Additional arguments are: +# - `postgresql` postgresql package of the version of postgresql this extension should be build for. +# Needs to be the build platform variant. +# - `useFakeRustfmt` Whether to use a noop fake command as rustfmt. cargo-pgrx tries to call rustfmt. +# If the generated rust bindings aren't needed to use the extension, its a +# unnecessary and heavy dependency. If you set this to true, you also +# have to add `rustfmt` to `nativeBuildInputs`. + +{ buildAndTestSubdir ? null +, buildType ? "release" +, buildFeatures ? [ ] +, cargoBuildFlags ? [ ] +, postgresql +# cargo-pgrx calls rustfmt on generated bindings, this is not strictly necessary, so we avoid the +# dependency here. Set to false and provide rustfmt in nativeBuildInputs, if you need it, e.g. +# if you include the generated code in the output via postInstall. +, useFakeRustfmt ? true +, usePgTestCheckFeature ? true +, ... +} @ args: +let + rustfmtInNativeBuildInputs = lib.lists.any (dep: lib.getName dep == "rustfmt") (args.nativeBuildInputs or []); +in + +assert lib.asserts.assertMsg ((args.installPhase or "") == "") + "buildPgrxExtensions overwrites the installPhase, so providing one does nothing"; +assert lib.asserts.assertMsg ((args.buildPhase or "") == "") + "buildPgrxExtensions overwrites the buildPhase, so providing one does nothing"; +assert lib.asserts.assertMsg (useFakeRustfmt -> !rustfmtInNativeBuildInputs) + "The parameter useFakeRustfmt is set to true, but rustfmt is included in nativeBuildInputs. Either set useFakeRustfmt to false or remove rustfmt from nativeBuildInputs."; +assert lib.asserts.assertMsg (!useFakeRustfmt -> rustfmtInNativeBuildInputs) + "The parameter useFakeRustfmt is set to false, but rustfmt is not included in nativeBuildInputs. Either set useFakeRustfmt to true or add rustfmt from nativeBuildInputs."; + +let + fakeRustfmt = writeShellScriptBin "rustfmt" '' + exit 0 + ''; + maybeDebugFlag = lib.optionalString (buildType != "release") "--debug"; + maybeEnterBuildAndTestSubdir = lib.optionalString (buildAndTestSubdir != null) '' + export CARGO_TARGET_DIR="$(pwd)/target" + pushd "${buildAndTestSubdir}" + ''; + maybeLeaveBuildAndTestSubdir = lib.optionalString (buildAndTestSubdir != null) "popd"; + + pgrxPostgresMajor = lib.versions.major postgresql.version; + preBuildAndTest = '' + export PGRX_HOME=$(mktemp -d) + export PGDATA="$PGRX_HOME/data-${pgrxPostgresMajor}/" + cargo-pgrx pgrx init "--pg${pgrxPostgresMajor}" ${lib.getDev postgresql}/bin/pg_config + echo "unix_socket_directories = '$(mktemp -d)'" > "$PGDATA/postgresql.conf" + + # This is primarily for Mac or other Nix systems that don't use the nixbld user. + export USER="$(whoami)" + pg_ctl start + createuser -h localhost --superuser --createdb "$USER" || true + pg_ctl stop + ''; + + argsForBuildRustPackage = builtins.removeAttrs args [ "postgresql" "useFakeRustfmt" "usePgTestCheckFeature" ]; + + # so we don't accidentally `(rustPlatform.buildRustPackage argsForBuildRustPackage) // { ... }` because + # we forgot parentheses + finalArgs = argsForBuildRustPackage // { + buildInputs = (args.buildInputs or [ ]) ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; + + nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ + cargo-pgrx + postgresql + pkg-config + rustPlatform.bindgenHook + ] ++ lib.optionals useFakeRustfmt [ fakeRustfmt ]; + + buildPhase = '' + runHook preBuild + + echo "Executing cargo-pgrx buildPhase" + ${preBuildAndTest} + ${maybeEnterBuildAndTestSubdir} + + PGRX_BUILD_FLAGS="--frozen -j $NIX_BUILD_CORES ${builtins.concatStringsSep " " cargoBuildFlags}" \ + ${lib.optionalString stdenv.hostPlatform.isDarwin ''RUSTFLAGS="''${RUSTFLAGS:+''${RUSTFLAGS} }-Clink-args=-Wl,-undefined,dynamic_lookup"''} \ + cargo pgrx package \ + --pg-config ${lib.getDev postgresql}/bin/pg_config \ + ${maybeDebugFlag} \ + --features "${builtins.concatStringsSep " " buildFeatures}" \ + --out-dir "$out" + + ${maybeLeaveBuildAndTestSubdir} + + runHook postBuild + ''; + + preCheck = preBuildAndTest + args.preCheck or ""; + + installPhase = '' + runHook preInstall + + echo "Executing buildPgrxExtension install" + + ${maybeEnterBuildAndTestSubdir} + + cargo-pgrx pgrx stop all + + mv $out/${postgresql}/* $out + rm -rf $out/nix + + ${maybeLeaveBuildAndTestSubdir} + + runHook postInstall + ''; + + PGRX_PG_SYS_SKIP_BINDING_REWRITE = "1"; + CARGO_BUILD_INCREMENTAL = "false"; + RUST_BACKTRACE = "full"; + + checkNoDefaultFeatures = true; + checkFeatures = (args.checkFeatures or [ ]) ++ (lib.optionals usePgTestCheckFeature [ "pg_test" ]) ++ [ "pg${pgrxPostgresMajor}" ]; + }; +in +rustPlatform.buildRustPackage finalArgs diff --git a/nix/cargo-pgrx/default.nix b/nix/cargo-pgrx/default.nix new file mode 100644 index 000000000..64e15160b --- /dev/null +++ b/nix/cargo-pgrx/default.nix @@ -0,0 +1,75 @@ +{ lib +, darwin +, fetchCrate +, openssl +, pkg-config +, makeRustPlatform +, stdenv +, rust-bin +}: +let + rustVersion = "1.76.0"; + rustPlatform = makeRustPlatform { + cargo = rust-bin.stable.${rustVersion}.default; + rustc = rust-bin.stable.${rustVersion}.default; + }; + generic = + { version + , hash + , cargoHash + }: + rustPlatform.buildRustPackage rec { + pname = "cargo-pgrx"; + inherit version; + src = fetchCrate { + inherit version pname hash; + }; + inherit cargoHash; + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ + pkg-config + ]; + buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ + openssl + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + OPENSSL_DIR = "${openssl.dev}"; + OPENSSL_INCLUDE_DIR = "${openssl.dev}/include"; + OPENSSL_LIB_DIR = "${openssl.out}/lib"; + PKG_CONFIG_PATH = "${openssl.dev}/lib/pkgconfig"; + preCheck = '' + export PGRX_HOME=$(mktemp -d) + ''; + checkFlags = [ + # requires pgrx to be properly initialized with cargo pgrx init + "--skip=command::schema::tests::test_parse_managed_postmasters" + ]; + meta = with lib; { + description = "Build Postgres Extensions with Rust"; + homepage = "https://github.com/pgcentralfoundation/pgrx"; + changelog = "https://github.com/pgcentralfoundation/pgrx/releases/tag/v$%7Bversion%7D"; + license = licenses.mit; + maintainers = with maintainers; [ happysalada ]; + mainProgram = "cargo-pgrx"; + }; + }; +in +{ + cargo-pgrx_0_11_3 = generic { + version = "0.11.3"; + hash = "sha256-UHIfwOdXoJvR4Svha6ud0FxahP1wPwUtviUwUnTmLXU="; + cargoHash = "sha256-j4HnD8Zt9uhlV5N7ldIy9564o9qFEqs5KfXHmnQ1WEw="; + }; + cargo-pgrx_0_12_6 = generic { + version = "0.12.6"; + hash = "sha256-7aQkrApALZe6EoQGVShGBj0UIATnfOy2DytFj9IWdEA="; + cargoHash = "sha256-Di4UldQwAt3xVyvgQT1gUhdvYUVp7n/a72pnX45kP0w="; + }; + cargo-pgrx_0_12_9 = generic { + version = "0.12.9"; + hash = "sha256-aR3DZAjeEEAjLQfZ0ZxkjLqTVMIEbU0UiZ62T4BkQq8="; + cargoHash = "sha256-53HKhvsKLTa2JCByLEcK3UzWXoM+LTatd98zvS1C9no="; + }; + inherit rustPlatform; +} diff --git a/nix/do-not-use-vendored-libraries.patch b/nix/do-not-use-vendored-libraries.patch new file mode 100644 index 000000000..6a005349d --- /dev/null +++ b/nix/do-not-use-vendored-libraries.patch @@ -0,0 +1,15 @@ +Do not use vendored libraries + +--- a/vendor/CMakeLists.txt ++++ b/vendor/CMakeLists.txt +@@ -14,10 +14,7 @@ + # License along with this library; if not, write to the Free Software + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + add_subdirectory(onigmo) +-add_subdirectory(mruby) +-add_subdirectory(mecab) +-add_subdirectory(message_pack) + if(GRN_WITH_MRUBY) + add_subdirectory(groonga-log) + endif() \ No newline at end of file diff --git a/nix/docker/init.sh.in b/nix/docker/init.sh.in new file mode 100644 index 000000000..5d39e7a5a --- /dev/null +++ b/nix/docker/init.sh.in @@ -0,0 +1,5 @@ +#!/bin/bash +# shellcheck shell=bash +/bin/initdb --locale=C -D /data/postgresql --username=supabase_admin +ln -s /etc/postgresql.conf /data/postgresql/postgresql.conf +/bin/postgres -p @PGSQL_DEFAULT_PORT@ -D /data/postgresql diff --git a/nix/docs/README.md b/nix/docs/README.md new file mode 100644 index 000000000..400632984 --- /dev/null +++ b/nix/docs/README.md @@ -0,0 +1,8 @@ +# Documentation + +This directory contains most of the "runbooks" and documentation on how to use +this repository. + +You probably want to start with the [starting guide](./start-here.md). Then, +learn how to play with `postgres` in the [build guide](./build-postgres.md). +After that, you can probe around a bit. diff --git a/nix/docs/adding-new-package.md b/nix/docs/adding-new-package.md new file mode 100644 index 000000000..6f7753953 --- /dev/null +++ b/nix/docs/adding-new-package.md @@ -0,0 +1,159 @@ +# Adding a new extension package + + +## Pre-packaging steps +1. Make sure you have nix installed [Nix installer](https://github.com/DeterminateSystems/nix-installer) +2. Create a branch off of `develop` + + +## C/C++ postgres extensions + +If you are creating a C/C++ extension, the pattern found in https://github.com/supabase/postgres/blob/develop/nix/ext/pgvector.nix will work well. + +``` +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "pgvector"; + version = "0.7.4"; + + buildInputs = [ postgresql ]; + + src = fetchFromGitHub { + owner = "pgvector"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-qwPaguQUdDHV8q6GDneLq5MuhVroPizpbqt7f08gKJI="; + }; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + cp *.so $out/lib + cp sql/*.sql $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "Open-source vector similarity search for Postgres"; + homepage = "https://github.com/$%7Bsrc.owner%7D/$%7Bsrc.repo%7D"; + maintainers = with maintainers; [ olirice ]; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} +``` + +This uses `stdenv.mkDerivation` which is a general nix builder for C and C++ projects (and others). It can auto detect the Makefile, and attempt to use it. ***It's a good practice to not have steps in the Makefile of your project that try to deal with OS specific system paths, or make calls out to the internet, as Nix cannot use these steps to build your project.*** + +Your build should produce all of the sql and control files needed for the install phase. + +1. Once you have created this file, you can add it to `nix/ext/.nix` and edit `flake.nix` and add it to the `ourExtensions` list. +2. `git add .` as nix uses git to track changes +3. In your package file, temporarily empty the `hash = "sha256<...>=";` to `hash = "";` and save and `git add .` +4. Run `nix build .#psql_15/exts/` to try to trigger a build, nix will print the calculated sha256 value that you can add back the the `hash` variable, save the file again, and re-run `nix build .#psql_15/exts/`. +5. Add any needed migrations into the `supabase/postgres` migrations directory. +6. You can then run tests locally to verify that the update of the package succeeded. +7. Now it's ready for PR review! + +## Extensions written in Rust that use `buildPgrxExtension` builder + +Extensions like: + +* https://github.com/supabase/postgres/blob/develop/nix/ext/wrappers/default.nix +* https://github.com/supabase/postgres/blob/develop/nix/ext/pg_graphql.nix +* https://github.com/supabase/postgres/blob/develop/nix/ext/pg_jsonschema.nix + +Are written in Rust, built with `cargo`, and need to use https://github.com/pgcentralfoundation/pgrx to build the extension. + +We in turn have a special nix package `builder` which is sourced from `nixpkgs` and called `buildPgrxExtension` + +A simple example is found in `pg_jsonschema` + + +``` +{ lib, stdenv, fetchFromGitHub, postgresql, buildPgrxExtension_0_11_3, cargo }: + +buildPgrxExtension_0_11_3 rec { + pname = "pg_jsonschema"; + version = "0.3.1"; + inherit postgresql; + + src = fetchFromGitHub { + owner = "supabase"; + repo = pname; + rev = "v${version}"; + hash = "sha256-YdKpOEiDIz60xE7C+EzpYjBcH0HabnDbtZl23CYls6g="; + }; + + nativeBuildInputs = [ cargo ]; + buildInputs = [ postgresql ]; + # update the following array when the pg_jsonschema version is updated + # required to ensure that extensions update scripts from previous versions are generated + + previousVersions = ["0.3.0" "0.2.0" "0.1.4" "0.1.4" "0.1.2" "0.1.1" "0.1.0"]; + CARGO="${cargo}/bin/cargo"; + env = lib.optionalAttrs stdenv.isDarwin { + POSTGRES_LIB = "${postgresql}/lib"; + RUSTFLAGS = "-C link-arg=-undefined -C link-arg=dynamic_lookup"; + }; + cargoHash = "sha256-VcS+efMDppofuFW2zNrhhsbC28By3lYekDFquHPta2g="; + + # FIXME (aseipp): testsuite tries to write files into /nix/store; we'll have + # to fix this a bit later. + doCheck = false; + + preBuild = '' + echo "Processing git tags..." + echo '${builtins.concatStringsSep "," previousVersions}' | sed 's/,/\n/g' > git_tags.txt + ''; + + postInstall = '' + echo "Creating SQL files for previous versions..." + current_version="${version}" + sql_file="$out/share/postgresql/extension/pg_jsonschema--$current_version.sql" + + if [ -f "$sql_file" ]; then + while read -r previous_version; do + if [ "$(printf '%s\n' "$previous_version" "$current_version" | sort -V | head -n1)" = "$previous_version" ] && [ "$previous_version" != "$current_version" ]; then + new_file="$out/share/postgresql/extension/pg_jsonschema--$previous_version--$current_version.sql" + echo "Creating $new_file" + cp "$sql_file" "$new_file" + fi + done < git_tags.txt + else + echo "Warning: $sql_file not found" + fi + rm git_tags.txt + ''; + + + meta = with lib; { + description = "JSON Schema Validation for PostgreSQL"; + homepage = "https://github.com/supabase/$%7Bpname%7D"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} +``` + +Here we have built support in our overlay to specify and pin the version of `buildPgrxExtension` to a specific version (in this case `buildPgrxExtension_0_11_3`). This is currently the only version we can support, but this can be extended in our overlay https://github.com/supabase/postgres/blob/develop/nix/overlays/cargo-pgrx-0-11-3.nix to support other versions. + +A few things about `buildPgrxExtension_x`: + +* It doesn't support `buildPhase`, `installPhase` and those are implemented directly in the builder already +* It mostly just allows `cargo build` to do it's thing, but you may need to set env vars for the build process as seen above +* It caclulates a special `cargoHash` that will be generated after the first in `src` is generated, when running `nix build .#psql_15/exts/` to build the extension + + +## Post Nix derivation release steps + + +1. You can add and run tests as described in https://github.com/supabase/postgres/blob/develop/nix/docs/adding-tests.md +2. You may need to add tests to our test.yml gh action workflow as well. +3. You can add the package and name and version to `ansible/vars.yml` it is not necessary to add the sha256 hash here, as the package is already built and cached in our release process before these vars are ever run. +4. to check that all your files will land in the overall build correctly, you can run `nix profile install .#psql_15/bin` on your machine, and check in `~/.nix-profile/bin, ~/.nix-profile/lib, ~/.nix-profile/share/postgresql/*` and you should see your lib, .control and sql files there. +5. You can also run `nix run .#start-server 15` and in a new terminal window run `nix run .#star-client-and-migrate 15` and try to `CREATE EXTENSION ` and work with it there +6. Check that your extension works with the `pg_upgrade` process (TODO documentation forthcoming) +7. Now you are ready to PR the extension +8. From here, the release process should typically take care of the rest. \ No newline at end of file diff --git a/nix/docs/adding-tests.md b/nix/docs/adding-tests.md new file mode 100644 index 000000000..8ab21ad9b --- /dev/null +++ b/nix/docs/adding-tests.md @@ -0,0 +1,108 @@ +There are basically two types of tests you can add: + +- pgTAP based tests, and +- pg\_regress tests +- Migration tests. + +In all cases, a number of extensions may be installed into the database for +use; you can see those in both [postgresql.conf.in](../tests/postgresql.conf.in) +and [prime.sql](../tests/prime.sql) (extensions may be enabled in either place.) + +## pg\_regress tests + +pg\_regress tests are in [tests/sql](./../tests/sql/) with output in [tests/expected](./../tests/expected/). +To create a new test, create a new SQL file in [tests/sql](./../tests/sql/) + +Next, for each current major version of postgres, we run a "flake check" build one at a time. + +Examples: + +``` +nix build .#checks.aarch64-darwin.psql_15 -L +nix build .#checks.aarch64-darwin.psql_17 -L +nix build .#checks.aarch64-darwin.psql_orioledb-17 -L +``` + +(Note that the evaluation and nix build of the postgres packages "bundle" of each major version must succeed here, even though we run one version at a time. If you made changes to postgres or extensions, or wrappers those may rebuild here when you run this. Otherwise they will usually download the prebuilt version from the supabase nix binary cache) + +Next, review the logs to identify where the test output was written + +``` +postgres> CREATE EXTENSION IF NOT EXISTS index_advisor; +postgres> CREATE EXTENSION +postgres> (using postmaster on localhost, port 5432) +postgres> ============== running regression test queries ============== +postgres> test new_test ... diff: /nix/store/5gk419ddz7mzzwhc9j6yj5i8lkw67pdl-tests/expected/new_test.out: No such file or directory +postgres> diff command failed with status 512: diff "/nix/store/5gk419ddz7mzzwhc9j6yj5i8lkw67pdl-tests/expected/new_test.out" "/nix/store/2fbrvnnr7iz6yigyf0rb0vxnyqvrgxzp-postgres-15.6-check-harness/regression_output/results/new_test.out" > "/nix/store/2fbrvnnr7iz6yigyf0rb0vxnyqvrgxzp-postgres-15.6-check-harness/regression_output/results/new_test.out.diff +``` + +and copy the `regression_output` directory to where you can review + +``` +cp -r /nix/store/2fbrvnnr7iz6yigyf0rb0vxnyqvrgxzp-postgres-15.6-check-harness/regression_output . +``` + +Then you can review the contents of `regression_output/results/new_test.out` to see if it matches what you expected. + +If it does match your expectations, copy the file to [tests/expected](./../tests/expected/) and the test will pass on the next run. + +If the output does not match your expectations, update the `.sql` file, re-run with `nix flake check -L` and try again + + +## pgTAP tests + +These are super easy: simply add `.sql` files to the +[tests/smoke](./../tests/smoke/) directory, then: + +``` +nix flake check -L +``` + +(`-L` prints logs to stderrr, for more details see `man nix`) + +These files are run using `pg_prove`; they pretty much behave exactly like how +you expect; you can read +[the pgTAP documentation](https://pgtap.org/documentation.html) for more. + +For a good example of a pgTAP test as a pull request, check out +[pull request #4](https://github.com/supabase/nix-postgres/pull/4/files). + +## Re-running tests + +`nix flake check` gets its results cached, so if you do it again the tests won't rerun. If you change a file then it will run again. + + + +Limitation: currently there's no way to rerun all the tests, so you have to specify the check attribute. + +To get the correct attribute (`#checks.x86_64-linux.psql_15` above), you can do `nix flake show`. This will show a tree with all the output attributes. + +## Migration tests + +> **NOTE**: Currently, migration tests _do not happen in CI_. They can only be +> run manually. + +Migration tests are pretty simple in the sense they follow a very simple +principle: + +- You put data in the database +- Run the migration procedure +- It should probably not fail + +Step 1 and 2 are easy, and for various reasons (e.g. mistakes from upstream +extension authors), step 3 isn't guaranteed, so that's what the whole idea is +designed to test. + +To add data into the database, modify the +[data.sql](../nix/tests/migrations/data.sql) script and add whatever you want into +it. This script gets loaded into the old version of the database at startup, and +it's expected that the new version of the database can handle it. + +To run the `migration-test` tool, check out the documentation on +[migration-tests](./migration-tests.md). diff --git a/nix/docs/build-postgres.md b/nix/docs/build-postgres.md new file mode 100644 index 000000000..2805d443a --- /dev/null +++ b/nix/docs/build-postgres.md @@ -0,0 +1,124 @@ +# 01 — Using supabase nix + +Let's clone this repo: + +```bash +git clone https://github.com/supabase/postgres $HOME/supabase-postgres +cd $HOME/supabase-postgres +``` + +## Hashes for everyone + +But how do we build stuff within it? With `nix build`, of course! For example, +the following command will, when completed, create a symlink named `result` that +points to a path which contains an entire PostgreSQL 15 installation — +extensions and all: + +``` +nix build .#psql_15/bin +``` + +``` +$ readlink result +/nix/store/ybf48481x033649mgdzk5dyaqv9dppzx-postgresql-and-plugins-15.3 +``` + +``` +$ ls result +bin include lib share +``` + +``` +$ ll result/bin/ +total 9928 +dr-xr-xr-x 2 root root 4096 Dec 31 1969 ./ +dr-xr-xr-x 5 root root 4096 Dec 31 1969 ../ +lrwxrwxrwx 1 root root 79 Dec 31 1969 .initdb-wrapped -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/.initdb-wrapped* +-r-xr-xr-x 1 root root 9829624 Dec 31 1969 .postgres-wrapped* +lrwxrwxrwx 1 root root 73 Dec 31 1969 clusterdb -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/clusterdb* +lrwxrwxrwx 1 root root 72 Dec 31 1969 createdb -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/createdb* +lrwxrwxrwx 1 root root 74 Dec 31 1969 createuser -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/createuser* +lrwxrwxrwx 1 root root 70 Dec 31 1969 dropdb -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/dropdb* +lrwxrwxrwx 1 root root 72 Dec 31 1969 dropuser -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/dropuser* +lrwxrwxrwx 1 root root 68 Dec 31 1969 ecpg -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/ecpg* +lrwxrwxrwx 1 root root 70 Dec 31 1969 initdb -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/initdb* +lrwxrwxrwx 1 root root 72 Dec 31 1969 oid2name -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/oid2name* +lrwxrwxrwx 1 root root 74 Dec 31 1969 pg_amcheck -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_amcheck* +lrwxrwxrwx 1 root root 81 Dec 31 1969 pg_archivecleanup -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_archivecleanup* +lrwxrwxrwx 1 root root 77 Dec 31 1969 pg_basebackup -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_basebackup* +lrwxrwxrwx 1 root root 76 Dec 31 1969 pg_checksums -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_checksums* +-r-xr-xr-x 1 root root 53432 Dec 31 1969 pg_config* +lrwxrwxrwx 1 root root 78 Dec 31 1969 pg_controldata -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_controldata* +-r-xr-xr-x 1 root root 82712 Dec 31 1969 pg_ctl* +lrwxrwxrwx 1 root root 71 Dec 31 1969 pg_dump -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_dump* +lrwxrwxrwx 1 root root 74 Dec 31 1969 pg_dumpall -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_dumpall* +lrwxrwxrwx 1 root root 74 Dec 31 1969 pg_isready -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_isready* +lrwxrwxrwx 1 root root 77 Dec 31 1969 pg_receivewal -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_receivewal* +lrwxrwxrwx 1 root root 78 Dec 31 1969 pg_recvlogical -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_recvlogical* +lrwxrwxrwx 1 root root 73 Dec 31 1969 pg_repack -> /nix/store/bi9i5ns4cqxk235qz3srs9p4x1qfxfna-pg_repack-1.4.8/bin/pg_repack* +lrwxrwxrwx 1 root root 75 Dec 31 1969 pg_resetwal -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_resetwal* +lrwxrwxrwx 1 root root 74 Dec 31 1969 pg_restore -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_restore* +lrwxrwxrwx 1 root root 73 Dec 31 1969 pg_rewind -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_rewind* +lrwxrwxrwx 1 root root 77 Dec 31 1969 pg_test_fsync -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_test_fsync* +lrwxrwxrwx 1 root root 78 Dec 31 1969 pg_test_timing -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_test_timing* +lrwxrwxrwx 1 root root 74 Dec 31 1969 pg_upgrade -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_upgrade* +lrwxrwxrwx 1 root root 79 Dec 31 1969 pg_verifybackup -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_verifybackup* +lrwxrwxrwx 1 root root 74 Dec 31 1969 pg_waldump -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pg_waldump* +lrwxrwxrwx 1 root root 71 Dec 31 1969 pgbench -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/pgbench* +lrwxrwxrwx 1 root root 71 Dec 31 1969 pgsql2shp -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/pgsql2shp* +lrwxrwxrwx 1 root root 77 Dec 31 1969 pgsql2shp-3.3.3 -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/pgsql2shp-3.3.3* +lrwxrwxrwx 1 root root 75 Dec 31 1969 pgtopo_export -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/pgtopo_export* +lrwxrwxrwx 1 root root 81 Dec 31 1969 pgtopo_export-3.3.3 -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/pgtopo_export-3.3.3* +lrwxrwxrwx 1 root root 75 Dec 31 1969 pgtopo_import -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/pgtopo_import* +lrwxrwxrwx 1 root root 81 Dec 31 1969 pgtopo_import-3.3.3 -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/pgtopo_import-3.3.3* +-r-xr-xr-x 1 root root 286 Dec 31 1969 postgres* +lrwxrwxrwx 1 root root 74 Dec 31 1969 postmaster -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/postmaster* +lrwxrwxrwx 1 root root 68 Dec 31 1969 psql -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/psql* +lrwxrwxrwx 1 root root 74 Dec 31 1969 raster2pgsql -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/raster2pgsql* +lrwxrwxrwx 1 root root 80 Dec 31 1969 raster2pgsql-3.3.3 -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/raster2pgsql-3.3.3* +lrwxrwxrwx 1 root root 73 Dec 31 1969 reindexdb -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/reindexdb* +lrwxrwxrwx 1 root root 71 Dec 31 1969 shp2pgsql -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/shp2pgsql* +lrwxrwxrwx 1 root root 77 Dec 31 1969 shp2pgsql-3.3.3 -> /nix/store/4wwzd3c136g6j7aqva2gyiqgwy784qjv-postgis-3.3.3/bin/shp2pgsql-3.3.3* +lrwxrwxrwx 1 root root 72 Dec 31 1969 vacuumdb -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/vacuumdb* +lrwxrwxrwx 1 root root 72 Dec 31 1969 vacuumlo -> /nix/store/kdjdxnyhpwpvb11da8s99ylqilspcmzl-postgresql-15.3/bin/vacuumlo* +``` + +As we can see, these files all point to paths under `/nix/store`. We're actually +looking at a "farm" of symlinks to various paths, but collectively they form an +entire installation directory we can reuse as much as we want. + +The path +`/nix/store/ybf48481x033649mgdzk5dyaqv9dppzx-postgresql-and-plugins-15.3` +ultimately is a cryptographically hashed, unique name for our installation of +PostgreSQL with those plugins. This hash includes _everything_ used to build it, +so even a single change anywhere to any extension or version would result in a +_new_ hash. + +The ability to refer to a piece of data by its hash, by some notion of +_content_, is a very powerful primitive, as we'll see later. + +## Build a different version: v16 + +What if we wanted PostgreSQL 16 and plugins? Just replace `_15` with `_16`: + +``` +nix build .#psql_16/bin +``` + +You're done: + +``` +$ readlink result +/nix/store/p7ziflx0000s28bfb213jsghrczknkc4-postgresql-and-plugins-14.8 +``` + + +## Using `nix develop` + + +`nix develop .` will just drop you in a subshell with +tools you need _ready to go instantly_. That's all you need to do! And once that +shell goes away, nix installed tools will be removed from your `$PATH` as well. + +There's an even easier way to do this +[that is completely transparent to you, as well](./use-direnv.md). diff --git a/nix/docs/development-workflow.md b/nix/docs/development-workflow.md new file mode 100644 index 000000000..695427abc --- /dev/null +++ b/nix/docs/development-workflow.md @@ -0,0 +1,141 @@ +# PostgreSQL Development Workflow + +This document outlines the workflow for developing and testing PostgreSQL in an ec2 instance using the tools provided in this repo. + +## Prerequisites + +- Nix installed and configured +- AWS credentials configured with aws-vault (you must set up aws-vault beforehand) +- GitHub access to the repository + +## Workflow Steps + +### 1. Trigger Remote Build and Cache + +To build, test, and cache your changes in the Supabase Nix binary cache: + +```bash +# From your branch +nix run .#trigger-nix-build +``` + +This will: +- Trigger a GitHub Actions workflow +- Build PostgreSQL and extensions +- Run nix flake check tests (evaluation of nix code, pg_regress and migrations tests) +- Cache the results in the Supabase Nix binary cache +- Watch the workflow progress until completion + +The workflow will run on the branch you're currently on. + +If you're on a feature different branch, you'll be prompted to confirm before proceeding. + +### 2. Build AMI + +After the build is complete and cached, build the AMI: + +```bash +# Build AMI for PostgreSQL 15 +aws-vault exec -- nix run .#build-test-ami 15 + +# Or for PostgreSQL 17 +aws-vault exec -- nix run .#build-test-ami 17 + +# Or for PostgreSQL orioledb-17 +aws-vault exec -- nix run .#build-test-ami orioledb-17 +``` + +This will: +- Build two AMI stages using Packer +- Clean up temporary instances after AMI builds +- Output the final AMI name (e.g., `supabase-postgres-abc123`) + +**Important**: Take note of the AMI name output at the end, as you'll need it for the next step. + +### 3. Run Testinfra + +Run the testinfra tests against the AMI: + +```bash +# Run tests against the AMI +nix run .#run-testinfra -- --aws-vault-profile --ami-name supabase-postgres-abc123 +``` + +This will: +- Create a Python virtual environment +- Install required Python packages +- Create an EC2 instance from the AMI +- Run the test suite +- Automatically terminate the EC2 instance when done + +The script handles: +- Setting up AWS credentials via aws-vault +- Creating and managing the Python virtual environment +- Running the tests +- Cleaning up EC2 instances +- Proper error handling and cleanup on interruption + +### 4. Optional: Cleanup AMI + +If you want to clean up the AMI after testing: + +```bash +# Clean up the AMI +aws-vault exec -- nix run .#cleanup-ami supabase-postgres-abc123 +``` + +This will: +- Deregister the AMI +- Clean up any associated resources + +## Troubleshooting + +### Common Issues + +1. **AWS Credentials** + - Ensure aws-vault is properly configured + - Use the `--aws-vault-profile` argument to specify your AWS profile + - Default profile is "staging" if not specified + +2. **EC2 Instance Not Terminating** + - The script includes multiple safeguards for cleanup + - If instances aren't terminated, check AWS console and terminate manually + +3. **Test Failures** + - Check the test output for specific failures + - Ensure you're using the correct AMI name + - Verify AWS region and permissions + +### Environment Variables + +The following environment variables are used: +- `AWS_VAULT`: AWS Vault profile name (default: staging) +- `AWS_REGION`: AWS region (default: ap-southeast-1) +- `AMI_NAME`: Name of the AMI to test + +## Best Practices + +1. **Branch Management** + - Use feature branches for development + - Merge to develop for testing + - Use release branches for version-specific changes + +2. **Resource Cleanup** + - Always run the cleanup step after testing + - Monitor AWS console for any lingering resources + - Use the cleanup-ami command when done with an AMI + +3. **Testing** + - Run tests locally before pushing changes + - Verify AMI builds before running testinfra + - Check test output for any warnings or errors + +## Additional Commands + +```bash +# Show available commands +nix run .#show-commands + +# Update README with latest command information +nix run .#update-readme +``` \ No newline at end of file diff --git a/nix/docs/docker.md b/nix/docs/docker.md new file mode 100644 index 000000000..198c18d49 --- /dev/null +++ b/nix/docs/docker.md @@ -0,0 +1,14 @@ +Docker images are pushed to `ghcr.io` on every commit. Try the following: + +``` +docker run --rm -it ghcr.io/supabase/nix-postgres-15:latest +``` + +Every Docker image that is built on every push is given a tag that exactly +corresponds to a Git commit in the repository — for example commit +[d3e0c39d34e1bb4d37e058175a7bc376620f6868](https://github.com/supabase/nix-postgres/commit/d3e0c39d34e1bb4d37e058175a7bc376620f6868) +in this repository has a tag in the container registry which can be used to pull +exactly that version. + +This just starts the server. Client container images are not provided; you can +use `nix run` for that, as outlined [here](./start-client-server.md). diff --git a/nix/docs/migration-tests.md b/nix/docs/migration-tests.md new file mode 100644 index 000000000..d04bfeb90 --- /dev/null +++ b/nix/docs/migration-tests.md @@ -0,0 +1,50 @@ +Migration tests are run similar to running the client and server; see +[more on that here](./start-client-server.md). + +Instead, you use the following format to specify the upgrade: + +``` +nix run .#migration-test [pg_dumpall|pg_upgrade] +``` + +The arguments are: + +- The version to upgrade from +- The version to upgrade to +- The upgrade mechanism: either `pg_dumpall` or `pg_upgrade` + +## Specifying the version + +The versions for upgrading can be one of two forms: + +- A major version number, e.g. `14` or `15` +- A path to `/nix/store`, which points to _any_ version of PostgreSQL, as long + as it has the "expected" layout and is a postgresql install. + +## Always use the latest version of the migration tool + +Unlike the method for starting the client or server, you probably always want to +use the latest version of the `migration-test` tool from the repository. This is +because it can ensure forwards and backwards compatibility if necessary. + +## Upgrading between arbitrary `/nix/store` versions + +If you want to test migrations from arbitrary versions built by the repository, +you can combine `nix build` and `nix run` to do so. You can use the syntax from +the runbook on [running the server & client](./start-client-server.md) to refer +to arbitrary git revisions. + +For example, if you updated an extension in this repository, and you want to +test a migration from PostgreSQL 14 to PostgreSQL 14 + (updated extension), +using `pg_upgrade` — simply record the two git commits you want to +compare, and you could do something like the following: + +``` +OLD_GIT_VERSION=... +NEW_GIT_VERSION=... + +nix run github:supabase/nix-postgres#migration-test \ + $(nix build "github:supabase/nix-postgres/$OLD_GIT_VERSION#psql_14/bin") \ + $(nix build "github:supabase/nix-postgres/$NEW_GIT_VERSION#psql_14/bin") \ + pg_upgrade +``` diff --git a/nix/docs/new-major-postgres.md b/nix/docs/new-major-postgres.md new file mode 100644 index 000000000..1c5a2dffc --- /dev/null +++ b/nix/docs/new-major-postgres.md @@ -0,0 +1,34 @@ +PostgreSQL versions are managed in upstream nixpkgs. + +See this example PR to add a new version of PostgreSQL; this version is for 16 +beta3, but any version is roughly the same. In short, you need to: + +- Add a new version and hash +- Possibly patch the source code for minor refactorings + - In this example, an old patch had to be rewritten because a function was + split into two different functions; the patch is functionally equivalent but + textually different +- Add the changes to `all-packages.nix` +- Integrate inside the CI and get code review +- Run `nix flake update` to get a new version, once it's ready + +https://github.com/NixOS/nixpkgs/pull/249030 + +## Adding the major version to this repository + +It isn't well abstracted, unfortunately. In short: look for the strings `14` and +`15` under `flake.nix` and `nix/tools/`. More specifically: + +- Add `psql_XX` to `basePackages` in `flake.nix` +- Ditto with `checks` in `flake.nix` +- Modify the tools under `tools/` to understand the new major version +- Make sure the CI is integrated under the GitHub Actions. + +The third step and fourth steps are the most annoying, really. The first two are +easy and by that point you can run `nix flake check` in order to test the build, +at least. + +## Other notes + +See also issue [#6](https://github.com/supabase/nix-postgres/issues/6), which +would make it possible to define PostgreSQL versions inside this repository. diff --git a/nix/docs/nix-overlays.md b/nix/docs/nix-overlays.md new file mode 100644 index 000000000..90b6f221f --- /dev/null +++ b/nix/docs/nix-overlays.md @@ -0,0 +1,36 @@ +Overlays are a feature of Nixpkgs that allow you to: + +- Add new packages with new names to the namespace _without_ modifying upstream + - For example, if there is a package `foobar`, you might add `foobar-1_2_3` to + add a specific version for backwards compatibility +- Globally override _existing_ package names, in terms of other packages. + - For example, if you want to globally override a package to enable a + disabled-by-default feature. + +First, you need to define a file for the overlay under +[overlays/](../overlays/), and then import it in `flake.nix`. There is an +example pull request in +[#14](https://github.com/supabase/nix-postgres/issues/14) for this; an overlay +typically looks like this: + +``` +final: prev: { + gdal = prev.gdalMinimal; +} +``` + +This says "globally override `gdal` with a different version, named +`gdalMinimal`". In this case `gdalMinimal` is a build with less features +enabled. + +The most important part is that there is an equation of the form `lhs = rhs;` +— if the `lhs` refers to an existing name, it's overwritten. If it refers +to a new name, it's introduced. Overwriting an existing name acts as if you +changed the files upstream: so the above example _globally_ overrides GDAL for +anything that depends on it. + +The names `final` and `prev` are used to refer to packages in terms of other +overlays. For more information about this, see the +[NixOS Wiki Page for Overlays](https://nixos.wiki/wiki/Overlays). + +We also use an overlay to override the default build recipe for `postgresql_16`, and instead feed it the specially patched postgres for use with orioledb extension. This experimental variant can be built with `nix build .#psql_orioledb_16/bin`. This will build this patched version of postgres, along with all extensions and wrappers that currently are known to work with orioledb. diff --git a/nix/docs/receipt-files.md b/nix/docs/receipt-files.md new file mode 100644 index 000000000..978f8a9f4 --- /dev/null +++ b/nix/docs/receipt-files.md @@ -0,0 +1,155 @@ +Every time you run `nix build` on this repository to build PostgreSQL, the +installation directory comes with a _receipt_ file that tells you what's inside +of it. Primarily, this tells you: + +- The version of PostgreSQL, +- The installed extensions, and +- The version of nixpkgs. + +The intent of the receipt file is to provide a mechanism for tooling to +understand installation directories and provide things like upgrade paths or +upgrade mechanisms. + +## Example receipt + +For example: + +``` +nix build .#psql_15/bin +``` + +``` +austin@GANON:~/work/nix-postgres$ nix build .#psql_15/bin +austin@GANON:~/work/nix-postgres$ ls result +bin include lib receipt.json share +``` + +The receipt is in JSON format, under `receipt.json`. Here's an example of what +it would look like: + +```json +{ + "extensions": [ + { + "name": "pgsql-http", + "version": "1.5.0" + }, + { + "name": "pg_plan_filter", + "version": "unstable-2021-09-23" + }, + { + "name": "pg_net", + "version": "0.7.2" + }, + { + "name": "pg_hashids", + "version": "unstable-2022-09-17" + }, + { + "name": "pgsodium", + "version": "3.1.8" + }, + { + "name": "pg_graphql", + "version": "unstable-2023-08-01" + }, + { + "name": "pg_stat_monitor", + "version": "1.0.1" + }, + { + "name": "pg_jsonschema", + "version": "unstable-2023-07-23" + }, + { + "name": "vault", + "version": "0.2.9" + }, + { + "name": "hypopg", + "version": "1.3.1" + }, + { + "name": "pg_tle", + "version": "1.0.4" + }, + { + "name": "supabase-wrappers", + "version": "unstable-2023-07-31" + }, + { + "name": "supautils", + "version": "1.7.3" + } + ], + "nixpkgs": { + "extensions": [ + { + "name": "postgis", + "version": "3.3.3" + }, + { + "name": "pgrouting", + "version": "3.5.0" + }, + { + "name": "pgtap", + "version": "1.2.0" + }, + { + "name": "pg_cron", + "version": "1.5.2" + }, + { + "name": "pgaudit", + "version": "1.7.0" + }, + { + "name": "pgjwt", + "version": "unstable-2021-11-13" + }, + { + "name": "plpgsql_check", + "version": "2.3.4" + }, + { + "name": "pg-safeupdate", + "version": "1.4" + }, + { + "name": "timescaledb", + "version": "2.11.1" + }, + { + "name": "wal2json", + "version": "2.5" + }, + { + "name": "plv8", + "version": "3.1.5" + }, + { + "name": "rum", + "version": "1.3.13" + }, + { + "name": "pgvector", + "version": "0.4.4" + }, + { + "name": "pg_repack", + "version": "1.4.8" + }, + { + "name": "pgroonga", + "version": "3.0.8" + } + ], + "revision": "750fc50bfd132a44972aa15bb21937ae26303bc4" + }, + "psql-version": "15.3", + "receipt-version": "1", + "revision": "vcs=d250647+20230814" +} +``` diff --git a/nix/docs/references.md b/nix/docs/references.md new file mode 100644 index 000000000..fe5b791e2 --- /dev/null +++ b/nix/docs/references.md @@ -0,0 +1,31 @@ +Nix references and other useful tools: + +- **Zero to Nix**: Start here to get your feet wet with how Nix works, and how + to use Nixpkgs: https://zero-to-nix.com/ +- `nix-installer`: My recommended way to install Nix + - https://github.com/DeterminateSystems/nix-installer +- Nix manual https://nixos.org/manual/nix/stable/ + - Useful primarily for option and command references +- Flake schema reference https://nixos.wiki/wiki/Flakes + - Useful to know what `flake.nix` is referring to +- Example pull requests for this repo: + - Adding smoke tests for an extension: + https://github.com/supabase/nix-postgres/pull/2 + - Extension smoke tests, part 2: + https://github.com/supabase/nix-postgres/pull/3 + - Adding an extension and a smoke test at once: + https://github.com/supabase/nix-postgres/pull/4/files + - Updating an extension to trunk: + https://github.com/supabase/nix-postgres/pull/7 + - Updating an extension to the latest release: + https://github.com/supabase/nix-postgres/pull/9 +- Contributing to [nixpkgs](https://github.com/nixos/nixpkgs) + - Adding a PGRX-powered extension: + https://github.com/NixOS/nixpkgs/pull/246803 + - Adding a normal extension: https://github.com/NixOS/nixpkgs/pull/249000 + - Adding new PostgreSQL versions: https://github.com/NixOS/nixpkgs/pull/249030 +- NixOS Discourse: https://discourse.nixos.org/ + - Useful for community feedback, guidance, and help +- `nix-update`: https://github.com/Mic92/nix-update + - Used in this repository to help update extensions +- pgTAP for testing: https://pgtap.org/documentation.html diff --git a/nix/docs/start-client-server.md b/nix/docs/start-client-server.md new file mode 100644 index 000000000..5f1d0d214 --- /dev/null +++ b/nix/docs/start-client-server.md @@ -0,0 +1,93 @@ +## Running the server + +If you want to run a postgres server, just do this from the root of the +repository: + +``` +nix run .#start-server 15 +``` + +Replace the `15` with a `16`, and you'll be using a different version. Optionally you can specify a second argument for the port. + +You likely have a running postgres, so to not cause a conflict, this uses port 5435 by default. + +Actually, you don't even need the repository. You can do this from arbitrary +directories, if the left-hand side of the hash character (`.` in this case) is a +valid "flake reference": + +``` +# from any arbitrary directory +nix run github:supabase/postgres#start-server 15 +``` + +### Arbitrary versions at arbitrary git revisions + +Let's say you want to use a PostgreSQL build from a specific version of the +repository. You can change the syntax of the above to use _any_ version of the +repository, at any time, by adding the commit hash after the repository name: + +``` +# use postgresql 15 build at commit +nix run github:supabase/postgres/#start-server 15 +``` + +## Running the client + +All of the same rules apply, but try using `start-client` on the right-hand side +of the hash character, instead. For example: + +``` +nix run github:supabase/postgres#start-server 15 & +sleep 5 +nix run github:supabase/postgres#start-client 16 +``` + +## Running a server replica + +To start a replica you can use the `start-postgres-replica` command. + +- first argument: the master version +- second argument: the master port +- third argument: the replica server port + +First start a server and a couple of replicas: + +``` +$ start-postgres-server 15 5435 + +$ start-postgres-replica 15 5439 + +$ start-postgres-replica 15 5440 +``` + +Now check the master server: + +``` +$ start-postgres-client 15 5435 +``` + +```sql +SELECT client_addr, state +FROM pg_stat_replication; + client_addr | state +-------------+----------- + ::1 | streaming + ::1 | streaming +(2 rows) + +create table items as select x::int from generate_series(1,100) x; +``` + +And a replica: + +``` +$ start-postgres-client 15 5439 +``` + +```sql +select count(*) from items; + count +------- + 100 +(1 row) +``` diff --git a/nix/docs/start-here.md b/nix/docs/start-here.md new file mode 100644 index 000000000..acc315830 --- /dev/null +++ b/nix/docs/start-here.md @@ -0,0 +1,70 @@ +Let's go ahead and install Nix. To do that, we'll use the +**[nix-installer tool]** by Determinate Systems. This works on many platforms, +but most importantly it works on **aarch64 Linux** and **x86_64 Linux**. Use the +following command in your shell, **it should work on any Linux distro of your +choice**: + +[nix-installer tool]: https://github.com/DeterminateSystems/nix-installer + +```bash +curl \ + --proto '=https' --tlsv1.2 \ + -sSf -L https://install.determinate.systems/nix \ +| sh -s -- install +``` + +After you do this, **you must log in and log back out of your desktop +environment** to get a new login session. This is so that your shell can have +the Nix tools installed on `$PATH` and so that your user shell can see some +extra settings. + +You should now be able to do something like the following; try running these +same commands on your machine: + +``` +$ nix --version +nix (Nix) 2.16.1 +``` + +``` +$ nix run nixpkgs#nix-info -- -m + - system: `"x86_64-linux"` + - host os: `Linux 5.15.90.1-microsoft-standard-WSL2, Ubuntu, 22.04.2 LTS (Jammy Jellyfish), nobuild` + - multi-user?: `yes` + - sandbox: `yes` + - version: `nix-env (Nix) 2.16.1` + - channels(root): `"nixpkgs"` + - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs` +``` + +If the above worked, you're now cooking with gas! + +> _**NOTE**_: While there is an upstream tool to install Nix, written in Bash, +> we use the Determinate Systems installer — which will hopefully replace the +> original — because it's faster, and takes care of several extra edge cases +> that the original one couldn't handle, and makes several changes to the +> default installed configuration to make things more user friendly. Determinate +> Systems is staffed by many long-time Nix contributors and the creator of Nix, +> and is trustworthy. + +## Do some fun stuff + +One of the best things about Nix that requires _very little_ knowledge of it is +that it lets you install the latest and greatest versions of many tools _on any +Linux distribution_. We'll explain more about that later on. But just as a few +examples: + +- **Q**: I want the latest version of Deno. Can we get that? +- **A**: `nix profile install nixpkgs#deno`, and you're done! + + + +- **Q**: What about HTTPie? A nice Python application? +- **A**: Same idea: `nix profile install nixpkgs#httpie` + + + +- **Q**: What about my favorite Rust applications, like ripgrep and bat? +- **A.1**: `nix profile install nixpkgs#ripgrep` +- **A.2**: `nix profile install nixpkgs#bat` +- **A.3**: And yes, you also have exa, fd, hyperfine, and more! diff --git a/nix/docs/update-extension.md b/nix/docs/update-extension.md new file mode 100644 index 000000000..786c8c2fc --- /dev/null +++ b/nix/docs/update-extension.md @@ -0,0 +1,17 @@ + +# Update an existing nix extension + + +1. Create a branch off of `develop` +2. For instance, if we were updating https://github.com/supabase/postgres/blob/develop/nix/ext/supautils.nix we would: + 1. change the `version = "2.2.1";` to whatever our git tag release version is that we want to update to + 2. temporarily empty the `hash = "sha256-wSUEG0at00TPAoHv6+NMzuUE8mfW6fnHH0MNxvBdUiE=";` to `hash = "";` and save `supautils.nix` and `git add .` + 3. run `nix build .#psql_15/exts/supautils` or the name of the extension to update, nix will print the calculated sha256 value that you can add back the the `hash` variable, save the file again, and re-run nix build .#psql_15/exts/supautils. + 4. NOTE: This step is only necessary for `buildPgrxExtension` packages, which includes supabase-wrappers, pg_jsonschema, and pg_graphql. Otherwise you can skip this step. For our packages that are build with `buildPgrxExtension` you will need to prepend the previous version to the `previousVersions` variable before updating the version in the package (for instance if you are updating `supabase-wrappers` extension from `0.4.1` to `0.4.2` then you would prepend `0.4.1` to this line https://github.com/supabase/postgres/blob/develop/nix/ext/wrappers/default.nix#L18 ). + 5. Add any needed migrations into the `supabase/postgres` migrations directory + 6. update the version in `ansible/vars.yml` as usual + 7. You can then run the `nix flake check -L` tests locally to verify that the update of the package succeeded. + 8. Now it's ready for PR review. + 9. Once the PR is approved, if you want the change to go out in a release, update the common-nix.vars.yml file with the new version prior to merging. + + diff --git a/nix/docs/use-direnv.md b/nix/docs/use-direnv.md new file mode 100644 index 000000000..cf34a2380 --- /dev/null +++ b/nix/docs/use-direnv.md @@ -0,0 +1,102 @@ +Have you ever used a tool like `pip`'s `bin/activate` script, or `rbenv`? These +tools populate your shell environment with the right tools and scripts and +dependencies (e.g. `PYTHONPATH`) to run your software. + +What if I told you there was a magical tool that worked like that, and could do +it for arbitrary languages and tools? + +That tool is called **[direnv](https://direnv.net)**. + +## Install direnv and use it in your shell + +First, install `direnv`: + +``` +$ nix profile install nixpkgs#direnv +``` + +``` +$ which direnv +/home/austin/.nix-profile/bin/direnv +``` + +Now, you need to activate it in your shell by hooking into it. If you're using +**Bash**, try putting this in your `.bashrc` and starting up a new interactive +shell: + +``` +eval "$(direnv hook bash)" +``` + +Not using bash? Check the +[direnv hook documentation](https://direnv.net/docs/hook.html) for more. + +## Set up `nix-postgres` + +Let's go back to the `nix-postgres` source code. + +``` +cd $HOME/tmp-nix-postgres +``` + +Now, normally, direnv is going to look for a file called `.envrc` and load that +if it exists. But to be polite, we don't do that by default; we keep a file +named `.envrc.recommended` in the repository instead, and encourage people to do +this: + +``` +echo "source_env .envrc.recommended" >> .envrc +``` + +All this says is "Load the code from `.envrc.recommended` directly", just like a +normal bash script using `source`. The idea of this pattern is to allow users to +have their own customized `.envrc` and piggyback on the committed code for +utility — and `.envrc` is `.gitignore`'d, so you can put e.g. secret +tokens inside without fear of committing them. + +Run the above command, and then... + +## What just happened? + +Oops, a big red error appeared? + +``` +$ echo "source_env .envrc.recommended" >> .envrc +direnv: error /home/austin/work/nix-postgres/.envrc is blocked. Run `direnv allow` to approve its content +``` + +What happened? By default, as a security measure, `direnv` _does not_ load or +execute any code from an `.envrc` file, and instead it MUST be allowed +explicitly. + +## `direnv allow` + +Our `.envrc.recommended` file will integrate with Nix directly. So run +`direnv allow`, and you'll suddenly see the following: + +``` +$ direnv allow +direnv: loading ~/work/nix-postgres/.envrc +direnv: loading ~/work/nix-postgres/.envrc.recommended +direnv: loading https://raw.githubusercontent.com/nix-community/nix-direnv/2.3.0/direnvrc (sha256-Dmd+j63L84wuzgyjITIfSxSD57Tx7v51DMxVZOsiUD8=) +direnv: using flake +direnv: nix-direnv: renewed cache +direnv: export +AR +AS +CC +CONFIG_SHELL +CXX +DETERMINISTIC_BUILD +HOST_PATH +IN_NIX_SHELL +LD +NIX_BINTOOLS +NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_BUILD_CORES +NIX_CC +NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_CFLAGS_COMPILE +NIX_ENFORCE_NO_NATIVE +NIX_HARDENING_ENABLE +NIX_LDFLAGS +NIX_STORE +NM +OBJCOPY +OBJDUMP +PYTHONHASHSEED +PYTHONNOUSERSITE +PYTHONPATH +RANLIB +READELF +SIZE +SOURCE_DATE_EPOCH +STRINGS +STRIP +_PYTHON_HOST_PLATFORM +_PYTHON_SYSCONFIGDATA_NAME +__structuredAttrs +buildInputs +buildPhase +builder +cmakeFlags +configureFlags +depsBuildBuild +depsBuildBuildPropagated +depsBuildTarget +depsBuildTargetPropagated +depsHostHost +depsHostHostPropagated +depsTargetTarget +depsTargetTargetPropagated +doCheck +doInstallCheck +dontAddDisableDepTrack +mesonFlags +name +nativeBuildInputs +out +outputs +patches +phases +preferLocalBuild +propagatedBuildInputs +propagatedNativeBuildInputs +shell +shellHook +stdenv +strictDeps +system ~PATH ~XDG_DATA_DIRS +``` + +What just happened is that we populated the ambient shell environment with tools +specified inside of `flake.nix` — we'll cover Flakes later. But for now, +your tools are provisioned! + + +## The power of `direnv` + +`direnv` with Nix is a frighteningly good development combination for many +purposes. This is its main power: you can use it to create on-demand developer +shells for any language, tool, or environment, and all you need to do is `cd` to +the right directory. + +This is the power of `direnv`: your projects always, on demand, will have the +right tools configured and available, no matter if you last worked on them a day +ago or a year ago, or it was done by your teammate, or you have a brand new +computer that you've never programmed on. diff --git a/nix/ext/0001-build-Allow-using-V8-from-system.patch b/nix/ext/0001-build-Allow-using-V8-from-system.patch new file mode 100644 index 000000000..ab2c6f06c --- /dev/null +++ b/nix/ext/0001-build-Allow-using-V8-from-system.patch @@ -0,0 +1,46 @@ +diff --git a/Makefile b/Makefile +index 38879cc..6e78eeb 100644 +--- a/Makefile ++++ b/Makefile +@@ -20,6 +20,7 @@ OBJS = $(SRCS:.cc=.o) + MODULE_big = plv8-$(PLV8_VERSION) + EXTENSION = plv8 + PLV8_DATA = plv8.control plv8--$(PLV8_VERSION).sql ++USE_SYSTEM_V8 = 0 + + + # Platform detection +@@ -41,6 +42,7 @@ PGXS := $(shell $(PG_CONFIG) --pgxs) + PG_VERSION_NUM := $(shell cat `$(PG_CONFIG) --includedir-server`/pg_config*.h \ + | perl -ne 'print $$1 and exit if /PG_VERSION_NUM\s+(\d+)/') + ++ifeq ($(USE_SYSTEM_V8),0) + AUTOV8_DIR = build/v8 + AUTOV8_OUT = build/v8/out.gn/obj + AUTOV8_STATIC_LIBS = -lv8_libplatform -lv8_libbase +@@ -66,6 +68,7 @@ v8: + make -f Makefiles/Makefile.macos v8 + endif + endif ++endif + + # enable direct jsonb conversion by default + CCFLAGS += -DJSONB_DIRECT_CONVERSION +@@ -83,6 +86,7 @@ ifdef BIGINT_GRACEFUL + endif + + ++ifeq ($(USE_SYSTEM_V8),0) + # We're gonna build static link. Rip it out after include Makefile + SHLIB_LINK := $(filter-out -lv8, $(SHLIB_LINK)) + +@@ -101,6 +105,7 @@ else + SHLIB_LINK += -lrt -std=c++14 + endif + endif ++endif + + DATA = $(PLV8_DATA) + ifndef DISABLE_DIALECT +-- +2.37.3 diff --git a/nix/ext/gdal.nix b/nix/ext/gdal.nix new file mode 100644 index 000000000..83924d9ff --- /dev/null +++ b/nix/ext/gdal.nix @@ -0,0 +1,69 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, pkg-config +, curl +, expat +, libgeotiff +, geos +, json_c +, libxml2 +, postgresql +, proj +, sqlite +, libtiff +, zlib +}: + +stdenv.mkDerivation rec { + pname = "gdal"; + version = "3.8.5"; + + src = fetchFromGitHub { + owner = "OSGeo"; + repo = "gdal"; + rev = "v${version}"; + hash = "sha256-Z+mYlyOX9vJ772qwZMQfCbD/V7RL6+9JLHTzoZ55ot0="; + }; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + curl + expat + libgeotiff + geos + json_c + libxml2 + postgresql + proj + sqlite + libtiff + zlib + ]; + + cmakeFlags = [ + "-DGDAL_USE_INTERNAL_LIBS=OFF" + "-DGEOTIFF_INCLUDE_DIR=${lib.getDev libgeotiff}/include" + "-DGEOTIFF_LIBRARY_RELEASE=${lib.getLib libgeotiff}/lib/libgeotiff${stdenv.hostPlatform.extensions.sharedLibrary}" + "-DBUILD_PYTHON_BINDINGS=OFF" + ] ++ lib.optionals (!stdenv.isDarwin) [ + "-DCMAKE_SKIP_BUILD_RPATH=ON" + ] ++ lib.optionals stdenv.isDarwin [ + "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" + ]; + + enableParallelBuilding = true; + + meta = with lib; { + description = "Translator library for raster geospatial data formats (PostGIS-focused build)"; + homepage = "https://www.gdal.org/"; + license = licenses.mit; + maintainers = with maintainers; teams.geospatial.members ++ [ marcweber dotlambda ]; + platforms = platforms.unix; + }; +} diff --git a/nix/ext/hypopg.nix b/nix/ext/hypopg.nix new file mode 100644 index 000000000..ffafe904e --- /dev/null +++ b/nix/ext/hypopg.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "hypopg"; + version = "1.4.1"; + + buildInputs = [ postgresql ]; + + src = fetchFromGitHub { + owner = "HypoPG"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-88uKPSnITRZ2VkelI56jZ9GWazG/Rn39QlyHKJKSKMM="; + }; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + cp *${postgresql.dlSuffix} $out/lib + cp *.sql $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "Hypothetical Indexes for PostgreSQL"; + homepage = "https://github.com/HypoPG/$%7Bpname%7D"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/index_advisor.nix b/nix/ext/index_advisor.nix new file mode 100644 index 000000000..ae23354b9 --- /dev/null +++ b/nix/ext/index_advisor.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "index_advisor"; + version = "0.2.0"; + + buildInputs = [ postgresql ]; + + src = fetchFromGitHub { + owner = "olirice"; + repo = pname; + rev = "v${version}"; + hash = "sha256-G0eQk2bY5CNPMeokN/nb05g03CuiplRf902YXFVQFbs="; + }; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + cp *.sql $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "Recommend indexes to improve query performance in PostgreSQL"; + homepage = "https://github.com/olirice/index_advisor"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/mecab-naist-jdic/default.nix b/nix/ext/mecab-naist-jdic/default.nix new file mode 100644 index 000000000..82f0ed37c --- /dev/null +++ b/nix/ext/mecab-naist-jdic/default.nix @@ -0,0 +1,40 @@ +{ lib, stdenv, fetchurl, mecab }: + +stdenv.mkDerivation rec { + pname = "mecab-naist-jdic"; + version = "0.6.3b-20111013"; + + src = fetchurl { + url = "https://github.com/supabase/mecab-naist-jdic/raw/main/mecab-naist-jdic-$%7Bversion%7D.tar.gz"; + sha256 = "sha256-yzdwDcmne5U/K/OxW0nP7NZ4SFMKLPirywm1lMpWKMw="; + }; + + buildInputs = [ mecab ]; + + configureFlags = [ + "--with-charset=utf8" + ]; + + buildPhase = '' + runHook preBuild + make + ${mecab}/libexec/mecab/mecab-dict-index -d . -o . -f UTF-8 -t utf-8 + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/lib/mecab/dic/naist-jdic + cp *.dic *.bin *.def $out/lib/mecab/dic/naist-jdic/ + + runHook postInstall + ''; + + meta = with lib; { + description = "Naist Japanese Dictionary for MeCab"; + homepage = "https://taku910.github.io/mecab/"; + license = licenses.gpl2; + platforms = platforms.unix; + }; +} diff --git a/nix/ext/orioledb.nix b/nix/ext/orioledb.nix new file mode 100644 index 000000000..96e70e308 --- /dev/null +++ b/nix/ext/orioledb.nix @@ -0,0 +1,37 @@ +{ lib, stdenv, fetchFromGitHub, curl, libkrb5, postgresql, python3, openssl }: + +stdenv.mkDerivation rec { + pname = "orioledb"; + name = pname; + src = fetchFromGitHub { + owner = "orioledb"; + repo = "orioledb"; + rev = "beta10"; + sha256 = "sha256-O4OTi8ickylVXE9FURm5R++A+l15Z22YLna7OVzVMjc="; + }; + version = "beta10"; + buildInputs = [ curl libkrb5 postgresql python3 openssl ]; + buildPhase = "make USE_PGXS=1 ORIOLEDB_PATCHSET_VERSION=6"; + installPhase = '' + runHook preInstall + + mkdir -p $out/{lib,share/postgresql/extension} + + # Copy the extension library + cp orioledb${postgresql.dlSuffix} $out/lib/ + + # Copy sql files from the sql directory + cp sql/*.sql $out/share/postgresql/extension/ + + # Copy control file + cp orioledb.control $out/share/postgresql/extension/ + + runHook postInstall + ''; + doCheck = true; + meta = with lib; { + description = "orioledb"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/pg-safeupdate.nix b/nix/ext/pg-safeupdate.nix new file mode 100644 index 000000000..f5ad17a82 --- /dev/null +++ b/nix/ext/pg-safeupdate.nix @@ -0,0 +1,28 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "pg-safeupdate"; + version = "1.4"; + + buildInputs = [ postgresql ]; + + src = fetchFromGitHub { + owner = "eradman"; + repo = pname; + rev = version; + hash = "sha256-1cyvVEC9MQGMr7Tg6EUbsVBrMc8ahdFS3+CmDkmAq4Y="; + }; + + installPhase = '' + install -D safeupdate${postgresql.dlSuffix} -t $out/lib + ''; + + meta = with lib; { + description = "A simple extension to PostgreSQL that requires criteria for UPDATE and DELETE"; + homepage = "https://github.com/eradman/pg-safeupdate"; + changelog = "https://github.com/eradman/pg-safeupdate/raw/$%7Bsrc.rev%7D/NEWS"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + broken = versionOlder postgresql.version "14"; + }; +} diff --git a/nix/ext/pg_backtrace.nix b/nix/ext/pg_backtrace.nix new file mode 100644 index 000000000..0a0b0ae4f --- /dev/null +++ b/nix/ext/pg_backtrace.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "pg_backtrace"; + version = "1.1"; + + buildInputs = [ postgresql ]; + + src = fetchFromGitHub { + owner = "pashkinelfe"; + repo = pname; + rev = "d100bac815a7365e199263f5b3741baf71b14c70"; + hash = "sha256-IVCL4r4oj1Ams03D8y+XCFkckPFER/W9tQ68GkWQQMY="; + }; + + makeFlags = [ "USE_PGXS=1" ]; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + cp *${postgresql.dlSuffix} $out/lib + cp *.sql $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "Updated fork of pg_backtrace"; + homepage = "https://github.com/pashkinelfe/pg_backtrace"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/pg_cron.nix b/nix/ext/pg_cron.nix new file mode 100644 index 000000000..792db7676 --- /dev/null +++ b/nix/ext/pg_cron.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "pg_cron"; + version = "1.6.4"; + + buildInputs = [ postgresql ]; + + src = fetchFromGitHub { + owner = "citusdata"; + repo = pname; + rev = "v${version}"; + hash = "sha256-t1DpFkPiSfdoGG2NgNT7g1lkvSooZoRoUrix6cBID40="; + }; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + cp *${postgresql.dlSuffix} $out/lib + cp *.sql $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "Run Cron jobs through PostgreSQL"; + homepage = "https://github.com/citusdata/pg_cron"; + changelog = "https://github.com/citusdata/pg_cron/raw/v$%7Bversion%7D/CHANGELOG.md"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/pg_graphql.nix b/nix/ext/pg_graphql.nix new file mode 100644 index 000000000..af2f02447 --- /dev/null +++ b/nix/ext/pg_graphql.nix @@ -0,0 +1,46 @@ +{ lib, stdenv, fetchFromGitHub, postgresql, buildPgrxExtension_0_12_9, cargo, rust-bin }: + +let + rustVersion = "1.81.0"; + cargo = rust-bin.stable.${rustVersion}.default; +in +buildPgrxExtension_0_12_9 rec { + pname = "pg_graphql"; + version = "1.5.11"; + inherit postgresql; + + src = fetchFromGitHub { + owner = "supabase"; + repo = pname; + rev = "v${version}"; + hash = "sha256-BMZc9ui+2J3U24HzZZVCU5+KWhz+5qeUsRGeptiqbek="; + }; + + nativeBuildInputs = [ cargo ]; + buildInputs = [ postgresql ]; + + CARGO = "${cargo}/bin/cargo"; + + cargoLock = { + lockFile = "${src}/Cargo.lock"; + }; + # Setting RUSTFLAGS in env to ensure it's available for all phases + env = lib.optionalAttrs stdenv.isDarwin { + POSTGRES_LIB = "${postgresql}/lib"; + PGPORT = if (lib.versions.major postgresql.version) == "17" then "5440" else "5439"; + RUSTFLAGS = "-C link-arg=-undefined -C link-arg=dynamic_lookup"; + NIX_BUILD_CORES = "4"; # Limit parallel jobs + CARGO_BUILD_JOBS = "4"; # Limit cargo parallelism + }; + CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG = true; + + + doCheck = false; + + meta = with lib; { + description = "GraphQL support for PostreSQL"; + homepage = "https://github.com/supabase/$%7Bpname%7D"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/pg_hashids.nix b/nix/ext/pg_hashids.nix new file mode 100644 index 000000000..828db60fb --- /dev/null +++ b/nix/ext/pg_hashids.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "pg_hashids"; + version = "cd0e1b31d52b394a0df64079406a14a4f7387cd6"; + + buildInputs = [ postgresql ]; + + src = fetchFromGitHub { + owner = "iCyberon"; + repo = pname; + rev = "${version}"; + hash = "sha256-Nmb7XLqQflYZfqj0yrewfb1Hl5YgEB5wfjBunPwIuOU="; + }; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + cp *${postgresql.dlSuffix} $out/lib + cp *.sql $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "Generate short unique IDs in PostgreSQL"; + homepage = "https://github.com/iCyberon/pg_hashids"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/pg_jsonschema.nix b/nix/ext/pg_jsonschema.nix new file mode 100644 index 000000000..654bb93f5 --- /dev/null +++ b/nix/ext/pg_jsonschema.nix @@ -0,0 +1,75 @@ +{ lib, stdenv, fetchFromGitHub, postgresql, buildPgrxExtension_0_12_6, cargo, rust-bin }: +let + rustVersion = "1.80.0"; + cargo = rust-bin.stable.${rustVersion}.default; +in +buildPgrxExtension_0_12_6 rec { + pname = "pg_jsonschema"; + version = "0.3.3"; + inherit postgresql; + + src = fetchFromGitHub { + owner = "supabase"; + repo = pname; + rev = "v${version}"; + hash = "sha256-Au1mqatoFKVq9EzJrpu1FVq5a1kBb510sfC980mDlsU="; + }; + + nativeBuildInputs = [ cargo ]; + buildInputs = [ postgresql ]; + # update the following array when the pg_jsonschema version is updated + # required to ensure that extensions update scripts from previous versions are generated + + previousVersions = ["0.3.1" "0.3.0" "0.2.0" "0.1.4" "0.1.4" "0.1.2" "0.1.1" "0.1.0"]; + CARGO="${cargo}/bin/cargo"; + #darwin env needs PGPORT to be unique for build to not clash with other pgrx extensions + env = lib.optionalAttrs stdenv.isDarwin { + POSTGRES_LIB = "${postgresql}/lib"; + RUSTFLAGS = "-C link-arg=-undefined -C link-arg=dynamic_lookup"; + PGPORT = toString (5441 + + (if builtins.match ".*_.*" postgresql.version != null then 1 else 0) + # +1 for OrioleDB + ((builtins.fromJSON (builtins.substring 0 2 postgresql.version)) - 15) * 2); # +2 for each major version + + }; + + cargoLock = { + lockFile = "${src}/Cargo.lock"; + allowBuiltinFetchGit = false; + }; + + # FIXME (aseipp): testsuite tries to write files into /nix/store; we'll have + # to fix this a bit later. + doCheck = false; + + preBuild = '' + echo "Processing git tags..." + echo '${builtins.concatStringsSep "," previousVersions}' | sed 's/,/\n/g' > git_tags.txt + ''; + + postInstall = '' + echo "Creating SQL files for previous versions..." + current_version="${version}" + sql_file="$out/share/postgresql/extension/pg_jsonschema--$current_version.sql" + + if [ -f "$sql_file" ]; then + while read -r previous_version; do + if [ "$(printf '%s\n' "$previous_version" "$current_version" | sort -V | head -n1)" = "$previous_version" ] && [ "$previous_version" != "$current_version" ]; then + new_file="$out/share/postgresql/extension/pg_jsonschema--$previous_version--$current_version.sql" + echo "Creating $new_file" + cp "$sql_file" "$new_file" + fi + done < git_tags.txt + else + echo "Warning: $sql_file not found" + fi + rm git_tags.txt + ''; + + + meta = with lib; { + description = "JSON Schema Validation for PostgreSQL"; + homepage = "https://github.com/supabase/$%7Bpname%7D"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/pg_net.nix b/nix/ext/pg_net.nix new file mode 100644 index 000000000..0f20163e5 --- /dev/null +++ b/nix/ext/pg_net.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, fetchFromGitHub, curl, postgresql }: + +stdenv.mkDerivation rec { + pname = "pg_net"; + version = "0.14.0"; + + buildInputs = [ curl postgresql ]; + + src = fetchFromGitHub { + owner = "supabase"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-c1pxhTyrE5j6dY+M5eKAboQNofIORS+Dccz+7HKEKQI="; + }; + + env.NIX_CFLAGS_COMPILE = "-Wno-error"; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + cp *${postgresql.dlSuffix} $out/lib + cp sql/*.sql $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "Async networking for Postgres"; + homepage = "https://github.com/supabase/pg_net"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/pg_partman.nix b/nix/ext/pg_partman.nix new file mode 100644 index 000000000..899716b44 --- /dev/null +++ b/nix/ext/pg_partman.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "pg_partman"; + version = "5.1.0"; + + buildInputs = [ postgresql ]; + + src = fetchFromGitHub { + owner = "pgpartman"; + repo = pname; + rev = "refs/tags/v${version}"; + sha256 = "sha256-GrVOJ5ywZMyqyDroYDLdKkXDdIJSDGhDfveO/ZvrmYs="; + }; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + cp src/*${postgresql.dlSuffix} $out/lib + cp updates/* $out/share/postgresql/extension + cp -r sql/* $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "Partition management extension for PostgreSQL"; + homepage = "https://github.com/pgpartman/pg_partman"; + changelog = "https://github.com/pgpartman/pg_partman/blob/v$%7Bversion%7D/CHANGELOG.md"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + broken = versionOlder postgresql.version "14"; + }; +} diff --git a/nix/ext/pg_plan_filter.nix b/nix/ext/pg_plan_filter.nix new file mode 100644 index 000000000..6281d0b67 --- /dev/null +++ b/nix/ext/pg_plan_filter.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "pg_plan_filter"; + version = "5081a7b5cb890876e67d8e7486b6a64c38c9a492"; + + buildInputs = [ postgresql ]; + + src = fetchFromGitHub { + owner = "pgexperts"; + repo = pname; + rev = "${version}"; + hash = "sha256-YNeIfmccT/DtOrwDmpYFCuV2/P6k3Zj23VWBDkOh6sw="; + }; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + cp *${postgresql.dlSuffix} $out/lib + cp *.sql $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "Filter PostgreSQL statements by execution plans"; + homepage = "https://github.com/pgexperts/$%7Bpname%7D"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/pg_regress.nix b/nix/ext/pg_regress.nix new file mode 100644 index 000000000..08f82aa79 --- /dev/null +++ b/nix/ext/pg_regress.nix @@ -0,0 +1,23 @@ +{ lib +, stdenv +, postgresql +}: + +stdenv.mkDerivation { + pname = "pg_regress"; + version = postgresql.version; + + phases = [ "installPhase" ]; + + installPhase = '' + mkdir -p $out/bin + cp ${postgresql}/lib/pgxs/src/test/regress/pg_regress $out/bin/ + ''; + + meta = with lib; { + description = "Regression testing tool for PostgreSQL"; + homepage = "https://www.postgresql.org/"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/pg_repack.nix b/nix/ext/pg_repack.nix new file mode 100644 index 000000000..076e878f2 --- /dev/null +++ b/nix/ext/pg_repack.nix @@ -0,0 +1,65 @@ +{ lib +, stdenv +, fetchFromGitHub +, openssl +, postgresql +, postgresqlTestHook +, readline +, testers +, zlib +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "pg_repack"; + version = "1.5.2"; + + buildInputs = postgresql.buildInputs ++ [ postgresql ]; + + src = fetchFromGitHub { + owner = "reorg"; + repo = "pg_repack"; + rev = "ver_${finalAttrs.version}"; + hash = "sha256-wfjiLkx+S3zVrAynisX1GdazueVJ3EOwQEPcgUQt7eA="; + }; + + installPhase = '' + install -D bin/pg_repack -t $out/bin/ + install -D lib/pg_repack${postgresql.dlSuffix} -t $out/lib/ + install -D lib/{pg_repack--${finalAttrs.version}.sql,pg_repack.control} -t $out/share/postgresql/extension + ''; + + passthru.tests = { + version = testers.testVersion { + package = finalAttrs.finalPackage; + }; + extension = stdenv.mkDerivation { + name = "plpgsql-check-test"; + dontUnpack = true; + doCheck = true; + buildInputs = [ postgresqlTestHook ]; + nativeCheckInputs = [ (postgresql.withPackages (ps: [ ps.pg_repack ])) ]; + postgresqlTestUserOptions = "LOGIN SUPERUSER"; + failureHook = "postgresqlStop"; + checkPhase = '' + runHook preCheck + psql -a -v ON_ERROR_STOP=1 -c "CREATE EXTENSION pg_repack;" + runHook postCheck + ''; + installPhase = "touch $out"; + }; + }; + + meta = with lib; { + description = "Reorganize tables in PostgreSQL databases with minimal locks"; + longDescription = '' + pg_repack is a PostgreSQL extension which lets you remove bloat from tables and indexes, and optionally restore + the physical order of clustered indexes. Unlike CLUSTER and VACUUM FULL it works online, without holding an + exclusive lock on the processed tables during processing. pg_repack is efficient to boot, + with performance comparable to using CLUSTER directly. + ''; + homepage = "https://github.com/reorg/pg_repack"; + license = licenses.bsd3; + inherit (postgresql.meta) platforms; + mainProgram = "pg_repack"; + }; +}) diff --git a/nix/ext/pg_stat_monitor.nix b/nix/ext/pg_stat_monitor.nix new file mode 100644 index 000000000..8469f4b98 --- /dev/null +++ b/nix/ext/pg_stat_monitor.nix @@ -0,0 +1,48 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +let + # NOTE (aseipp): the 1.x series of pg_stat_monitor has some non-standard and + # weird build logic (Percona projects in general seem to have their own + # strange build harness) where it will try to pick the right .sql file to + # install into the extension dir based on the postgresql major version. for + # our purposes, we only need to support v13 and v14+, so just replicate this + # logic from the makefile and pick the right file here. + # + # this seems to all be cleaned up in version 2.0 of the extension, so ideally + # we could upgrade to it later on and nuke this. + # DEPRECATED sqlFilename = if lib.versionOlder postgresql.version "14" + # then "pg_stat_monitor--1.0.13.sql.in" + # else "pg_stat_monitor--1.0.14.sql.in"; + +in +stdenv.mkDerivation rec { + pname = "pg_stat_monitor"; + version = "2.1.0"; + + buildInputs = [ postgresql ]; + + src = fetchFromGitHub { + owner = "percona"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-STJVvvrLVLe1JevNu6u6EftzAWv+X+J8lu66su7Or2s="; + }; + + makeFlags = [ "USE_PGXS=1" ]; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + cp *${postgresql.dlSuffix} $out/lib + cp *.sql $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "Query Performance Monitoring Tool for PostgreSQL"; + homepage = "https://github.com/percona/$%7Bpname%7D"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + broken = lib.versionOlder postgresql.version "15"; + }; +} diff --git a/nix/ext/pg_tle.nix b/nix/ext/pg_tle.nix new file mode 100644 index 000000000..a0e9385b2 --- /dev/null +++ b/nix/ext/pg_tle.nix @@ -0,0 +1,35 @@ +{ lib, stdenv, fetchFromGitHub, postgresql, flex, openssl, libkrb5 }: + +stdenv.mkDerivation rec { + pname = "pg_tle"; + version = "1.4.0"; + + nativeBuildInputs = [ flex ]; + buildInputs = [ openssl postgresql libkrb5 ]; + + src = fetchFromGitHub { + owner = "aws"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-crxj5R9jblIv0h8lpqddAoYe2UqgUlnvbOajKTzVces="; + }; + + + makeFlags = [ "FLEX=flex" ]; + + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + cp *${postgresql.dlSuffix} $out/lib + cp *.sql $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "Framework for 'Trusted Language Extensions' in PostgreSQL"; + homepage = "https://github.com/aws/$%7Bpname%7D"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/pgaudit.nix b/nix/ext/pgaudit.nix new file mode 100644 index 000000000..01ab66f15 --- /dev/null +++ b/nix/ext/pgaudit.nix @@ -0,0 +1,47 @@ +{ lib, stdenv, fetchFromGitHub, libkrb5, openssl, postgresql }: +#adapted from https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/sql/postgresql/ext/pgaudit.nix +let + source = { + "17" = { + version = "17.0"; + hash = "sha256-3ksq09wiudQPuBQI3dhEQi8IkXKLVIsPFgBnwLiicro="; + }; + "16" = { + version = "16.0"; + hash = "sha256-8+tGOl1U5y9Zgu+9O5UDDE4bec4B0JC/BQ6GLhHzQzc="; + }; + "15" = { + version = "1.7.0"; + hash = "sha256-8pShPr4HJaJQPjW1iPJIpj3CutTx8Tgr+rOqoXtgCcw="; + }; + }.${lib.versions.major postgresql.version} or (throw "Source for pgaudit is not available for ${postgresql.version}"); +in +stdenv.mkDerivation { + pname = "pgaudit"; + inherit (source) version; + + src = fetchFromGitHub { + owner = "pgaudit"; + repo = "pgaudit"; + rev = source.version; + hash = source.hash; + }; + + buildInputs = [ libkrb5 openssl postgresql ]; + + makeFlags = [ "USE_PGXS=1" ]; + + installPhase = '' + install -D -t $out/lib pgaudit${postgresql.dlSuffix} + install -D -t $out/share/postgresql/extension *.sql + install -D -t $out/share/postgresql/extension *.control + ''; + + meta = with lib; { + description = "Open Source PostgreSQL Audit Logging"; + homepage = "https://github.com/pgaudit/pgaudit"; + changelog = "https://github.com/pgaudit/pgaudit/releases/tag/$%7Bsource.version%7D"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/pgjwt.nix b/nix/ext/pgjwt.nix new file mode 100644 index 000000000..4ecd76339 --- /dev/null +++ b/nix/ext/pgjwt.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitHub, postgresql, unstableGitUpdater }: + +stdenv.mkDerivation rec { + pname = "pgjwt"; + version = "9742dab1b2f297ad3811120db7b21451bca2d3c9"; + + src = fetchFromGitHub { + owner = "michelp"; + repo = "pgjwt"; + rev = "${version}"; + hash = "sha256-Hw3R9bMGDmh+dMzjmqZSy/rT4mX8cPU969OJiARFg10="; + }; + + dontBuild = true; + installPhase = '' + mkdir -p $out/share/postgresql/extension + cp pg*sql *.control $out/share/postgresql/extension + ''; + + passthru.updateScript = unstableGitUpdater { }; + + meta = with lib; { + description = "PostgreSQL implementation of JSON Web Tokens"; + longDescription = '' + sign() and verify() functions to create and verify JSON Web Tokens. + ''; + license = licenses.mit; + platforms = postgresql.meta.platforms; + }; +} diff --git a/nix/ext/pgmq.nix b/nix/ext/pgmq.nix new file mode 100644 index 000000000..97a3c27e3 --- /dev/null +++ b/nix/ext/pgmq.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "pgmq"; + version = "1.4.4"; + buildInputs = [ postgresql ]; + src = fetchFromGitHub { + owner = "tembo-io"; + repo = pname; + rev = "v${version}"; + hash = "sha256-z+8/BqIlHwlMnuIzMz6eylmYbSmhtsNt7TJf/CxbdVw="; + }; + + buildPhase = '' + cd pgmq-extension + ''; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + mv sql/pgmq.sql $out/share/postgresql/extension/pgmq--${version}.sql + cp sql/*.sql $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "A lightweight message queue. Like AWS SQS and RSMQ but on Postgres."; + homepage = "https://github.com/tembo-io/pgmq"; + maintainers = with maintainers; [ olirice ]; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/pgroonga.nix b/nix/ext/pgroonga.nix new file mode 100644 index 000000000..de0dedc93 --- /dev/null +++ b/nix/ext/pgroonga.nix @@ -0,0 +1,78 @@ +{ lib, stdenv, fetchurl, pkg-config, postgresql, msgpack-c, callPackage, mecab, makeWrapper, xxHash }: +let + supabase-groonga = callPackage ../supabase-groonga.nix { }; +in +stdenv.mkDerivation rec { + pname = "pgroonga"; + version = "3.2.5"; + src = fetchurl { + url = "https://packages.groonga.org/source/$%7Bpname%7D/$%7Bpname%7D-$%7Bversion%7D.tar.gz"; + sha256 = "sha256-GM9EOQty72hdE4Ecq8jpDudhZLiH3pP9ODLxs8DXcSY="; + }; + nativeBuildInputs = [ pkg-config makeWrapper ]; + + buildInputs = [ postgresql msgpack-c supabase-groonga mecab ] ++ lib.optionals stdenv.isDarwin [ + xxHash + ]; + + propagatedBuildInputs = [ supabase-groonga ]; + configureFlags = [ + "--with-mecab=${mecab}" + "--enable-mecab" + "--with-groonga=${supabase-groonga}" + "--with-groonga-plugin-dir=${supabase-groonga}/lib/groonga/plugins" + ]; + + makeFlags = [ + "HAVE_MSGPACK=1" + "MSGPACK_PACKAGE_NAME=msgpack-c" + "HAVE_MECAB=1" + ]; + + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin (builtins.concatStringsSep " " [ + "-Wno-error=incompatible-function-pointer-types" + "-Wno-error=format" + "-Wno-format" + "-I${supabase-groonga}/include/groonga" + "-I${xxHash}/include" + "-DPGRN_VERSION=\"${version}\"" + ]); + + preConfigure = '' + export GROONGA_LIBS="-L${supabase-groonga}/lib -lgroonga" + export GROONGA_CFLAGS="-I${supabase-groonga}/include" + export MECAB_CONFIG="${mecab}/bin/mecab-config" + ${lib.optionalString stdenv.isDarwin '' + export CPPFLAGS="-I${supabase-groonga}/include/groonga -I${xxHash}/include -DPGRN_VERSION=\"${version}\"" + export CFLAGS="-I${supabase-groonga}/include/groonga -I${xxHash}/include -DPGRN_VERSION=\"${version}\"" + export PG_CPPFLAGS="-Wno-error=incompatible-function-pointer-types -Wno-error=format" + ''} + ''; + + installPhase = '' + mkdir -p $out/lib $out/share/postgresql/extension $out/bin + install -D pgroonga${postgresql.dlSuffix} -t $out/lib/ + install -D pgroonga.control -t $out/share/postgresql/extension + install -D data/pgroonga-*.sql -t $out/share/postgresql/extension + install -D pgroonga_database${postgresql.dlSuffix} -t $out/lib/ + install -D pgroonga_database.control -t $out/share/postgresql/extension + install -D data/pgroonga_database-*.sql -t $out/share/postgresql/extension + + echo "Debug: Groonga plugins directory contents:" + ls -l ${supabase-groonga}/lib/groonga/plugins/tokenizers/ + ''; + + meta = with lib; { + description = "A PostgreSQL extension to use Groonga as the index"; + longDescription = '' + PGroonga is a PostgreSQL extension to use Groonga as the index. + PostgreSQL supports full text search against languages that use only alphabet and digit. + It means that PostgreSQL doesn't support full text search against Japanese, Chinese and so on. + You can use super fast full text search feature against all languages by installing PGroonga into your PostgreSQL. + ''; + homepage = "https://pgroonga.github.io/"; + changelog = "https://github.com/pgroonga/pgroonga/releases/tag/$%7Bversion%7D"; + license = licenses.postgresql; + platforms = postgresql.meta.platforms; + }; +} diff --git a/nix/ext/pgrouting.nix b/nix/ext/pgrouting.nix new file mode 100644 index 000000000..3e898022f --- /dev/null +++ b/nix/ext/pgrouting.nix @@ -0,0 +1,59 @@ +{ lib, stdenv, fetchFromGitHub, postgresql, perl, cmake, boost }: + +stdenv.mkDerivation rec { + pname = "pgrouting"; + version = "3.4.1"; + + nativeBuildInputs = [ cmake perl ]; + buildInputs = [ postgresql boost ]; + + src = fetchFromGitHub { + owner = "pgRouting"; + repo = pname; + rev = "v${version}"; + hash = "sha256-QC77AnPGpPQGEWi6JtJdiNsB2su5+aV2pKg5ImR2B0k="; + }; + + #disable compile time warnings for incompatible pointer types only on macos and pg16 + NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") + "-Wno-error=int-conversion -Wno-error=incompatible-pointer-types"; + + cmakeFlags = [ + "-DPOSTGRESQL_VERSION=${postgresql.version}" + ] ++ lib.optionals (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") [ + "-DCMAKE_MACOSX_RPATH=ON" + "-DCMAKE_SHARED_MODULE_SUFFIX=.dylib" + "-DCMAKE_SHARED_LIBRARY_SUFFIX=.dylib" + ]; + + preConfigure = lib.optionalString (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") '' + export DLSUFFIX=.dylib + export CMAKE_SHARED_LIBRARY_SUFFIX=.dylib + export CMAKE_SHARED_MODULE_SUFFIX=.dylib + export MACOSX_RPATH=ON + ''; + + postBuild = lib.optionalString (stdenv.isDarwin && lib.versionAtLeast postgresql.version "16") '' + shopt -s nullglob + for file in lib/libpgrouting-*.so; do + if [ -f "$file" ]; then + mv "$file" "''${file%.so}.dylib" + fi + done + shopt -u nullglob + ''; + + installPhase = '' + install -D lib/*${postgresql.dlSuffix} -t $out/lib + install -D sql/pgrouting--*.sql -t $out/share/postgresql/extension + install -D sql/common/pgrouting.control -t $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "A PostgreSQL/PostGIS extension that provides geospatial routing functionality"; + homepage = "https://pgrouting.org/"; + changelog = "https://github.com/pgRouting/pgrouting/releases/tag/v$%7Bversion%7D"; + platforms = postgresql.meta.platforms; + license = licenses.gpl2Plus; + }; +} diff --git a/nix/ext/pgsodium.nix b/nix/ext/pgsodium.nix new file mode 100644 index 000000000..ec2979499 --- /dev/null +++ b/nix/ext/pgsodium.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitHub, libsodium, postgresql }: + +stdenv.mkDerivation rec { + pname = "pgsodium"; + version = "3.1.8"; + + buildInputs = [ libsodium postgresql ]; + + src = fetchFromGitHub { + owner = "michelp"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-j5F1PPdwfQRbV8XJ8Mloi8FvZF0MTl4eyIJcBYQy1E4="; + }; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + cp *${postgresql.dlSuffix} $out/lib + cp sql/*.sql $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "Modern cryptography for PostgreSQL"; + homepage = "https://github.com/michelp/$%7Bpname%7D"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/pgsql-http.nix b/nix/ext/pgsql-http.nix new file mode 100644 index 000000000..8b74f191b --- /dev/null +++ b/nix/ext/pgsql-http.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitHub, curl, postgresql }: + +stdenv.mkDerivation rec { + pname = "pgsql-http"; + version = "1.6.1"; + + buildInputs = [ curl postgresql ]; + + src = fetchFromGitHub { + owner = "pramsey"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-C8eqi0q1dnshUAZjIsZFwa5FTYc7vmATF3vv2CReWPM="; + }; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + cp *${postgresql.dlSuffix} $out/lib + cp *.sql $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "HTTP client for Postgres"; + homepage = "https://github.com/pramsey/$%7Bpname%7D"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/pgtap.nix b/nix/ext/pgtap.nix new file mode 100644 index 000000000..159fec433 --- /dev/null +++ b/nix/ext/pgtap.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, fetchFromGitHub, postgresql, perl, perlPackages, which }: + +stdenv.mkDerivation rec { + pname = "pgtap"; + version = "1.2.0"; + + src = fetchFromGitHub { + owner = "theory"; + repo = "pgtap"; + rev = "v${version}"; + hash = "sha256-lb0PRffwo6J5a6Hqw1ggvn0cW7gPZ02OEcLPi9ineI8="; + }; + + nativeBuildInputs = [ postgresql perl perlPackages.TAPParserSourceHandlerpgTAP which ]; + + installPhase = '' + install -D {sql/pgtap--${version}.sql,pgtap.control} -t $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "A unit testing framework for PostgreSQL"; + longDescription = '' + pgTAP is a unit testing framework for PostgreSQL written in PL/pgSQL and PL/SQL. + It includes a comprehensive collection of TAP-emitting assertion functions, + as well as the ability to integrate with other TAP-emitting test frameworks. + It can also be used in the xUnit testing style. + ''; + homepage = "https://pgtap.org/"; + inherit (postgresql.meta) platforms; + license = licenses.mit; + }; +} diff --git a/nix/ext/pgvector.nix b/nix/ext/pgvector.nix new file mode 100644 index 000000000..a7d58ec61 --- /dev/null +++ b/nix/ext/pgvector.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "pgvector"; + version = "0.8.0"; + + buildInputs = [ postgresql ]; + + src = fetchFromGitHub { + owner = "pgvector"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-JsZV+I4eRMypXTjGmjCtMBXDVpqTIPHQa28ogXncE/Q="; + }; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + cp *${postgresql.dlSuffix} $out/lib + cp sql/*.sql $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "Open-source vector similarity search for Postgres"; + homepage = "https://github.com/$%7Bsrc.owner%7D/$%7Bsrc.repo%7D"; + maintainers = with maintainers; [ olirice ]; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/pljava.nix b/nix/ext/pljava.nix new file mode 100644 index 000000000..51c5e1317 --- /dev/null +++ b/nix/ext/pljava.nix @@ -0,0 +1,50 @@ +{ stdenv, lib, fetchFromGitHub, openssl, openjdk, maven, postgresql, libkrb5, makeWrapper, gcc, pkg-config, which }: + +maven.buildMavenPackage rec { + pname = "pljava"; + + version = "1.6.7"; + + src = fetchFromGitHub { + owner = "tada"; + repo = "pljava"; + rev = "V1_6_7"; + sha256 = "sha256-M17adSLsw47KZ2BoUwxyWkXKRD8TcexDAy61Yfw4fNU="; + + }; + + mvnParameters = "clean install -Dmaven.test.skip -DskipTests -Dmaven.javadoc.skip=true"; + mvnHash = "sha256-lcxRduh/nKcPL6YQIVTsNH0L4ga0LgJpQKgX5IPkRzs="; + + nativeBuildInputs = [ makeWrapper maven openjdk postgresql openssl postgresql gcc libkrb5 pkg-config ]; + buildInputs = [ stdenv.cc.cc.lib which]; + buildPhase = '' + export PATH=$(lib.makeBinPath [ postgresql ]):$PATH + + ''; + buildOffline = true; + + installPhase = '' + mkdir -p $out/pljavabuild + cp -r * $out/pljavabuild + mkdir -p $out/share/postgresql/extension/pljava + mkdir -p $out/share/postgresql/pljava + mkdir -p $out/lib + mkdir -p $out/etc + java -Dpgconfig=${postgresql}/bin/pg_config \ + -Dpgconfig.sharedir=$out/share \ + -Dpgconfig.sysconfdir=$out/etc/pljava.policy \ + -Dpgconfig.pkglibdir=$out/lib \ + -jar $out/pljavabuild/pljava-packaging/target/pljava-pg15.jar + cp $out/share/pljava/* $out/share/postgresql/extension/pljava + cp $out/share/pljava/* $out/share/postgresql/pljava + cp $out/share/extension/*.control $out/share/postgresql/extension + rm -r $out/pljavabuild + ''; + + meta = with lib; { + description = "PL/Java extension for PostgreSQL"; + homepage = https://github.com/tada/pljava; + license = licenses.bsd3; + }; +} diff --git a/nix/ext/plpgsql-check.nix b/nix/ext/plpgsql-check.nix new file mode 100644 index 000000000..7be2aac2a --- /dev/null +++ b/nix/ext/plpgsql-check.nix @@ -0,0 +1,46 @@ +{ lib, stdenv, fetchFromGitHub, postgresql, postgresqlTestHook }: + +stdenv.mkDerivation rec { + pname = "plpgsql-check"; + version = "2.7.11"; + + src = fetchFromGitHub { + owner = "okbob"; + repo = "plpgsql_check"; + rev = "v${version}"; + hash = "sha256-vR3MvfmUP2QEAtXFpq0NCCKck3wZPD+H3QleHtyVQJs="; + }; + + buildInputs = [ postgresql ]; + + installPhase = '' + install -D -t $out/lib *${postgresql.dlSuffix} + install -D -t $out/share/postgresql/extension *.sql + install -D -t $out/share/postgresql/extension *.control + ''; + + passthru.tests.extension = stdenv.mkDerivation { + name = "plpgsql-check-test"; + dontUnpack = true; + doCheck = true; + buildInputs = [ postgresqlTestHook ]; + nativeCheckInputs = [ (postgresql.withPackages (ps: [ ps.plpgsql_check ])) ]; + postgresqlTestUserOptions = "LOGIN SUPERUSER"; + failureHook = "postgresqlStop"; + checkPhase = '' + runHook preCheck + psql -a -v ON_ERROR_STOP=1 -c "CREATE EXTENSION plpgsql_check;" + runHook postCheck + ''; + installPhase = "touch $out"; + }; + + meta = with lib; { + description = "Linter tool for language PL/pgSQL"; + homepage = "https://github.com/okbob/plpgsql_check"; + changelog = "https://github.com/okbob/plpgsql_check/releases/tag/v$%7Bversion%7D"; + platforms = postgresql.meta.platforms; + license = licenses.mit; + maintainers = [ maintainers.marsam ]; + }; +} diff --git a/nix/ext/plv8.nix b/nix/ext/plv8.nix new file mode 100644 index 000000000..b3fd03e07 --- /dev/null +++ b/nix/ext/plv8.nix @@ -0,0 +1,145 @@ +{ stdenv +, lib +, fetchFromGitHub +, v8 +, perl +, postgresql +# For passthru test on various systems, and local development on macos +# not we are not currently using passthru tests but retaining for possible contrib +# to nixpkgs +, runCommand +, coreutils +, gnugrep +, clang +, xcbuild +, darwin +, patchelf +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "plv8"; + version = "3.1.10"; + + src = fetchFromGitHub { + owner = "plv8"; + repo = "plv8"; + rev = "v${finalAttrs.version}"; + hash = "sha256-g1A/XPC0dX2360Gzvmo9/FSQnM6Wt2K4eR0pH0p9fz4="; + }; + + patches = [ + # Allow building with system v8. + # https://github.com/plv8/plv8/pull/505 (rejected) + ./0001-build-Allow-using-V8-from-system.patch + ]; + + nativeBuildInputs = [ + perl + ] ++ lib.optionals stdenv.isDarwin [ + clang + xcbuild + ]; + + buildInputs = [ + v8 + postgresql + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.CoreFoundation + darwin.apple_sdk.frameworks.Kerberos + ]; + + buildFlags = [ "all" ]; + + makeFlags = [ + # Nixpkgs build a v8 monolith instead of separate v8_libplatform. + "USE_SYSTEM_V8=1" + "V8_OUTDIR=${v8}/lib" + "PG_CONFIG=${postgresql}/bin/pg_config" + ] ++ lib.optionals stdenv.isDarwin [ + "CC=${clang}/bin/clang" + "CXX=${clang}/bin/clang++" + "SHLIB_LINK=-L${v8}/lib -lv8_monolith -Wl,-rpath,${v8}/lib" + ] ++ lib.optionals (!stdenv.isDarwin) [ + "SHLIB_LINK=-lv8" + ]; + + NIX_LDFLAGS = (lib.optionals stdenv.isDarwin [ + "-L${postgresql}/lib" + "-L${v8}/lib" + "-lv8_monolith" + "-lpq" + "-lpgcommon" + "-lpgport" + "-F${darwin.apple_sdk.frameworks.CoreFoundation}/Library/Frameworks" + "-framework" "CoreFoundation" + "-F${darwin.apple_sdk.frameworks.Kerberos}/Library/Frameworks" + "-framework" "Kerberos" + "-undefined" "dynamic_lookup" + "-flat_namespace" + ]); + + installFlags = [ + # PGXS only supports installing to postgresql prefix so we need to redirect this + "DESTDIR=${placeholder "out"}" + ]; + + # No configure script. + dontConfigure = true; + + postPatch = '' + patchShebangs ./generate_upgrade.sh + substituteInPlace generate_upgrade.sh \ + --replace " 2.3.10 " " 2.3.10 2.3.11 2.3.12 2.3.13 2.3.14 2.3.15 " + + ${lib.optionalString stdenv.isDarwin '' + # Replace g++ with clang++ in Makefile + sed -i 's/g++/clang++/g' Makefile + ''} + ''; + + postInstall = '' + # Move the redirected to proper directory. + # There appear to be no references to the install directories + # so changing them does not cause issues. + mv "$out/nix/store"/*/* "$out" + rmdir "$out/nix/store"/* "$out/nix/store" "$out/nix" + + # Handle different PostgreSQL versions + if [ "${lib.versions.major postgresql.version}" = "15" ]; then + mv "$out/lib/plv8-${finalAttrs.version}.so" "$out/lib/plv8.so" + ln -s "$out/lib/plv8.so" "$out/lib/plv8-${finalAttrs.version}.so" + sed -i 's|module_pathname = '"'"'$libdir/plv8-[0-9.]*'"'"'|module_pathname = '"'"'$libdir/plv8'"'"'|' "$out/share/postgresql/extension/plv8.control" + sed -i 's|module_pathname = '"'"'$libdir/plv8-[0-9.]*'"'"'|module_pathname = '"'"'$libdir/plv8'"'"'|' "$out/share/postgresql/extension/plcoffee.control" + sed -i 's|module_pathname = '"'"'$libdir/plv8-[0-9.]*'"'"'|module_pathname = '"'"'$libdir/plv8'"'"'|' "$out/share/postgresql/extension/plls.control" + + ${lib.optionalString stdenv.isDarwin '' + install_name_tool -add_rpath "${v8}/lib" $out/lib/plv8.so + install_name_tool -add_rpath "${postgresql}/lib" $out/lib/plv8.so + install_name_tool -add_rpath "${stdenv.cc.cc.lib}/lib" $out/lib/plv8.so + install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/plv8.so + ''} + + ${lib.optionalString (!stdenv.isDarwin) '' + ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8.so + ''} + else + ${lib.optionalString stdenv.isDarwin '' + install_name_tool -add_rpath "${v8}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} + install_name_tool -add_rpath "${postgresql}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} + install_name_tool -add_rpath "${stdenv.cc.cc.lib}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} + install_name_tool -change @rpath/libv8_monolith.dylib ${v8}/lib/libv8_monolith.dylib $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} + ''} + + ${lib.optionalString (!stdenv.isDarwin) '' + ${patchelf}/bin/patchelf --set-rpath "${v8}/lib:${postgresql}/lib:${stdenv.cc.cc.lib}/lib" $out/lib/plv8-${finalAttrs.version}${postgresql.dlSuffix} + ''} + fi + ''; + + meta = with lib; { + description = "V8 Engine Javascript Procedural Language add-on for PostgreSQL"; + homepage = "https://plv8.github.io/"; + platforms = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ]; + license = licenses.postgresql; + }; +}) diff --git a/nix/ext/postgis.nix b/nix/ext/postgis.nix new file mode 100644 index 000000000..e5ccda443 --- /dev/null +++ b/nix/ext/postgis.nix @@ -0,0 +1,86 @@ +{ fetchurl +, lib, stdenv +, perl +, libxml2 +, postgresql +, geos +, proj +, json_c +, pkg-config +, file +, protobufc +, libiconv +, pcre2 +, nixosTests +, callPackage +}: + +let + sfcgal = callPackage ./sfcgal/sfcgal.nix { }; + gdal = callPackage ./gdal.nix { inherit postgresql; }; +in +stdenv.mkDerivation rec { + pname = "postgis"; + version = "3.3.7"; + + outputs = [ "out" "doc" ]; + + src = fetchurl { + url = "https://download.osgeo.org/postgis/source/postgis-$%7Bversion%7D.tar.gz"; + sha256 = "sha256-UHJKDd5JrcJT5Z4CTYsY/va+ToU0GUPG1eHhuXTkP84="; + }; + + buildInputs = [ libxml2 postgresql geos proj gdal json_c protobufc pcre2.dev sfcgal ] + ++ lib.optional stdenv.isDarwin libiconv; + nativeBuildInputs = [ perl pkg-config ]; + dontDisableStatic = true; + + + env.NIX_LDFLAGS = "-L${lib.getLib json_c}/lib"; + + preConfigure = '' + sed -i 's@/usr/bin/file@${file}/bin/file@' configure + configureFlags="--datadir=$out/share/postgresql --datarootdir=$out/share/postgresql --bindir=$out/bin --docdir=$doc/share/doc/${pname} --with-gdalconfig=${gdal}/bin/gdal-config --with-jsondir=${json_c.dev} --disable-extension-upgrades-install --with-sfcgal" + + makeFlags="PERL=${perl}/bin/perl datadir=$out/share/postgresql pkglibdir=$out/lib bindir=$out/bin docdir=$doc/share/doc/${pname}" + ''; + + postConfigure = '' + sed -i "s|@mkdir -p \$(DESTDIR)\$(PGSQL_BINDIR)||g ; + s|\$(DESTDIR)\$(PGSQL_BINDIR)|$prefix/bin|g + " \ + "raster/loader/Makefile"; + sed -i "s|\$(DESTDIR)\$(PGSQL_BINDIR)|$prefix/bin|g + " \ + "raster/scripts/python/Makefile"; + mkdir -p $out/bin + ln -s ${postgresql}/bin/postgres $out/bin/postgres + ''; + +postInstall = '' + rm $out/bin/postgres + for prog in $out/bin/*; do # */ + ln -s $prog $prog-${version} + done + # Add function definition and usage to tiger geocoder files + for file in $out/share/postgresql/extension/postgis_tiger_geocoder*--${version}.sql; do + sed -i "/SELECT postgis_extension_AddToSearchPath('tiger');/a SELECT postgis_extension_AddToSearchPath('extensions');" "$file" + done + # Original topology patching + for file in $out/share/postgresql/extension/postgis_topology*--${version}.sql; do + sed -i "/SELECT topology.AddToSearchPath('topology');/i SELECT topology.AddToSearchPath('extensions');" "$file" + done + mkdir -p $doc/share/doc/postgis + mv doc/* $doc/share/doc/postgis/ +''; + + passthru.tests.postgis = nixosTests.postgis; + + meta = with lib; { + description = "Geographic Objects for PostgreSQL"; + homepage = "https://postgis.net/"; + changelog = "https://git.osgeo.org/gitea/postgis/postgis/raw/tag/$%7Bversion%7D/NEWS"; + license = licenses.gpl2; + inherit (postgresql.meta) platforms; + }; +} diff --git a/nix/ext/rum.nix b/nix/ext/rum.nix new file mode 100644 index 000000000..574ef3d3a --- /dev/null +++ b/nix/ext/rum.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "rum"; + version = "1.3.14"; + + src = fetchFromGitHub { + owner = "postgrespro"; + repo = "rum"; + rev = version; + hash = "sha256-VsfpxQqRBu9bIAP+TfMRXd+B3hSjuhU2NsutocNiCt8="; + }; + + buildInputs = [ postgresql ]; + + makeFlags = [ "USE_PGXS=1" ]; + + installPhase = '' + install -D -t $out/lib *${postgresql.dlSuffix} + install -D -t $out/share/postgresql/extension *.control + install -D -t $out/share/postgresql/extension *.sql + ''; + + meta = with lib; { + description = "Full text search index method for PostgreSQL"; + homepage = "https://github.com/postgrespro/rum"; + license = licenses.postgresql; + platforms = postgresql.meta.platforms; + }; +} diff --git a/nix/ext/sfcgal/sfcgal.nix b/nix/ext/sfcgal/sfcgal.nix new file mode 100644 index 000000000..b1d5842f8 --- /dev/null +++ b/nix/ext/sfcgal/sfcgal.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitLab, cgal, cmake, pkg-config, gmp, mpfr, boost }: + +stdenv.mkDerivation rec { + pname = "sfcgal"; + version = "61f3b08ade49493b56c6bafa98c7c1f84addbc10"; + + src = fetchFromGitLab { + owner = "sfcgal"; + repo = "SFCGAL"; + rev = "${version}"; + hash = "sha256-nKSqiFyMkZAYptIeShb1zFg9lYSny3kcGJfxdeTFqxw="; + }; + + nativeBuildInputs = [ cmake pkg-config cgal gmp mpfr boost ]; + + cmakeFlags = [ "-DCGAL_DIR=${cgal}" "-DCMAKE_PREFIX_PATH=${cgal}" ]; + + + postPatch = '' + substituteInPlace sfcgal.pc.in \ + --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ + ''; + + meta = with lib; { + description = "A wrapper around CGAL that intents to implement 2D and 3D operations on OGC standards models"; + homepage = "https://sfcgal.gitlab.io/SFCGAL/"; + license = with licenses; [ gpl3Plus lgpl3Plus]; + platforms = platforms.all; + }; +} diff --git a/nix/ext/supautils.nix b/nix/ext/supautils.nix new file mode 100644 index 000000000..40973a1af --- /dev/null +++ b/nix/ext/supautils.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "supautils"; + version = "2.9.1"; + + buildInputs = [ postgresql ]; + + src = fetchFromGitHub { + owner = "supabase"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-Rw7dmIUg9bJ7SuiHxCsZtnVhdG9hg4WlptiB/MxVmPc="; + }; + + installPhase = '' + mkdir -p $out/lib + + install -D build/*${postgresql.dlSuffix} -t $out/lib + ''; + + meta = with lib; { + description = "PostgreSQL extension for enhanced security"; + homepage = "https://github.com/supabase/$%7Bpname%7D"; + maintainers = with maintainers; [ steve-chavez ]; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/timescaledb-2.9.1.nix b/nix/ext/timescaledb-2.9.1.nix new file mode 100644 index 000000000..92d5d73fe --- /dev/null +++ b/nix/ext/timescaledb-2.9.1.nix @@ -0,0 +1,50 @@ +{ lib, stdenv, fetchFromGitHub, cmake, postgresql, openssl, libkrb5 }: + +stdenv.mkDerivation rec { + pname = "timescaledb-apache"; + version = "2.9.1"; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ postgresql openssl libkrb5 ]; + + src = fetchFromGitHub { + owner = "timescale"; + repo = "timescaledb"; + rev = version; + hash = "sha256-fvVSxDiGZAewyuQ2vZDb0I6tmlDXl6trjZp8+qDBtb8="; + }; + + cmakeFlags = [ "-DSEND_TELEMETRY_DEFAULT=OFF" "-DREGRESS_CHECKS=OFF" "-DTAP_CHECKS=OFF" "-DAPACHE_ONLY=1" ] + ++ lib.optionals stdenv.isDarwin [ "-DLINTER=OFF" ]; + + # Fix the install phase which tries to install into the pgsql extension dir, + # and cannot be manually overridden. This is rather fragile but works OK. + postPatch = '' + for x in CMakeLists.txt sql/CMakeLists.txt; do + substituteInPlace "$x" \ + --replace 'DESTINATION "''${PG_SHAREDIR}/extension"' "DESTINATION \"$out/share/postgresql/extension\"" + done + + for x in src/CMakeLists.txt src/loader/CMakeLists.txt tsl/src/CMakeLists.txt; do + substituteInPlace "$x" \ + --replace 'DESTINATION ''${PG_PKGLIBDIR}' "DESTINATION \"$out/lib\"" + done + ''; + + + # timescaledb-2.9.1.so already exists in the lib directory + # we have no need for the timescaledb.so or control file + postInstall = '' + rm $out/lib/timescaledb.so + rm $out/share/postgresql/extension/timescaledb.control + ''; + + meta = with lib; { + description = "Scales PostgreSQL for time-series data via automatic partitioning across time and space"; + homepage = "https://www.timescale.com/"; + changelog = "https://github.com/timescale/timescaledb/blob/$%7Bversion%7D/CHANGELOG.md"; + platforms = postgresql.meta.platforms; + license = licenses.asl20; + broken = versionOlder postgresql.version "13"; + }; +} diff --git a/nix/ext/timescaledb.nix b/nix/ext/timescaledb.nix new file mode 100644 index 000000000..1d7360762 --- /dev/null +++ b/nix/ext/timescaledb.nix @@ -0,0 +1,42 @@ +{ lib, stdenv, fetchFromGitHub, cmake, postgresql, openssl, libkrb5 }: + +stdenv.mkDerivation rec { + pname = "timescaledb-apache"; + version = "2.16.1"; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ postgresql openssl libkrb5 ]; + + src = fetchFromGitHub { + owner = "timescale"; + repo = "timescaledb"; + rev = version; + hash = "sha256-sLxWdBmih9mgiO51zLLxn9uwJVYc5JVHJjSWoADoJ+w="; + }; + + cmakeFlags = [ "-DSEND_TELEMETRY_DEFAULT=OFF" "-DREGRESS_CHECKS=OFF" "-DTAP_CHECKS=OFF" "-DAPACHE_ONLY=1" ] + ++ lib.optionals stdenv.isDarwin [ "-DLINTER=OFF" ]; + + # Fix the install phase which tries to install into the pgsql extension dir, + # and cannot be manually overridden. This is rather fragile but works OK. + postPatch = '' + for x in CMakeLists.txt sql/CMakeLists.txt; do + substituteInPlace "$x" \ + --replace 'DESTINATION "''${PG_SHAREDIR}/extension"' "DESTINATION \"$out/share/postgresql/extension\"" + done + + for x in src/CMakeLists.txt src/loader/CMakeLists.txt tsl/src/CMakeLists.txt; do + substituteInPlace "$x" \ + --replace 'DESTINATION ''${PG_PKGLIBDIR}' "DESTINATION \"$out/lib\"" + done + ''; + + meta = with lib; { + description = "Scales PostgreSQL for time-series data via automatic partitioning across time and space"; + homepage = "https://www.timescale.com/"; + changelog = "https://github.com/timescale/timescaledb/blob/$%7Bversion%7D/CHANGELOG.md"; + platforms = postgresql.meta.platforms; + license = licenses.asl20; + broken = versionOlder postgresql.version "13"; + }; +} diff --git a/nix/ext/use-system-groonga.patch b/nix/ext/use-system-groonga.patch new file mode 100644 index 000000000..6d3042bc8 --- /dev/null +++ b/nix/ext/use-system-groonga.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 33b34477..f4ffefe5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,7 +12,6 @@ if(MSVC_VERSION LESS 1800) + message(FATAL_ERROR "PGroonga supports only MSVC 2013 or later") + endif() + +-add_subdirectory(vendor/groonga) + + set(PGRN_POSTGRESQL_DIR "${CMAKE_INSTALL_PREFIX}" + CACHE PATH "PostgreSQL binary directory") +@@ -52,8 +51,6 @@ string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3" + string(REGEX REPLACE ".*comment = '([^']+)'.*" "\\1" + PGRN_DESCRIPTION "${PGRN_CONTROL}") + +-file(READ "${CMAKE_CURRENT_SOURCE_DIR}/vendor/groonga/bundled_message_pack_version" +- PGRN_BUNDLED_MESSAGE_PACK_VERSION) + string(STRIP + "${PGRN_BUNDLED_MESSAGE_PACK_VERSION}" + PGRN_BUNDLED_MESSAGE_PACK_VERSION) \ No newline at end of file diff --git a/nix/ext/vault.nix b/nix/ext/vault.nix new file mode 100644 index 000000000..fcc1a9129 --- /dev/null +++ b/nix/ext/vault.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitHub, libsodium, postgresql }: + +stdenv.mkDerivation rec { + pname = "vault"; + version = "0.3.1"; + + buildInputs = [ libsodium postgresql ]; + + src = fetchFromGitHub { + owner = "supabase"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-MC87bqgtynnDhmNZAu96jvfCpsGDCPB0g5TZfRQHd30="; + }; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + install -D *${postgresql.dlSuffix} $out/lib + install -D -t $out/share/postgresql/extension sql/*.sql + install -D -t $out/share/postgresql/extension *.control + ''; + + meta = with lib; { + description = "Store encrypted secrets in PostgreSQL"; + homepage = "https://github.com/supabase/$%7Bpname%7D"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/ext/wal2json.nix b/nix/ext/wal2json.nix new file mode 100644 index 000000000..b1f532dcf --- /dev/null +++ b/nix/ext/wal2json.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "wal2json"; + version = "2_6"; + + src = fetchFromGitHub { + owner = "eulerto"; + repo = "wal2json"; + rev = "wal2json_${builtins.replaceStrings ["."] ["_"] version}"; + hash = "sha256-+QoACPCKiFfuT2lJfSUmgfzC5MXf75KpSoc2PzPxKyM="; + }; + + buildInputs = [ postgresql ]; + + makeFlags = [ "USE_PGXS=1" ]; + + installPhase = '' + install -D -t $out/lib *${postgresql.dlSuffix} + install -D -t $out/share/postgresql/extension sql/*.sql + ''; + + meta = with lib; { + description = "PostgreSQL JSON output plugin for changeset extraction"; + homepage = "https://github.com/eulerto/wal2json"; + changelog = "https://github.com/eulerto/wal2json/releases/tag/wal2json_$%7Bversion%7D"; + platforms = postgresql.meta.platforms; + license = licenses.bsd3; + }; +} diff --git a/nix/ext/wrappers/default.nix b/nix/ext/wrappers/default.nix new file mode 100644 index 000000000..e87dfb372 --- /dev/null +++ b/nix/ext/wrappers/default.nix @@ -0,0 +1,173 @@ +{ lib +, stdenv +, fetchFromGitHub +, openssl +, pkg-config +, postgresql +, buildPgrxExtension_0_12_9 +, cargo +, darwin +, jq +, rust-bin +, git +}: +let + rustVersion = "1.81.0"; + cargo = rust-bin.stable.${rustVersion}.default; +in +buildPgrxExtension_0_12_9 rec { + pname = "supabase-wrappers"; + version = "0.4.6"; + # update the following array when the wrappers version is updated + # required to ensure that extensions update scripts from previous versions are generated + previousVersions = ["0.4.5" "0.4.4" "0.4.3" "0.4.2" "0.4.1" "0.4.0" "0.3.1" "0.3.0" "0.2.0" "0.1.19" "0.1.18" "0.1.17" "0.1.16" "0.1.15" "0.1.14" "0.1.12" "0.1.11" "0.1.10" "0.1.9" "0.1.8" "0.1.7" "0.1.6" "0.1.5" "0.1.4" "0.1.1" "0.1.0"]; + inherit postgresql; + src = fetchFromGitHub { + owner = "supabase"; + repo = "wrappers"; + rev = "v${version}"; + hash = "sha256-hthb3qEXT1Kf4yPoq0udEbQzlyLtI5tug6sK4YAPFjU="; + }; + + nativeBuildInputs = [ pkg-config cargo git ]; + buildInputs = [ openssl postgresql ] ++ lib.optionals (stdenv.isDarwin) [ + darwin.apple_sdk.frameworks.CoreFoundation + darwin.apple_sdk.frameworks.Security + darwin.apple_sdk.frameworks.SystemConfiguration + ]; + + NIX_LDFLAGS = "-L${postgresql}/lib -lpq"; + + # Set necessary environment variables for pgrx in darwin only + env = lib.optionalAttrs stdenv.isDarwin { + POSTGRES_LIB = "${postgresql}/lib"; + RUSTFLAGS = "-C link-arg=-undefined -C link-arg=dynamic_lookup"; + # Calculate unique port for each PostgreSQL version: + # - Check if version contains underscore (indicating OrioleDB) + # - Add 1 to port if it's OrioleDB + # - Add 2 for each major version above 15 + # Examples: + # - PostgreSQL 15.8 → 5435 + 0 + (15-15)*2 = 5435 + # - PostgreSQL 17_0 (OrioleDB) → 5435 + 1 + (17-15)*2 = 5440 + # - PostgreSQL 17.4 → 5435 + 0 + (17-15)*2 = 5439 + PGPORT = toString (5435 + + (if builtins.match ".*_.*" postgresql.version != null then 1 else 0) + # +1 for OrioleDB + ((builtins.fromJSON (builtins.substring 0 2 postgresql.version)) - 15) * 2); # +2 for each major version + }; + + OPENSSL_NO_VENDOR = 1; + #need to set this to 2 to avoid cpu starvation + CARGO_BUILD_JOBS = "2"; + CARGO="${cargo}/bin/cargo"; + + #CARGO_NET_GIT_FETCH_WITH_CLI = "true"; + cargoLock = { + lockFile = "${src}/Cargo.lock"; + allowBuiltinFetchGit = false; + outputHashes = { + "clickhouse-rs-1.1.0-alpha.1" = "sha256-G+v4lNP5eK2U45D1fL90Dq24pUSlpIysNCxuZ17eac0="; + }; + }; + + preConfigure = '' + cd wrappers + + # update the clickhouse-rs dependency + # append the branch name to the git URL to help cargo locate the commit + # while maintaining the rev for reproducibility + awk -i inplace ' + /\[dependencies.clickhouse-rs\]/ { + print + getline + if ($0 ~ /git =/) { + print "git = \"https://github.com/suharev7/clickhouse-rs/async-await/"" + } else { + print + } + while ($0 !~ /^\[/ && NF > 0) { + getline + if ($0 ~ /rev =/) print + if ($0 ~ /^\[/) print + } + next + } + { print } + ' Cargo.toml + + # Verify the file is still valid TOML, break build with this error + # if it is not + if ! cargo verify-project 2>/dev/null; then + echo "Failed to maintain valid TOML syntax" + exit 1 + fi + + cd .. + ''; + + buildAndTestSubdir = "wrappers"; + buildFeatures = [ + "helloworld_fdw" + "all_fdws" + ]; + doCheck = false; + + preBuild = '' + echo "Processing git tags..." + echo '${builtins.concatStringsSep "," previousVersions}' | sed 's/,/\n/g' > git_tags.txt + ''; + + postInstall = '' + echo "Modifying main SQL file to use unversioned library name..." + current_version="${version}" + main_sql_file="$out/share/postgresql/extension/wrappers--$current_version.sql" + if [ -f "$main_sql_file" ]; then + sed -i 's|$libdir/wrappers-[0-9.]*|$libdir/wrappers|g' "$main_sql_file" + echo "Modified $main_sql_file" + else + echo "Warning: $main_sql_file not found" + fi + echo "Creating and modifying SQL files for previous versions..." + + if [ -f "$main_sql_file" ]; then + while read -r previous_version; do + if [ "$(printf '%s\n' "$previous_version" "$current_version" | sort -V | head -n1)" = "$previous_version" ] && [ "$previous_version" != "$current_version" ]; then + new_file="$out/share/postgresql/extension/wrappers--$previous_version--$current_version.sql" + echo "Creating $new_file" + cp "$main_sql_file" "$new_file" + sed -i 's|$libdir/wrappers-[0-9.]*|$libdir/wrappers|g' "$new_file" + echo "Modified $new_file" + fi + done < git_tags.txt + else + echo "Warning: $main_sql_file not found" + fi + mv $out/lib/wrappers-${version}${postgresql.dlSuffix} $out/lib/wrappers${postgresql.dlSuffix} + ln -s $out/lib/wrappers${postgresql.dlSuffix} $out/lib/wrappers-${version}${postgresql.dlSuffix} + + echo "Creating wrappers.so symlinks to support pg_upgrade..." + if [ -f "$out/lib/wrappers.so" ]; then + while read -r previous_version; do + if [ "$(printf '%s\n' "$previous_version" "$current_version" | sort -V | head -n1)" = "$previous_version" ] && [ "$previous_version" != "$current_version" ]; then + new_file="$out/lib/wrappers-$previous_version.so" + echo "Creating $new_file" + ln -s "$out/lib/wrappers.so" "$new_file" + fi + done < git_tags.txt + else + echo "Warning: $out/lib/wrappers.so not found" + fi + + rm git_tags.txt + echo "Contents of updated wrappers.control:" + cat "$out/share/postgresql/extension/wrappers.control" + echo "List of generated SQL files:" + ls -l $out/share/postgresql/extension/wrappers--*.sql + ''; + + meta = with lib; { + description = "Various Foreign Data Wrappers (FDWs) for PostreSQL"; + homepage = "https://github.com/supabase/wrappers"; + platforms = postgresql.meta.platforms; + license = licenses.postgresql; + }; +} diff --git a/nix/fix-cmake-install-path.patch b/nix/fix-cmake-install-path.patch new file mode 100644 index 000000000..1fe317b6c --- /dev/null +++ b/nix/fix-cmake-install-path.patch @@ -0,0 +1,21 @@ +Fix CMake install path + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1141,11 +1141,11 @@ + + set(prefix "${CMAKE_INSTALL_PREFIX}") + set(exec_prefix "\${prefix}") +-set(bindir "\${exec_prefix}/${CMAKE_INSTALL_BINDIR}") +-set(sbindir "\${exec_prefix}/${CMAKE_INSTALL_SBINDIR}") +-set(libdir "\${prefix}/${CMAKE_INSTALL_LIBDIR}") +-set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") +-set(datarootdir "\${prefix}/${CMAKE_INSTALL_DATAROOTDIR}") ++set(bindir "${CMAKE_INSTALL_FULL_BINDIR}") ++set(sbindir "${CMAKE_INSTALL_FULL_SBINDIR}") ++set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") ++set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") ++set(datarootdir "${CMAKE_INSTALL_FULL_DATAROOTDIR}") + set(datadir "\${datarootdir}") + set(expanded_pluginsdir "${GRN_PLUGINS_DIR}") + set(GRN_EXPANDED_DEFAULT_DOCUMENT_ROOT "${GRN_DEFAULT_DOCUMENT_ROOT}") \ No newline at end of file diff --git a/nix/init.sh b/nix/init.sh new file mode 100755 index 000000000..7a0aadff4 --- /dev/null +++ b/nix/init.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# shellcheck shell=bash + +export PGUSER=supabase_admin +export PGDATA=$PWD/postgres_data +export PGHOST=$PWD/postgres +export PGPORT=5432 +export PGPASS=postgres +export LOG_PATH=$PGHOST/LOG +export PGDATABASE=testdb +export DATABASE_URL="postgresql:///$PGDATABASE?host=$PGHOST&port=$PGPORT" +mkdir -p $PGHOST +if [ ! -d $PGDATA ]; then + echo 'Initializing postgresql database...' + initdb $PGDATA --locale=C --username $PGUSER -A md5 --pwfile=<(echo $PGPASS) --auth=trust + echo "listen_addresses='*'" >> $PGDATA/postgresql.conf + echo "unix_socket_directories='$PGHOST'" >> $PGDATA/postgresql.conf + echo "unix_socket_permissions=0700" >> $PGDATA/postgresql.conf +fi +chmod o-rwx $PGDATA diff --git a/nix/overlays/cargo-pgrx-0-11-3.nix b/nix/overlays/cargo-pgrx-0-11-3.nix new file mode 100644 index 000000000..41ba97d4c --- /dev/null +++ b/nix/overlays/cargo-pgrx-0-11-3.nix @@ -0,0 +1,7 @@ +final: prev: { + #cargo-pgrx_0_11_3 = cargo-pgrx.cargo-pgrx_0_11_3; + + buildPgrxExtension_0_11_3 = prev.buildPgrxExtension.override { + cargo-pgrx = final.cargo-pgrx_0_11_3; + }; +} diff --git a/nix/overlays/psql_16-oriole.nix b/nix/overlays/psql_16-oriole.nix new file mode 100644 index 000000000..309129f1f --- /dev/null +++ b/nix/overlays/psql_16-oriole.nix @@ -0,0 +1,21 @@ +final: prev: { + pg_orioledb = prev.postgresql_16.overrideAttrs (old: { + pname = "postgresql_orioledb"; + version = "16_31"; + src = prev.fetchurl { + url = "https://github.com/orioledb/postgres/archive/refs/tags/patches16_31.tar.gz"; + sha256 = "sha256-29uHUACwZKh8e4zJ9tWzEhLNjEuh6P31KbpxnMEhtuI="; + }; + buildInputs = old.buildInputs ++ [ + prev.bison + prev.docbook5 + prev.docbook_xsl + prev.docbook_xsl_ns + prev.docbook_xml_dtd_45 + prev.flex + prev.libxslt + prev.perl + ]; + }); + postgresql_orioledb = final.pg_orioledb; +} diff --git a/nix/postgresql/15.nix b/nix/postgresql/15.nix new file mode 100644 index 000000000..63f492840 --- /dev/null +++ b/nix/postgresql/15.nix @@ -0,0 +1,4 @@ +import ./generic.nix { + version = "15.8"; + hash = "sha256-RANRX5pp7rPv68mPMLjGlhIr/fiV6Ss7I/W452nty2o="; +} diff --git a/nix/postgresql/17.nix b/nix/postgresql/17.nix new file mode 100644 index 000000000..32102fdb6 --- /dev/null +++ b/nix/postgresql/17.nix @@ -0,0 +1,4 @@ +import ./generic.nix { + version = "17.4"; + hash = "sha256-xGBbc/6hGWNAZpn5Sblm5dFzp+4Myu+JON7AyoqZX+c="; +} diff --git a/nix/postgresql/default.nix b/nix/postgresql/default.nix new file mode 100644 index 000000000..f7b3c5583 --- /dev/null +++ b/nix/postgresql/default.nix @@ -0,0 +1,19 @@ +self: +let + versions = { + postgresql_15 = ./15.nix; + postgresql_17 = ./17.nix; + postgresql_orioledb-17 = ./orioledb-17.nix; + }; + mkAttributes = jitSupport: + self.lib.mapAttrs' (version: path: + let + attrName = if jitSupport then "${version}_jit" else version; + in + self.lib.nameValuePair attrName (import path { + inherit jitSupport self; + }) + ) versions; +in +# variations without and with JIT +(mkAttributes false) // (mkAttributes true) diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix new file mode 100644 index 000000000..cefd5a61b --- /dev/null +++ b/nix/postgresql/generic.nix @@ -0,0 +1,320 @@ +let + + generic = + # adapted from the nixpkgs postgresql package + # dependencies + { stdenv, lib, fetchurl, fetchpatch, makeWrapper + , glibc, zlib, readline, openssl, icu, lz4, zstd, systemd, libossp_uuid + , pkg-config, libxml2, tzdata, libkrb5, substituteAll, darwin + , linux-pam + #orioledb specific + , perl, bison, flex, docbook_xsl, docbook_xml_dtd_45, docbook_xsl_ns, libxslt + + # This is important to obtain a version of `libpq` that does not depend on systemd. + , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd && !stdenv.hostPlatform.isStatic + , enableSystemd ? null + , gssSupport ? with stdenv.hostPlatform; !isWindows && !isStatic + + # for postgresql.pkgs + , self, newScope, buildEnv + + # source specification + , version, hash, muslPatches ? {} + + # for tests + , testers + + # JIT + , jitSupport + , nukeReferences, patchelf, llvmPackages + + # PL/Python + , pythonSupport ? false + , python3 + + # detection of crypt fails when using llvm stdenv, so we add it manually + # for <13 (where it got removed: https://github.com/postgres/postgres/commit/c45643d618e35ec2fe91438df15abd4f3c0d85ca) + , libxcrypt + } @args: + let + atLeast = lib.versionAtLeast version; + olderThan = lib.versionOlder version; + lz4Enabled = atLeast "14"; + zstdEnabled = atLeast "15"; + + systemdSupport' = if enableSystemd == null then systemdSupport else (lib.warn "postgresql: argument enableSystemd is deprecated, please use systemdSupport instead." enableSystemd); + + pname = "postgresql"; + + stdenv' = if jitSupport then llvmPackages.stdenv else stdenv; + in stdenv'.mkDerivation (finalAttrs: { + inherit version; + pname = pname + lib.optionalString jitSupport "-jit"; + + src = if (builtins.match "[0-9][0-9]_.*" version != null) then + fetchurl { + url = "https://github.com/orioledb/postgres/archive/refs/tags/patches$%7Bversion%7D.tar.gz"; + inherit hash; + } + else + fetchurl { + url = "mirror://postgresql/source/v${version}/${pname}-${version}.tar.bz2"; + inherit hash; + }; + + hardeningEnable = lib.optionals (!stdenv'.cc.isClang) [ "pie" ]; + + outputs = [ "out" "lib" ]; + setOutputFlags = false; # $out retains configureFlags :-/ + + buildInputs = [ + zlib + readline + openssl + (libxml2.override {python = python3;}) + icu + ] + ++ lib.optionals (olderThan "13") [ libxcrypt ] + ++ lib.optionals jitSupport [ llvmPackages.llvm ] + ++ lib.optionals lz4Enabled [ lz4 ] + ++ lib.optionals zstdEnabled [ zstd ] + ++ lib.optionals systemdSupport' [ systemd ] + ++ lib.optionals pythonSupport [ python3 ] + ++ lib.optionals gssSupport [ libkrb5 ] + ++ lib.optionals stdenv'.isLinux [ linux-pam ] + ++ lib.optionals (!stdenv'.isDarwin) [ libossp_uuid ] + ++ lib.optionals ((builtins.match "[0-9][0-9]_.*" version != null) || (lib.versionAtLeast version "17")) [ + perl bison flex docbook_xsl docbook_xml_dtd_45 docbook_xsl_ns libxslt + ]; + + nativeBuildInputs = [ + makeWrapper + pkg-config + ] + ++ lib.optionals jitSupport [ llvmPackages.llvm.dev nukeReferences patchelf ]; + + enableParallelBuilding = true; + + separateDebugInfo = true; + + buildFlags = [ "world-bin" ]; + + # Makes cross-compiling work when xml2-config can't be executed on the host. + # Fixed upstream in https://github.com/postgres/postgres/commit/0bc8cebdb889368abdf224aeac8bc197fe4c9ae6 + env.NIX_CFLAGS_COMPILE = lib.optionalString (olderThan "13") "-I${libxml2.dev}/include/libxml2"; + + configureFlags = [ + "--with-openssl" + "--with-libxml" + "--with-icu" + "--sysconfdir=/etc" + "--libdir=$(lib)/lib" + "--with-system-tzdata=${tzdata}/share/zoneinfo" + "--enable-debug" + (lib.optionalString systemdSupport' "--with-systemd") + (if stdenv'.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid") + ] ++ lib.optionals lz4Enabled [ "--with-lz4" ] + ++ lib.optionals zstdEnabled [ "--with-zstd" ] + ++ lib.optionals gssSupport [ "--with-gssapi" ] + ++ lib.optionals pythonSupport [ "--with-python" ] + ++ lib.optionals jitSupport [ "--with-llvm" ] + ++ lib.optionals stdenv'.isLinux [ "--with-pam" ]; + + patches = [ + (if atLeast "16" then ./patches/relative-to-symlinks-16+.patch else ./patches/relative-to-symlinks.patch) + ./patches/less-is-more.patch + ./patches/paths-for-split-outputs.patch + ./patches/specify_pkglibdir_at_runtime.patch + ./patches/paths-with-postgresql-suffix.patch + + (substituteAll { + src = ./patches/locale-binary-path.patch; + locale = "${if stdenv.isDarwin then darwin.adv_cmds else lib.getBin stdenv.cc.libc}/bin/locale"; + }) + ] ++ lib.optionals stdenv'.hostPlatform.isMusl ( + # Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 + map fetchurl (lib.attrValues muslPatches) + ) ++ lib.optionals stdenv'.isLinux [ + (if atLeast "13" then ./patches/socketdir-in-run-13+.patch else ./patches/socketdir-in-run.patch) + ]; + + installTargets = [ "install-world-bin" ]; + + postPatch = '' + # Hardcode the path to pgxs so pg_config returns the path in $out + substituteInPlace "src/common/config_info.c" --subst-var out + '' + lib.optionalString jitSupport '' + # Force lookup of jit stuff in $out instead of $lib + substituteInPlace src/backend/jit/jit.c --replace pkglib_path \"$out/lib\" + substituteInPlace src/backend/jit/llvm/llvmjit.c --replace pkglib_path \"$out/lib\" + substituteInPlace src/backend/jit/llvm/llvmjit_inline.cpp --replace pkglib_path \"$out/lib\" + ''; + + postInstall = + '' + moveToOutput "lib/pgxs" "$out" # looks strange, but not deleting it + moveToOutput "lib/libpgcommon*.a" "$out" + moveToOutput "lib/libpgport*.a" "$out" + moveToOutput "lib/libecpg*" "$out" + + # Prevent a retained dependency on gcc-wrapper. + substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv'.cc}/bin/ld ld + + if [ -z "''${dontDisableStatic:-}" ]; then + # Remove static libraries in case dynamic are available. + for i in $out/lib/*.a $lib/lib/*.a; do + name="$(basename "$i")" + ext="${stdenv'.hostPlatform.extensions.sharedLibrary}" + if [ -e "$lib/lib/''${name%.a}$ext" ] || [ -e "''${i%.a}$ext" ]; then + rm "$i" + fi + done + fi + '' + lib.optionalString jitSupport '' + # Move the bitcode and libllvmjit.so library out of $lib; otherwise, every client that + # depends on libpq.so will also have libLLVM.so in its closure too, bloating it + moveToOutput "lib/bitcode" "$out" + moveToOutput "lib/llvmjit*" "$out" + + # In the case of JIT support, prevent a retained dependency on clang-wrapper + substituteInPlace "$out/lib/pgxs/src/Makefile.global" --replace ${stdenv'.cc}/bin/clang clang + nuke-refs $out/lib/llvmjit_types.bc $(find $out/lib/bitcode -type f) + + # Stop out depending on the default output of llvm + substituteInPlace $out/lib/pgxs/src/Makefile.global \ + --replace ${llvmPackages.llvm.out}/bin "" \ + --replace '$(LLVM_BINPATH)/' "" + + # Stop out depending on the -dev output of llvm + substituteInPlace $out/lib/pgxs/src/Makefile.global \ + --replace ${llvmPackages.llvm.dev}/bin/llvm-config llvm-config \ + --replace -I${llvmPackages.llvm.dev}/include "" + + ${lib.optionalString (!stdenv'.isDarwin) '' + # Stop lib depending on the -dev output of llvm + rpath=$(patchelf --print-rpath $out/lib/llvmjit.so) + nuke-refs -e $out $out/lib/llvmjit.so + # Restore the correct rpath + patchelf $out/lib/llvmjit.so --set-rpath "$rpath" + ''} + ''; + + postFixup = lib.optionalString (!stdenv'.isDarwin && stdenv'.hostPlatform.libc == "glibc") + '' + # initdb needs access to "locale" command from glibc. + wrapProgram $out/bin/initdb --prefix PATH ":" ${glibc.bin}/bin + ''; + + doCheck = !stdenv'.isDarwin; + # autodetection doesn't seem to able to find this, but it's there. + checkTarget = "check"; + + disallowedReferences = [ stdenv'.cc ]; + + passthru = let + this = self.callPackage generic args; + jitToggle = this.override { + jitSupport = !jitSupport; + }; + in + { + psqlSchema = lib.versions.major version; + + withJIT = if jitSupport then this else jitToggle; + withoutJIT = if jitSupport then jitToggle else this; + + dlSuffix = if olderThan "16" then ".so" else stdenv.hostPlatform.extensions.sharedLibrary; + + pkgs = let + scope = { + inherit jitSupport; + inherit (llvmPackages) llvm; + postgresql = this; + stdenv = stdenv'; + }; + newSelf = self // scope; + newSuper = { callPackage = newScope (scope // this.pkgs); }; + in import ./ext newSelf newSuper; + + withPackages = postgresqlWithPackages { + inherit makeWrapper buildEnv; + postgresql = this; + } + this.pkgs; + + tests = { + postgresql-wal-receiver = import ../../../../nixos/tests/postgresql-wal-receiver.nix { + inherit (stdenv) system; + pkgs = self; + package = this; + }; + pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + } // lib.optionalAttrs jitSupport { + postgresql-jit = import ../../../../nixos/tests/postgresql-jit.nix { + inherit (stdenv) system; + pkgs = self; + package = this; + }; + }; + }; + + meta = with lib; { + homepage = "https://www.postgresql.org/"; + description = "Powerful, open source object-relational database system"; + license = licenses.postgresql; + changelog = "https://www.postgresql.org/docs/release/$%7BfinalAttrs.version%7D/"; + maintainers = with maintainers; [ thoughtpolice danbst globin ivan ma27 wolfgangwalther ]; + pkgConfigModules = [ "libecpg" "libecpg_compat" "libpgtypes" "libpq" ]; + platforms = platforms.unix; + + # JIT support doesn't work with cross-compilation. It is attempted to build LLVM-bytecode + # (`%.bc` is the corresponding `make(1)`-rule) for each sub-directory in `backend/` for + # the JIT apparently, but with a $(CLANG) that can produce binaries for the build, not the + # host-platform. + # + # I managed to get a cross-build with JIT support working with + # `depsBuildBuild = [ llvmPackages.clang ] ++ buildInputs`, but considering that the + # resulting LLVM IR isn't platform-independent this doesn't give you much. + # In fact, I tried to test the result in a VM-test, but as soon as JIT was used to optimize + # a query, postgres would coredump with `Illegal instruction`. + broken = (jitSupport && stdenv.hostPlatform != stdenv.buildPlatform) + # Allmost all tests fail FATAL errors for v12 and v13 + || (jitSupport && stdenv.hostPlatform.isMusl && olderThan "14"); + }; + }); + + postgresqlWithPackages = { postgresql, makeWrapper, buildEnv }: pkgs: f: buildEnv { + name = "postgresql-and-plugins-${postgresql.version}"; + paths = f pkgs ++ [ + postgresql + postgresql.lib + #TODO RM postgresql.man # in case user installs this into environment + ]; + nativeBuildInputs = [ makeWrapper ]; + + + # We include /bin to ensure the $out/bin directory is created, which is + # needed because we'll be removing the files from that directory in postBuild + # below. See #22653 + pathsToLink = ["/" "/bin"]; + + # Note: the duplication of executables is about 4MB size. + # So a nicer solution was patching postgresql to allow setting the + # libdir explicitly. + postBuild = '' + mkdir -p $out/bin + rm $out/bin/{pg_config,postgres,pg_ctl} + cp --target-directory=$out/bin ${postgresql}/bin/{postgres,pg_config,pg_ctl} + wrapProgram $out/bin/postgres --set NIX_PGLIBDIR $out/lib + ''; + + passthru.version = postgresql.version; + passthru.psqlSchema = postgresql.psqlSchema; + }; + +in +# passed by .nix +versionArgs: +# passed by default.nix +{ self, ... } @defaultArgs: +self.callPackage generic (defaultArgs // versionArgs) diff --git a/nix/postgresql/orioledb-17.nix b/nix/postgresql/orioledb-17.nix new file mode 100644 index 000000000..b8e5bc374 --- /dev/null +++ b/nix/postgresql/orioledb-17.nix @@ -0,0 +1,4 @@ +import ./generic.nix { + version = "17_6"; + hash = "sha256-HbuTcXNanFOl9YfvlSzQJon8CfAhc8TFwo/y7jXy51w="; +} diff --git a/nix/postgresql/patches/less-is-more.patch b/nix/postgresql/patches/less-is-more.patch new file mode 100644 index 000000000..a72d1a28f --- /dev/null +++ b/nix/postgresql/patches/less-is-more.patch @@ -0,0 +1,11 @@ +--- a/src/include/fe_utils/print.h ++++ b/src/include/fe_utils/print.h +@@ -18,7 +18,7 @@ + + /* This is not a particularly great place for this ... */ + #ifndef __CYGWIN__ +-#define DEFAULT_PAGER "more" ++#define DEFAULT_PAGER "less" + #else + #define DEFAULT_PAGER "less" + #endif diff --git a/nix/postgresql/patches/locale-binary-path.patch b/nix/postgresql/patches/locale-binary-path.patch new file mode 100644 index 000000000..8068683ab --- /dev/null +++ b/nix/postgresql/patches/locale-binary-path.patch @@ -0,0 +1,11 @@ +--- a/src/backend/commands/collationcmds.c ++++ b/src/backend/commands/collationcmds.c +@@ -611,7 +611,7 @@ pg_import_system_collations(PG_FUNCTION_ARGS) + aliases = (CollAliasData *) palloc(maxaliases * sizeof(CollAliasData)); + naliases = 0; + +- locale_a_handle = OpenPipeStream("locale -a", "r"); ++ locale_a_handle = OpenPipeStream("@locale@ -a", "r"); + if (locale_a_handle == NULL) + ereport(ERROR, + (errcode_for_file_access(), diff --git a/nix/postgresql/patches/paths-for-split-outputs.patch b/nix/postgresql/patches/paths-for-split-outputs.patch new file mode 100644 index 000000000..2134f7e81 --- /dev/null +++ b/nix/postgresql/patches/paths-for-split-outputs.patch @@ -0,0 +1,11 @@ +--- a/src/common/config_info.c ++++ b/src/common/config_info.c +@@ -118,7 +118,7 @@ + i++; + + configdata[i].name = pstrdup("PGXS"); ++ strlcpy(path, "@out@/lib", sizeof(path)); +- get_pkglib_path(my_exec_path, path); + strlcat(path, "/pgxs/src/makefiles/pgxs.mk", sizeof(path)); + cleanup_path(path); + configdata[i].setting = pstrdup(path); diff --git a/nix/postgresql/patches/paths-with-postgresql-suffix.patch b/nix/postgresql/patches/paths-with-postgresql-suffix.patch new file mode 100644 index 000000000..04d2f556e --- /dev/null +++ b/nix/postgresql/patches/paths-with-postgresql-suffix.patch @@ -0,0 +1,41 @@ +Nix outputs put the `name' in each store path like +/nix/store/...-. This was confusing the Postgres make script +because it thought its data directory already had postgresql in its +directory. This lead to Postgres installing all of its fils in +$out/share. To fix this, we just look for postgres or psql in the part +after the / using make's notdir. + +--- +--- a/src/Makefile.global.in ++++ b/src/Makefile.global.in +@@ -102,15 +102,15 @@ datarootdir := @datarootdir@ + bindir := @bindir@ + + datadir := @datadir@ +-ifeq "$(findstring pgsql, $(datadir))" "" +-ifeq "$(findstring postgres, $(datadir))" "" ++ifeq "$(findstring pgsql, $(notdir $(datadir)))" "" ++ifeq "$(findstring postgres, $(notdir $(datadir)))" "" + override datadir := $(datadir)/postgresql + endif + endif + + sysconfdir := @sysconfdir@ +-ifeq "$(findstring pgsql, $(sysconfdir))" "" +-ifeq "$(findstring postgres, $(sysconfdir))" "" ++ifeq "$(findstring pgsql, $(notdir $(sysconfdir)))" "" ++ifeq "$(findstring postgres, $(notdir $(sysconfdir)))" "" + override sysconfdir := $(sysconfdir)/postgresql + endif + endif +@@ -136,8 +136,8 @@ endif + mandir := @mandir@ + + docdir := @docdir@ +-ifeq "$(findstring pgsql, $(docdir))" "" +-ifeq "$(findstring postgres, $(docdir))" "" ++ifeq "$(findstring pgsql, $(notdir $(docdir)))" "" ++ifeq "$(findstring postgres, $(notdir $(docdir)))" "" + override docdir := $(docdir)/postgresql + endif + endif diff --git a/nix/postgresql/patches/relative-to-symlinks-16+.patch b/nix/postgresql/patches/relative-to-symlinks-16+.patch new file mode 100644 index 000000000..996072ebd --- /dev/null +++ b/nix/postgresql/patches/relative-to-symlinks-16+.patch @@ -0,0 +1,13 @@ +On NixOS we *want* stuff relative to symlinks. +--- +--- a/src/common/exec.c ++++ b/src/common/exec.c +@@ -238,6 +238,8 @@ + static int + normalize_exec_path(char *path) + { ++ return 0; ++ + /* + * We used to do a lot of work ourselves here, but now we just let + * realpath(3) do all the heavy lifting. diff --git a/nix/postgresql/patches/relative-to-symlinks.patch b/nix/postgresql/patches/relative-to-symlinks.patch new file mode 100644 index 000000000..c9b199baf --- /dev/null +++ b/nix/postgresql/patches/relative-to-symlinks.patch @@ -0,0 +1,13 @@ +On NixOS we *want* stuff relative to symlinks. +--- +--- a/src/common/exec.c ++++ b/src/common/exec.c +@@ -218,6 +218,8 @@ + static int + resolve_symlinks(char *path) + { ++ return 0; ++ + #ifdef HAVE_READLINK + struct stat buf; + char orig_wd[MAXPGPATH], diff --git a/nix/postgresql/patches/socketdir-in-run-13+.patch b/nix/postgresql/patches/socketdir-in-run-13+.patch new file mode 100644 index 000000000..fd808b609 --- /dev/null +++ b/nix/postgresql/patches/socketdir-in-run-13+.patch @@ -0,0 +1,11 @@ +--- a/src/include/pg_config_manual.h ++++ b/src/include/pg_config_manual.h +@@ -201,7 +201,7 @@ + * support them yet. + */ + #ifndef WIN32 +-#define DEFAULT_PGSOCKET_DIR "/tmp" ++#define DEFAULT_PGSOCKET_DIR "/run/postgresql" + #else + #define DEFAULT_PGSOCKET_DIR "" + #endif diff --git a/nix/postgresql/patches/socketdir-in-run.patch b/nix/postgresql/patches/socketdir-in-run.patch new file mode 100644 index 000000000..4932ef69e --- /dev/null +++ b/nix/postgresql/patches/socketdir-in-run.patch @@ -0,0 +1,11 @@ +--- a/src/include/pg_config_manual.h ++++ b/src/include/pg_config_manual.h +@@ -179,7 +179,7 @@ + * here's where to twiddle it. You can also override this at runtime + * with the postmaster's -k switch. + */ +-#define DEFAULT_PGSOCKET_DIR "/tmp" ++#define DEFAULT_PGSOCKET_DIR "/run/postgresql" + + /* + * This is the default event source for Windows event log. diff --git a/nix/postgresql/patches/specify_pkglibdir_at_runtime.patch b/nix/postgresql/patches/specify_pkglibdir_at_runtime.patch new file mode 100644 index 000000000..b94fc9efc --- /dev/null +++ b/nix/postgresql/patches/specify_pkglibdir_at_runtime.patch @@ -0,0 +1,28 @@ +--- a/src/port/path.c ++++ b/src/port/path.c +@@ -714,7 +714,11 @@ + void + get_lib_path(const char *my_exec_path, char *ret_path) + { +- make_relative_path(ret_path, LIBDIR, PGBINDIR, my_exec_path); ++ char const * const nix_pglibdir = getenv("NIX_PGLIBDIR"); ++ if(nix_pglibdir == NULL) ++ make_relative_path(ret_path, LIBDIR, PGBINDIR, my_exec_path); ++ else ++ make_relative_path(ret_path, nix_pglibdir, PGBINDIR, my_exec_path); + } + + /* +@@ -723,7 +727,11 @@ + void + get_pkglib_path(const char *my_exec_path, char *ret_path) + { +- make_relative_path(ret_path, PKGLIBDIR, PGBINDIR, my_exec_path); ++ char const * const nix_pglibdir = getenv("NIX_PGLIBDIR"); ++ if(nix_pglibdir == NULL) ++ make_relative_path(ret_path, PKGLIBDIR, PGBINDIR, my_exec_path); ++ else ++ make_relative_path(ret_path, nix_pglibdir, PGBINDIR, my_exec_path); + } + + /* diff --git a/nix/supabase-groonga.nix b/nix/supabase-groonga.nix new file mode 100644 index 000000000..5035f369f --- /dev/null +++ b/nix/supabase-groonga.nix @@ -0,0 +1,74 @@ +{ lib, stdenv, cmake, fetchurl, kytea, msgpack-c, mecab, pkg-config, rapidjson +, testers, xxHash, zstd, postgresqlPackages, makeWrapper, suggestSupport ? false +, zeromq, libevent, openssl, lz4Support ? false, lz4, zlibSupport ? true, zlib +, writeShellScriptBin, callPackage }: +let mecab-naist-jdic = callPackage ./ext/mecab-naist-jdic { }; +in stdenv.mkDerivation (finalAttrs: { + pname = "supabase-groonga"; + version = "14.0.5"; + src = fetchurl { + url = + "https://packages.groonga.org/source/groonga/groonga-$%7BfinalAttrs.version%7D.tar.gz"; + hash = "sha256-y4UGnv8kK0z+br8wXpPf57NMXkdEJHcLCuTvYiubnIc="; + }; + patches = + [ ./fix-cmake-install-path.patch ./do-not-use-vendored-libraries.patch ]; + nativeBuildInputs = [ cmake pkg-config makeWrapper ]; + buildInputs = [ rapidjson xxHash zstd mecab kytea msgpack-c ] + ++ lib.optionals lz4Support [ lz4 ] ++ lib.optional zlibSupport [ zlib ] + ++ lib.optionals suggestSupport [ zeromq libevent ]; + cmakeFlags = [ + "-DWITH_MECAB=ON" + "-DMECAB_DICDIR=${mecab-naist-jdic}/lib/mecab/dic/naist-jdic" + "-DMECAB_CONFIG=${mecab}/bin/mecab-config" + "-DENABLE_MECAB_TOKENIZER=ON" + "-DMECAB_INCLUDE_DIR=${mecab}/include" + "-DMECAB_LIBRARY=${mecab}/lib/libmecab.so" + "-DGROONGA_ENABLE_TOKENIZER_MECAB=YES" + "-DGRN_WITH_MECAB=YES" + ]; + preConfigure = '' + export MECAB_DICDIR=${mecab-naist-jdic}/lib/mecab/dic/naist-jdic + echo "MeCab dictionary directory is: $MECAB_DICDIR" + ''; + buildPhase = '' + cmake --build . -- VERBOSE=1 + grep -i mecab CMakeCache.txt || (echo "MeCab not detected in CMake cache" && exit 1) + echo "CMake cache contents related to MeCab:" + grep -i mecab CMakeCache.txt + ''; + + # installPhase = '' + # mkdir -p $out/bin $out/lib/groonga/plugins + # cp -r lib/groonga/plugins/* $out/lib/groonga/plugins + # cp -r bin/* $out/bin + # echo "Installed Groonga plugins:" + # ls -l $out/lib/groonga/plugins + # ''; + + postInstall = '' + echo "Searching for MeCab-related files:" + find $out -name "*mecab*" + + echo "Checking Groonga plugins directory:" + ls -l $out/lib/groonga/plugins + + echo "Wrapping Groonga binary:" + wrapProgram $out/bin/groonga \ + --set GRN_PLUGINS_DIR $out/lib/groonga/plugins + + ''; + env.NIX_CFLAGS_COMPILE = + lib.optionalString zlibSupport "-I${zlib.dev}/include"; + + meta = with lib; { + homepage = "https://groonga.org/"; + description = "Open-source fulltext search engine and column store"; + license = licenses.lgpl21; + platforms = platforms.all; + longDescription = '' + Groonga is an open-source fulltext search engine and column store. + It lets you write high-performance applications that requires fulltext search. + ''; + }; +}) diff --git a/nix/tests/expected/auth.out b/nix/tests/expected/auth.out new file mode 100644 index 000000000..419e74a41 --- /dev/null +++ b/nix/tests/expected/auth.out @@ -0,0 +1,235 @@ +-- auth schema owner +select + n.nspname as schema_name, + r.rolname as owner +from + pg_namespace n +join + pg_roles r on n.nspowner = r.oid +where + n.nspname = 'auth'; + schema_name | owner +-------------+---------------- + auth | supabase_admin +(1 row) + +-- auth schema tables with owners and rls policies +select + ns.nspname as schema_name, + c.relname as table_name, + r.rolname as owner, + c.relrowsecurity as rls_enabled, + string_agg(p.polname, ', ' order by p.polname) as rls_policies +from + pg_class c +join + pg_namespace ns on c.relnamespace = ns.oid +join + pg_roles r on c.relowner = r.oid +left join + pg_policy p on p.polrelid = c.oid +where + ns.nspname = 'auth' + and c.relkind = 'r' +group by + ns.nspname, c.relname, r.rolname, c.relrowsecurity +order by + c.relname; + schema_name | table_name | owner | rls_enabled | rls_policies +-------------+-------------------+---------------------+-------------+-------------- + auth | audit_log_entries | supabase_auth_admin | f | + auth | instances | supabase_auth_admin | f | + auth | refresh_tokens | supabase_auth_admin | f | + auth | schema_migrations | supabase_auth_admin | f | + auth | users | supabase_auth_admin | f | +(5 rows) + +-- auth schema objects with roles privileges +select + ns.nspname as schema_name, + c.relname as table_name, + r.rolname as role_name, + a.privilege_type, + a.is_grantable +from + pg_class c +join + pg_namespace ns on c.relnamespace = ns.oid +cross join lateral + aclexplode(c.relacl) as a +join + pg_roles r on a.grantee = r.oid +where + ns.nspname = 'auth' + and c.relkind in ('r', 'v', 'm') + and a.privilege_type <> 'MAINTAIN' +order by + c.relname, + r.rolname, + a.privilege_type; + schema_name | table_name | role_name | privilege_type | is_grantable +-------------+-------------------+---------------------+----------------+-------------- + auth | audit_log_entries | dashboard_user | DELETE | f + auth | audit_log_entries | dashboard_user | INSERT | f + auth | audit_log_entries | dashboard_user | REFERENCES | f + auth | audit_log_entries | dashboard_user | SELECT | f + auth | audit_log_entries | dashboard_user | TRIGGER | f + auth | audit_log_entries | dashboard_user | TRUNCATE | f + auth | audit_log_entries | dashboard_user | UPDATE | f + auth | audit_log_entries | postgres | DELETE | f + auth | audit_log_entries | postgres | INSERT | f + auth | audit_log_entries | postgres | REFERENCES | f + auth | audit_log_entries | postgres | SELECT | f + auth | audit_log_entries | postgres | TRIGGER | f + auth | audit_log_entries | postgres | TRUNCATE | f + auth | audit_log_entries | postgres | UPDATE | f + auth | audit_log_entries | supabase_auth_admin | DELETE | f + auth | audit_log_entries | supabase_auth_admin | INSERT | f + auth | audit_log_entries | supabase_auth_admin | REFERENCES | f + auth | audit_log_entries | supabase_auth_admin | SELECT | f + auth | audit_log_entries | supabase_auth_admin | TRIGGER | f + auth | audit_log_entries | supabase_auth_admin | TRUNCATE | f + auth | audit_log_entries | supabase_auth_admin | UPDATE | f + auth | instances | dashboard_user | DELETE | f + auth | instances | dashboard_user | INSERT | f + auth | instances | dashboard_user | REFERENCES | f + auth | instances | dashboard_user | SELECT | f + auth | instances | dashboard_user | TRIGGER | f + auth | instances | dashboard_user | TRUNCATE | f + auth | instances | dashboard_user | UPDATE | f + auth | instances | postgres | DELETE | f + auth | instances | postgres | INSERT | f + auth | instances | postgres | REFERENCES | f + auth | instances | postgres | SELECT | f + auth | instances | postgres | TRIGGER | f + auth | instances | postgres | TRUNCATE | f + auth | instances | postgres | UPDATE | f + auth | instances | supabase_auth_admin | DELETE | f + auth | instances | supabase_auth_admin | INSERT | f + auth | instances | supabase_auth_admin | REFERENCES | f + auth | instances | supabase_auth_admin | SELECT | f + auth | instances | supabase_auth_admin | TRIGGER | f + auth | instances | supabase_auth_admin | TRUNCATE | f + auth | instances | supabase_auth_admin | UPDATE | f + auth | refresh_tokens | dashboard_user | DELETE | f + auth | refresh_tokens | dashboard_user | INSERT | f + auth | refresh_tokens | dashboard_user | REFERENCES | f + auth | refresh_tokens | dashboard_user | SELECT | f + auth | refresh_tokens | dashboard_user | TRIGGER | f + auth | refresh_tokens | dashboard_user | TRUNCATE | f + auth | refresh_tokens | dashboard_user | UPDATE | f + auth | refresh_tokens | postgres | DELETE | f + auth | refresh_tokens | postgres | INSERT | f + auth | refresh_tokens | postgres | REFERENCES | f + auth | refresh_tokens | postgres | SELECT | f + auth | refresh_tokens | postgres | TRIGGER | f + auth | refresh_tokens | postgres | TRUNCATE | f + auth | refresh_tokens | postgres | UPDATE | f + auth | refresh_tokens | supabase_auth_admin | DELETE | f + auth | refresh_tokens | supabase_auth_admin | INSERT | f + auth | refresh_tokens | supabase_auth_admin | REFERENCES | f + auth | refresh_tokens | supabase_auth_admin | SELECT | f + auth | refresh_tokens | supabase_auth_admin | TRIGGER | f + auth | refresh_tokens | supabase_auth_admin | TRUNCATE | f + auth | refresh_tokens | supabase_auth_admin | UPDATE | f + auth | schema_migrations | supabase_auth_admin | DELETE | f + auth | schema_migrations | supabase_auth_admin | INSERT | f + auth | schema_migrations | supabase_auth_admin | REFERENCES | f + auth | schema_migrations | supabase_auth_admin | SELECT | f + auth | schema_migrations | supabase_auth_admin | TRIGGER | f + auth | schema_migrations | supabase_auth_admin | TRUNCATE | f + auth | schema_migrations | supabase_auth_admin | UPDATE | f + auth | users | dashboard_user | DELETE | f + auth | users | dashboard_user | INSERT | f + auth | users | dashboard_user | REFERENCES | f + auth | users | dashboard_user | SELECT | f + auth | users | dashboard_user | TRIGGER | f + auth | users | dashboard_user | TRUNCATE | f + auth | users | dashboard_user | UPDATE | f + auth | users | postgres | DELETE | f + auth | users | postgres | INSERT | f + auth | users | postgres | REFERENCES | f + auth | users | postgres | SELECT | f + auth | users | postgres | TRIGGER | f + auth | users | postgres | TRUNCATE | f + auth | users | postgres | UPDATE | f + auth | users | supabase_auth_admin | DELETE | f + auth | users | supabase_auth_admin | INSERT | f + auth | users | supabase_auth_admin | REFERENCES | f + auth | users | supabase_auth_admin | SELECT | f + auth | users | supabase_auth_admin | TRIGGER | f + auth | users | supabase_auth_admin | TRUNCATE | f + auth | users | supabase_auth_admin | UPDATE | f +(91 rows) + +-- auth indexes with owners +select + ns.nspname as table_schema, + t.relname as table_name, + i.relname as index_name, + r.rolname as index_owner +from + pg_class t +join + pg_namespace ns on t.relnamespace = ns.oid +join + pg_index idx on t.oid = idx.indrelid +join + pg_class i on idx.indexrelid = i.oid +join + pg_roles r on i.relowner = r.oid +where + ns.nspname = 'auth' +order by + t.relname, i.relname; + table_schema | table_name | index_name | index_owner +--------------+-------------------+----------------------------------------+--------------------- + auth | audit_log_entries | audit_log_entries_pkey | supabase_auth_admin + auth | audit_log_entries | audit_logs_instance_id_idx | supabase_auth_admin + auth | instances | instances_pkey | supabase_auth_admin + auth | refresh_tokens | refresh_tokens_instance_id_idx | supabase_auth_admin + auth | refresh_tokens | refresh_tokens_instance_id_user_id_idx | supabase_auth_admin + auth | refresh_tokens | refresh_tokens_pkey | supabase_auth_admin + auth | refresh_tokens | refresh_tokens_token_idx | supabase_auth_admin + auth | schema_migrations | schema_migrations_pkey | supabase_auth_admin + auth | users | users_email_key | supabase_auth_admin + auth | users | users_instance_id_email_idx | supabase_auth_admin + auth | users | users_instance_id_idx | supabase_auth_admin + auth | users | users_pkey | supabase_auth_admin +(12 rows) + +-- auth schema functions with owners +select + n.nspname as schema_name, + p.proname as function_name, + r.rolname as owner +from + pg_proc p +join + pg_namespace n on p.pronamespace = n.oid +join + pg_roles r on p.proowner = r.oid +where + n.nspname = 'auth' +order by + p.proname; + schema_name | function_name | owner +-------------+---------------+--------------------- + auth | email | supabase_auth_admin + auth | role | supabase_auth_admin + auth | uid | supabase_auth_admin +(3 rows) + +-- auth service schema migrations +select * from auth.schema_migrations; + version +---------------- + 20171026211738 + 20171026211808 + 20171026211834 + 20180103212743 + 20180108183307 + 20180119214651 + 20180125194653 +(7 rows) + diff --git a/nix/tests/expected/evtrigs.out b/nix/tests/expected/evtrigs.out new file mode 100644 index 000000000..3e3f523fc --- /dev/null +++ b/nix/tests/expected/evtrigs.out @@ -0,0 +1,28 @@ +select + e.evtname, + e.evtowner::regrole as evtowner, + n_func.nspname as evtfunction_schema, + e.evtfoid::regproc as evtfunction, + p.proowner::regrole as function_owner +from pg_event_trigger e +join pg_proc p + on e.evtfoid = p.oid +join pg_namespace n_func + on p.pronamespace = n_func.oid +where p.prorettype = 'event_trigger'::regtype; + evtname | evtowner | evtfunction_schema | evtfunction | function_owner +----------------------------------------+----------------+--------------------+------------------------------------+---------------- + issue_pg_graphql_access | supabase_admin | extensions | grant_pg_graphql_access | supabase_admin + issue_graphql_placeholder | supabase_admin | extensions | set_graphql_placeholder | supabase_admin + pgrst_ddl_watch | supabase_admin | extensions | pgrst_ddl_watch | supabase_admin + pgrst_drop_watch | supabase_admin | extensions | pgrst_drop_watch | supabase_admin + graphql_watch_ddl | supabase_admin | graphql | graphql.increment_schema_version | supabase_admin + graphql_watch_drop | supabase_admin | graphql | graphql.increment_schema_version | supabase_admin + issue_pg_cron_access | supabase_admin | extensions | grant_pg_cron_access | supabase_admin + issue_pg_net_access | supabase_admin | extensions | grant_pg_net_access | supabase_admin + pg_tle_event_trigger_for_drop_function | supabase_admin | pgtle | pgtle.pg_tle_feature_info_sql_drop | supabase_admin + pgaudit_ddl_command_end | supabase_admin | public | pgaudit_ddl_command_end | supabase_admin + pgaudit_sql_drop | supabase_admin | public | pgaudit_sql_drop | supabase_admin + pgsodium_trg_mask_update | supabase_admin | pgsodium | pgsodium.trg_mask_update | supabase_admin +(12 rows) + diff --git a/nix/tests/expected/extensions_schema.out b/nix/tests/expected/extensions_schema.out new file mode 100644 index 000000000..7d3dffa95 --- /dev/null +++ b/nix/tests/expected/extensions_schema.out @@ -0,0 +1,22 @@ +-- all default extensions are installed in a schema "extensions" +-- we don't include the version as that will break often, we only care about +-- ensuring these extensions are present +select + e.extname as extension_name, + n.nspname as schema_name, + e.extowner::regrole as extension_owner +from + pg_extension e +join + pg_namespace n on e.extnamespace = n.oid +where + n.nspname = 'extensions' and e.extname != 'pgjwt' +order by + e.extname; + extension_name | schema_name | extension_owner +--------------------+-------------+----------------- + pg_stat_statements | extensions | supabase_admin + pgcrypto | extensions | supabase_admin + uuid-ossp | extensions | supabase_admin +(3 rows) + diff --git a/nix/tests/expected/hypopg.out b/nix/tests/expected/hypopg.out new file mode 100644 index 000000000..35c8a5b2d --- /dev/null +++ b/nix/tests/expected/hypopg.out @@ -0,0 +1,14 @@ +create schema v; +create table v.samp( + id int +); +select 1 from hypopg_create_index($$ + create index on v.samp(id) +$$); + ?column? +---------- + 1 +(1 row) + +drop schema v cascade; +NOTICE: drop cascades to table v.samp diff --git a/nix/tests/expected/index_advisor.out b/nix/tests/expected/index_advisor.out new file mode 100644 index 000000000..5a269ba54 --- /dev/null +++ b/nix/tests/expected/index_advisor.out @@ -0,0 +1,16 @@ +create schema v; +create table v.book( + id int primary key, + title text not null +); +select + index_statements, errors +from + index_advisor('select id from v.book where title = $1'); + index_statements | errors +------------------------------------------------+-------- + {"CREATE INDEX ON v.book USING btree (title)"} | {} +(1 row) + +drop schema v cascade; +NOTICE: drop cascades to table v.book diff --git a/nix/tests/expected/pg-safeupdate.out b/nix/tests/expected/pg-safeupdate.out new file mode 100644 index 000000000..f9100116a --- /dev/null +++ b/nix/tests/expected/pg-safeupdate.out @@ -0,0 +1,12 @@ +load 'safeupdate'; +set safeupdate.enabled=1; +create schema v; +create table v.foo( + id int, + val text +); +update v.foo + set val = 'bar'; +ERROR: UPDATE requires a WHERE clause +drop schema v cascade; +NOTICE: drop cascades to table v.foo diff --git a/nix/tests/expected/pg_graphql.out b/nix/tests/expected/pg_graphql.out new file mode 100644 index 000000000..63a352090 --- /dev/null +++ b/nix/tests/expected/pg_graphql.out @@ -0,0 +1,259 @@ +begin; + comment on schema public is '@graphql({"inflect_names": true})'; + create table account( + id serial primary key, + email varchar(255) not null, + priority int, + status text default 'active' + ); + create table blog( + id serial primary key, + owner_id integer not null references account(id) + ); + comment on table blog is e'@graphql({"totalCount": {"enabled": true}})'; + -- Make sure functions still work + create function _echo_email(account) + returns text + language sql + as $$ select $1.email $$; + /* + Literals + */ + select graphql.resolve($$ + mutation { + insertIntoAccountCollection(objects: [ + { email: "foo@barsley.com", priority: 1 }, + { email: "bar@foosworth.com" } + ]) { + affectedCount + records { + id + status + echoEmail + blogCollection { + totalCount + } + } + } + } + $$); + resolve +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + {"data": {"insertIntoAccountCollection": {"records": [{"id": 1, "status": "active", "echoEmail": "foo@barsley.com", "blogCollection": {"totalCount": 0}}, {"id": 2, "status": "active", "echoEmail": "bar@foosworth.com", "blogCollection": {"totalCount": 0}}], "affectedCount": 2}}} +(1 row) + + select graphql.resolve($$ + mutation { + insertIntoBlogCollection(objects: [{ + ownerId: 1 + }]) { + records { + id + owner { + id + } + } + } + } + $$); + resolve +-------------------------------------------------------------------------------------- + {"data": {"insertIntoBlogCollection": {"records": [{"id": 1, "owner": {"id": 1}}]}}} +(1 row) + + -- Override a default on status with null + select graphql.resolve($$ + mutation { + insertIntoAccountCollection(objects: [ + { email: "baz@baz.com", status: null }, + ]) { + affectedCount + records { + email + status + } + } + } + $$); + resolve +------------------------------------------------------------------------------------------------------------------------ + {"data": {"insertIntoAccountCollection": {"records": [{"email": "baz@baz.com", "status": null}], "affectedCount": 1}}} +(1 row) + + /* + Variables + */ + select graphql.resolve($$ + mutation newAccount($emailAddress: String) { + xyz: insertIntoAccountCollection(objects: [ + { email: $emailAddress }, + { email: "other@email.com" } + ]) { + affectedCount + records { + id + email + } + } + } + $$, + variables := '{"emailAddress": "foo@bar.com"}'::jsonb + ); + resolve +-------------------------------------------------------------------------------------------------------------------------------- + {"data": {"xyz": {"records": [{"id": 4, "email": "foo@bar.com"}, {"id": 5, "email": "other@email.com"}], "affectedCount": 2}}} +(1 row) + + -- Variable override of default with null results in null + select graphql.resolve($$ + mutation newAccount($status: String) { + xyz: insertIntoAccountCollection(objects: [ + { email: "1@email.com", status: $status} + ]) { + affectedCount + records { + email + status + } + } + } + $$, + variables := '{"status": null}'::jsonb + ); + resolve +------------------------------------------------------------------------------------------------ + {"data": {"xyz": {"records": [{"email": "1@email.com", "status": null}], "affectedCount": 1}}} +(1 row) + + -- Skipping variable override of default results in default + select graphql.resolve($$ + mutation newAccount($status: String) { + xyz: insertIntoAccountCollection(objects: [ + { email: "x@y.com", status: $status}, + ]) { + affectedCount + records { + email + status + } + } + } + $$, + variables := '{}'::jsonb + ); + resolve +------------------------------------------------------------------------------------------------ + {"data": {"xyz": {"records": [{"email": "x@y.com", "status": "active"}], "affectedCount": 1}}} +(1 row) + + select graphql.resolve($$ + mutation newAccount($acc: AccountInsertInput!) { + insertIntoAccountCollection(objects: [$acc]) { + affectedCount + records { + id + email + } + } + } + $$, + variables := '{"acc": {"email": "bar@foo.com"}}'::jsonb + ); + resolve +----------------------------------------------------------------------------------------------------------------- + {"data": {"insertIntoAccountCollection": {"records": [{"id": 8, "email": "bar@foo.com"}], "affectedCount": 1}}} +(1 row) + + select graphql.resolve($$ + mutation newAccounts($acc: [AccountInsertInput!]!) { + insertIntoAccountCollection(objects: $accs) { + affectedCount + records { + id + email + } + } + } + $$, + variables := '{"accs": [{"email": "bar@foo.com"}]}'::jsonb + ); + resolve +----------------------------------------------------------------------------------------------------------------- + {"data": {"insertIntoAccountCollection": {"records": [{"id": 9, "email": "bar@foo.com"}], "affectedCount": 1}}} +(1 row) + + -- Single object coerces to a list + select graphql.resolve($$ + mutation { + insertIntoBlogCollection(objects: {ownerId: 1}) { + affectedCount + } + } + $$); + resolve +-------------------------------------------------------------- + {"data": {"insertIntoBlogCollection": {"affectedCount": 1}}} +(1 row) + + /* + Errors + */ + -- Field does not exist + select graphql.resolve($$ + mutation createAccount($acc: AccountInsertInput) { + insertIntoAccountCollection(objects: [$acc]) { + affectedCount + records { + id + email + } + } + } + $$, + variables := '{"acc": {"doesNotExist": "other"}}'::jsonb + ); + resolve +--------------------------------------------------------------------------------------------------------------------- + {"data": null, "errors": [{"message": "Input for type AccountInsertInput contains extra keys [\"doesNotExist\"]"}]} +(1 row) + + -- Wrong input type (list of string, not list of object) + select graphql.resolve($$ + mutation { + insertIntoBlogCollection(objects: ["not an object"]) { + affectedCount + } + } + $$); + resolve +----------------------------------------------------------------------------------- + {"data": null, "errors": [{"message": "Invalid input for BlogInsertInput type"}]} +(1 row) + + -- objects argument is missing + select graphql.resolve($$ + mutation { + insertIntoBlogCollection { + affectedCount + } + } + $$); + resolve +--------------------------------------------------------------------------- + {"data": null, "errors": [{"message": "Invalid input for NonNull type"}]} +(1 row) + + -- Empty call + select graphql.resolve($$ + mutation { + insertIntoBlogCollection(objects: []) { + affectedCount + } + } + $$); + resolve +-------------------------------------------------------------------------------------------- + {"data": null, "errors": [{"message": "At least one record must be provided to objects"}]} +(1 row) + +rollback; diff --git a/nix/tests/expected/pg_hashids.out b/nix/tests/expected/pg_hashids.out new file mode 100644 index 000000000..393218e93 --- /dev/null +++ b/nix/tests/expected/pg_hashids.out @@ -0,0 +1,36 @@ +select id_encode(1001); -- Result: jNl + id_encode +----------- + jNl +(1 row) + +select id_encode(1234567, 'This is my salt'); -- Result: Pdzxp + id_encode +----------- + Pdzxp +(1 row) + +select id_encode(1234567, 'This is my salt', 10); -- Result: PlRPdzxpR7 + id_encode +------------ + PlRPdzxpR7 +(1 row) + +select id_encode(1234567, 'This is my salt', 10, 'abcdefghijABCDxFGHIJ1234567890'); -- Result: 3GJ956J9B9 + id_encode +------------ + 3GJ956J9B9 +(1 row) + +select id_decode('PlRPdzxpR7', 'This is my salt', 10); -- Result: 1234567 + id_decode +----------- + {1234567} +(1 row) + +select id_decode('3GJ956J9B9', 'This is my salt', 10, 'abcdefghijABCDxFGHIJ1234567890'); -- Result: 1234567 + id_decode +----------- + {1234567} +(1 row) + diff --git a/nix/tests/expected/pg_jsonschema.out b/nix/tests/expected/pg_jsonschema.out new file mode 100644 index 000000000..c291141ac --- /dev/null +++ b/nix/tests/expected/pg_jsonschema.out @@ -0,0 +1,73 @@ +begin; +-- Test json_matches_schema +create table customer( + id serial primary key, + metadata json, + check ( + json_matches_schema( + '{ + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string", + "maxLength": 16 + } + } + } + }', + metadata + ) + ) +); +insert into customer(metadata) +values ('{"tags": ["vip", "darkmode-ui"]}'); +-- Test jsonb_matches_schema +select + jsonb_matches_schema( + '{ + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string", + "maxLength": 16 + } + } + } + }', + '{"tags": ["vip", "darkmode-ui"]}'::jsonb +); + jsonb_matches_schema +---------------------- + t +(1 row) + +-- Test jsonschema_is_valid +select + jsonschema_is_valid( + '{ + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string", + "maxLength": 16 + } + } + } + }'); + jsonschema_is_valid +--------------------- + t +(1 row) + +-- Test invalid payload +insert into customer(metadata) +values ('{"tags": [1, 3]}'); +ERROR: new row for relation "customer" violates check constraint "customer_metadata_check" +DETAIL: Failing row contains (2, {"tags": [1, 3]}). +rollback; diff --git a/nix/tests/expected/pg_net.out b/nix/tests/expected/pg_net.out new file mode 100644 index 000000000..6b3ca5b4b --- /dev/null +++ b/nix/tests/expected/pg_net.out @@ -0,0 +1,11 @@ +-- This is a very basic test because you can't get the value returned +-- by a pg_net request in the same transaction that created it; +select + net.http_get ( + 'https://postman-echo.com/get?foo1=bar1&foo2=bar2' + ) as request_id; + request_id +------------ + 1 +(1 row) + diff --git a/nix/tests/expected/pg_plan_filter.out b/nix/tests/expected/pg_plan_filter.out new file mode 100644 index 000000000..4bdcd6555 --- /dev/null +++ b/nix/tests/expected/pg_plan_filter.out @@ -0,0 +1,16 @@ +begin; + load 'plan_filter'; + create schema v; + -- create a sample table + create table v.test_table ( + id serial primary key, + data text + ); + -- insert some test data + insert into v.test_table (data) + values ('sample1'), ('sample2'), ('sample3'); + set local plan_filter.statement_cost_limit = 0.001; + select * from v.test_table; +ERROR: plan cost limit exceeded +HINT: The plan for your query shows that it would probably have an excessive run time. This may be due to a logic error in the SQL, or it maybe just a very costly query. Rewrite your query or increase the configuration parameter "plan_filter.statement_cost_limit". +rollback; diff --git a/nix/tests/expected/pg_tle.out b/nix/tests/expected/pg_tle.out new file mode 100644 index 000000000..387e63e03 --- /dev/null +++ b/nix/tests/expected/pg_tle.out @@ -0,0 +1,92 @@ +set client_min_messages = warning; +select + pgtle.install_extension( + 'pg_distance', + '0.1', + 'Distance functions for two points', + $_pg_tle_$ + CREATE FUNCTION dist(x1 float8, y1 float8, x2 float8, y2 float8, norm int) + RETURNS float8 + AS $$ + SELECT (abs(x2 - x1) ^ norm + abs(y2 - y1) ^ norm) ^ (1::float8 / norm); + $$ LANGUAGE SQL; + + CREATE FUNCTION manhattan_dist(x1 float8, y1 float8, x2 float8, y2 float8) + RETURNS float8 + AS $$ + SELECT dist(x1, y1, x2, y2, 1); + $$ LANGUAGE SQL; + + CREATE FUNCTION euclidean_dist(x1 float8, y1 float8, x2 float8, y2 float8) + RETURNS float8 + AS $$ + SELECT dist(x1, y1, x2, y2, 2); + $$ LANGUAGE SQL; + $_pg_tle_$ + ); + install_extension +------------------- + t +(1 row) + +create extension pg_distance; +select manhattan_dist(1, 1, 5, 5)::numeric(10,2); + manhattan_dist +---------------- + 8.00 +(1 row) + +select euclidean_dist(1, 1, 5, 5)::numeric(10,2); + euclidean_dist +---------------- + 5.66 +(1 row) + +SELECT pgtle.install_update_path( + 'pg_distance', + '0.1', + '0.2', + $_pg_tle_$ + CREATE OR REPLACE FUNCTION dist(x1 float8, y1 float8, x2 float8, y2 float8, norm int) + RETURNS float8 + AS $$ + SELECT (abs(x2 - x1) ^ norm + abs(y2 - y1) ^ norm) ^ (1::float8 / norm); + $$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE; + + CREATE OR REPLACE FUNCTION manhattan_dist(x1 float8, y1 float8, x2 float8, y2 float8) + RETURNS float8 + AS $$ + SELECT dist(x1, y1, x2, y2, 1); + $$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE; + + CREATE OR REPLACE FUNCTION euclidean_dist(x1 float8, y1 float8, x2 float8, y2 float8) + RETURNS float8 + AS $$ + SELECT dist(x1, y1, x2, y2, 2); + $$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE; + $_pg_tle_$ + ); + install_update_path +--------------------- + t +(1 row) + +select + pgtle.set_default_version('pg_distance', '0.2'); + set_default_version +--------------------- + t +(1 row) + +alter extension pg_distance update; +drop extension pg_distance; +select + pgtle.uninstall_extension('pg_distance'); + uninstall_extension +--------------------- + t +(1 row) + +-- Restore original state if any of the above fails +drop extension pg_tle cascade; +create extension pg_tle; diff --git a/nix/tests/expected/pgaudit.out b/nix/tests/expected/pgaudit.out new file mode 100644 index 000000000..1937be6b6 --- /dev/null +++ b/nix/tests/expected/pgaudit.out @@ -0,0 +1,24 @@ +-- Note: there is no test that the logs were correctly output. Only checking for exceptions +set pgaudit.log = 'write, ddl'; +set pgaudit.log_relation = on; +set pgaudit.log_level = notice; +create schema v; +create table v.account( + id int, + name text, + password text, + description text +); +insert into v.account (id, name, password, description) +values (1, 'user1', 'HASH1', 'blah, blah'); +select + * +from + v.account; + id | name | password | description +----+-------+----------+------------- + 1 | user1 | HASH1 | blah, blah +(1 row) + +drop schema v cascade; +NOTICE: drop cascades to table v.account diff --git a/nix/tests/expected/pgbouncer.out b/nix/tests/expected/pgbouncer.out new file mode 100644 index 000000000..83845cb52 --- /dev/null +++ b/nix/tests/expected/pgbouncer.out @@ -0,0 +1,87 @@ +-- pgbouncer schema owner +select + n.nspname as schema_name, + r.rolname as owner +from + pg_namespace n +join + pg_roles r on n.nspowner = r.oid +where + n.nspname = 'pgbouncer'; + schema_name | owner +-------------+----------- + pgbouncer | pgbouncer +(1 row) + +-- pgbouncer schema functions with owners +select + n.nspname as schema_name, + p.proname as function_name, + r.rolname as owner +from + pg_proc p +join + pg_namespace n on p.pronamespace = n.oid +join + pg_roles r on p.proowner = r.oid +where + n.nspname = 'pgbouncer' +order by + p.proname; + schema_name | function_name | owner +-------------+---------------+---------------- + pgbouncer | get_auth | supabase_admin +(1 row) + +-- Tests role privileges on the pgbouncer objects +WITH schema_obj AS ( + SELECT oid, nspname + FROM pg_namespace + WHERE nspname = 'pgbouncer' +) +SELECT + s.nspname AS schema, + c.relname AS object_name, + acl.grantee::regrole::text AS grantee, + acl.privilege_type +FROM pg_class c +JOIN schema_obj s ON s.oid = c.relnamespace +CROSS JOIN LATERAL aclexplode(c.relacl) AS acl +WHERE c.relkind IN ('r', 'v', 'm', 'f', 'p') + AND acl.privilege_type <> 'MAINTAIN' +UNION ALL +SELECT + s.nspname AS schema, + p.proname AS object_name, + acl.grantee::regrole::text AS grantee, + acl.privilege_type +FROM pg_proc p +JOIN schema_obj s ON s.oid = p.pronamespace +CROSS JOIN LATERAL aclexplode(p.proacl) AS acl +ORDER BY object_name, grantee, privilege_type; + schema | object_name | grantee | privilege_type +-----------+-------------+----------------+---------------- + pgbouncer | get_auth | pgbouncer | EXECUTE + pgbouncer | get_auth | postgres | EXECUTE + pgbouncer | get_auth | supabase_admin | EXECUTE +(3 rows) + +-- Ensure that pgbouncer.get_auth() function does not return an expired password +create role test_expired_user_password with login password 'expired_password' valid until '2000-01-01 00:00:00+00'; +create role test_valid_user_password with login password 'valid_password' valid until '2100-01-01 00:00:00+00'; +-- Update the pg_authid catalog directly to replace with a known SCRAM hash +update pg_authid set rolpassword = 'SCRAM-SHA-256$4096:testsaltbase64$storedkeybase64$serverkeybase64' where rolname = 'test_valid_user_password'; +select pgbouncer.get_auth('test_expired_user_password'); + get_auth +------------------------------- + (test_expired_user_password,) +(1 row) + +select pgbouncer.get_auth('test_valid_user_password'); + get_auth +---------------------------------------------------------------------------------------------- + (test_valid_user_password,SCRAM-SHA-256$4096:testsaltbase64$storedkeybase64$serverkeybase64) +(1 row) + +drop role test_expired_user_password; +drop role test_valid_user_password; diff --git a/nix/tests/expected/pgmq.out b/nix/tests/expected/pgmq.out new file mode 100644 index 000000000..bce379fc7 --- /dev/null +++ b/nix/tests/expected/pgmq.out @@ -0,0 +1,190 @@ +-- Test the standard flow +select + pgmq.create('Foo'); + create +-------- + +(1 row) + +select + * +from + pgmq.send( + queue_name:='Foo', + msg:='{"foo": "bar1"}' + ); + send +------ + 1 +(1 row) + +-- Test queue is not case sensitive +select + * +from + pgmq.send( + queue_name:='foo', -- note: lowercase useage + msg:='{"foo": "bar2"}', + delay:=5 + ); + send +------ + 2 +(1 row) + +select + msg_id, + read_ct, + message +from + pgmq.read( + queue_name:='Foo', + vt:=30, + qty:=2 + ); + msg_id | read_ct | message +--------+---------+----------------- + 1 | 1 | {"foo": "bar1"} +(1 row) + +select + msg_id, + read_ct, + message +from + pgmq.pop('Foo'); + msg_id | read_ct | message +--------+---------+--------- +(0 rows) + +-- Archive message with msg_id=2. +select + pgmq.archive( + queue_name:='Foo', + msg_id:=2 + ); + archive +--------- + t +(1 row) + +select + pgmq.create('my_queue'); + create +-------- + +(1 row) + +select + pgmq.send_batch( + queue_name:='my_queue', + msgs:=array['{"foo": "bar3"}','{"foo": "bar4"}','{"foo": "bar5"}']::jsonb[] +); + send_batch +------------ + 1 + 2 + 3 +(3 rows) + +select + pgmq.archive( + queue_name:='my_queue', + msg_ids:=array[3, 4, 5] + ); + archive +--------- + 3 +(1 row) + +select + pgmq.delete('my_queue', 6); + delete +-------- + f +(1 row) + +select + pgmq.drop_queue('my_queue'); + drop_queue +------------ + t +(1 row) + +/* +-- Disabled until pg_partman goes back into the image +select + pgmq.create_partitioned( + 'my_partitioned_queue', + '5 seconds', + '10 seconds' +); +*/ +-- Make sure SQLI enabling characters are blocked +select pgmq.create('F--oo'); +ERROR: queue name contains invalid characters: $, ;, --, or \' +CONTEXT: PL/pgSQL function pgmq.format_table_name(text,text) line 5 at RAISE +PL/pgSQL function pgmq.create_non_partitioned(text) line 3 during statement block local variable initialization +SQL statement "SELECT pgmq.create_non_partitioned(queue_name)" +PL/pgSQL function pgmq."create"(text) line 3 at PERFORM +select pgmq.create('F$oo'); +ERROR: queue name contains invalid characters: $, ;, --, or \' +CONTEXT: PL/pgSQL function pgmq.format_table_name(text,text) line 5 at RAISE +PL/pgSQL function pgmq.create_non_partitioned(text) line 3 during statement block local variable initialization +SQL statement "SELECT pgmq.create_non_partitioned(queue_name)" +PL/pgSQL function pgmq."create"(text) line 3 at PERFORM +select pgmq.create($$F'oo$$); +ERROR: queue name contains invalid characters: $, ;, --, or \' +CONTEXT: PL/pgSQL function pgmq.format_table_name(text,text) line 5 at RAISE +PL/pgSQL function pgmq.create_non_partitioned(text) line 3 during statement block local variable initialization +SQL statement "SELECT pgmq.create_non_partitioned(queue_name)" +PL/pgSQL function pgmq."create"(text) line 3 at PERFORM +\echo + +-- pgmq schema functions with owners (ownership is modified on ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql) +select + n.nspname as schema_name, + p.proname as function_name, + r.rolname as owner +from + pg_proc p +join + pg_namespace n on p.pronamespace = n.oid +join + pg_roles r on p.proowner = r.oid +where + n.nspname = 'pgmq' +order by + p.proname; + schema_name | function_name | owner +-------------+-------------------------------+---------- + pgmq | _belongs_to_pgmq | postgres + pgmq | _ensure_pg_partman_installed | postgres + pgmq | _get_partition_col | postgres + pgmq | _get_pg_partman_major_version | postgres + pgmq | _get_pg_partman_schema | postgres + pgmq | archive | postgres + pgmq | archive | postgres + pgmq | convert_archive_partitioned | postgres + pgmq | create | postgres + pgmq | create_non_partitioned | postgres + pgmq | create_partitioned | postgres + pgmq | create_unlogged | postgres + pgmq | delete | postgres + pgmq | delete | postgres + pgmq | detach_archive | postgres + pgmq | drop_queue | postgres + pgmq | format_table_name | postgres + pgmq | list_queues | postgres + pgmq | metrics | postgres + pgmq | metrics_all | postgres + pgmq | pop | postgres + pgmq | purge_queue | postgres + pgmq | read | postgres + pgmq | read_with_poll | postgres + pgmq | send | postgres + pgmq | send_batch | postgres + pgmq | set_vt | postgres + pgmq | validate_queue_name | postgres +(28 rows) + diff --git a/nix/tests/expected/pgrouting.out b/nix/tests/expected/pgrouting.out new file mode 100644 index 000000000..2362a72ed --- /dev/null +++ b/nix/tests/expected/pgrouting.out @@ -0,0 +1,31 @@ +create schema v; +-- create the roads table +create table v.roads ( + id serial primary key, + source integer, + target integer, + cost double precision +); +-- insert sample data into roads table +insert into v.roads (source, target, cost) values +(1, 2, 1.0), +(2, 3, 1.0), +(3, 4, 1.0), +(1, 3, 2.5), +(3, 5, 2.0); +-- create a function to use pgRouting to find the shortest path +select * from pgr_dijkstra( + 'select id, source, target, cost from v.roads', + 1, -- start node + 4 -- end node +); + seq | path_seq | node | edge | cost | agg_cost +-----+----------+------+------+------+---------- + 1 | 1 | 1 | 1 | 1 | 0 + 2 | 2 | 2 | 2 | 1 | 1 + 3 | 3 | 3 | 3 | 1 | 2 + 4 | 4 | 4 | -1 | 0 | 3 +(4 rows) + +drop schema v cascade; +NOTICE: drop cascades to table v.roads diff --git a/nix/tests/expected/pgsodium.out b/nix/tests/expected/pgsodium.out new file mode 100644 index 000000000..418bf2dbb --- /dev/null +++ b/nix/tests/expected/pgsodium.out @@ -0,0 +1,9 @@ +select + status +from + pgsodium.create_key(); + status +-------- + valid +(1 row) + diff --git a/nix/tests/expected/pgtap.out b/nix/tests/expected/pgtap.out new file mode 100644 index 000000000..272d8387d --- /dev/null +++ b/nix/tests/expected/pgtap.out @@ -0,0 +1,21 @@ +begin; +select plan(1); + plan +------ + 1..1 +(1 row) + +-- Run the tests. +select pass( 'My test passed, w00t!' ); + pass +------------------------------ + ok 1 - My test passed, w00t! +(1 row) + +-- Finish the tests and clean up. +select * from finish(); + finish +-------- +(0 rows) + +rollback; diff --git a/nix/tests/expected/plpgsql-check.out b/nix/tests/expected/plpgsql-check.out new file mode 100644 index 000000000..2b5bf8287 --- /dev/null +++ b/nix/tests/expected/plpgsql-check.out @@ -0,0 +1,35 @@ +create schema v; +create table v.t1( + a int, + b int +); +create or replace function v.f1() + returns void + language plpgsql +as $$ +declare r record; +begin + for r in select * from v.t1 + loop + raise notice '%', r.c; -- there is bug - table t1 missing "c" column + end loop; +end; +$$; +select * from v.f1(); + f1 +---- + +(1 row) + +-- use plpgsql_check_function to check the function for errors +select * from plpgsql_check_function('v.f1()'); + plpgsql_check_function +------------------------------------------------- + error:42703:6:RAISE:record "r" has no field "c" + Context: SQL expression "r.c" +(2 rows) + +drop schema v cascade; +NOTICE: drop cascades to 2 other objects +DETAIL: drop cascades to table v.t1 +drop cascades to function v.f1() diff --git a/nix/tests/expected/postgis.out b/nix/tests/expected/postgis.out new file mode 100644 index 000000000..53194d8e2 --- /dev/null +++ b/nix/tests/expected/postgis.out @@ -0,0 +1,59 @@ +create schema v; +-- create a table to store geographic points +create table v.places ( + id serial primary key, + name text, + geom geometry(point, 4326) -- using WGS 84 coordinate system +); +-- insert some sample geographic points into the places table +insert into v.places (name, geom) +values + ('place_a', st_setsrid(st_makepoint(-73.9857, 40.7484), 4326)), -- latitude and longitude for a location + ('place_b', st_setsrid(st_makepoint(-74.0060, 40.7128), 4326)), -- another location + ('place_c', st_setsrid(st_makepoint(-73.9687, 40.7851), 4326)); -- yet another location +-- calculate the distance between two points (in meters) +select + a.name as place_a, + b.name as place_b, + st_distance(a.geom::geography, b.geom::geography) as distance_meters +from + v.places a, + v.places b +where + a.name = 'place_a' + and b.name = 'place_b'; + place_a | place_b | distance_meters +---------+---------+----------------- + place_a | place_b | 4309.25283351 +(1 row) + +-- find all places within a 5km radius of 'place_a' +select + name, + st_distance( + geom::geography, + ( + select + geom + from + v.places + where + name = 'place_a' + )::geography) as distance_meters +from + v.places +where + st_dwithin( + geom::geography, + (select geom from v.places where name = 'place_a')::geography, + 5000 + ) + and name != 'place_a'; + name | distance_meters +---------+----------------- + place_b | 4309.25283351 + place_c | 4320.8765634 +(2 rows) + +drop schema v cascade; +NOTICE: drop cascades to table v.places diff --git a/nix/tests/expected/realtime.out b/nix/tests/expected/realtime.out new file mode 100644 index 000000000..48f7c6aab --- /dev/null +++ b/nix/tests/expected/realtime.out @@ -0,0 +1,16 @@ +-- only a publication from supabase realtime is expected +SELECT + pubname AS publication_name, + pubowner::regrole AS owner, + puballtables, + pubinsert, + pubupdate, + pubdelete, + pubtruncate +FROM + pg_publication; + publication_name | owner | puballtables | pubinsert | pubupdate | pubdelete | pubtruncate +-------------------+----------+--------------+-----------+-----------+-----------+------------- + supabase_realtime | postgres | f | t | t | t | t +(1 row) + diff --git a/nix/tests/expected/roles.out b/nix/tests/expected/roles.out new file mode 100644 index 000000000..1cf984cf1 --- /dev/null +++ b/nix/tests/expected/roles.out @@ -0,0 +1,577 @@ +-- all roles and attributes +select + rolname, + rolcreaterole , + rolcanlogin , + rolsuper , + rolinherit , + rolcreatedb , + rolreplication , + rolconnlimit , + rolbypassrls , + rolvaliduntil +from pg_roles r +-- TODO: this exclusion is to maintain compat with pg17, we should cover it +where rolname not in ('pg_create_subscription', 'pg_maintain', 'pg_use_reserved_connections') +order by rolname; + rolname | rolcreaterole | rolcanlogin | rolsuper | rolinherit | rolcreatedb | rolreplication | rolconnlimit | rolbypassrls | rolvaliduntil +----------------------------+---------------+-------------+----------+------------+-------------+----------------+--------------+--------------+--------------- + anon | f | f | f | t | f | f | -1 | f | + authenticated | f | f | f | t | f | f | -1 | f | + authenticator | f | t | f | f | f | f | -1 | f | + dashboard_user | t | f | f | t | t | t | -1 | f | + pg_checkpoint | f | f | f | t | f | f | -1 | f | + pg_database_owner | f | f | f | t | f | f | -1 | f | + pg_execute_server_program | f | f | f | t | f | f | -1 | f | + pg_monitor | f | f | f | t | f | f | -1 | f | + pg_read_all_data | f | f | f | t | f | f | -1 | f | + pg_read_all_settings | f | f | f | t | f | f | -1 | f | + pg_read_all_stats | f | f | f | t | f | f | -1 | f | + pg_read_server_files | f | f | f | t | f | f | -1 | f | + pg_signal_backend | f | f | f | t | f | f | -1 | f | + pg_stat_scan_tables | f | f | f | t | f | f | -1 | f | + pg_write_all_data | f | f | f | t | f | f | -1 | f | + pg_write_server_files | f | f | f | t | f | f | -1 | f | + pgbouncer | f | t | f | t | f | f | -1 | f | + pgsodium_keyholder | f | f | f | t | f | f | -1 | f | + pgsodium_keyiduser | f | f | f | t | f | f | -1 | f | + pgsodium_keymaker | f | f | f | t | f | f | -1 | f | + pgtle_admin | f | f | f | t | f | f | -1 | f | + postgres | t | t | f | t | t | t | -1 | t | + service_role | f | f | f | t | f | f | -1 | t | + supabase_admin | t | t | t | t | t | t | -1 | t | + supabase_auth_admin | t | t | f | f | f | f | -1 | f | + supabase_functions_admin | t | t | f | f | f | f | -1 | f | + supabase_read_only_user | f | t | f | t | f | f | -1 | t | + supabase_replication_admin | f | t | f | t | f | t | -1 | f | + supabase_storage_admin | t | t | f | f | f | f | -1 | f | +(29 rows) + +select + rolname, + rolconfig +from pg_roles r +-- TODO: this exclusion is to maintain compat with pg17, we should cover it +where rolname not in ('pg_create_subscription', 'pg_maintain', 'pg_use_reserved_connections') +order by rolname; + rolname | rolconfig +----------------------------+--------------------------------------------------------------------------------- + anon | {statement_timeout=3s} + authenticated | {statement_timeout=8s} + authenticator | {session_preload_libraries=safeupdate,statement_timeout=8s,lock_timeout=8s} + dashboard_user | + pg_checkpoint | + pg_database_owner | + pg_execute_server_program | + pg_monitor | + pg_read_all_data | + pg_read_all_settings | + pg_read_all_stats | + pg_read_server_files | + pg_signal_backend | + pg_stat_scan_tables | + pg_write_all_data | + pg_write_server_files | + pgbouncer | + pgsodium_keyholder | + pgsodium_keyiduser | + pgsodium_keymaker | + pgtle_admin | + postgres | {"search_path=\"\\$user\", public, extensions"} + service_role | + supabase_admin | {"search_path=\"$user\", public, auth, extensions",log_statement=none} + supabase_auth_admin | {search_path=auth,idle_in_transaction_session_timeout=60000,log_statement=none} + supabase_functions_admin | + supabase_read_only_user | + supabase_replication_admin | + supabase_storage_admin | {search_path=storage,log_statement=none} +(29 rows) + +-- all role memberships +select + r.rolname as member, + g.rolname as "member_of (can become)", + m.admin_option +from + pg_roles r +left join + pg_auth_members m on r.oid = m.member +left join + pg_roles g on m.roleid = g.oid +-- TODO: this exclusion is to maintain compat with pg17, we should cover it +where r.rolname not in ('pg_create_subscription', 'pg_maintain', 'pg_use_reserved_connections') +order by + r.rolname, g.rolname; + member | member_of (can become) | admin_option +----------------------------+------------------------+-------------- + anon | | + authenticated | | + authenticator | anon | f + authenticator | authenticated | f + authenticator | service_role | f + dashboard_user | | + pg_checkpoint | | + pg_database_owner | | + pg_execute_server_program | | + pg_monitor | pg_read_all_settings | f + pg_monitor | pg_read_all_stats | f + pg_monitor | pg_stat_scan_tables | f + pg_read_all_data | | + pg_read_all_settings | | + pg_read_all_stats | | + pg_read_server_files | | + pg_signal_backend | | + pg_stat_scan_tables | | + pg_write_all_data | | + pg_write_server_files | | + pgbouncer | | + pgsodium_keyholder | pgsodium_keyiduser | f + pgsodium_keyiduser | | + pgsodium_keymaker | pgsodium_keyholder | f + pgsodium_keymaker | pgsodium_keyiduser | f + pgtle_admin | | + postgres | anon | f + postgres | authenticated | f + postgres | pg_monitor | f + postgres | pg_read_all_data | f + postgres | pg_signal_backend | f + postgres | pgtle_admin | f + postgres | service_role | f + service_role | | + supabase_admin | | + supabase_auth_admin | | + supabase_functions_admin | | + supabase_read_only_user | pg_read_all_data | f + supabase_replication_admin | | + supabase_storage_admin | authenticator | f +(40 rows) + +-- Check all privileges of the roles on the schemas +select schema_name, privilege_type, grantee, default_for +from ( + -- ALTER DEFAULT privileges on schemas + select + n.nspname as schema_name, + a.privilege_type, + r.rolname as grantee, + d.defaclrole::regrole as default_for, + case when n.nspname = 'public' then 0 else 1 end as schema_order + from + pg_default_acl d + join + pg_namespace n on d.defaclnamespace = n.oid + cross join lateral aclexplode(d.defaclacl) as a + join + pg_roles r on a.grantee = r.oid + where + a.privilege_type != 'MAINTAIN' -- TODO: this is to maintain compat with pg17, we should cover it + union all + -- explicit grant usage and create on the schemas + select + n.nspname as schema_name, + a.privilege_type, + r.rolname as grantee, + n.nspowner::regrole as default_for, + case when n.nspname = 'public' then 0 else 1 end as schema_order + from + pg_namespace n + cross join lateral aclexplode(n.nspacl) as a + join + pg_roles r on a.grantee = r.oid + where + a.privilege_type in ('CREATE', 'USAGE') +) sub +order by schema_order, schema_name, privilege_type, grantee, default_for; + schema_name | privilege_type | grantee | default_for +--------------------+----------------+--------------------------+--------------------- + public | CREATE | pg_database_owner | pg_database_owner + public | DELETE | anon | supabase_admin + public | DELETE | anon | postgres + public | DELETE | authenticated | supabase_admin + public | DELETE | authenticated | postgres + public | DELETE | postgres | supabase_admin + public | DELETE | postgres | postgres + public | DELETE | service_role | supabase_admin + public | DELETE | service_role | postgres + public | EXECUTE | anon | supabase_admin + public | EXECUTE | anon | postgres + public | EXECUTE | authenticated | supabase_admin + public | EXECUTE | authenticated | postgres + public | EXECUTE | postgres | supabase_admin + public | EXECUTE | postgres | postgres + public | EXECUTE | service_role | supabase_admin + public | EXECUTE | service_role | postgres + public | INSERT | anon | supabase_admin + public | INSERT | anon | postgres + public | INSERT | authenticated | supabase_admin + public | INSERT | authenticated | postgres + public | INSERT | postgres | supabase_admin + public | INSERT | postgres | postgres + public | INSERT | service_role | supabase_admin + public | INSERT | service_role | postgres + public | REFERENCES | anon | supabase_admin + public | REFERENCES | anon | postgres + public | REFERENCES | authenticated | supabase_admin + public | REFERENCES | authenticated | postgres + public | REFERENCES | postgres | supabase_admin + public | REFERENCES | postgres | postgres + public | REFERENCES | service_role | supabase_admin + public | REFERENCES | service_role | postgres + public | SELECT | anon | supabase_admin + public | SELECT | anon | supabase_admin + public | SELECT | anon | postgres + public | SELECT | anon | postgres + public | SELECT | authenticated | supabase_admin + public | SELECT | authenticated | supabase_admin + public | SELECT | authenticated | postgres + public | SELECT | authenticated | postgres + public | SELECT | postgres | supabase_admin + public | SELECT | postgres | supabase_admin + public | SELECT | postgres | postgres + public | SELECT | postgres | postgres + public | SELECT | service_role | supabase_admin + public | SELECT | service_role | supabase_admin + public | SELECT | service_role | postgres + public | SELECT | service_role | postgres + public | TRIGGER | anon | supabase_admin + public | TRIGGER | anon | postgres + public | TRIGGER | authenticated | supabase_admin + public | TRIGGER | authenticated | postgres + public | TRIGGER | postgres | supabase_admin + public | TRIGGER | postgres | postgres + public | TRIGGER | service_role | supabase_admin + public | TRIGGER | service_role | postgres + public | TRUNCATE | anon | supabase_admin + public | TRUNCATE | anon | postgres + public | TRUNCATE | authenticated | supabase_admin + public | TRUNCATE | authenticated | postgres + public | TRUNCATE | postgres | supabase_admin + public | TRUNCATE | postgres | postgres + public | TRUNCATE | service_role | supabase_admin + public | TRUNCATE | service_role | postgres + public | UPDATE | anon | supabase_admin + public | UPDATE | anon | supabase_admin + public | UPDATE | anon | postgres + public | UPDATE | anon | postgres + public | UPDATE | authenticated | supabase_admin + public | UPDATE | authenticated | supabase_admin + public | UPDATE | authenticated | postgres + public | UPDATE | authenticated | postgres + public | UPDATE | postgres | supabase_admin + public | UPDATE | postgres | supabase_admin + public | UPDATE | postgres | postgres + public | UPDATE | postgres | postgres + public | UPDATE | service_role | supabase_admin + public | UPDATE | service_role | supabase_admin + public | UPDATE | service_role | postgres + public | UPDATE | service_role | postgres + public | USAGE | anon | supabase_admin + public | USAGE | anon | pg_database_owner + public | USAGE | anon | postgres + public | USAGE | authenticated | supabase_admin + public | USAGE | authenticated | pg_database_owner + public | USAGE | authenticated | postgres + public | USAGE | pg_database_owner | pg_database_owner + public | USAGE | postgres | supabase_admin + public | USAGE | postgres | pg_database_owner + public | USAGE | postgres | postgres + public | USAGE | service_role | supabase_admin + public | USAGE | service_role | pg_database_owner + public | USAGE | service_role | postgres + auth | CREATE | dashboard_user | supabase_admin + auth | CREATE | supabase_admin | supabase_admin + auth | CREATE | supabase_auth_admin | supabase_admin + auth | DELETE | dashboard_user | supabase_auth_admin + auth | DELETE | postgres | supabase_auth_admin + auth | EXECUTE | dashboard_user | supabase_auth_admin + auth | EXECUTE | postgres | supabase_auth_admin + auth | INSERT | dashboard_user | supabase_auth_admin + auth | INSERT | postgres | supabase_auth_admin + auth | REFERENCES | dashboard_user | supabase_auth_admin + auth | REFERENCES | postgres | supabase_auth_admin + auth | SELECT | dashboard_user | supabase_auth_admin + auth | SELECT | dashboard_user | supabase_auth_admin + auth | SELECT | postgres | supabase_auth_admin + auth | SELECT | postgres | supabase_auth_admin + auth | TRIGGER | dashboard_user | supabase_auth_admin + auth | TRIGGER | postgres | supabase_auth_admin + auth | TRUNCATE | dashboard_user | supabase_auth_admin + auth | TRUNCATE | postgres | supabase_auth_admin + auth | UPDATE | dashboard_user | supabase_auth_admin + auth | UPDATE | dashboard_user | supabase_auth_admin + auth | UPDATE | postgres | supabase_auth_admin + auth | UPDATE | postgres | supabase_auth_admin + auth | USAGE | anon | supabase_admin + auth | USAGE | authenticated | supabase_admin + auth | USAGE | dashboard_user | supabase_admin + auth | USAGE | dashboard_user | supabase_auth_admin + auth | USAGE | postgres | supabase_admin + auth | USAGE | postgres | supabase_auth_admin + auth | USAGE | service_role | supabase_admin + auth | USAGE | supabase_admin | supabase_admin + auth | USAGE | supabase_auth_admin | supabase_admin + extensions | CREATE | dashboard_user | postgres + extensions | CREATE | postgres | postgres + extensions | DELETE | postgres | supabase_admin + extensions | EXECUTE | postgres | supabase_admin + extensions | INSERT | postgres | supabase_admin + extensions | REFERENCES | postgres | supabase_admin + extensions | SELECT | postgres | supabase_admin + extensions | SELECT | postgres | supabase_admin + extensions | TRIGGER | postgres | supabase_admin + extensions | TRUNCATE | postgres | supabase_admin + extensions | UPDATE | postgres | supabase_admin + extensions | UPDATE | postgres | supabase_admin + extensions | USAGE | anon | postgres + extensions | USAGE | authenticated | postgres + extensions | USAGE | dashboard_user | postgres + extensions | USAGE | postgres | supabase_admin + extensions | USAGE | postgres | postgres + extensions | USAGE | service_role | postgres + graphql | CREATE | supabase_admin | supabase_admin + graphql | DELETE | anon | supabase_admin + graphql | DELETE | authenticated | supabase_admin + graphql | DELETE | postgres | supabase_admin + graphql | DELETE | service_role | supabase_admin + graphql | EXECUTE | anon | supabase_admin + graphql | EXECUTE | authenticated | supabase_admin + graphql | EXECUTE | postgres | supabase_admin + graphql | EXECUTE | service_role | supabase_admin + graphql | INSERT | anon | supabase_admin + graphql | INSERT | authenticated | supabase_admin + graphql | INSERT | postgres | supabase_admin + graphql | INSERT | service_role | supabase_admin + graphql | REFERENCES | anon | supabase_admin + graphql | REFERENCES | authenticated | supabase_admin + graphql | REFERENCES | postgres | supabase_admin + graphql | REFERENCES | service_role | supabase_admin + graphql | SELECT | anon | supabase_admin + graphql | SELECT | anon | supabase_admin + graphql | SELECT | authenticated | supabase_admin + graphql | SELECT | authenticated | supabase_admin + graphql | SELECT | postgres | supabase_admin + graphql | SELECT | postgres | supabase_admin + graphql | SELECT | service_role | supabase_admin + graphql | SELECT | service_role | supabase_admin + graphql | TRIGGER | anon | supabase_admin + graphql | TRIGGER | authenticated | supabase_admin + graphql | TRIGGER | postgres | supabase_admin + graphql | TRIGGER | service_role | supabase_admin + graphql | TRUNCATE | anon | supabase_admin + graphql | TRUNCATE | authenticated | supabase_admin + graphql | TRUNCATE | postgres | supabase_admin + graphql | TRUNCATE | service_role | supabase_admin + graphql | UPDATE | anon | supabase_admin + graphql | UPDATE | anon | supabase_admin + graphql | UPDATE | authenticated | supabase_admin + graphql | UPDATE | authenticated | supabase_admin + graphql | UPDATE | postgres | supabase_admin + graphql | UPDATE | postgres | supabase_admin + graphql | UPDATE | service_role | supabase_admin + graphql | UPDATE | service_role | supabase_admin + graphql | USAGE | anon | supabase_admin + graphql | USAGE | anon | supabase_admin + graphql | USAGE | authenticated | supabase_admin + graphql | USAGE | authenticated | supabase_admin + graphql | USAGE | postgres | supabase_admin + graphql | USAGE | postgres | supabase_admin + graphql | USAGE | service_role | supabase_admin + graphql | USAGE | service_role | supabase_admin + graphql | USAGE | supabase_admin | supabase_admin + graphql_public | CREATE | supabase_admin | supabase_admin + graphql_public | DELETE | anon | supabase_admin + graphql_public | DELETE | authenticated | supabase_admin + graphql_public | DELETE | postgres | supabase_admin + graphql_public | DELETE | service_role | supabase_admin + graphql_public | EXECUTE | anon | supabase_admin + graphql_public | EXECUTE | authenticated | supabase_admin + graphql_public | EXECUTE | postgres | supabase_admin + graphql_public | EXECUTE | service_role | supabase_admin + graphql_public | INSERT | anon | supabase_admin + graphql_public | INSERT | authenticated | supabase_admin + graphql_public | INSERT | postgres | supabase_admin + graphql_public | INSERT | service_role | supabase_admin + graphql_public | REFERENCES | anon | supabase_admin + graphql_public | REFERENCES | authenticated | supabase_admin + graphql_public | REFERENCES | postgres | supabase_admin + graphql_public | REFERENCES | service_role | supabase_admin + graphql_public | SELECT | anon | supabase_admin + graphql_public | SELECT | anon | supabase_admin + graphql_public | SELECT | authenticated | supabase_admin + graphql_public | SELECT | authenticated | supabase_admin + graphql_public | SELECT | postgres | supabase_admin + graphql_public | SELECT | postgres | supabase_admin + graphql_public | SELECT | service_role | supabase_admin + graphql_public | SELECT | service_role | supabase_admin + graphql_public | TRIGGER | anon | supabase_admin + graphql_public | TRIGGER | authenticated | supabase_admin + graphql_public | TRIGGER | postgres | supabase_admin + graphql_public | TRIGGER | service_role | supabase_admin + graphql_public | TRUNCATE | anon | supabase_admin + graphql_public | TRUNCATE | authenticated | supabase_admin + graphql_public | TRUNCATE | postgres | supabase_admin + graphql_public | TRUNCATE | service_role | supabase_admin + graphql_public | UPDATE | anon | supabase_admin + graphql_public | UPDATE | anon | supabase_admin + graphql_public | UPDATE | authenticated | supabase_admin + graphql_public | UPDATE | authenticated | supabase_admin + graphql_public | UPDATE | postgres | supabase_admin + graphql_public | UPDATE | postgres | supabase_admin + graphql_public | UPDATE | service_role | supabase_admin + graphql_public | UPDATE | service_role | supabase_admin + graphql_public | USAGE | anon | supabase_admin + graphql_public | USAGE | anon | supabase_admin + graphql_public | USAGE | authenticated | supabase_admin + graphql_public | USAGE | authenticated | supabase_admin + graphql_public | USAGE | postgres | supabase_admin + graphql_public | USAGE | postgres | supabase_admin + graphql_public | USAGE | service_role | supabase_admin + graphql_public | USAGE | service_role | supabase_admin + graphql_public | USAGE | supabase_admin | supabase_admin + information_schema | CREATE | supabase_admin | supabase_admin + information_schema | USAGE | supabase_admin | supabase_admin + net | CREATE | supabase_admin | supabase_admin + net | USAGE | anon | supabase_admin + net | USAGE | authenticated | supabase_admin + net | USAGE | postgres | supabase_admin + net | USAGE | service_role | supabase_admin + net | USAGE | supabase_admin | supabase_admin + net | USAGE | supabase_functions_admin | supabase_admin + pg_catalog | CREATE | supabase_admin | supabase_admin + pg_catalog | USAGE | supabase_admin | supabase_admin + pgmq | CREATE | supabase_admin | supabase_admin + pgmq | SELECT | pg_monitor | supabase_admin + pgmq | SELECT | pg_monitor | supabase_admin + pgmq | USAGE | pg_monitor | supabase_admin + pgmq | USAGE | supabase_admin | supabase_admin + pgsodium | CREATE | supabase_admin | supabase_admin + pgsodium | DELETE | pgsodium_keyholder | supabase_admin + pgsodium | INSERT | pgsodium_keyholder | supabase_admin + pgsodium | REFERENCES | pgsodium_keyholder | supabase_admin + pgsodium | SELECT | pgsodium_keyholder | supabase_admin + pgsodium | SELECT | pgsodium_keyholder | supabase_admin + pgsodium | TRIGGER | pgsodium_keyholder | supabase_admin + pgsodium | TRUNCATE | pgsodium_keyholder | supabase_admin + pgsodium | UPDATE | pgsodium_keyholder | supabase_admin + pgsodium | UPDATE | pgsodium_keyholder | supabase_admin + pgsodium | USAGE | pgsodium_keyholder | supabase_admin + pgsodium | USAGE | supabase_admin | supabase_admin + pgsodium_masks | CREATE | supabase_admin | supabase_admin + pgsodium_masks | DELETE | pgsodium_keyiduser | supabase_admin + pgsodium_masks | EXECUTE | pgsodium_keyiduser | supabase_admin + pgsodium_masks | INSERT | pgsodium_keyiduser | supabase_admin + pgsodium_masks | REFERENCES | pgsodium_keyiduser | supabase_admin + pgsodium_masks | SELECT | pgsodium_keyiduser | supabase_admin + pgsodium_masks | SELECT | pgsodium_keyiduser | supabase_admin + pgsodium_masks | TRIGGER | pgsodium_keyiduser | supabase_admin + pgsodium_masks | TRUNCATE | pgsodium_keyiduser | supabase_admin + pgsodium_masks | UPDATE | pgsodium_keyiduser | supabase_admin + pgsodium_masks | UPDATE | pgsodium_keyiduser | supabase_admin + pgsodium_masks | USAGE | pgsodium_keyiduser | supabase_admin + pgsodium_masks | USAGE | pgsodium_keyiduser | supabase_admin + pgsodium_masks | USAGE | supabase_admin | supabase_admin + pgtle | CREATE | pgtle_admin | supabase_admin + pgtle | CREATE | supabase_admin | supabase_admin + pgtle | USAGE | pgtle_admin | supabase_admin + pgtle | USAGE | supabase_admin | supabase_admin + realtime | CREATE | supabase_admin | supabase_admin + realtime | DELETE | dashboard_user | supabase_admin + realtime | DELETE | postgres | supabase_admin + realtime | EXECUTE | dashboard_user | supabase_admin + realtime | EXECUTE | postgres | supabase_admin + realtime | INSERT | dashboard_user | supabase_admin + realtime | INSERT | postgres | supabase_admin + realtime | REFERENCES | dashboard_user | supabase_admin + realtime | REFERENCES | postgres | supabase_admin + realtime | SELECT | dashboard_user | supabase_admin + realtime | SELECT | dashboard_user | supabase_admin + realtime | SELECT | postgres | supabase_admin + realtime | SELECT | postgres | supabase_admin + realtime | TRIGGER | dashboard_user | supabase_admin + realtime | TRIGGER | postgres | supabase_admin + realtime | TRUNCATE | dashboard_user | supabase_admin + realtime | TRUNCATE | postgres | supabase_admin + realtime | UPDATE | dashboard_user | supabase_admin + realtime | UPDATE | dashboard_user | supabase_admin + realtime | UPDATE | postgres | supabase_admin + realtime | UPDATE | postgres | supabase_admin + realtime | USAGE | dashboard_user | supabase_admin + realtime | USAGE | postgres | supabase_admin + realtime | USAGE | postgres | supabase_admin + realtime | USAGE | supabase_admin | supabase_admin + repack | CREATE | postgres | supabase_admin + repack | CREATE | supabase_admin | supabase_admin + repack | DELETE | postgres | supabase_admin + repack | INSERT | postgres | supabase_admin + repack | REFERENCES | postgres | supabase_admin + repack | SELECT | postgres | supabase_admin + repack | SELECT | postgres | supabase_admin + repack | TRIGGER | postgres | supabase_admin + repack | TRUNCATE | postgres | supabase_admin + repack | UPDATE | postgres | supabase_admin + repack | UPDATE | postgres | supabase_admin + repack | USAGE | postgres | supabase_admin + repack | USAGE | postgres | supabase_admin + repack | USAGE | supabase_admin | supabase_admin + storage | CREATE | dashboard_user | supabase_admin + storage | CREATE | supabase_admin | supabase_admin + storage | CREATE | supabase_storage_admin | supabase_admin + storage | DELETE | anon | postgres + storage | DELETE | authenticated | postgres + storage | DELETE | postgres | postgres + storage | DELETE | service_role | postgres + storage | EXECUTE | anon | postgres + storage | EXECUTE | authenticated | postgres + storage | EXECUTE | postgres | postgres + storage | EXECUTE | service_role | postgres + storage | INSERT | anon | postgres + storage | INSERT | authenticated | postgres + storage | INSERT | postgres | postgres + storage | INSERT | service_role | postgres + storage | REFERENCES | anon | postgres + storage | REFERENCES | authenticated | postgres + storage | REFERENCES | postgres | postgres + storage | REFERENCES | service_role | postgres + storage | SELECT | anon | postgres + storage | SELECT | anon | postgres + storage | SELECT | authenticated | postgres + storage | SELECT | authenticated | postgres + storage | SELECT | postgres | postgres + storage | SELECT | postgres | postgres + storage | SELECT | service_role | postgres + storage | SELECT | service_role | postgres + storage | TRIGGER | anon | postgres + storage | TRIGGER | authenticated | postgres + storage | TRIGGER | postgres | postgres + storage | TRIGGER | service_role | postgres + storage | TRUNCATE | anon | postgres + storage | TRUNCATE | authenticated | postgres + storage | TRUNCATE | postgres | postgres + storage | TRUNCATE | service_role | postgres + storage | UPDATE | anon | postgres + storage | UPDATE | anon | postgres + storage | UPDATE | authenticated | postgres + storage | UPDATE | authenticated | postgres + storage | UPDATE | postgres | postgres + storage | UPDATE | postgres | postgres + storage | UPDATE | service_role | postgres + storage | UPDATE | service_role | postgres + storage | USAGE | anon | supabase_admin + storage | USAGE | anon | postgres + storage | USAGE | authenticated | supabase_admin + storage | USAGE | authenticated | postgres + storage | USAGE | dashboard_user | supabase_admin + storage | USAGE | postgres | supabase_admin + storage | USAGE | postgres | postgres + storage | USAGE | service_role | supabase_admin + storage | USAGE | service_role | postgres + storage | USAGE | supabase_admin | supabase_admin + storage | USAGE | supabase_storage_admin | supabase_admin + topology | CREATE | supabase_admin | supabase_admin + topology | USAGE | supabase_admin | supabase_admin + vault | CREATE | supabase_admin | supabase_admin + vault | USAGE | postgres | supabase_admin + vault | USAGE | service_role | supabase_admin + vault | USAGE | supabase_admin | supabase_admin +(389 rows) + diff --git a/nix/tests/expected/security.out b/nix/tests/expected/security.out new file mode 100644 index 000000000..81b6b8705 --- /dev/null +++ b/nix/tests/expected/security.out @@ -0,0 +1,33 @@ +-- get a list of security definer functions owned by supabase_admin +-- this list should be vetted to ensure the functions are safe to use as security definer +select + n.nspname, p.proname +from pg_catalog.pg_proc p + left join pg_catalog.pg_namespace n ON n.oid = p.pronamespace +where p.proowner = (select oid from pg_catalog.pg_roles where rolname = 'supabase_admin') + and p.prosecdef = true +order by 1,2; + nspname | proname +-----------+-------------------------------- + graphql | get_schema_version + graphql | increment_schema_version + pgbouncer | get_auth + pgsodium | disable_security_label_trigger + pgsodium | enable_security_label_trigger + pgsodium | get_key_by_id + pgsodium | get_key_by_name + pgsodium | get_named_keys + pgsodium | mask_role + pgsodium | update_mask + public | dblink_connect_u + public | dblink_connect_u + public | pgaudit_ddl_command_end + public | pgaudit_sql_drop + public | st_estimatedextent + public | st_estimatedextent + public | st_estimatedextent + repack | repack_trigger + vault | create_secret + vault | update_secret +(20 rows) + diff --git a/nix/tests/expected/storage.out b/nix/tests/expected/storage.out new file mode 100644 index 000000000..353604ec8 --- /dev/null +++ b/nix/tests/expected/storage.out @@ -0,0 +1,208 @@ +-- storage schema owner +select + n.nspname as schema_name, + r.rolname as owner +from + pg_namespace n +join + pg_roles r on n.nspowner = r.oid +where + n.nspname = 'storage'; + schema_name | owner +-------------+---------------- + storage | supabase_admin +(1 row) + +-- storage schema tables with owners and rls policies +select + ns.nspname as schema_name, + c.relname as table_name, + r.rolname as owner, + c.relrowsecurity as rls_enabled, + string_agg(p.polname, ', ' order by p.polname) as rls_policies +from + pg_class c +join + pg_namespace ns on c.relnamespace = ns.oid +join + pg_roles r on c.relowner = r.oid +left join + pg_policy p on p.polrelid = c.oid +where + ns.nspname = 'storage' + and c.relkind = 'r' +group by + ns.nspname, c.relname, r.rolname, c.relrowsecurity +order by + c.relname; + schema_name | table_name | owner | rls_enabled | rls_policies +-------------+------------+------------------------+-------------+-------------- + storage | buckets | supabase_storage_admin | f | + storage | migrations | supabase_storage_admin | f | + storage | objects | supabase_storage_admin | t | +(3 rows) + +-- storage schema objects with roles privileges +select + ns.nspname as schema_name, + c.relname as table_name, + r.rolname as role_name, + a.privilege_type, + a.is_grantable +from + pg_class c +join + pg_namespace ns on c.relnamespace = ns.oid +cross join lateral + aclexplode(c.relacl) as a +join + pg_roles r on a.grantee = r.oid +where + ns.nspname = 'storage' + and c.relkind in ('r', 'v', 'm') + and a.privilege_type <> 'MAINTAIN' +order by + c.relname, + r.rolname, + a.privilege_type; + schema_name | table_name | role_name | privilege_type | is_grantable +-------------+------------+------------------------+----------------+-------------- + storage | buckets | anon | DELETE | f + storage | buckets | anon | INSERT | f + storage | buckets | anon | REFERENCES | f + storage | buckets | anon | SELECT | f + storage | buckets | anon | TRIGGER | f + storage | buckets | anon | TRUNCATE | f + storage | buckets | anon | UPDATE | f + storage | buckets | authenticated | DELETE | f + storage | buckets | authenticated | INSERT | f + storage | buckets | authenticated | REFERENCES | f + storage | buckets | authenticated | SELECT | f + storage | buckets | authenticated | TRIGGER | f + storage | buckets | authenticated | TRUNCATE | f + storage | buckets | authenticated | UPDATE | f + storage | buckets | postgres | DELETE | f + storage | buckets | postgres | INSERT | f + storage | buckets | postgres | REFERENCES | f + storage | buckets | postgres | SELECT | f + storage | buckets | postgres | TRIGGER | f + storage | buckets | postgres | TRUNCATE | f + storage | buckets | postgres | UPDATE | f + storage | buckets | service_role | DELETE | f + storage | buckets | service_role | INSERT | f + storage | buckets | service_role | REFERENCES | f + storage | buckets | service_role | SELECT | f + storage | buckets | service_role | TRIGGER | f + storage | buckets | service_role | TRUNCATE | f + storage | buckets | service_role | UPDATE | f + storage | buckets | supabase_storage_admin | DELETE | f + storage | buckets | supabase_storage_admin | INSERT | f + storage | buckets | supabase_storage_admin | REFERENCES | f + storage | buckets | supabase_storage_admin | SELECT | f + storage | buckets | supabase_storage_admin | TRIGGER | f + storage | buckets | supabase_storage_admin | TRUNCATE | f + storage | buckets | supabase_storage_admin | UPDATE | f + storage | migrations | supabase_storage_admin | DELETE | f + storage | migrations | supabase_storage_admin | INSERT | f + storage | migrations | supabase_storage_admin | REFERENCES | f + storage | migrations | supabase_storage_admin | SELECT | f + storage | migrations | supabase_storage_admin | TRIGGER | f + storage | migrations | supabase_storage_admin | TRUNCATE | f + storage | migrations | supabase_storage_admin | UPDATE | f + storage | objects | anon | DELETE | f + storage | objects | anon | INSERT | f + storage | objects | anon | REFERENCES | f + storage | objects | anon | SELECT | f + storage | objects | anon | TRIGGER | f + storage | objects | anon | TRUNCATE | f + storage | objects | anon | UPDATE | f + storage | objects | authenticated | DELETE | f + storage | objects | authenticated | INSERT | f + storage | objects | authenticated | REFERENCES | f + storage | objects | authenticated | SELECT | f + storage | objects | authenticated | TRIGGER | f + storage | objects | authenticated | TRUNCATE | f + storage | objects | authenticated | UPDATE | f + storage | objects | postgres | DELETE | f + storage | objects | postgres | INSERT | f + storage | objects | postgres | REFERENCES | f + storage | objects | postgres | SELECT | f + storage | objects | postgres | TRIGGER | f + storage | objects | postgres | TRUNCATE | f + storage | objects | postgres | UPDATE | f + storage | objects | service_role | DELETE | f + storage | objects | service_role | INSERT | f + storage | objects | service_role | REFERENCES | f + storage | objects | service_role | SELECT | f + storage | objects | service_role | TRIGGER | f + storage | objects | service_role | TRUNCATE | f + storage | objects | service_role | UPDATE | f + storage | objects | supabase_storage_admin | DELETE | f + storage | objects | supabase_storage_admin | INSERT | f + storage | objects | supabase_storage_admin | REFERENCES | f + storage | objects | supabase_storage_admin | SELECT | f + storage | objects | supabase_storage_admin | TRIGGER | f + storage | objects | supabase_storage_admin | TRUNCATE | f + storage | objects | supabase_storage_admin | UPDATE | f +(77 rows) + +-- storage indexes with owners +select + ns.nspname as table_schema, + t.relname as table_name, + i.relname as index_name, + r.rolname as index_owner +from + pg_class t +join + pg_namespace ns on t.relnamespace = ns.oid +join + pg_index idx on t.oid = idx.indrelid +join + pg_class i on idx.indexrelid = i.oid +join + pg_roles r on i.relowner = r.oid +where + ns.nspname = 'storage' +order by + t.relname, i.relname; + table_schema | table_name | index_name | index_owner +--------------+------------+---------------------+------------------------ + storage | buckets | bname | supabase_storage_admin + storage | buckets | buckets_pkey | supabase_storage_admin + storage | migrations | migrations_name_key | supabase_storage_admin + storage | migrations | migrations_pkey | supabase_storage_admin + storage | objects | bucketid_objname | supabase_storage_admin + storage | objects | name_prefix_search | supabase_storage_admin + storage | objects | objects_pkey | supabase_storage_admin +(7 rows) + +-- storage schema functions with owners +select + n.nspname as schema_name, + p.proname as function_name, + r.rolname as owner +from + pg_proc p +join + pg_namespace n on p.pronamespace = n.oid +join + pg_roles r on p.proowner = r.oid +where + n.nspname = 'storage' +order by + p.proname; + schema_name | function_name | owner +-------------+---------------+------------------------ + storage | extension | supabase_storage_admin + storage | filename | supabase_storage_admin + storage | foldername | supabase_storage_admin + storage | search | supabase_storage_admin +(4 rows) + +-- storage service migrations +select * from storage.migrations ; + id | name | hash | executed_at +----+------+------+------------- +(0 rows) + diff --git a/nix/tests/expected/vault.out b/nix/tests/expected/vault.out new file mode 100644 index 000000000..4ffb68664 --- /dev/null +++ b/nix/tests/expected/vault.out @@ -0,0 +1,99 @@ +-- Tests role privileges on the vault objects +-- INSERT and UPDATE privileges should not be present on the vault tables for postgres and service_role, only SELECT and DELETE +WITH schema_obj AS ( + SELECT oid, nspname + FROM pg_namespace + WHERE nspname = 'vault' +) +SELECT + s.nspname AS schema, + c.relname AS object_name, + acl.grantee::regrole::text AS grantee, + acl.privilege_type +FROM pg_class c +JOIN schema_obj s ON s.oid = c.relnamespace +CROSS JOIN LATERAL aclexplode(c.relacl) AS acl +WHERE c.relkind IN ('r', 'v', 'm', 'f', 'p') + AND acl.privilege_type <> 'MAINTAIN' +UNION ALL +SELECT + s.nspname AS schema, + p.proname AS object_name, + acl.grantee::regrole::text AS grantee, + acl.privilege_type +FROM pg_proc p +JOIN schema_obj s ON s.oid = p.pronamespace +CROSS JOIN LATERAL aclexplode(p.proacl) AS acl +ORDER BY object_name, grantee, privilege_type; + schema | object_name | grantee | privilege_type +--------+---------------------------+----------------+---------------- + vault | _crypto_aead_det_decrypt | postgres | EXECUTE + vault | _crypto_aead_det_decrypt | service_role | EXECUTE + vault | _crypto_aead_det_decrypt | supabase_admin | EXECUTE + vault | _crypto_aead_det_encrypt | supabase_admin | EXECUTE + vault | _crypto_aead_det_noncegen | supabase_admin | EXECUTE + vault | create_secret | postgres | EXECUTE + vault | create_secret | service_role | EXECUTE + vault | create_secret | supabase_admin | EXECUTE + vault | decrypted_secrets | postgres | DELETE + vault | decrypted_secrets | postgres | REFERENCES + vault | decrypted_secrets | postgres | SELECT + vault | decrypted_secrets | postgres | TRUNCATE + vault | decrypted_secrets | service_role | DELETE + vault | decrypted_secrets | service_role | SELECT + vault | decrypted_secrets | supabase_admin | DELETE + vault | decrypted_secrets | supabase_admin | INSERT + vault | decrypted_secrets | supabase_admin | REFERENCES + vault | decrypted_secrets | supabase_admin | SELECT + vault | decrypted_secrets | supabase_admin | TRIGGER + vault | decrypted_secrets | supabase_admin | TRUNCATE + vault | decrypted_secrets | supabase_admin | UPDATE + vault | secrets | postgres | DELETE + vault | secrets | postgres | REFERENCES + vault | secrets | postgres | SELECT + vault | secrets | postgres | TRUNCATE + vault | secrets | service_role | DELETE + vault | secrets | service_role | SELECT + vault | secrets | supabase_admin | DELETE + vault | secrets | supabase_admin | INSERT + vault | secrets | supabase_admin | REFERENCES + vault | secrets | supabase_admin | SELECT + vault | secrets | supabase_admin | TRIGGER + vault | secrets | supabase_admin | TRUNCATE + vault | secrets | supabase_admin | UPDATE + vault | update_secret | postgres | EXECUTE + vault | update_secret | service_role | EXECUTE + vault | update_secret | supabase_admin | EXECUTE +(37 rows) + +-- vault indexes with owners +SELECT + ns.nspname AS schema, + t.relname AS table, + i.relname AS index_name, + r.rolname AS index_owner, + CASE + WHEN idx.indisunique THEN 'Unique' + ELSE 'Non Unique' + END AS index_type +FROM + pg_class t +JOIN + pg_namespace ns ON t.relnamespace = ns.oid +JOIN + pg_index idx ON t.oid = idx.indrelid +JOIN + pg_class i ON idx.indexrelid = i.oid +JOIN + pg_roles r ON i.relowner = r.oid +WHERE + ns.nspname = 'vault' +ORDER BY + t.relname, + i.relname; + schema | table | index_name | index_owner | index_type +--------+---------+------------------+----------------+------------ + vault | secrets | secrets_name_idx | supabase_admin | Unique + vault | secrets | secrets_pkey | supabase_admin | Unique +(2 rows) + diff --git a/nix/tests/expected/wal2json.out b/nix/tests/expected/wal2json.out new file mode 100644 index 000000000..6edc359ee --- /dev/null +++ b/nix/tests/expected/wal2json.out @@ -0,0 +1,42 @@ +create schema v; +create table v.foo( + id int primary key +); +select + 1 +from + pg_create_logical_replication_slot('reg_test', 'wal2json', false); + ?column? +---------- + 1 +(1 row) + +insert into v.foo(id) values (1); +select + data +from + pg_logical_slot_get_changes( + 'reg_test', + null, + null, + 'include-pk', '1', + 'include-transaction', 'false', + 'include-timestamp', 'false', + 'include-type-oids', 'false', + 'format-version', '2', + 'actions', 'insert,update,delete' + ) x; + data +-------------------------------------------------------------------------------------------------------------------------------------- + {"action":"I","schema":"v","table":"foo","columns":[{"name":"id","type":"integer","value":1}],"pk":[{"name":"id","type":"integer"}]} +(1 row) + +select + pg_drop_replication_slot('reg_test'); + pg_drop_replication_slot +-------------------------- + +(1 row) + +drop schema v cascade; +NOTICE: drop cascades to table v.foo diff --git a/nix/tests/expected/z_15_ext_interface.out b/nix/tests/expected/z_15_ext_interface.out new file mode 100644 index 000000000..566da6aed --- /dev/null +++ b/nix/tests/expected/z_15_ext_interface.out @@ -0,0 +1,6371 @@ +/* + +The purpose of this test is to monitor the SQL interface exposed +by Postgres extensions so we have to manually review/approve any difference +that emerge as versions change. + +*/ +/* + +List all extensions that are not enabled +If a new entry shows up in this list, that means a new extension has been +added and you should `create extension ...` to enable it in ./nix/tests/prime + +*/ +create extension if not exists adminpack; +create extension if not exists plv8; +create extension if not exists plcoffee; +create extension if not exists plls; +create extension if not exists old_snapshot; +create extension if not exists timescaledb; +create extension if not exists postgis_tiger_geocoder; +select + name +from + pg_available_extensions +where + installed_version is null +order by + name asc; + name +----------------- + pg_cron + tsm_system_time +(2 rows) + +/* + +Monitor relocatability and config of each extension +- lesson learned from pg_cron + +*/ +select + extname as extension_name, + extrelocatable as is_relocatable +from + pg_extension +order by + extname asc; + extension_name | is_relocatable +------------------------------+---------------- + address_standardizer | t + address_standardizer_data_us | t + adminpack | f + amcheck | t + autoinc | t + bloom | t + btree_gin | t + btree_gist | t + citext | t + cube | t + dblink | t + dict_int | t + dict_xsyn | t + earthdistance | t + file_fdw | t + fuzzystrmatch | t + hstore | t + http | f + hypopg | t + index_advisor | t + insert_username | t + intagg | t + intarray | t + isn | t + lo | t + ltree | t + moddatetime | t + old_snapshot | t + pageinspect | t + pg_buffercache | t + pg_freespacemap | t + pg_graphql | f + pg_hashids | t + pg_jsonschema | f + pg_net | f + pg_prewarm | t + pg_repack | f + pg_stat_monitor | t + pg_stat_statements | t + pg_surgery | t + pg_tle | f + pg_trgm | t + pg_visibility | t + pg_walinspect | t + pgaudit | t + pgcrypto | t + pgjwt | f + pgmq | f + pgroonga | f + pgroonga_database | f + pgrouting | t + pgrowlocks | t + pgsodium | f + pgstattuple | t + pgtap | t + plcoffee | f + plls | f + plpgsql | f + plpgsql_check | f + plv8 | f + postgis | f + postgis_raster | f + postgis_sfcgal | t + postgis_tiger_geocoder | f + postgis_topology | f + postgres_fdw | t + refint | t + rum | t + seg | t + sslinfo | t + supabase_vault | f + tablefunc | t + tcn | t + timescaledb | f + tsm_system_rows | t + unaccent | t + uuid-ossp | t + vector | t + wrappers | f + xml2 | f +(80 rows) + +/* + +Monitor extension public function interface + +*/ +select + e.extname as extension_name, + n.nspname as schema_name, + p.proname as function_name, + pg_catalog.pg_get_function_identity_arguments(p.oid) as argument_types, + pg_catalog.pg_get_function_result(p.oid) as return_type +from + pg_catalog.pg_proc p + join pg_catalog.pg_namespace n + on n.oid = p.pronamespace + join pg_catalog.pg_depend d + on d.objid = p.oid + join pg_catalog.pg_extension e + on e.oid = d.refobjid +where + d.deptype = 'e' + -- Filter out changes between pg15 and pg16 from extensions that ship with postgres + -- new in pg16 + and not (e.extname = 'fuzzystrmatch' and p.proname = 'daitch_mokotoff') + and not (e.extname = 'pageinspect' and p.proname = 'bt_multi_page_stats') + and not (e.extname = 'pg_buffercache' and p.proname = 'pg_buffercache_summary') + and not (e.extname = 'pg_buffercache' and p.proname = 'pg_buffercache_usage_counts') + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_block_info') + -- removed in pg16 + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_records_info_till_end_of_wal') + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_stats_till_end_of_wal') + -- changed in pg16 - output signature added a column + and not (e.extname = 'pageinspect' and p.proname = 'brin_page_items') +order by + e.extname, + n.nspname, + p.proname, + md5(pg_catalog.pg_get_function_identity_arguments(p.oid)); + extension_name | schema_name | function_name | argument_types | return_type +------------------------+--------------------------+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + address_standardizer | public | parse_address | text, OUT num text, OUT street text, OUT street2 text, OUT address1 text, OUT city text, OUT state text, OUT zip text, OUT zipplus text, OUT country text | record + address_standardizer | public | standardize_address | lextab text, gaztab text, rultab text, address text | stdaddr + address_standardizer | public | standardize_address | lextab text, gaztab text, rultab text, micro text, macro text | stdaddr + adminpack | pg_catalog | pg_file_rename | text, text | boolean + adminpack | pg_catalog | pg_file_rename | text, text, text | boolean + adminpack | pg_catalog | pg_file_sync | text | void + adminpack | pg_catalog | pg_file_unlink | text | boolean + adminpack | pg_catalog | pg_file_write | text, text, boolean | bigint + adminpack | pg_catalog | pg_logdir_ls | | SETOF record + amcheck | public | bt_index_check | index regclass | void + amcheck | public | bt_index_check | index regclass, heapallindexed boolean | void + amcheck | public | bt_index_parent_check | index regclass | void + amcheck | public | bt_index_parent_check | index regclass, heapallindexed boolean | void + amcheck | public | bt_index_parent_check | index regclass, heapallindexed boolean, rootdescend boolean | void + amcheck | public | verify_heapam | relation regclass, on_error_stop boolean, check_toast boolean, skip text, startblock bigint, endblock bigint, OUT blkno bigint, OUT offnum integer, OUT attnum integer, OUT msg text | SETOF record + autoinc | public | autoinc | | trigger + bloom | public | blhandler | internal | index_am_handler + btree_gin | public | gin_btree_consistent | internal, smallint, anyelement, integer, internal, internal | boolean + btree_gin | public | gin_compare_prefix_anyenum | anyenum, anyenum, smallint, internal | integer + btree_gin | public | gin_compare_prefix_bit | bit, bit, smallint, internal | integer + btree_gin | public | gin_compare_prefix_bool | boolean, boolean, smallint, internal | integer + btree_gin | public | gin_compare_prefix_bpchar | character, character, smallint, internal | integer + btree_gin | public | gin_compare_prefix_bytea | bytea, bytea, smallint, internal | integer + btree_gin | public | gin_compare_prefix_char | "char", "char", smallint, internal | integer + btree_gin | public | gin_compare_prefix_cidr | cidr, cidr, smallint, internal | integer + btree_gin | public | gin_compare_prefix_date | date, date, smallint, internal | integer + btree_gin | public | gin_compare_prefix_float4 | real, real, smallint, internal | integer + btree_gin | public | gin_compare_prefix_float8 | double precision, double precision, smallint, internal | integer + btree_gin | public | gin_compare_prefix_inet | inet, inet, smallint, internal | integer + btree_gin | public | gin_compare_prefix_int2 | smallint, smallint, smallint, internal | integer + btree_gin | public | gin_compare_prefix_int4 | integer, integer, smallint, internal | integer + btree_gin | public | gin_compare_prefix_int8 | bigint, bigint, smallint, internal | integer + btree_gin | public | gin_compare_prefix_interval | interval, interval, smallint, internal | integer + btree_gin | public | gin_compare_prefix_macaddr | macaddr, macaddr, smallint, internal | integer + btree_gin | public | gin_compare_prefix_macaddr8 | macaddr8, macaddr8, smallint, internal | integer + btree_gin | public | gin_compare_prefix_money | money, money, smallint, internal | integer + btree_gin | public | gin_compare_prefix_name | name, name, smallint, internal | integer + btree_gin | public | gin_compare_prefix_numeric | numeric, numeric, smallint, internal | integer + btree_gin | public | gin_compare_prefix_oid | oid, oid, smallint, internal | integer + btree_gin | public | gin_compare_prefix_text | text, text, smallint, internal | integer + btree_gin | public | gin_compare_prefix_time | time without time zone, time without time zone, smallint, internal | integer + btree_gin | public | gin_compare_prefix_timestamp | timestamp without time zone, timestamp without time zone, smallint, internal | integer + btree_gin | public | gin_compare_prefix_timestamptz | timestamp with time zone, timestamp with time zone, smallint, internal | integer + btree_gin | public | gin_compare_prefix_timetz | time with time zone, time with time zone, smallint, internal | integer + btree_gin | public | gin_compare_prefix_uuid | uuid, uuid, smallint, internal | integer + btree_gin | public | gin_compare_prefix_varbit | bit varying, bit varying, smallint, internal | integer + btree_gin | public | gin_enum_cmp | anyenum, anyenum | integer + btree_gin | public | gin_extract_query_anyenum | anyenum, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_bit | bit, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_bool | boolean, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_bpchar | character, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_bytea | bytea, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_char | "char", internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_cidr | cidr, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_date | date, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_float4 | real, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_float8 | double precision, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_inet | inet, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_int2 | smallint, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_int4 | integer, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_int8 | bigint, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_interval | interval, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_macaddr | macaddr, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_macaddr8 | macaddr8, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_money | money, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_name | name, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_numeric | numeric, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_oid | oid, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_text | text, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_time | time without time zone, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_timestamp | timestamp without time zone, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_timestamptz | timestamp with time zone, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_timetz | time with time zone, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_uuid | uuid, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_varbit | bit varying, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_value_anyenum | anyenum, internal | internal + btree_gin | public | gin_extract_value_bit | bit, internal | internal + btree_gin | public | gin_extract_value_bool | boolean, internal | internal + btree_gin | public | gin_extract_value_bpchar | character, internal | internal + btree_gin | public | gin_extract_value_bytea | bytea, internal | internal + btree_gin | public | gin_extract_value_char | "char", internal | internal + btree_gin | public | gin_extract_value_cidr | cidr, internal | internal + btree_gin | public | gin_extract_value_date | date, internal | internal + btree_gin | public | gin_extract_value_float4 | real, internal | internal + btree_gin | public | gin_extract_value_float8 | double precision, internal | internal + btree_gin | public | gin_extract_value_inet | inet, internal | internal + btree_gin | public | gin_extract_value_int2 | smallint, internal | internal + btree_gin | public | gin_extract_value_int4 | integer, internal | internal + btree_gin | public | gin_extract_value_int8 | bigint, internal | internal + btree_gin | public | gin_extract_value_interval | interval, internal | internal + btree_gin | public | gin_extract_value_macaddr | macaddr, internal | internal + btree_gin | public | gin_extract_value_macaddr8 | macaddr8, internal | internal + btree_gin | public | gin_extract_value_money | money, internal | internal + btree_gin | public | gin_extract_value_name | name, internal | internal + btree_gin | public | gin_extract_value_numeric | numeric, internal | internal + btree_gin | public | gin_extract_value_oid | oid, internal | internal + btree_gin | public | gin_extract_value_text | text, internal | internal + btree_gin | public | gin_extract_value_time | time without time zone, internal | internal + btree_gin | public | gin_extract_value_timestamp | timestamp without time zone, internal | internal + btree_gin | public | gin_extract_value_timestamptz | timestamp with time zone, internal | internal + btree_gin | public | gin_extract_value_timetz | time with time zone, internal | internal + btree_gin | public | gin_extract_value_uuid | uuid, internal | internal + btree_gin | public | gin_extract_value_varbit | bit varying, internal | internal + btree_gin | public | gin_numeric_cmp | numeric, numeric | integer + btree_gist | public | cash_dist | money, money | money + btree_gist | public | date_dist | date, date | integer + btree_gist | public | float4_dist | real, real | real + btree_gist | public | float8_dist | double precision, double precision | double precision + btree_gist | public | gbt_bit_compress | internal | internal + btree_gist | public | gbt_bit_consistent | internal, bit, smallint, oid, internal | boolean + btree_gist | public | gbt_bit_penalty | internal, internal, internal | internal + btree_gist | public | gbt_bit_picksplit | internal, internal | internal + btree_gist | public | gbt_bit_same | gbtreekey_var, gbtreekey_var, internal | internal + btree_gist | public | gbt_bit_union | internal, internal | gbtreekey_var + btree_gist | public | gbt_bool_compress | internal | internal + btree_gist | public | gbt_bool_consistent | internal, boolean, smallint, oid, internal | boolean + btree_gist | public | gbt_bool_fetch | internal | internal + btree_gist | public | gbt_bool_penalty | internal, internal, internal | internal + btree_gist | public | gbt_bool_picksplit | internal, internal | internal + btree_gist | public | gbt_bool_same | gbtreekey2, gbtreekey2, internal | internal + btree_gist | public | gbt_bool_union | internal, internal | gbtreekey2 + btree_gist | public | gbt_bpchar_compress | internal | internal + btree_gist | public | gbt_bpchar_consistent | internal, character, smallint, oid, internal | boolean + btree_gist | public | gbt_bytea_compress | internal | internal + btree_gist | public | gbt_bytea_consistent | internal, bytea, smallint, oid, internal | boolean + btree_gist | public | gbt_bytea_penalty | internal, internal, internal | internal + btree_gist | public | gbt_bytea_picksplit | internal, internal | internal + btree_gist | public | gbt_bytea_same | gbtreekey_var, gbtreekey_var, internal | internal + btree_gist | public | gbt_bytea_union | internal, internal | gbtreekey_var + btree_gist | public | gbt_cash_compress | internal | internal + btree_gist | public | gbt_cash_consistent | internal, money, smallint, oid, internal | boolean + btree_gist | public | gbt_cash_distance | internal, money, smallint, oid, internal | double precision + btree_gist | public | gbt_cash_fetch | internal | internal + btree_gist | public | gbt_cash_penalty | internal, internal, internal | internal + btree_gist | public | gbt_cash_picksplit | internal, internal | internal + btree_gist | public | gbt_cash_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_cash_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_date_compress | internal | internal + btree_gist | public | gbt_date_consistent | internal, date, smallint, oid, internal | boolean + btree_gist | public | gbt_date_distance | internal, date, smallint, oid, internal | double precision + btree_gist | public | gbt_date_fetch | internal | internal + btree_gist | public | gbt_date_penalty | internal, internal, internal | internal + btree_gist | public | gbt_date_picksplit | internal, internal | internal + btree_gist | public | gbt_date_same | gbtreekey8, gbtreekey8, internal | internal + btree_gist | public | gbt_date_union | internal, internal | gbtreekey8 + btree_gist | public | gbt_decompress | internal | internal + btree_gist | public | gbt_enum_compress | internal | internal + btree_gist | public | gbt_enum_consistent | internal, anyenum, smallint, oid, internal | boolean + btree_gist | public | gbt_enum_fetch | internal | internal + btree_gist | public | gbt_enum_penalty | internal, internal, internal | internal + btree_gist | public | gbt_enum_picksplit | internal, internal | internal + btree_gist | public | gbt_enum_same | gbtreekey8, gbtreekey8, internal | internal + btree_gist | public | gbt_enum_union | internal, internal | gbtreekey8 + btree_gist | public | gbt_float4_compress | internal | internal + btree_gist | public | gbt_float4_consistent | internal, real, smallint, oid, internal | boolean + btree_gist | public | gbt_float4_distance | internal, real, smallint, oid, internal | double precision + btree_gist | public | gbt_float4_fetch | internal | internal + btree_gist | public | gbt_float4_penalty | internal, internal, internal | internal + btree_gist | public | gbt_float4_picksplit | internal, internal | internal + btree_gist | public | gbt_float4_same | gbtreekey8, gbtreekey8, internal | internal + btree_gist | public | gbt_float4_union | internal, internal | gbtreekey8 + btree_gist | public | gbt_float8_compress | internal | internal + btree_gist | public | gbt_float8_consistent | internal, double precision, smallint, oid, internal | boolean + btree_gist | public | gbt_float8_distance | internal, double precision, smallint, oid, internal | double precision + btree_gist | public | gbt_float8_fetch | internal | internal + btree_gist | public | gbt_float8_penalty | internal, internal, internal | internal + btree_gist | public | gbt_float8_picksplit | internal, internal | internal + btree_gist | public | gbt_float8_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_float8_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_inet_compress | internal | internal + btree_gist | public | gbt_inet_consistent | internal, inet, smallint, oid, internal | boolean + btree_gist | public | gbt_inet_penalty | internal, internal, internal | internal + btree_gist | public | gbt_inet_picksplit | internal, internal | internal + btree_gist | public | gbt_inet_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_inet_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_int2_compress | internal | internal + btree_gist | public | gbt_int2_consistent | internal, smallint, smallint, oid, internal | boolean + btree_gist | public | gbt_int2_distance | internal, smallint, smallint, oid, internal | double precision + btree_gist | public | gbt_int2_fetch | internal | internal + btree_gist | public | gbt_int2_penalty | internal, internal, internal | internal + btree_gist | public | gbt_int2_picksplit | internal, internal | internal + btree_gist | public | gbt_int2_same | gbtreekey4, gbtreekey4, internal | internal + btree_gist | public | gbt_int2_union | internal, internal | gbtreekey4 + btree_gist | public | gbt_int4_compress | internal | internal + btree_gist | public | gbt_int4_consistent | internal, integer, smallint, oid, internal | boolean + btree_gist | public | gbt_int4_distance | internal, integer, smallint, oid, internal | double precision + btree_gist | public | gbt_int4_fetch | internal | internal + btree_gist | public | gbt_int4_penalty | internal, internal, internal | internal + btree_gist | public | gbt_int4_picksplit | internal, internal | internal + btree_gist | public | gbt_int4_same | gbtreekey8, gbtreekey8, internal | internal + btree_gist | public | gbt_int4_union | internal, internal | gbtreekey8 + btree_gist | public | gbt_int8_compress | internal | internal + btree_gist | public | gbt_int8_consistent | internal, bigint, smallint, oid, internal | boolean + btree_gist | public | gbt_int8_distance | internal, bigint, smallint, oid, internal | double precision + btree_gist | public | gbt_int8_fetch | internal | internal + btree_gist | public | gbt_int8_penalty | internal, internal, internal | internal + btree_gist | public | gbt_int8_picksplit | internal, internal | internal + btree_gist | public | gbt_int8_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_int8_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_intv_compress | internal | internal + btree_gist | public | gbt_intv_consistent | internal, interval, smallint, oid, internal | boolean + btree_gist | public | gbt_intv_decompress | internal | internal + btree_gist | public | gbt_intv_distance | internal, interval, smallint, oid, internal | double precision + btree_gist | public | gbt_intv_fetch | internal | internal + btree_gist | public | gbt_intv_penalty | internal, internal, internal | internal + btree_gist | public | gbt_intv_picksplit | internal, internal | internal + btree_gist | public | gbt_intv_same | gbtreekey32, gbtreekey32, internal | internal + btree_gist | public | gbt_intv_union | internal, internal | gbtreekey32 + btree_gist | public | gbt_macad8_compress | internal | internal + btree_gist | public | gbt_macad8_consistent | internal, macaddr8, smallint, oid, internal | boolean + btree_gist | public | gbt_macad8_fetch | internal | internal + btree_gist | public | gbt_macad8_penalty | internal, internal, internal | internal + btree_gist | public | gbt_macad8_picksplit | internal, internal | internal + btree_gist | public | gbt_macad8_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_macad8_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_macad_compress | internal | internal + btree_gist | public | gbt_macad_consistent | internal, macaddr, smallint, oid, internal | boolean + btree_gist | public | gbt_macad_fetch | internal | internal + btree_gist | public | gbt_macad_penalty | internal, internal, internal | internal + btree_gist | public | gbt_macad_picksplit | internal, internal | internal + btree_gist | public | gbt_macad_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_macad_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_numeric_compress | internal | internal + btree_gist | public | gbt_numeric_consistent | internal, numeric, smallint, oid, internal | boolean + btree_gist | public | gbt_numeric_penalty | internal, internal, internal | internal + btree_gist | public | gbt_numeric_picksplit | internal, internal | internal + btree_gist | public | gbt_numeric_same | gbtreekey_var, gbtreekey_var, internal | internal + btree_gist | public | gbt_numeric_union | internal, internal | gbtreekey_var + btree_gist | public | gbt_oid_compress | internal | internal + btree_gist | public | gbt_oid_consistent | internal, oid, smallint, oid, internal | boolean + btree_gist | public | gbt_oid_distance | internal, oid, smallint, oid, internal | double precision + btree_gist | public | gbt_oid_fetch | internal | internal + btree_gist | public | gbt_oid_penalty | internal, internal, internal | internal + btree_gist | public | gbt_oid_picksplit | internal, internal | internal + btree_gist | public | gbt_oid_same | gbtreekey8, gbtreekey8, internal | internal + btree_gist | public | gbt_oid_union | internal, internal | gbtreekey8 + btree_gist | public | gbt_text_compress | internal | internal + btree_gist | public | gbt_text_consistent | internal, text, smallint, oid, internal | boolean + btree_gist | public | gbt_text_penalty | internal, internal, internal | internal + btree_gist | public | gbt_text_picksplit | internal, internal | internal + btree_gist | public | gbt_text_same | gbtreekey_var, gbtreekey_var, internal | internal + btree_gist | public | gbt_text_union | internal, internal | gbtreekey_var + btree_gist | public | gbt_time_compress | internal | internal + btree_gist | public | gbt_time_consistent | internal, time without time zone, smallint, oid, internal | boolean + btree_gist | public | gbt_time_distance | internal, time without time zone, smallint, oid, internal | double precision + btree_gist | public | gbt_time_fetch | internal | internal + btree_gist | public | gbt_time_penalty | internal, internal, internal | internal + btree_gist | public | gbt_time_picksplit | internal, internal | internal + btree_gist | public | gbt_time_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_time_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_timetz_compress | internal | internal + btree_gist | public | gbt_timetz_consistent | internal, time with time zone, smallint, oid, internal | boolean + btree_gist | public | gbt_ts_compress | internal | internal + btree_gist | public | gbt_ts_consistent | internal, timestamp without time zone, smallint, oid, internal | boolean + btree_gist | public | gbt_ts_distance | internal, timestamp without time zone, smallint, oid, internal | double precision + btree_gist | public | gbt_ts_fetch | internal | internal + btree_gist | public | gbt_ts_penalty | internal, internal, internal | internal + btree_gist | public | gbt_ts_picksplit | internal, internal | internal + btree_gist | public | gbt_ts_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_ts_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_tstz_compress | internal | internal + btree_gist | public | gbt_tstz_consistent | internal, timestamp with time zone, smallint, oid, internal | boolean + btree_gist | public | gbt_tstz_distance | internal, timestamp with time zone, smallint, oid, internal | double precision + btree_gist | public | gbt_uuid_compress | internal | internal + btree_gist | public | gbt_uuid_consistent | internal, uuid, smallint, oid, internal | boolean + btree_gist | public | gbt_uuid_fetch | internal | internal + btree_gist | public | gbt_uuid_penalty | internal, internal, internal | internal + btree_gist | public | gbt_uuid_picksplit | internal, internal | internal + btree_gist | public | gbt_uuid_same | gbtreekey32, gbtreekey32, internal | internal + btree_gist | public | gbt_uuid_union | internal, internal | gbtreekey32 + btree_gist | public | gbt_var_decompress | internal | internal + btree_gist | public | gbt_var_fetch | internal | internal + btree_gist | public | gbtreekey16_in | cstring | gbtreekey16 + btree_gist | public | gbtreekey16_out | gbtreekey16 | cstring + btree_gist | public | gbtreekey2_in | cstring | gbtreekey2 + btree_gist | public | gbtreekey2_out | gbtreekey2 | cstring + btree_gist | public | gbtreekey32_in | cstring | gbtreekey32 + btree_gist | public | gbtreekey32_out | gbtreekey32 | cstring + btree_gist | public | gbtreekey4_in | cstring | gbtreekey4 + btree_gist | public | gbtreekey4_out | gbtreekey4 | cstring + btree_gist | public | gbtreekey8_in | cstring | gbtreekey8 + btree_gist | public | gbtreekey8_out | gbtreekey8 | cstring + btree_gist | public | gbtreekey_var_in | cstring | gbtreekey_var + btree_gist | public | gbtreekey_var_out | gbtreekey_var | cstring + btree_gist | public | int2_dist | smallint, smallint | smallint + btree_gist | public | int4_dist | integer, integer | integer + btree_gist | public | int8_dist | bigint, bigint | bigint + btree_gist | public | interval_dist | interval, interval | interval + btree_gist | public | oid_dist | oid, oid | oid + btree_gist | public | time_dist | time without time zone, time without time zone | interval + btree_gist | public | ts_dist | timestamp without time zone, timestamp without time zone | interval + btree_gist | public | tstz_dist | timestamp with time zone, timestamp with time zone | interval + citext | public | citext | boolean | citext + citext | public | citext | inet | citext + citext | public | citext | character | citext + citext | public | citext_cmp | citext, citext | integer + citext | public | citext_eq | citext, citext | boolean + citext | public | citext_ge | citext, citext | boolean + citext | public | citext_gt | citext, citext | boolean + citext | public | citext_hash | citext | integer + citext | public | citext_hash_extended | citext, bigint | bigint + citext | public | citext_larger | citext, citext | citext + citext | public | citext_le | citext, citext | boolean + citext | public | citext_lt | citext, citext | boolean + citext | public | citext_ne | citext, citext | boolean + citext | public | citext_pattern_cmp | citext, citext | integer + citext | public | citext_pattern_ge | citext, citext | boolean + citext | public | citext_pattern_gt | citext, citext | boolean + citext | public | citext_pattern_le | citext, citext | boolean + citext | public | citext_pattern_lt | citext, citext | boolean + citext | public | citext_smaller | citext, citext | citext + citext | public | citextin | cstring | citext + citext | public | citextout | citext | cstring + citext | public | citextrecv | internal | citext + citext | public | citextsend | citext | bytea + citext | public | max | citext | citext + citext | public | min | citext | citext + citext | public | regexp_match | citext, citext | text[] + citext | public | regexp_match | citext, citext, text | text[] + citext | public | regexp_matches | citext, citext | SETOF text[] + citext | public | regexp_matches | citext, citext, text | SETOF text[] + citext | public | regexp_replace | citext, citext, text, text | text + citext | public | regexp_replace | citext, citext, text | text + citext | public | regexp_split_to_array | citext, citext | text[] + citext | public | regexp_split_to_array | citext, citext, text | text[] + citext | public | regexp_split_to_table | citext, citext | SETOF text + citext | public | regexp_split_to_table | citext, citext, text | SETOF text + citext | public | replace | citext, citext, citext | text + citext | public | split_part | citext, citext, integer | text + citext | public | strpos | citext, citext | integer + citext | public | texticlike | citext, citext | boolean + citext | public | texticlike | citext, text | boolean + citext | public | texticnlike | citext, citext | boolean + citext | public | texticnlike | citext, text | boolean + citext | public | texticregexeq | citext, citext | boolean + citext | public | texticregexeq | citext, text | boolean + citext | public | texticregexne | citext, citext | boolean + citext | public | texticregexne | citext, text | boolean + citext | public | translate | citext, citext, text | text + cube | public | cube | cube, double precision, double precision | cube + cube | public | cube | double precision | cube + cube | public | cube | double precision[], double precision[] | cube + cube | public | cube | cube, double precision | cube + cube | public | cube | double precision, double precision | cube + cube | public | cube | double precision[] | cube + cube | public | cube_cmp | cube, cube | integer + cube | public | cube_contained | cube, cube | boolean + cube | public | cube_contains | cube, cube | boolean + cube | public | cube_coord | cube, integer | double precision + cube | public | cube_coord_llur | cube, integer | double precision + cube | public | cube_dim | cube | integer + cube | public | cube_distance | cube, cube | double precision + cube | public | cube_enlarge | cube, double precision, integer | cube + cube | public | cube_eq | cube, cube | boolean + cube | public | cube_ge | cube, cube | boolean + cube | public | cube_gt | cube, cube | boolean + cube | public | cube_in | cstring | cube + cube | public | cube_inter | cube, cube | cube + cube | public | cube_is_point | cube | boolean + cube | public | cube_le | cube, cube | boolean + cube | public | cube_ll_coord | cube, integer | double precision + cube | public | cube_lt | cube, cube | boolean + cube | public | cube_ne | cube, cube | boolean + cube | public | cube_out | cube | cstring + cube | public | cube_overlap | cube, cube | boolean + cube | public | cube_recv | internal | cube + cube | public | cube_send | cube | bytea + cube | public | cube_size | cube | double precision + cube | public | cube_subset | cube, integer[] | cube + cube | public | cube_union | cube, cube | cube + cube | public | cube_ur_coord | cube, integer | double precision + cube | public | distance_chebyshev | cube, cube | double precision + cube | public | distance_taxicab | cube, cube | double precision + cube | public | g_cube_consistent | internal, cube, smallint, oid, internal | boolean + cube | public | g_cube_distance | internal, cube, smallint, oid, internal | double precision + cube | public | g_cube_penalty | internal, internal, internal | internal + cube | public | g_cube_picksplit | internal, internal | internal + cube | public | g_cube_same | cube, cube, internal | internal + cube | public | g_cube_union | internal, internal | cube + dblink | public | dblink | text, boolean | SETOF record + dblink | public | dblink | text | SETOF record + dblink | public | dblink | text, text | SETOF record + dblink | public | dblink | text, text, boolean | SETOF record + dblink | public | dblink_build_sql_delete | text, int2vector, integer, text[] | text + dblink | public | dblink_build_sql_insert | text, int2vector, integer, text[], text[] | text + dblink | public | dblink_build_sql_update | text, int2vector, integer, text[], text[] | text + dblink | public | dblink_cancel_query | text | text + dblink | public | dblink_close | text, boolean | text + dblink | public | dblink_close | text | text + dblink | public | dblink_close | text, text | text + dblink | public | dblink_close | text, text, boolean | text + dblink | public | dblink_connect | text | text + dblink | public | dblink_connect | text, text | text + dblink | public | dblink_connect_u | text | text + dblink | public | dblink_connect_u | text, text | text + dblink | public | dblink_current_query | | text + dblink | public | dblink_disconnect | text | text + dblink | public | dblink_disconnect | | text + dblink | public | dblink_error_message | text | text + dblink | public | dblink_exec | text, boolean | text + dblink | public | dblink_exec | text | text + dblink | public | dblink_exec | text, text | text + dblink | public | dblink_exec | text, text, boolean | text + dblink | public | dblink_fdw_validator | options text[], catalog oid | void + dblink | public | dblink_fetch | text, text, integer, boolean | SETOF record + dblink | public | dblink_fetch | text, integer | SETOF record + dblink | public | dblink_fetch | text, text, integer | SETOF record + dblink | public | dblink_fetch | text, integer, boolean | SETOF record + dblink | public | dblink_get_connections | | text[] + dblink | public | dblink_get_notify | OUT notify_name text, OUT be_pid integer, OUT extra text | SETOF record + dblink | public | dblink_get_notify | conname text, OUT notify_name text, OUT be_pid integer, OUT extra text | SETOF record + dblink | public | dblink_get_pkey | text | SETOF dblink_pkey_results + dblink | public | dblink_get_result | text, boolean | SETOF record + dblink | public | dblink_get_result | text | SETOF record + dblink | public | dblink_is_busy | text | integer + dblink | public | dblink_open | text, text, text, boolean | text + dblink | public | dblink_open | text, text | text + dblink | public | dblink_open | text, text, boolean | text + dblink | public | dblink_open | text, text, text | text + dblink | public | dblink_send_query | text, text | integer + dict_int | public | dintdict_init | internal | internal + dict_int | public | dintdict_lexize | internal, internal, internal, internal | internal + dict_xsyn | public | dxsyn_init | internal | internal + dict_xsyn | public | dxsyn_lexize | internal, internal, internal, internal | internal + earthdistance | public | earth | | double precision + earthdistance | public | earth_box | earth, double precision | cube + earthdistance | public | earth_distance | earth, earth | double precision + earthdistance | public | gc_to_sec | double precision | double precision + earthdistance | public | geo_distance | point, point | double precision + earthdistance | public | latitude | earth | double precision + earthdistance | public | ll_to_earth | double precision, double precision | earth + earthdistance | public | longitude | earth | double precision + earthdistance | public | sec_to_gc | double precision | double precision + file_fdw | public | file_fdw_handler | | fdw_handler + file_fdw | public | file_fdw_validator | text[], oid | void + fuzzystrmatch | public | difference | text, text | integer + fuzzystrmatch | public | dmetaphone | text | text + fuzzystrmatch | public | dmetaphone_alt | text | text + fuzzystrmatch | public | levenshtein | text, text | integer + fuzzystrmatch | public | levenshtein | text, text, integer, integer, integer | integer + fuzzystrmatch | public | levenshtein_less_equal | text, text, integer, integer, integer, integer | integer + fuzzystrmatch | public | levenshtein_less_equal | text, text, integer | integer + fuzzystrmatch | public | metaphone | text, integer | text + fuzzystrmatch | public | soundex | text | text + fuzzystrmatch | public | text_soundex | text | text + hstore | public | akeys | hstore | text[] + hstore | public | avals | hstore | text[] + hstore | public | defined | hstore, text | boolean + hstore | public | delete | hstore, text | hstore + hstore | public | delete | hstore, text[] | hstore + hstore | public | delete | hstore, hstore | hstore + hstore | public | each | hs hstore, OUT key text, OUT value text | SETOF record + hstore | public | exist | hstore, text | boolean + hstore | public | exists_all | hstore, text[] | boolean + hstore | public | exists_any | hstore, text[] | boolean + hstore | public | fetchval | hstore, text | text + hstore | public | ghstore_compress | internal | internal + hstore | public | ghstore_consistent | internal, hstore, smallint, oid, internal | boolean + hstore | public | ghstore_decompress | internal | internal + hstore | public | ghstore_in | cstring | ghstore + hstore | public | ghstore_options | internal | void + hstore | public | ghstore_out | ghstore | cstring + hstore | public | ghstore_penalty | internal, internal, internal | internal + hstore | public | ghstore_picksplit | internal, internal | internal + hstore | public | ghstore_same | ghstore, ghstore, internal | internal + hstore | public | ghstore_union | internal, internal | ghstore + hstore | public | gin_consistent_hstore | internal, smallint, hstore, integer, internal, internal | boolean + hstore | public | gin_extract_hstore | hstore, internal | internal + hstore | public | gin_extract_hstore_query | hstore, internal, smallint, internal, internal | internal + hstore | public | hs_concat | hstore, hstore | hstore + hstore | public | hs_contained | hstore, hstore | boolean + hstore | public | hs_contains | hstore, hstore | boolean + hstore | public | hstore | text[], text[] | hstore + hstore | public | hstore | text, text | hstore + hstore | public | hstore | text[] | hstore + hstore | public | hstore | record | hstore + hstore | public | hstore_cmp | hstore, hstore | integer + hstore | public | hstore_eq | hstore, hstore | boolean + hstore | public | hstore_ge | hstore, hstore | boolean + hstore | public | hstore_gt | hstore, hstore | boolean + hstore | public | hstore_hash | hstore | integer + hstore | public | hstore_hash_extended | hstore, bigint | bigint + hstore | public | hstore_in | cstring | hstore + hstore | public | hstore_le | hstore, hstore | boolean + hstore | public | hstore_lt | hstore, hstore | boolean + hstore | public | hstore_ne | hstore, hstore | boolean + hstore | public | hstore_out | hstore | cstring + hstore | public | hstore_recv | internal | hstore + hstore | public | hstore_send | hstore | bytea + hstore | public | hstore_subscript_handler | internal | internal + hstore | public | hstore_to_array | hstore | text[] + hstore | public | hstore_to_json | hstore | json + hstore | public | hstore_to_json_loose | hstore | json + hstore | public | hstore_to_jsonb | hstore | jsonb + hstore | public | hstore_to_jsonb_loose | hstore | jsonb + hstore | public | hstore_to_matrix | hstore | text[] + hstore | public | hstore_version_diag | hstore | integer + hstore | public | isdefined | hstore, text | boolean + hstore | public | isexists | hstore, text | boolean + hstore | public | populate_record | anyelement, hstore | anyelement + hstore | public | skeys | hstore | SETOF text + hstore | public | slice | hstore, text[] | hstore + hstore | public | slice_array | hstore, text[] | text[] + hstore | public | svals | hstore | SETOF text + hstore | public | tconvert | text, text | hstore + http | public | bytea_to_text | data bytea | text + http | public | http | request http_request | http_response + http | public | http_delete | uri character varying, content character varying, content_type character varying | http_response + http | public | http_delete | uri character varying | http_response + http | public | http_get | uri character varying, data jsonb | http_response + http | public | http_get | uri character varying | http_response + http | public | http_head | uri character varying | http_response + http | public | http_header | field character varying, value character varying | http_header + http | public | http_list_curlopt | | TABLE(curlopt text, value text) + http | public | http_patch | uri character varying, content character varying, content_type character varying | http_response + http | public | http_post | uri character varying, data jsonb | http_response + http | public | http_post | uri character varying, content character varying, content_type character varying | http_response + http | public | http_put | uri character varying, content character varying, content_type character varying | http_response + http | public | http_reset_curlopt | | boolean + http | public | http_set_curlopt | curlopt character varying, value character varying | boolean + http | public | text_to_bytea | data text | bytea + http | public | urlencode | data jsonb | text + http | public | urlencode | string character varying | text + http | public | urlencode | string bytea | text + hypopg | public | hypopg | OUT indexname text, OUT indexrelid oid, OUT indrelid oid, OUT innatts integer, OUT indisunique boolean, OUT indkey int2vector, OUT indcollation oidvector, OUT indclass oidvector, OUT indoption oidvector, OUT indexprs pg_node_tree, OUT indpred pg_node_tree, OUT amid oid | SETOF record + hypopg | public | hypopg_create_index | sql_order text, OUT indexrelid oid, OUT indexname text | SETOF record + hypopg | public | hypopg_drop_index | indexid oid | boolean + hypopg | public | hypopg_get_indexdef | indexid oid | text + hypopg | public | hypopg_hidden_indexes | | TABLE(indexid oid) + hypopg | public | hypopg_hide_index | indexid oid | boolean + hypopg | public | hypopg_relation_size | indexid oid | bigint + hypopg | public | hypopg_reset | | void + hypopg | public | hypopg_reset_index | | void + hypopg | public | hypopg_unhide_all_indexes | | void + hypopg | public | hypopg_unhide_index | indexid oid | boolean + index_advisor | public | index_advisor | query text | TABLE(startup_cost_before jsonb, startup_cost_after jsonb, total_cost_before jsonb, total_cost_after jsonb, index_statements text[], errors text[]) + insert_username | public | insert_username | | trigger + intagg | public | int_agg_final_array | internal | integer[] + intagg | public | int_agg_state | internal, integer | internal + intagg | public | int_array_aggregate | integer | integer[] + intagg | public | int_array_enum | integer[] | SETOF integer + intarray | public | _int_contained | integer[], integer[] | boolean + intarray | public | _int_contained_joinsel | internal, oid, internal, smallint, internal | double precision + intarray | public | _int_contained_sel | internal, oid, internal, integer | double precision + intarray | public | _int_contains | integer[], integer[] | boolean + intarray | public | _int_contains_joinsel | internal, oid, internal, smallint, internal | double precision + intarray | public | _int_contains_sel | internal, oid, internal, integer | double precision + intarray | public | _int_different | integer[], integer[] | boolean + intarray | public | _int_inter | integer[], integer[] | integer[] + intarray | public | _int_matchsel | internal, oid, internal, integer | double precision + intarray | public | _int_overlap | integer[], integer[] | boolean + intarray | public | _int_overlap_joinsel | internal, oid, internal, smallint, internal | double precision + intarray | public | _int_overlap_sel | internal, oid, internal, integer | double precision + intarray | public | _int_same | integer[], integer[] | boolean + intarray | public | _int_union | integer[], integer[] | integer[] + intarray | public | _intbig_in | cstring | intbig_gkey + intarray | public | _intbig_out | intbig_gkey | cstring + intarray | public | boolop | integer[], query_int | boolean + intarray | public | bqarr_in | cstring | query_int + intarray | public | bqarr_out | query_int | cstring + intarray | public | g_int_compress | internal | internal + intarray | public | g_int_consistent | internal, integer[], smallint, oid, internal | boolean + intarray | public | g_int_decompress | internal | internal + intarray | public | g_int_options | internal | void + intarray | public | g_int_penalty | internal, internal, internal | internal + intarray | public | g_int_picksplit | internal, internal | internal + intarray | public | g_int_same | integer[], integer[], internal | internal + intarray | public | g_int_union | internal, internal | integer[] + intarray | public | g_intbig_compress | internal | internal + intarray | public | g_intbig_consistent | internal, integer[], smallint, oid, internal | boolean + intarray | public | g_intbig_decompress | internal | internal + intarray | public | g_intbig_options | internal | void + intarray | public | g_intbig_penalty | internal, internal, internal | internal + intarray | public | g_intbig_picksplit | internal, internal | internal + intarray | public | g_intbig_same | intbig_gkey, intbig_gkey, internal | internal + intarray | public | g_intbig_union | internal, internal | intbig_gkey + intarray | public | ginint4_consistent | internal, smallint, integer[], integer, internal, internal, internal, internal | boolean + intarray | public | ginint4_queryextract | integer[], internal, smallint, internal, internal, internal, internal | internal + intarray | public | icount | integer[] | integer + intarray | public | idx | integer[], integer | integer + intarray | public | intarray_del_elem | integer[], integer | integer[] + intarray | public | intarray_push_array | integer[], integer[] | integer[] + intarray | public | intarray_push_elem | integer[], integer | integer[] + intarray | public | intset | integer | integer[] + intarray | public | intset_subtract | integer[], integer[] | integer[] + intarray | public | intset_union_elem | integer[], integer | integer[] + intarray | public | querytree | query_int | text + intarray | public | rboolop | query_int, integer[] | boolean + intarray | public | sort | integer[] | integer[] + intarray | public | sort | integer[], text | integer[] + intarray | public | sort_asc | integer[] | integer[] + intarray | public | sort_desc | integer[] | integer[] + intarray | public | subarray | integer[], integer | integer[] + intarray | public | subarray | integer[], integer, integer | integer[] + intarray | public | uniq | integer[] | integer[] + isn | public | btean13cmp | ean13, ean13 | integer + isn | public | btean13cmp | ean13, issn | integer + isn | public | btean13cmp | ean13, upc | integer + isn | public | btean13cmp | ean13, issn13 | integer + isn | public | btean13cmp | ean13, ismn | integer + isn | public | btean13cmp | ean13, ismn13 | integer + isn | public | btean13cmp | ean13, isbn13 | integer + isn | public | btean13cmp | ean13, isbn | integer + isn | public | btisbn13cmp | isbn13, isbn13 | integer + isn | public | btisbn13cmp | isbn13, ean13 | integer + isn | public | btisbn13cmp | isbn13, isbn | integer + isn | public | btisbncmp | isbn, ean13 | integer + isn | public | btisbncmp | isbn, isbn | integer + isn | public | btisbncmp | isbn, isbn13 | integer + isn | public | btismn13cmp | ismn13, ismn13 | integer + isn | public | btismn13cmp | ismn13, ean13 | integer + isn | public | btismn13cmp | ismn13, ismn | integer + isn | public | btismncmp | ismn, ismn | integer + isn | public | btismncmp | ismn, ean13 | integer + isn | public | btismncmp | ismn, ismn13 | integer + isn | public | btissn13cmp | issn13, issn13 | integer + isn | public | btissn13cmp | issn13, ean13 | integer + isn | public | btissn13cmp | issn13, issn | integer + isn | public | btissncmp | issn, ean13 | integer + isn | public | btissncmp | issn, issn13 | integer + isn | public | btissncmp | issn, issn | integer + isn | public | btupccmp | upc, upc | integer + isn | public | btupccmp | upc, ean13 | integer + isn | public | ean13_in | cstring | ean13 + isn | public | ean13_out | isbn13 | cstring + isn | public | ean13_out | ismn13 | cstring + isn | public | ean13_out | ean13 | cstring + isn | public | ean13_out | issn13 | cstring + isn | public | hashean13 | ean13 | integer + isn | public | hashisbn | isbn | integer + isn | public | hashisbn13 | isbn13 | integer + isn | public | hashismn | ismn | integer + isn | public | hashismn13 | ismn13 | integer + isn | public | hashissn | issn | integer + isn | public | hashissn13 | issn13 | integer + isn | public | hashupc | upc | integer + isn | public | is_valid | isbn13 | boolean + isn | public | is_valid | upc | boolean + isn | public | is_valid | ismn | boolean + isn | public | is_valid | issn | boolean + isn | public | is_valid | isbn | boolean + isn | public | is_valid | ismn13 | boolean + isn | public | is_valid | ean13 | boolean + isn | public | is_valid | issn13 | boolean + isn | public | isbn | ean13 | isbn + isn | public | isbn13 | ean13 | isbn13 + isn | public | isbn13_in | cstring | isbn13 + isn | public | isbn_in | cstring | isbn + isn | public | ismn | ean13 | ismn + isn | public | ismn13 | ean13 | ismn13 + isn | public | ismn13_in | cstring | ismn13 + isn | public | ismn_in | cstring | ismn + isn | public | isn_out | upc | cstring + isn | public | isn_out | ismn | cstring + isn | public | isn_out | issn | cstring + isn | public | isn_out | isbn | cstring + isn | public | isn_weak | boolean | boolean + isn | public | isn_weak | | boolean + isn | public | isneq | ismn, ismn | boolean + isn | public | isneq | ean13, ean13 | boolean + isn | public | isneq | isbn, ean13 | boolean + isn | public | isneq | issn, ean13 | boolean + isn | public | isneq | isbn13, isbn13 | boolean + isn | public | isneq | ean13, issn | boolean + isn | public | isneq | isbn, isbn | boolean + isn | public | isneq | ean13, upc | boolean + isn | public | isneq | ean13, issn13 | boolean + isn | public | isneq | ean13, ismn | boolean + isn | public | isneq | upc, upc | boolean + isn | public | isneq | issn13, issn13 | boolean + isn | public | isneq | upc, ean13 | boolean + isn | public | isneq | ismn13, ismn13 | boolean + isn | public | isneq | issn13, ean13 | boolean + isn | public | isneq | ean13, ismn13 | boolean + isn | public | isneq | ismn13, ean13 | boolean + isn | public | isneq | issn13, issn | boolean + isn | public | isneq | ismn, ean13 | boolean + isn | public | isneq | ismn13, ismn | boolean + isn | public | isneq | ean13, isbn13 | boolean + isn | public | isneq | isbn13, ean13 | boolean + isn | public | isneq | isbn13, isbn | boolean + isn | public | isneq | isbn, isbn13 | boolean + isn | public | isneq | ismn, ismn13 | boolean + isn | public | isneq | ean13, isbn | boolean + isn | public | isneq | issn, issn13 | boolean + isn | public | isneq | issn, issn | boolean + isn | public | isnge | ismn, ismn | boolean + isn | public | isnge | ean13, ean13 | boolean + isn | public | isnge | isbn, ean13 | boolean + isn | public | isnge | issn, ean13 | boolean + isn | public | isnge | isbn13, isbn13 | boolean + isn | public | isnge | ean13, issn | boolean + isn | public | isnge | isbn, isbn | boolean + isn | public | isnge | ean13, upc | boolean + isn | public | isnge | ean13, issn13 | boolean + isn | public | isnge | ean13, ismn | boolean + isn | public | isnge | upc, upc | boolean + isn | public | isnge | issn13, issn13 | boolean + isn | public | isnge | upc, ean13 | boolean + isn | public | isnge | ismn13, ismn13 | boolean + isn | public | isnge | issn13, ean13 | boolean + isn | public | isnge | ean13, ismn13 | boolean + isn | public | isnge | ismn13, ean13 | boolean + isn | public | isnge | issn13, issn | boolean + isn | public | isnge | ismn, ean13 | boolean + isn | public | isnge | ismn13, ismn | boolean + isn | public | isnge | ean13, isbn13 | boolean + isn | public | isnge | isbn13, ean13 | boolean + isn | public | isnge | isbn13, isbn | boolean + isn | public | isnge | isbn, isbn13 | boolean + isn | public | isnge | ismn, ismn13 | boolean + isn | public | isnge | ean13, isbn | boolean + isn | public | isnge | issn, issn13 | boolean + isn | public | isnge | issn, issn | boolean + isn | public | isngt | ismn, ismn | boolean + isn | public | isngt | ean13, ean13 | boolean + isn | public | isngt | isbn, ean13 | boolean + isn | public | isngt | issn, ean13 | boolean + isn | public | isngt | isbn13, isbn13 | boolean + isn | public | isngt | ean13, issn | boolean + isn | public | isngt | isbn, isbn | boolean + isn | public | isngt | ean13, upc | boolean + isn | public | isngt | ean13, issn13 | boolean + isn | public | isngt | ean13, ismn | boolean + isn | public | isngt | upc, upc | boolean + isn | public | isngt | issn13, issn13 | boolean + isn | public | isngt | upc, ean13 | boolean + isn | public | isngt | ismn13, ismn13 | boolean + isn | public | isngt | issn13, ean13 | boolean + isn | public | isngt | ean13, ismn13 | boolean + isn | public | isngt | ismn13, ean13 | boolean + isn | public | isngt | issn13, issn | boolean + isn | public | isngt | ismn, ean13 | boolean + isn | public | isngt | ismn13, ismn | boolean + isn | public | isngt | ean13, isbn13 | boolean + isn | public | isngt | isbn13, ean13 | boolean + isn | public | isngt | isbn13, isbn | boolean + isn | public | isngt | isbn, isbn13 | boolean + isn | public | isngt | ismn, ismn13 | boolean + isn | public | isngt | ean13, isbn | boolean + isn | public | isngt | issn, issn13 | boolean + isn | public | isngt | issn, issn | boolean + isn | public | isnle | ismn, ismn | boolean + isn | public | isnle | ean13, ean13 | boolean + isn | public | isnle | isbn, ean13 | boolean + isn | public | isnle | issn, ean13 | boolean + isn | public | isnle | isbn13, isbn13 | boolean + isn | public | isnle | ean13, issn | boolean + isn | public | isnle | isbn, isbn | boolean + isn | public | isnle | ean13, upc | boolean + isn | public | isnle | ean13, issn13 | boolean + isn | public | isnle | ean13, ismn | boolean + isn | public | isnle | upc, upc | boolean + isn | public | isnle | issn13, issn13 | boolean + isn | public | isnle | upc, ean13 | boolean + isn | public | isnle | ismn13, ismn13 | boolean + isn | public | isnle | issn13, ean13 | boolean + isn | public | isnle | ean13, ismn13 | boolean + isn | public | isnle | ismn13, ean13 | boolean + isn | public | isnle | issn13, issn | boolean + isn | public | isnle | ismn, ean13 | boolean + isn | public | isnle | ismn13, ismn | boolean + isn | public | isnle | ean13, isbn13 | boolean + isn | public | isnle | isbn13, ean13 | boolean + isn | public | isnle | isbn13, isbn | boolean + isn | public | isnle | isbn, isbn13 | boolean + isn | public | isnle | ismn, ismn13 | boolean + isn | public | isnle | ean13, isbn | boolean + isn | public | isnle | issn, issn13 | boolean + isn | public | isnle | issn, issn | boolean + isn | public | isnlt | ismn, ismn | boolean + isn | public | isnlt | ean13, ean13 | boolean + isn | public | isnlt | isbn, ean13 | boolean + isn | public | isnlt | issn, ean13 | boolean + isn | public | isnlt | isbn13, isbn13 | boolean + isn | public | isnlt | ean13, issn | boolean + isn | public | isnlt | isbn, isbn | boolean + isn | public | isnlt | ean13, upc | boolean + isn | public | isnlt | ean13, issn13 | boolean + isn | public | isnlt | ean13, ismn | boolean + isn | public | isnlt | upc, upc | boolean + isn | public | isnlt | issn13, issn13 | boolean + isn | public | isnlt | upc, ean13 | boolean + isn | public | isnlt | ismn13, ismn13 | boolean + isn | public | isnlt | issn13, ean13 | boolean + isn | public | isnlt | ean13, ismn13 | boolean + isn | public | isnlt | ismn13, ean13 | boolean + isn | public | isnlt | issn13, issn | boolean + isn | public | isnlt | ismn, ean13 | boolean + isn | public | isnlt | ismn13, ismn | boolean + isn | public | isnlt | ean13, isbn13 | boolean + isn | public | isnlt | isbn13, ean13 | boolean + isn | public | isnlt | isbn13, isbn | boolean + isn | public | isnlt | isbn, isbn13 | boolean + isn | public | isnlt | ismn, ismn13 | boolean + isn | public | isnlt | ean13, isbn | boolean + isn | public | isnlt | issn, issn13 | boolean + isn | public | isnlt | issn, issn | boolean + isn | public | isnne | ismn, ismn | boolean + isn | public | isnne | ean13, ean13 | boolean + isn | public | isnne | isbn, ean13 | boolean + isn | public | isnne | issn, ean13 | boolean + isn | public | isnne | isbn13, isbn13 | boolean + isn | public | isnne | ean13, issn | boolean + isn | public | isnne | isbn, isbn | boolean + isn | public | isnne | ean13, upc | boolean + isn | public | isnne | ean13, issn13 | boolean + isn | public | isnne | ean13, ismn | boolean + isn | public | isnne | upc, upc | boolean + isn | public | isnne | issn13, issn13 | boolean + isn | public | isnne | upc, ean13 | boolean + isn | public | isnne | ismn13, ismn13 | boolean + isn | public | isnne | issn13, ean13 | boolean + isn | public | isnne | ean13, ismn13 | boolean + isn | public | isnne | ismn13, ean13 | boolean + isn | public | isnne | issn13, issn | boolean + isn | public | isnne | ismn, ean13 | boolean + isn | public | isnne | ismn13, ismn | boolean + isn | public | isnne | ean13, isbn13 | boolean + isn | public | isnne | isbn13, ean13 | boolean + isn | public | isnne | isbn13, isbn | boolean + isn | public | isnne | isbn, isbn13 | boolean + isn | public | isnne | ismn, ismn13 | boolean + isn | public | isnne | ean13, isbn | boolean + isn | public | isnne | issn, issn13 | boolean + isn | public | isnne | issn, issn | boolean + isn | public | issn | ean13 | issn + isn | public | issn13 | ean13 | issn13 + isn | public | issn13_in | cstring | issn13 + isn | public | issn_in | cstring | issn + isn | public | make_valid | isbn13 | isbn13 + isn | public | make_valid | upc | upc + isn | public | make_valid | ismn | ismn + isn | public | make_valid | issn | issn + isn | public | make_valid | isbn | isbn + isn | public | make_valid | ismn13 | ismn13 + isn | public | make_valid | ean13 | ean13 + isn | public | make_valid | issn13 | issn13 + isn | public | upc | ean13 | upc + isn | public | upc_in | cstring | upc + lo | public | lo_manage | | trigger + lo | public | lo_oid | lo | oid + ltree | public | _lt_q_regex | ltree[], lquery[] | boolean + ltree | public | _lt_q_rregex | lquery[], ltree[] | boolean + ltree | public | _ltq_extract_regex | ltree[], lquery | ltree + ltree | public | _ltq_regex | ltree[], lquery | boolean + ltree | public | _ltq_rregex | lquery, ltree[] | boolean + ltree | public | _ltree_compress | internal | internal + ltree | public | _ltree_consistent | internal, ltree[], smallint, oid, internal | boolean + ltree | public | _ltree_extract_isparent | ltree[], ltree | ltree + ltree | public | _ltree_extract_risparent | ltree[], ltree | ltree + ltree | public | _ltree_gist_options | internal | void + ltree | public | _ltree_isparent | ltree[], ltree | boolean + ltree | public | _ltree_penalty | internal, internal, internal | internal + ltree | public | _ltree_picksplit | internal, internal | internal + ltree | public | _ltree_r_isparent | ltree, ltree[] | boolean + ltree | public | _ltree_r_risparent | ltree, ltree[] | boolean + ltree | public | _ltree_risparent | ltree[], ltree | boolean + ltree | public | _ltree_same | ltree_gist, ltree_gist, internal | internal + ltree | public | _ltree_union | internal, internal | ltree_gist + ltree | public | _ltxtq_exec | ltree[], ltxtquery | boolean + ltree | public | _ltxtq_extract_exec | ltree[], ltxtquery | ltree + ltree | public | _ltxtq_rexec | ltxtquery, ltree[] | boolean + ltree | public | index | ltree, ltree | integer + ltree | public | index | ltree, ltree, integer | integer + ltree | public | lca | ltree, ltree, ltree, ltree, ltree, ltree | ltree + ltree | public | lca | ltree, ltree | ltree + ltree | public | lca | ltree, ltree, ltree | ltree + ltree | public | lca | ltree, ltree, ltree, ltree, ltree, ltree, ltree, ltree | ltree + ltree | public | lca | ltree, ltree, ltree, ltree, ltree | ltree + ltree | public | lca | ltree[] | ltree + ltree | public | lca | ltree, ltree, ltree, ltree, ltree, ltree, ltree | ltree + ltree | public | lca | ltree, ltree, ltree, ltree | ltree + ltree | public | lquery_in | cstring | lquery + ltree | public | lquery_out | lquery | cstring + ltree | public | lquery_recv | internal | lquery + ltree | public | lquery_send | lquery | bytea + ltree | public | lt_q_regex | ltree, lquery[] | boolean + ltree | public | lt_q_rregex | lquery[], ltree | boolean + ltree | public | ltq_regex | ltree, lquery | boolean + ltree | public | ltq_rregex | lquery, ltree | boolean + ltree | public | ltree2text | ltree | text + ltree | public | ltree_addltree | ltree, ltree | ltree + ltree | public | ltree_addtext | ltree, text | ltree + ltree | public | ltree_cmp | ltree, ltree | integer + ltree | public | ltree_compress | internal | internal + ltree | public | ltree_consistent | internal, ltree, smallint, oid, internal | boolean + ltree | public | ltree_decompress | internal | internal + ltree | public | ltree_eq | ltree, ltree | boolean + ltree | public | ltree_ge | ltree, ltree | boolean + ltree | public | ltree_gist_in | cstring | ltree_gist + ltree | public | ltree_gist_options | internal | void + ltree | public | ltree_gist_out | ltree_gist | cstring + ltree | public | ltree_gt | ltree, ltree | boolean + ltree | public | ltree_in | cstring | ltree + ltree | public | ltree_isparent | ltree, ltree | boolean + ltree | public | ltree_le | ltree, ltree | boolean + ltree | public | ltree_lt | ltree, ltree | boolean + ltree | public | ltree_ne | ltree, ltree | boolean + ltree | public | ltree_out | ltree | cstring + ltree | public | ltree_penalty | internal, internal, internal | internal + ltree | public | ltree_picksplit | internal, internal | internal + ltree | public | ltree_recv | internal | ltree + ltree | public | ltree_risparent | ltree, ltree | boolean + ltree | public | ltree_same | ltree_gist, ltree_gist, internal | internal + ltree | public | ltree_send | ltree | bytea + ltree | public | ltree_textadd | text, ltree | ltree + ltree | public | ltree_union | internal, internal | ltree_gist + ltree | public | ltreeparentsel | internal, oid, internal, integer | double precision + ltree | public | ltxtq_exec | ltree, ltxtquery | boolean + ltree | public | ltxtq_in | cstring | ltxtquery + ltree | public | ltxtq_out | ltxtquery | cstring + ltree | public | ltxtq_recv | internal | ltxtquery + ltree | public | ltxtq_rexec | ltxtquery, ltree | boolean + ltree | public | ltxtq_send | ltxtquery | bytea + ltree | public | nlevel | ltree | integer + ltree | public | subltree | ltree, integer, integer | ltree + ltree | public | subpath | ltree, integer | ltree + ltree | public | subpath | ltree, integer, integer | ltree + ltree | public | text2ltree | text | ltree + moddatetime | public | moddatetime | | trigger + old_snapshot | public | pg_old_snapshot_time_mapping | OUT array_offset integer, OUT end_timestamp timestamp with time zone, OUT newest_xmin xid | SETOF record + pageinspect | public | brin_metapage_info | page bytea, OUT magic text, OUT version integer, OUT pagesperrange integer, OUT lastrevmappage bigint | record + pageinspect | public | brin_page_type | page bytea | text + pageinspect | public | brin_revmap_data | page bytea, OUT pages tid | SETOF tid + pageinspect | public | bt_metap | relname text, OUT magic integer, OUT version integer, OUT root bigint, OUT level bigint, OUT fastroot bigint, OUT fastlevel bigint, OUT last_cleanup_num_delpages bigint, OUT last_cleanup_num_tuples double precision, OUT allequalimage boolean | record + pageinspect | public | bt_page_items | page bytea, OUT itemoffset smallint, OUT ctid tid, OUT itemlen smallint, OUT nulls boolean, OUT vars boolean, OUT data text, OUT dead boolean, OUT htid tid, OUT tids tid[] | SETOF record + pageinspect | public | bt_page_items | relname text, blkno bigint, OUT itemoffset smallint, OUT ctid tid, OUT itemlen smallint, OUT nulls boolean, OUT vars boolean, OUT data text, OUT dead boolean, OUT htid tid, OUT tids tid[] | SETOF record + pageinspect | public | bt_page_stats | relname text, blkno bigint, OUT blkno bigint, OUT type "char", OUT live_items integer, OUT dead_items integer, OUT avg_item_size integer, OUT page_size integer, OUT free_size integer, OUT btpo_prev bigint, OUT btpo_next bigint, OUT btpo_level bigint, OUT btpo_flags integer | record + pageinspect | public | fsm_page_contents | page bytea | text + pageinspect | public | get_raw_page | text, bigint | bytea + pageinspect | public | get_raw_page | text, text, bigint | bytea + pageinspect | public | gin_leafpage_items | page bytea, OUT first_tid tid, OUT nbytes smallint, OUT tids tid[] | SETOF record + pageinspect | public | gin_metapage_info | page bytea, OUT pending_head bigint, OUT pending_tail bigint, OUT tail_free_size integer, OUT n_pending_pages bigint, OUT n_pending_tuples bigint, OUT n_total_pages bigint, OUT n_entry_pages bigint, OUT n_data_pages bigint, OUT n_entries bigint, OUT version integer | record + pageinspect | public | gin_page_opaque_info | page bytea, OUT rightlink bigint, OUT maxoff integer, OUT flags text[] | record + pageinspect | public | gist_page_items | page bytea, index_oid regclass, OUT itemoffset smallint, OUT ctid tid, OUT itemlen smallint, OUT dead boolean, OUT keys text | SETOF record + pageinspect | public | gist_page_items_bytea | page bytea, OUT itemoffset smallint, OUT ctid tid, OUT itemlen smallint, OUT dead boolean, OUT key_data bytea | SETOF record + pageinspect | public | gist_page_opaque_info | page bytea, OUT lsn pg_lsn, OUT nsn pg_lsn, OUT rightlink bigint, OUT flags text[] | record + pageinspect | public | hash_bitmap_info | index_oid regclass, blkno bigint, OUT bitmapblkno bigint, OUT bitmapbit integer, OUT bitstatus boolean | SETOF record + pageinspect | public | hash_metapage_info | page bytea, OUT magic bigint, OUT version bigint, OUT ntuples double precision, OUT ffactor integer, OUT bsize integer, OUT bmsize integer, OUT bmshift integer, OUT maxbucket bigint, OUT highmask bigint, OUT lowmask bigint, OUT ovflpoint bigint, OUT firstfree bigint, OUT nmaps bigint, OUT procid oid, OUT spares bigint[], OUT mapp bigint[] | record + pageinspect | public | hash_page_items | page bytea, OUT itemoffset integer, OUT ctid tid, OUT data bigint | SETOF record + pageinspect | public | hash_page_stats | page bytea, OUT live_items integer, OUT dead_items integer, OUT page_size integer, OUT free_size integer, OUT hasho_prevblkno bigint, OUT hasho_nextblkno bigint, OUT hasho_bucket bigint, OUT hasho_flag integer, OUT hasho_page_id integer | record + pageinspect | public | hash_page_type | page bytea | text + pageinspect | public | heap_page_item_attrs | page bytea, rel_oid regclass, OUT lp smallint, OUT lp_off smallint, OUT lp_flags smallint, OUT lp_len smallint, OUT t_xmin xid, OUT t_xmax xid, OUT t_field3 integer, OUT t_ctid tid, OUT t_infomask2 integer, OUT t_infomask integer, OUT t_hoff smallint, OUT t_bits text, OUT t_oid oid, OUT t_attrs bytea[] | SETOF record + pageinspect | public | heap_page_item_attrs | page bytea, rel_oid regclass, do_detoast boolean, OUT lp smallint, OUT lp_off smallint, OUT lp_flags smallint, OUT lp_len smallint, OUT t_xmin xid, OUT t_xmax xid, OUT t_field3 integer, OUT t_ctid tid, OUT t_infomask2 integer, OUT t_infomask integer, OUT t_hoff smallint, OUT t_bits text, OUT t_oid oid, OUT t_attrs bytea[] | SETOF record + pageinspect | public | heap_page_items | page bytea, OUT lp smallint, OUT lp_off smallint, OUT lp_flags smallint, OUT lp_len smallint, OUT t_xmin xid, OUT t_xmax xid, OUT t_field3 integer, OUT t_ctid tid, OUT t_infomask2 integer, OUT t_infomask integer, OUT t_hoff smallint, OUT t_bits text, OUT t_oid oid, OUT t_data bytea | SETOF record + pageinspect | public | heap_tuple_infomask_flags | t_infomask integer, t_infomask2 integer, OUT raw_flags text[], OUT combined_flags text[] | record + pageinspect | public | page_checksum | page bytea, blkno bigint | smallint + pageinspect | public | page_header | page bytea, OUT lsn pg_lsn, OUT checksum smallint, OUT flags smallint, OUT lower integer, OUT upper integer, OUT special integer, OUT pagesize integer, OUT version smallint, OUT prune_xid xid | record + pageinspect | public | tuple_data_split | rel_oid oid, t_data bytea, t_infomask integer, t_infomask2 integer, t_bits text | bytea[] + pageinspect | public | tuple_data_split | rel_oid oid, t_data bytea, t_infomask integer, t_infomask2 integer, t_bits text, do_detoast boolean | bytea[] + pg_buffercache | public | pg_buffercache_pages | | SETOF record + pg_freespacemap | public | pg_freespace | rel regclass, OUT blkno bigint, OUT avail smallint | SETOF record + pg_freespacemap | public | pg_freespace | regclass, bigint | smallint + pg_graphql | graphql | _internal_resolve | query text, variables jsonb, "operationName" text, extensions jsonb | jsonb + pg_graphql | graphql | comment_directive | comment_ text | jsonb + pg_graphql | graphql | exception | message text | text + pg_graphql | graphql | get_schema_version | | integer + pg_graphql | graphql | increment_schema_version | | event_trigger + pg_graphql | graphql | resolve | query text, variables jsonb, "operationName" text, extensions jsonb | jsonb + pg_graphql | graphql_public | graphql | "operationName" text, query text, variables jsonb, extensions jsonb | jsonb + pg_hashids | public | hash_decode | text, text, integer | integer + pg_hashids | public | hash_encode | bigint | text + pg_hashids | public | hash_encode | bigint, text | text + pg_hashids | public | hash_encode | bigint, text, integer | text + pg_hashids | public | id_decode | text | bigint[] + pg_hashids | public | id_decode | text, text | bigint[] + pg_hashids | public | id_decode | text, text, integer, text | bigint[] + pg_hashids | public | id_decode | text, text, integer | bigint[] + pg_hashids | public | id_decode_once | text | bigint + pg_hashids | public | id_decode_once | text, text | bigint + pg_hashids | public | id_decode_once | text, text, integer, text | bigint + pg_hashids | public | id_decode_once | text, text, integer | bigint + pg_hashids | public | id_encode | bigint | text + pg_hashids | public | id_encode | bigint[] | text + pg_hashids | public | id_encode | bigint[], text | text + pg_hashids | public | id_encode | bigint[], text, integer | text + pg_hashids | public | id_encode | bigint, text | text + pg_hashids | public | id_encode | bigint, text, integer | text + pg_hashids | public | id_encode | bigint, text, integer, text | text + pg_hashids | public | id_encode | bigint[], text, integer, text | text + pg_jsonschema | public | json_matches_schema | schema json, instance json | boolean + pg_jsonschema | public | jsonb_matches_schema | schema json, instance jsonb | boolean + pg_jsonschema | public | jsonschema_is_valid | schema json | boolean + pg_jsonschema | public | jsonschema_validation_errors | schema json, instance json | text[] + pg_net | net | _await_response | request_id bigint | boolean + pg_net | net | _encode_url_with_params_array | url text, params_array text[] | text + pg_net | net | _http_collect_response | request_id bigint, async boolean | net.http_response_result + pg_net | net | _urlencode_string | string character varying | text + pg_net | net | check_worker_is_up | | void + pg_net | net | http_collect_response | request_id bigint, async boolean | net.http_response_result + pg_net | net | http_delete | url text, params jsonb, headers jsonb, timeout_milliseconds integer | bigint + pg_net | net | http_get | url text, params jsonb, headers jsonb, timeout_milliseconds integer | bigint + pg_net | net | http_post | url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer | bigint + pg_net | net | worker_restart | | boolean + pg_prewarm | public | autoprewarm_dump_now | | bigint + pg_prewarm | public | autoprewarm_start_worker | | void + pg_prewarm | public | pg_prewarm | regclass, mode text, fork text, first_block bigint, last_block bigint | bigint + pg_repack | repack | conflicted_triggers | oid | SETOF name + pg_repack | repack | create_index_type | oid, oid | void + pg_repack | repack | create_log_table | oid | void + pg_repack | repack | create_table | oid, name | void + pg_repack | repack | disable_autovacuum | regclass | void + pg_repack | repack | get_alter_col_storage | oid | text + pg_repack | repack | get_assign | oid, text | text + pg_repack | repack | get_columns_for_create_as | oid | text + pg_repack | repack | get_compare_pkey | oid, text | text + pg_repack | repack | get_create_index_type | oid, name | text + pg_repack | repack | get_create_trigger | relid oid, pkid oid | text + pg_repack | repack | get_drop_columns | oid, text | text + pg_repack | repack | get_enable_trigger | relid oid | text + pg_repack | repack | get_index_columns | oid | text + pg_repack | repack | get_order_by | oid, oid | text + pg_repack | repack | get_storage_param | oid | text + pg_repack | repack | get_table_and_inheritors | regclass | regclass[] + pg_repack | repack | oid2text | oid | text + pg_repack | repack | repack_apply | sql_peek cstring, sql_insert cstring, sql_delete cstring, sql_update cstring, sql_pop cstring, count integer | integer + pg_repack | repack | repack_drop | oid, integer | void + pg_repack | repack | repack_index_swap | oid | void + pg_repack | repack | repack_indexdef | oid, oid, name, boolean | text + pg_repack | repack | repack_swap | oid | void + pg_repack | repack | repack_trigger | | trigger + pg_repack | repack | version | | text + pg_repack | repack | version_sql | | text + pg_stat_monitor | public | decode_error_level | elevel integer | text + pg_stat_monitor | public | get_cmd_type | cmd_type integer | text + pg_stat_monitor | public | get_histogram_timings | | text + pg_stat_monitor | public | histogram | _bucket integer, _quryid bigint | SETOF record + pg_stat_monitor | public | pg_stat_monitor_internal | showtext boolean, OUT bucket bigint, OUT userid oid, OUT username text, OUT dbid oid, OUT datname text, OUT client_ip bigint, OUT queryid bigint, OUT planid bigint, OUT query text, OUT query_plan text, OUT pgsm_query_id bigint, OUT top_queryid bigint, OUT top_query text, OUT application_name text, OUT relations text, OUT cmd_type integer, OUT elevel integer, OUT sqlcode text, OUT message text, OUT bucket_start_time timestamp with time zone, OUT calls bigint, OUT total_exec_time double precision, OUT min_exec_time double precision, OUT max_exec_time double precision, OUT mean_exec_time double precision, OUT stddev_exec_time double precision, OUT rows bigint, OUT plans bigint, OUT total_plan_time double precision, OUT min_plan_time double precision, OUT max_plan_time double precision, OUT mean_plan_time double precision, OUT stddev_plan_time double precision, OUT shared_blks_hit bigint, OUT shared_blks_read bigint, OUT shared_blks_dirtied bigint, OUT shared_blks_written bigint, OUT local_blks_hit bigint, OUT local_blks_read bigint, OUT local_blks_dirtied bigint, OUT local_blks_written bigint, OUT temp_blks_read bigint, OUT temp_blks_written bigint, OUT shared_blk_read_time double precision, OUT shared_blk_write_time double precision, OUT local_blk_read_time double precision, OUT local_blk_write_time double precision, OUT temp_blk_read_time double precision, OUT temp_blk_write_time double precision, OUT resp_calls text, OUT cpu_user_time double precision, OUT cpu_sys_time double precision, OUT wal_records bigint, OUT wal_fpi bigint, OUT wal_bytes numeric, OUT comments text, OUT jit_functions bigint, OUT jit_generation_time double precision, OUT jit_inlining_count bigint, OUT jit_inlining_time double precision, OUT jit_optimization_count bigint, OUT jit_optimization_time double precision, OUT jit_emission_count bigint, OUT jit_emission_time double precision, OUT jit_deform_count bigint, OUT jit_deform_time double precision, OUT stats_since timestamp with time zone, OUT minmax_stats_since timestamp with time zone, OUT toplevel boolean, OUT bucket_done boolean | SETOF record + pg_stat_monitor | public | pg_stat_monitor_reset | | void + pg_stat_monitor | public | pg_stat_monitor_version | | text + pg_stat_monitor | public | pgsm_create_11_view | | integer + pg_stat_monitor | public | pgsm_create_13_view | | integer + pg_stat_monitor | public | pgsm_create_14_view | | integer + pg_stat_monitor | public | pgsm_create_15_view | | integer + pg_stat_monitor | public | pgsm_create_17_view | | integer + pg_stat_monitor | public | pgsm_create_view | | integer + pg_stat_monitor | public | range | | text[] + pg_stat_statements | extensions | pg_stat_statements | showtext boolean, OUT userid oid, OUT dbid oid, OUT toplevel boolean, OUT queryid bigint, OUT query text, OUT plans bigint, OUT total_plan_time double precision, OUT min_plan_time double precision, OUT max_plan_time double precision, OUT mean_plan_time double precision, OUT stddev_plan_time double precision, OUT calls bigint, OUT total_exec_time double precision, OUT min_exec_time double precision, OUT max_exec_time double precision, OUT mean_exec_time double precision, OUT stddev_exec_time double precision, OUT rows bigint, OUT shared_blks_hit bigint, OUT shared_blks_read bigint, OUT shared_blks_dirtied bigint, OUT shared_blks_written bigint, OUT local_blks_hit bigint, OUT local_blks_read bigint, OUT local_blks_dirtied bigint, OUT local_blks_written bigint, OUT temp_blks_read bigint, OUT temp_blks_written bigint, OUT blk_read_time double precision, OUT blk_write_time double precision, OUT temp_blk_read_time double precision, OUT temp_blk_write_time double precision, OUT wal_records bigint, OUT wal_fpi bigint, OUT wal_bytes numeric, OUT jit_functions bigint, OUT jit_generation_time double precision, OUT jit_inlining_count bigint, OUT jit_inlining_time double precision, OUT jit_optimization_count bigint, OUT jit_optimization_time double precision, OUT jit_emission_count bigint, OUT jit_emission_time double precision | SETOF record + pg_stat_statements | extensions | pg_stat_statements_info | OUT dealloc bigint, OUT stats_reset timestamp with time zone | record + pg_stat_statements | extensions | pg_stat_statements_reset | userid oid, dbid oid, queryid bigint | void + pg_surgery | public | heap_force_freeze | reloid regclass, tids tid[] | void + pg_surgery | public | heap_force_kill | reloid regclass, tids tid[] | void + pg_tle | pgtle | available_extension_versions | OUT name name, OUT version text, OUT superuser boolean, OUT trusted boolean, OUT relocatable boolean, OUT schema name, OUT requires name[], OUT comment text | SETOF record + pg_tle | pgtle | available_extensions | OUT name name, OUT default_version text, OUT comment text | SETOF record + pg_tle | pgtle | create_base_type | typenamespace regnamespace, typename name, infunc regprocedure, outfunc regprocedure, internallength integer, alignment text, storage text | void + pg_tle | pgtle | create_base_type_if_not_exists | typenamespace regnamespace, typename name, infunc regprocedure, outfunc regprocedure, internallength integer, alignment text, storage text | boolean + pg_tle | pgtle | create_operator_func | typenamespace regnamespace, typename name, opfunc regprocedure | void + pg_tle | pgtle | create_operator_func_if_not_exists | typenamespace regnamespace, typename name, opfunc regprocedure | boolean + pg_tle | pgtle | create_shell_type | typenamespace regnamespace, typename name | void + pg_tle | pgtle | create_shell_type_if_not_exists | typenamespace regnamespace, typename name | boolean + pg_tle | pgtle | extension_update_paths | name name, OUT source text, OUT target text, OUT path text | SETOF record + pg_tle | pgtle | install_extension | name text, version text, description text, ext text, requires text[] | boolean + pg_tle | pgtle | install_extension_version_sql | name text, version text, ext text | boolean + pg_tle | pgtle | install_update_path | name text, fromvers text, tovers text, ext text | boolean + pg_tle | pgtle | pg_tle_feature_info_sql_drop | | event_trigger + pg_tle | pgtle | register_feature | proc regproc, feature pgtle.pg_tle_features | void + pg_tle | pgtle | register_feature_if_not_exists | proc regproc, feature pgtle.pg_tle_features | boolean + pg_tle | pgtle | set_default_version | name text, version text | boolean + pg_tle | pgtle | uninstall_extension | extname text | boolean + pg_tle | pgtle | uninstall_extension | extname text, version text | boolean + pg_tle | pgtle | uninstall_extension_if_exists | extname text | boolean + pg_tle | pgtle | uninstall_update_path | extname text, fromvers text, tovers text | boolean + pg_tle | pgtle | uninstall_update_path_if_exists | extname text, fromvers text, tovers text | boolean + pg_tle | pgtle | unregister_feature | proc regproc, feature pgtle.pg_tle_features | void + pg_tle | pgtle | unregister_feature_if_exists | proc regproc, feature pgtle.pg_tle_features | boolean + pg_trgm | public | gin_extract_query_trgm | text, internal, smallint, internal, internal, internal, internal | internal + pg_trgm | public | gin_extract_value_trgm | text, internal | internal + pg_trgm | public | gin_trgm_consistent | internal, smallint, text, integer, internal, internal, internal, internal | boolean + pg_trgm | public | gin_trgm_triconsistent | internal, smallint, text, integer, internal, internal, internal | "char" + pg_trgm | public | gtrgm_compress | internal | internal + pg_trgm | public | gtrgm_consistent | internal, text, smallint, oid, internal | boolean + pg_trgm | public | gtrgm_decompress | internal | internal + pg_trgm | public | gtrgm_distance | internal, text, smallint, oid, internal | double precision + pg_trgm | public | gtrgm_in | cstring | gtrgm + pg_trgm | public | gtrgm_options | internal | void + pg_trgm | public | gtrgm_out | gtrgm | cstring + pg_trgm | public | gtrgm_penalty | internal, internal, internal | internal + pg_trgm | public | gtrgm_picksplit | internal, internal | internal + pg_trgm | public | gtrgm_same | gtrgm, gtrgm, internal | internal + pg_trgm | public | gtrgm_union | internal, internal | gtrgm + pg_trgm | public | set_limit | real | real + pg_trgm | public | show_limit | | real + pg_trgm | public | show_trgm | text | text[] + pg_trgm | public | similarity | text, text | real + pg_trgm | public | similarity_dist | text, text | real + pg_trgm | public | similarity_op | text, text | boolean + pg_trgm | public | strict_word_similarity | text, text | real + pg_trgm | public | strict_word_similarity_commutator_op | text, text | boolean + pg_trgm | public | strict_word_similarity_dist_commutator_op | text, text | real + pg_trgm | public | strict_word_similarity_dist_op | text, text | real + pg_trgm | public | strict_word_similarity_op | text, text | boolean + pg_trgm | public | word_similarity | text, text | real + pg_trgm | public | word_similarity_commutator_op | text, text | boolean + pg_trgm | public | word_similarity_dist_commutator_op | text, text | real + pg_trgm | public | word_similarity_dist_op | text, text | real + pg_trgm | public | word_similarity_op | text, text | boolean + pg_visibility | public | pg_check_frozen | regclass, OUT t_ctid tid | SETOF tid + pg_visibility | public | pg_check_visible | regclass, OUT t_ctid tid | SETOF tid + pg_visibility | public | pg_truncate_visibility_map | regclass | void + pg_visibility | public | pg_visibility | regclass, OUT blkno bigint, OUT all_visible boolean, OUT all_frozen boolean, OUT pd_all_visible boolean | SETOF record + pg_visibility | public | pg_visibility | regclass, blkno bigint, OUT all_visible boolean, OUT all_frozen boolean, OUT pd_all_visible boolean | record + pg_visibility | public | pg_visibility_map | regclass, blkno bigint, OUT all_visible boolean, OUT all_frozen boolean | record + pg_visibility | public | pg_visibility_map | regclass, OUT blkno bigint, OUT all_visible boolean, OUT all_frozen boolean | SETOF record + pg_visibility | public | pg_visibility_map_summary | regclass, OUT all_visible bigint, OUT all_frozen bigint | record + pg_walinspect | public | pg_get_wal_record_info | in_lsn pg_lsn, OUT start_lsn pg_lsn, OUT end_lsn pg_lsn, OUT prev_lsn pg_lsn, OUT xid xid, OUT resource_manager text, OUT record_type text, OUT record_length integer, OUT main_data_length integer, OUT fpi_length integer, OUT description text, OUT block_ref text | record + pg_walinspect | public | pg_get_wal_records_info | start_lsn pg_lsn, end_lsn pg_lsn, OUT start_lsn pg_lsn, OUT end_lsn pg_lsn, OUT prev_lsn pg_lsn, OUT xid xid, OUT resource_manager text, OUT record_type text, OUT record_length integer, OUT main_data_length integer, OUT fpi_length integer, OUT description text, OUT block_ref text | SETOF record + pg_walinspect | public | pg_get_wal_stats | start_lsn pg_lsn, end_lsn pg_lsn, per_record boolean, OUT "resource_manager/record_type" text, OUT count bigint, OUT count_percentage double precision, OUT record_size bigint, OUT record_size_percentage double precision, OUT fpi_size bigint, OUT fpi_size_percentage double precision, OUT combined_size bigint, OUT combined_size_percentage double precision | SETOF record + pgaudit | public | pgaudit_ddl_command_end | | event_trigger + pgaudit | public | pgaudit_sql_drop | | event_trigger + pgcrypto | extensions | armor | bytea, text[], text[] | text + pgcrypto | extensions | armor | bytea | text + pgcrypto | extensions | crypt | text, text | text + pgcrypto | extensions | dearmor | text | bytea + pgcrypto | extensions | decrypt | bytea, bytea, text | bytea + pgcrypto | extensions | decrypt_iv | bytea, bytea, bytea, text | bytea + pgcrypto | extensions | digest | text, text | bytea + pgcrypto | extensions | digest | bytea, text | bytea + pgcrypto | extensions | encrypt | bytea, bytea, text | bytea + pgcrypto | extensions | encrypt_iv | bytea, bytea, bytea, text | bytea + pgcrypto | extensions | gen_random_bytes | integer | bytea + pgcrypto | extensions | gen_random_uuid | | uuid + pgcrypto | extensions | gen_salt | text | text + pgcrypto | extensions | gen_salt | text, integer | text + pgcrypto | extensions | hmac | text, text, text | bytea + pgcrypto | extensions | hmac | bytea, bytea, text | bytea + pgcrypto | extensions | pgp_armor_headers | text, OUT key text, OUT value text | SETOF record + pgcrypto | extensions | pgp_key_id | bytea | text + pgcrypto | extensions | pgp_pub_decrypt | bytea, bytea | text + pgcrypto | extensions | pgp_pub_decrypt | bytea, bytea, text, text | text + pgcrypto | extensions | pgp_pub_decrypt | bytea, bytea, text | text + pgcrypto | extensions | pgp_pub_decrypt_bytea | bytea, bytea | bytea + pgcrypto | extensions | pgp_pub_decrypt_bytea | bytea, bytea, text, text | bytea + pgcrypto | extensions | pgp_pub_decrypt_bytea | bytea, bytea, text | bytea + pgcrypto | extensions | pgp_pub_encrypt | text, bytea, text | bytea + pgcrypto | extensions | pgp_pub_encrypt | text, bytea | bytea + pgcrypto | extensions | pgp_pub_encrypt_bytea | bytea, bytea | bytea + pgcrypto | extensions | pgp_pub_encrypt_bytea | bytea, bytea, text | bytea + pgcrypto | extensions | pgp_sym_decrypt | bytea, text | text + pgcrypto | extensions | pgp_sym_decrypt | bytea, text, text | text + pgcrypto | extensions | pgp_sym_decrypt_bytea | bytea, text | bytea + pgcrypto | extensions | pgp_sym_decrypt_bytea | bytea, text, text | bytea + pgcrypto | extensions | pgp_sym_encrypt | text, text | bytea + pgcrypto | extensions | pgp_sym_encrypt | text, text, text | bytea + pgcrypto | extensions | pgp_sym_encrypt_bytea | bytea, text | bytea + pgcrypto | extensions | pgp_sym_encrypt_bytea | bytea, text, text | bytea + pgjwt | extensions | algorithm_sign | signables text, secret text, algorithm text | text + pgjwt | extensions | sign | payload json, secret text, algorithm text | text + pgjwt | extensions | try_cast_double | inp text | double precision + pgjwt | extensions | url_decode | data text | bytea + pgjwt | extensions | url_encode | data bytea | text + pgjwt | extensions | verify | token text, secret text, algorithm text | TABLE(header json, payload json, valid boolean) + pgmq | pgmq | _belongs_to_pgmq | table_name text | boolean + pgmq | pgmq | _ensure_pg_partman_installed | | void + pgmq | pgmq | _get_partition_col | partition_interval text | text + pgmq | pgmq | _get_pg_partman_major_version | | integer + pgmq | pgmq | _get_pg_partman_schema | | text + pgmq | pgmq | archive | queue_name text, msg_id bigint | boolean + pgmq | pgmq | archive | queue_name text, msg_ids bigint[] | SETOF bigint + pgmq | pgmq | convert_archive_partitioned | table_name text, partition_interval text, retention_interval text, leading_partition integer | void + pgmq | pgmq | create | queue_name text | void + pgmq | pgmq | create_non_partitioned | queue_name text | void + pgmq | pgmq | create_partitioned | queue_name text, partition_interval text, retention_interval text | void + pgmq | pgmq | create_unlogged | queue_name text | void + pgmq | pgmq | delete | queue_name text, msg_id bigint | boolean + pgmq | pgmq | delete | queue_name text, msg_ids bigint[] | SETOF bigint + pgmq | pgmq | detach_archive | queue_name text | void + pgmq | pgmq | drop_queue | queue_name text | boolean + pgmq | pgmq | format_table_name | queue_name text, prefix text | text + pgmq | pgmq | list_queues | | SETOF pgmq.queue_record + pgmq | pgmq | metrics | queue_name text | pgmq.metrics_result + pgmq | pgmq | metrics_all | | SETOF pgmq.metrics_result + pgmq | pgmq | pop | queue_name text | SETOF pgmq.message_record + pgmq | pgmq | purge_queue | queue_name text | bigint + pgmq | pgmq | read | queue_name text, vt integer, qty integer | SETOF pgmq.message_record + pgmq | pgmq | read_with_poll | queue_name text, vt integer, qty integer, max_poll_seconds integer, poll_interval_ms integer | SETOF pgmq.message_record + pgmq | pgmq | send | queue_name text, msg jsonb, delay integer | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], delay integer | SETOF bigint + pgmq | pgmq | set_vt | queue_name text, msg_id bigint, vt integer | SETOF pgmq.message_record + pgmq | pgmq | validate_queue_name | queue_name text | void + pgroonga | pgroonga | command | groongacommand text | text + pgroonga | pgroonga | command | groongacommand text, arguments text[] | text + pgroonga | pgroonga | command_escape_value | value text | text + pgroonga | pgroonga | contain_varchar_array | character varying[], character varying | boolean + pgroonga | pgroonga | escape | value bigint | text + pgroonga | pgroonga | escape | value double precision | text + pgroonga | pgroonga | escape | value text, special_characters text | text + pgroonga | pgroonga | escape | value timestamp without time zone | text + pgroonga | pgroonga | escape | value smallint | text + pgroonga | pgroonga | escape | value text | text + pgroonga | pgroonga | escape | value timestamp with time zone | text + pgroonga | pgroonga | escape | value real | text + pgroonga | pgroonga | escape | value boolean | text + pgroonga | pgroonga | escape | value integer | text + pgroonga | pgroonga | flush | indexname cstring | boolean + pgroonga | pgroonga | highlight_html | target text, keywords text[] | text + pgroonga | pgroonga | match_in_text | text, text[] | boolean + pgroonga | pgroonga | match_in_text_array | text[], text[] | boolean + pgroonga | pgroonga | match_in_varchar | character varying, character varying[] | boolean + pgroonga | pgroonga | match_jsonb | jsonb, text | boolean + pgroonga | pgroonga | match_positions_byte | target text, keywords text[] | integer[] + pgroonga | pgroonga | match_positions_character | target text, keywords text[] | integer[] + pgroonga | pgroonga | match_query | text, text | boolean + pgroonga | pgroonga | match_query | character varying, character varying | boolean + pgroonga | pgroonga | match_query | text[], text | boolean + pgroonga | pgroonga | match_regexp | text, text | boolean + pgroonga | pgroonga | match_regexp | character varying, character varying | boolean + pgroonga | pgroonga | match_script_jsonb | jsonb, text | boolean + pgroonga | pgroonga | match_term | target text, term text | boolean + pgroonga | pgroonga | match_term | target text[], term text | boolean + pgroonga | pgroonga | match_term | target character varying[], term character varying | boolean + pgroonga | pgroonga | match_term | target character varying, term character varying | boolean + pgroonga | pgroonga | match_text | text, text | boolean + pgroonga | pgroonga | match_text_array | text[], text | boolean + pgroonga | pgroonga | match_varchar | character varying, character varying | boolean + pgroonga | pgroonga | prefix_in_text | text, text[] | boolean + pgroonga | pgroonga | prefix_in_text_array | text[], text[] | boolean + pgroonga | pgroonga | prefix_rk_in_text | text, text[] | boolean + pgroonga | pgroonga | prefix_rk_in_text_array | text[], text[] | boolean + pgroonga | pgroonga | prefix_rk_text | text, text | boolean + pgroonga | pgroonga | prefix_rk_text_array | text[], text | boolean + pgroonga | pgroonga | prefix_text | text, text | boolean + pgroonga | pgroonga | prefix_text_array | text[], text | boolean + pgroonga | pgroonga | query_escape | query text | text + pgroonga | pgroonga | query_expand | tablename cstring, termcolumnname text, synonymscolumnname text, query text | text + pgroonga | pgroonga | query_extract_keywords | query text | text[] + pgroonga | pgroonga | query_in_text | text, text[] | boolean + pgroonga | pgroonga | query_in_text_array | text[], text[] | boolean + pgroonga | pgroonga | query_in_varchar | character varying, character varying[] | boolean + pgroonga | pgroonga | query_jsonb | jsonb, text | boolean + pgroonga | pgroonga | query_text | text, text | boolean + pgroonga | pgroonga | query_text_array | text[], text | boolean + pgroonga | pgroonga | query_varchar | character varying, character varying | boolean + pgroonga | pgroonga | regexp_text | text, text | boolean + pgroonga | pgroonga | regexp_varchar | character varying, character varying | boolean + pgroonga | pgroonga | score | "row" record | double precision + pgroonga | pgroonga | script_jsonb | jsonb, text | boolean + pgroonga | pgroonga | script_text | text, text | boolean + pgroonga | pgroonga | script_text_array | text[], text | boolean + pgroonga | pgroonga | script_varchar | character varying, character varying | boolean + pgroonga | pgroonga | similar_text | text, text | boolean + pgroonga | pgroonga | similar_text_array | text[], text | boolean + pgroonga | pgroonga | similar_varchar | character varying, character varying | boolean + pgroonga | pgroonga | snippet_html | target text, keywords text[], width integer | text[] + pgroonga | pgroonga | table_name | indexname cstring | text + pgroonga | public | pgroonga_command | groongacommand text | text + pgroonga | public | pgroonga_command | groongacommand text, arguments text[] | text + pgroonga | public | pgroonga_command_escape_value | value text | text + pgroonga | public | pgroonga_condition | query text, weights integer[], scorers text[], schema_name text, index_name text, column_name text, fuzzy_max_distance_ratio real | pgroonga_condition + pgroonga | public | pgroonga_contain_varchar_array | character varying[], character varying | boolean + pgroonga | public | pgroonga_equal_query_text_array | targets text[], query text | boolean + pgroonga | public | pgroonga_equal_query_text_array_condition | targets text[], condition pgroonga_condition | boolean + pgroonga | public | pgroonga_equal_query_text_array_condition | targets text[], condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_equal_query_varchar_array | targets character varying[], query text | boolean + pgroonga | public | pgroonga_equal_query_varchar_array_condition | targets character varying[], condition pgroonga_condition | boolean + pgroonga | public | pgroonga_equal_query_varchar_array_condition | targets character varying[], condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_equal_text | target text, other text | boolean + pgroonga | public | pgroonga_equal_text_condition | target text, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_equal_text_condition | target text, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_equal_varchar | target character varying, other character varying | boolean + pgroonga | public | pgroonga_equal_varchar_condition | target character varying, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_equal_varchar_condition | target character varying, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_escape | value bigint | text + pgroonga | public | pgroonga_escape | value double precision | text + pgroonga | public | pgroonga_escape | value text, special_characters text | text + pgroonga | public | pgroonga_escape | value timestamp without time zone | text + pgroonga | public | pgroonga_escape | value smallint | text + pgroonga | public | pgroonga_escape | value text | text + pgroonga | public | pgroonga_escape | value timestamp with time zone | text + pgroonga | public | pgroonga_escape | value real | text + pgroonga | public | pgroonga_escape | value boolean | text + pgroonga | public | pgroonga_escape | value integer | text + pgroonga | public | pgroonga_flush | indexname cstring | boolean + pgroonga | public | pgroonga_handler | internal | index_am_handler + pgroonga | public | pgroonga_highlight_html | target text, keywords text[], indexname cstring | text + pgroonga | public | pgroonga_highlight_html | targets text[], keywords text[], indexname cstring | text[] + pgroonga | public | pgroonga_highlight_html | target text, keywords text[] | text + pgroonga | public | pgroonga_highlight_html | targets text[], keywords text[] | text[] + pgroonga | public | pgroonga_index_column_name | indexname cstring, columnindex integer | text + pgroonga | public | pgroonga_index_column_name | indexname cstring, columnname text | text + pgroonga | public | pgroonga_is_writable | | boolean + pgroonga | public | pgroonga_list_broken_indexes | | SETOF text + pgroonga | public | pgroonga_list_lagged_indexes | | SETOF text + pgroonga | public | pgroonga_match_in_text | text, text[] | boolean + pgroonga | public | pgroonga_match_in_text_array | text[], text[] | boolean + pgroonga | public | pgroonga_match_in_varchar | character varying, character varying[] | boolean + pgroonga | public | pgroonga_match_jsonb | jsonb, text | boolean + pgroonga | public | pgroonga_match_positions_byte | target text, keywords text[], indexname cstring | integer[] + pgroonga | public | pgroonga_match_positions_byte | target text, keywords text[] | integer[] + pgroonga | public | pgroonga_match_positions_character | target text, keywords text[], indexname cstring | integer[] + pgroonga | public | pgroonga_match_positions_character | target text, keywords text[] | integer[] + pgroonga | public | pgroonga_match_query | text, text | boolean + pgroonga | public | pgroonga_match_query | character varying, character varying | boolean + pgroonga | public | pgroonga_match_query | text[], text | boolean + pgroonga | public | pgroonga_match_regexp | text, text | boolean + pgroonga | public | pgroonga_match_regexp | character varying, character varying | boolean + pgroonga | public | pgroonga_match_script_jsonb | jsonb, text | boolean + pgroonga | public | pgroonga_match_term | target text, term text | boolean + pgroonga | public | pgroonga_match_term | target text[], term text | boolean + pgroonga | public | pgroonga_match_term | target character varying[], term character varying | boolean + pgroonga | public | pgroonga_match_term | target character varying, term character varying | boolean + pgroonga | public | pgroonga_match_text | text, text | boolean + pgroonga | public | pgroonga_match_text_array | text[], text | boolean + pgroonga | public | pgroonga_match_text_array_condition | target text[], condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_match_text_array_condition | target text[], condition pgroonga_condition | boolean + pgroonga | public | pgroonga_match_text_array_condition_with_scorers | target text[], condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_match_text_condition | target text, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_match_text_condition | target text, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_match_text_condition_with_scorers | target text, condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_match_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_match_varchar_condition | target character varying, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_match_varchar_condition | target character varying, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_match_varchar_condition_with_scorers | target character varying, condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_normalize | target text | text + pgroonga | public | pgroonga_normalize | target text, normalizername text | text + pgroonga | public | pgroonga_not_prefix_in_text | text, text[] | boolean + pgroonga | public | pgroonga_prefix_in_text | text, text[] | boolean + pgroonga | public | pgroonga_prefix_in_text_array | text[], text[] | boolean + pgroonga | public | pgroonga_prefix_in_varchar | character varying, character varying[] | boolean + pgroonga | public | pgroonga_prefix_in_varchar_array | character varying[], character varying[] | boolean + pgroonga | public | pgroonga_prefix_rk_in_text | text, text[] | boolean + pgroonga | public | pgroonga_prefix_rk_in_text_array | text[], text[] | boolean + pgroonga | public | pgroonga_prefix_rk_in_varchar | character varying, character varying[] | boolean + pgroonga | public | pgroonga_prefix_rk_in_varchar_array | character varying[], character varying[] | boolean + pgroonga | public | pgroonga_prefix_rk_text | text, text | boolean + pgroonga | public | pgroonga_prefix_rk_text_array | text[], text | boolean + pgroonga | public | pgroonga_prefix_rk_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_prefix_rk_varchar_array | character varying[], character varying | boolean + pgroonga | public | pgroonga_prefix_text | text, text | boolean + pgroonga | public | pgroonga_prefix_text_array | text[], text | boolean + pgroonga | public | pgroonga_prefix_text_array_condition | text[], pgroonga_condition | boolean + pgroonga | public | pgroonga_prefix_text_condition | text, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_prefix_text_condition | text, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_prefix_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_prefix_varchar_array | character varying[], character varying | boolean + pgroonga | public | pgroonga_prefix_varchar_array_condition | character varying[], pgroonga_condition | boolean + pgroonga | public | pgroonga_prefix_varchar_condition | target character varying, conditoin pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_prefix_varchar_condition | target character varying, conditoin pgroonga_condition | boolean + pgroonga | public | pgroonga_query_escape | query text | text + pgroonga | public | pgroonga_query_expand | tablename cstring, termcolumnname text, synonymscolumnname text, query text | text + pgroonga | public | pgroonga_query_extract_keywords | query text, index_name text | text[] + pgroonga | public | pgroonga_query_in_text | text, text[] | boolean + pgroonga | public | pgroonga_query_in_text_array | text[], text[] | boolean + pgroonga | public | pgroonga_query_in_varchar | character varying, character varying[] | boolean + pgroonga | public | pgroonga_query_jsonb | jsonb, text | boolean + pgroonga | public | pgroonga_query_text | text, text | boolean + pgroonga | public | pgroonga_query_text_array | text[], text | boolean + pgroonga | public | pgroonga_query_text_array_condition | targets text[], condition pgroonga_condition | boolean + pgroonga | public | pgroonga_query_text_array_condition | targets text[], condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_query_text_array_condition_with_scorers | targets text[], condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_query_text_condition | target text, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_query_text_condition | target text, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_query_text_condition_with_scorers | target text, condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_query_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_query_varchar_condition | target character varying, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_query_varchar_condition | target character varying, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_query_varchar_condition_with_scorers | target character varying, condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_regexp_in_text | text, text[] | boolean + pgroonga | public | pgroonga_regexp_in_varchar | character varying, character varying[] | boolean + pgroonga | public | pgroonga_regexp_text | text, text | boolean + pgroonga | public | pgroonga_regexp_text_array | targets text[], pattern text | boolean + pgroonga | public | pgroonga_regexp_text_array_condition | targets text[], pattern pgroonga_condition | boolean + pgroonga | public | pgroonga_regexp_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_result_to_jsonb_objects | result jsonb | jsonb + pgroonga | public | pgroonga_result_to_recordset | result jsonb | SETOF record + pgroonga | public | pgroonga_score | "row" record | double precision + pgroonga | public | pgroonga_score | tableoid oid, ctid tid | double precision + pgroonga | public | pgroonga_script_jsonb | jsonb, text | boolean + pgroonga | public | pgroonga_script_text | text, text | boolean + pgroonga | public | pgroonga_script_text_array | text[], text | boolean + pgroonga | public | pgroonga_script_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_set_writable | newwritable boolean | boolean + pgroonga | public | pgroonga_similar_text | text, text | boolean + pgroonga | public | pgroonga_similar_text_array | text[], text | boolean + pgroonga | public | pgroonga_similar_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_snippet_html | target text, keywords text[], width integer | text[] + pgroonga | public | pgroonga_table_name | indexname cstring | text + pgroonga | public | pgroonga_tokenize | target text, VARIADIC options text[] | json[] + pgroonga | public | pgroonga_vacuum | | boolean + pgroonga | public | pgroonga_wal_apply | indexname cstring | bigint + pgroonga | public | pgroonga_wal_apply | | bigint + pgroonga | public | pgroonga_wal_set_applied_position | block bigint, "offset" bigint | boolean + pgroonga | public | pgroonga_wal_set_applied_position | indexname cstring, block bigint, "offset" bigint | boolean + pgroonga | public | pgroonga_wal_set_applied_position | indexname cstring | boolean + pgroonga | public | pgroonga_wal_set_applied_position | | boolean + pgroonga | public | pgroonga_wal_status | | TABLE(name text, oid oid, current_block bigint, current_offset bigint, current_size bigint, last_block bigint, last_offset bigint, last_size bigint) + pgroonga | public | pgroonga_wal_truncate | indexname cstring | bigint + pgroonga | public | pgroonga_wal_truncate | | bigint + pgroonga_database | public | pgroonga_database_remove | | boolean + pgrouting | public | _pgr_alphashape | text, alpha double precision, OUT seq1 bigint, OUT textgeom text | SETOF record + pgrouting | public | _pgr_array_reverse | anyarray | anyarray + pgrouting | public | _pgr_articulationpoints | edges_sql text, OUT seq integer, OUT node bigint | SETOF record + pgrouting | public | _pgr_astar | edges_sql text, start_vids anyarray, end_vids anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, only_cost boolean, normal boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_astar | edges_sql text, combinations_sql text, directed boolean, heuristic integer, factor double precision, epsilon double precision, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bdastar | text, text, directed boolean, heuristic integer, factor double precision, epsilon double precision, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bdastar | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bddijkstra | text, anyarray, anyarray, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bddijkstra | text, text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bellmanford | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bellmanford | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_biconnectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record + pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, combinations_sql text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bipartite | edges_sql text, OUT node bigint, OUT color bigint | SETOF record + pgrouting | public | _pgr_boost_version | | text + pgrouting | public | _pgr_breadthfirstsearch | edges_sql text, from_vids anyarray, max_depth bigint, directed boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bridges | edges_sql text, OUT seq integer, OUT edge bigint | SETOF record + pgrouting | public | _pgr_build_type | | text + pgrouting | public | _pgr_checkcolumn | text, text, text, is_optional boolean, dryrun boolean | boolean + pgrouting | public | _pgr_checkquery | text | text + pgrouting | public | _pgr_checkverttab | vertname text, columnsarr text[], reporterrs integer, fnname text, OUT sname text, OUT vname text | record + pgrouting | public | _pgr_chinesepostman | edges_sql text, only_cost boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_compilation_date | | text + pgrouting | public | _pgr_compiler_version | | text + pgrouting | public | _pgr_connectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record + pgrouting | public | _pgr_contraction | edges_sql text, contraction_order bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | _pgr_createindex | tabname text, colname text, indext text, reporterrs integer, fnname text | void + pgrouting | public | _pgr_createindex | sname text, tname text, colname text, indext text, reporterrs integer, fnname text | void + pgrouting | public | _pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record + pgrouting | public | _pgr_dagshortestpath | text, anyarray, anyarray, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dagshortestpath | text, text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_depthfirstsearch | edges_sql text, root_vids anyarray, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstra | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, normal boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstra | edges_sql text, start_vids anyarray, end_vids anyarray, directed boolean, only_cost boolean, normal boolean, n_goals bigint, global boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstra | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, n_goals bigint, global boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstra | edges_sql text, start_vids anyarray, end_vids anyarray, directed boolean, only_cost boolean, normal boolean, n_goals bigint, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstranear | text, anyarray, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstranear | text, anyarray, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstranear | text, bigint, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstravia | edges_sql text, via_vids anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | _pgr_drivingdistance | edges_sql text, start_vids anyarray, distance double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_edgecoloring | edges_sql text, OUT edge_id bigint, OUT color_id bigint | SETOF record + pgrouting | public | _pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_edgedisjointpaths | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_edwardmoore | edges_sql text, combinations_sql text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_edwardmoore | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_endpoint | g geometry | geometry + pgrouting | public | _pgr_floydwarshall | edges_sql text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_get_statement | o_sql text | text + pgrouting | public | _pgr_getcolumnname | tab text, col text, reporterrs integer, fnname text | text + pgrouting | public | _pgr_getcolumnname | sname text, tname text, col text, reporterrs integer, fnname text | text + pgrouting | public | _pgr_getcolumntype | tab text, col text, reporterrs integer, fnname text | text + pgrouting | public | _pgr_getcolumntype | sname text, tname text, cname text, reporterrs integer, fnname text | text + pgrouting | public | _pgr_gettablename | tab text, reporterrs integer, fnname text, OUT sname text, OUT tname text | record + pgrouting | public | _pgr_git_hash | | text + pgrouting | public | _pgr_hawickcircuits | text, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_iscolumnindexed | tab text, col text, reporterrs integer, fnname text | boolean + pgrouting | public | _pgr_iscolumnindexed | sname text, tname text, cname text, reporterrs integer, fnname text | boolean + pgrouting | public | _pgr_iscolumnintable | tab text, col text | boolean + pgrouting | public | _pgr_isplanar | text | boolean + pgrouting | public | _pgr_johnson | edges_sql text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_kruskal | text, anyarray, fn_suffix text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_ksp | edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_lengauertarjandominatortree | edges_sql text, root_vid bigint, OUT seq integer, OUT vid bigint, OUT idom bigint | SETOF record + pgrouting | public | _pgr_lib_version | | text + pgrouting | public | _pgr_linegraph | text, directed boolean, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT reverse_cost double precision | SETOF record + pgrouting | public | _pgr_linegraphfull | text, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT edge bigint | SETOF record + pgrouting | public | _pgr_makeconnected | text, OUT seq bigint, OUT start_vid bigint, OUT end_vid bigint | SETOF record + pgrouting | public | _pgr_maxcardinalitymatch | edges_sql text, directed boolean, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint | SETOF record + pgrouting | public | _pgr_maxflow | edges_sql text, combinations_sql text, algorithm integer, only_flow boolean, OUT seq integer, OUT edge_id bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | _pgr_maxflow | edges_sql text, sources anyarray, targets anyarray, algorithm integer, only_flow boolean, OUT seq integer, OUT edge_id bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | _pgr_maxflowmincost | edges_sql text, sources anyarray, targets anyarray, only_cost boolean, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_maxflowmincost | edges_sql text, combinations_sql text, only_cost boolean, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_msg | msgkind integer, fnname text, msg text | void + pgrouting | public | _pgr_onerror | errcond boolean, reporterrs integer, fnname text, msgerr text, hinto text, msgok text | void + pgrouting | public | _pgr_operating_system | | text + pgrouting | public | _pgr_parameter_check | fn text, sql text, big boolean | boolean + pgrouting | public | _pgr_pgsql_version | | text + pgrouting | public | _pgr_pickdeliver | text, text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record + pgrouting | public | _pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record + pgrouting | public | _pgr_pointtoid | point geometry, tolerance double precision, vertname text, srid integer | bigint + pgrouting | public | _pgr_prim | text, anyarray, order_by text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_quote_ident | idname text | text + pgrouting | public | _pgr_sequentialvertexcoloring | edges_sql text, OUT vertex_id bigint, OUT color_id bigint | SETOF record + pgrouting | public | _pgr_startpoint | g geometry | geometry + pgrouting | public | _pgr_stoerwagner | edges_sql text, OUT seq integer, OUT edge bigint, OUT cost double precision, OUT mincut double precision | SETOF record + pgrouting | public | _pgr_strongcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record + pgrouting | public | _pgr_topologicalsort | edges_sql text, OUT seq integer, OUT sorted_v bigint | SETOF record + pgrouting | public | _pgr_transitiveclosure | edges_sql text, OUT seq integer, OUT vid bigint, OUT target_array bigint[] | SETOF record + pgrouting | public | _pgr_trsp | sql text, source_eid integer, source_pos double precision, target_eid integer, target_pos double precision, directed boolean, has_reverse_cost boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT cost double precision | SETOF record + pgrouting | public | _pgr_trsp | text, text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trsp | text, text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trsp | text, text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trsp | text, text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trsp_withpoints | text, text, text, text, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trsp_withpoints | text, text, text, anyarray, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trspvia | text, text, anyarray, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | _pgr_trspvia_withpoints | text, text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | _pgr_trspviavertices | sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT id3 integer, OUT cost double precision | SETOF record + pgrouting | public | _pgr_tsp | matrix_row_sql text, start_id bigint, end_id bigint, max_processing_time double precision, tries_per_temperature integer, max_changes_per_temperature integer, max_consecutive_non_changes integer, initial_temperature double precision, final_temperature double precision, cooling_factor double precision, randomize boolean, OUT seq integer, OUT node bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_tspeuclidean | coordinates_sql text, start_id bigint, end_id bigint, max_processing_time double precision, tries_per_temperature integer, max_changes_per_temperature integer, max_consecutive_non_changes integer, initial_temperature double precision, final_temperature double precision, cooling_factor double precision, randomize boolean, OUT seq integer, OUT node bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_turnrestrictedpath | text, text, bigint, bigint, integer, directed boolean, heap_paths boolean, stop_on_first boolean, strict boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_versionless | v1 text, v2 text | boolean + pgrouting | public | _pgr_vrponedepot | text, text, text, integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record + pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, combinations_sql text, directed boolean, driving_side character, details boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, start_pids anyarray, end_pids anyarray, directed boolean, driving_side character, details boolean, only_cost boolean, normal boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsdd | edges_sql text, points_sql text, start_pid anyarray, distance double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsksp | edges_sql text, points_sql text, start_pid bigint, end_pid bigint, k integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsvia | sql text, via_edges bigint[], fraction double precision[], directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsvia | text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | _trsp | text, text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _v4trsp | text, text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _v4trsp | text, text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_alphashape | geometry, alpha double precision | geometry + pgrouting | public | pgr_analyzegraph | text, double precision, the_geom text, id text, source text, target text, rows_where text | character varying + pgrouting | public | pgr_analyzeoneway | text, text[], text[], text[], text[], two_way_if_null boolean, oneway text, source text, target text | text + pgrouting | public | pgr_articulationpoints | text, OUT node bigint | SETOF bigint + pgrouting | public | pgr_astar | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, text, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcost | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcost | text, text, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcost | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcost | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcostmatrix | text, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, text, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcost | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcost | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcost | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcost | text, text, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcostmatrix | text, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstra | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstra | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracost | text, text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracost | text, bigint, bigint, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracost | text, anyarray, bigint, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracost | text, anyarray, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracost | text, bigint, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracostmatrix | text, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bellmanford | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bellmanford | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bellmanford | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bellmanford | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bellmanford | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_biconnectedcomponents | text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record + pgrouting | public | pgr_binarybreadthfirstsearch | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_binarybreadthfirstsearch | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_binarybreadthfirstsearch | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_binarybreadthfirstsearch | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_binarybreadthfirstsearch | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bipartite | text, OUT vertex_id bigint, OUT color_id bigint | SETOF record + pgrouting | public | pgr_boykovkolmogorov | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_boykovkolmogorov | text, text, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_boykovkolmogorov | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_boykovkolmogorov | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_boykovkolmogorov | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_breadthfirstsearch | text, anyarray, max_depth bigint, directed boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_breadthfirstsearch | text, bigint, max_depth bigint, directed boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bridges | text, OUT edge bigint | SETOF bigint + pgrouting | public | pgr_chinesepostman | text, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_chinesepostmancost | text | double precision + pgrouting | public | pgr_connectedcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record + pgrouting | public | pgr_contraction | text, bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_createtopology | text, double precision, the_geom text, id text, source text, target text, rows_where text, clean boolean | character varying + pgrouting | public | pgr_createverticestable | text, the_geom text, source text, target text, rows_where text | text + pgrouting | public | pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record + pgrouting | public | pgr_dagshortestpath | text, anyarray, anyarray, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dagshortestpath | text, bigint, bigint, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dagshortestpath | text, anyarray, bigint, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dagshortestpath | text, text, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dagshortestpath | text, bigint, anyarray, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_degree | text, text, dryrun boolean, OUT node bigint, OUT degree bigint | SETOF record + pgrouting | public | pgr_depthfirstsearch | text, bigint, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_depthfirstsearch | text, anyarray, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracost | text, text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracost | text, bigint, bigint, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracost | text, anyarray, bigint, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracost | text, anyarray, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracost | text, bigint, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracostmatrix | text, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranear | text, bigint, anyarray, directed boolean, cap bigint, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranear | text, anyarray, bigint, directed boolean, cap bigint, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranear | text, anyarray, anyarray, directed boolean, cap bigint, global boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranear | text, text, directed boolean, cap bigint, global boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranearcost | text, text, directed boolean, cap bigint, global boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranearcost | text, anyarray, anyarray, directed boolean, cap bigint, global boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranearcost | text, bigint, anyarray, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranearcost | text, anyarray, bigint, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstravia | text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, bigint, double precision, directed boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, anyarray, double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edgecoloring | text, OUT edge_id bigint, OUT color_id bigint | SETOF record + pgrouting | public | pgr_edgedisjointpaths | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edgedisjointpaths | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edgedisjointpaths | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edgedisjointpaths | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edmondskarp | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_edmondskarp | text, text, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_edmondskarp | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_edmondskarp | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_edmondskarp | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_edwardmoore | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edwardmoore | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edwardmoore | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edwardmoore | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edwardmoore | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_extractvertices | text, dryrun boolean, OUT id bigint, OUT in_edges bigint[], OUT out_edges bigint[], OUT x double precision, OUT y double precision, OUT geom geometry | SETOF record + pgrouting | public | pgr_findcloseedges | text, geometry[], double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record + pgrouting | public | pgr_findcloseedges | text, geometry, double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record + pgrouting | public | pgr_floydwarshall | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_full_version | OUT version text, OUT build_type text, OUT compile_date text, OUT library text, OUT system text, OUT postgresql text, OUT compiler text, OUT boost text, OUT hash text | record + pgrouting | public | pgr_hawickcircuits | text, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_isplanar | text | boolean + pgrouting | public | pgr_johnson | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskal | text, OUT edge bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, bigint, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_lengauertarjandominatortree | text, bigint, OUT seq integer, OUT vertex_id bigint, OUT idom bigint | SETOF record + pgrouting | public | pgr_linegraph | text, directed boolean, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT reverse_cost double precision | SETOF record + pgrouting | public | pgr_linegraphfull | text, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT edge bigint | SETOF record + pgrouting | public | pgr_makeconnected | text, OUT seq bigint, OUT start_vid bigint, OUT end_vid bigint | SETOF record + pgrouting | public | pgr_maxcardinalitymatch | text, directed boolean, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint | SETOF record + pgrouting | public | pgr_maxcardinalitymatch | text, OUT edge bigint | SETOF bigint + pgrouting | public | pgr_maxflow | text, anyarray, anyarray | bigint + pgrouting | public | pgr_maxflow | text, text | bigint + pgrouting | public | pgr_maxflow | text, bigint, anyarray | bigint + pgrouting | public | pgr_maxflow | text, anyarray, bigint | bigint + pgrouting | public | pgr_maxflow | text, bigint, bigint | bigint + pgrouting | public | pgr_maxflowmincost | text, text, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_maxflowmincost | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_maxflowmincost | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_maxflowmincost | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_maxflowmincost | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_maxflowmincost_cost | text, anyarray, anyarray | double precision + pgrouting | public | pgr_maxflowmincost_cost | text, text | double precision + pgrouting | public | pgr_maxflowmincost_cost | text, bigint, anyarray | double precision + pgrouting | public | pgr_maxflowmincost_cost | text, anyarray, bigint | double precision + pgrouting | public | pgr_maxflowmincost_cost | text, bigint, bigint | double precision + pgrouting | public | pgr_nodenetwork | text, double precision, id text, the_geom text, table_ending text, rows_where text, outall boolean | text + pgrouting | public | pgr_pickdeliver | text, text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record + pgrouting | public | pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record + pgrouting | public | pgr_prim | text, OUT edge bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_pushrelabel | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_pushrelabel | text, text, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_pushrelabel | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_pushrelabel | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_pushrelabel | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_sequentialvertexcoloring | text, OUT vertex_id bigint, OUT color_id bigint | SETOF record + pgrouting | public | pgr_stoerwagner | text, OUT seq integer, OUT edge bigint, OUT cost double precision, OUT mincut double precision | SETOF record + pgrouting | public | pgr_strongcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record + pgrouting | public | pgr_topologicalsort | text, OUT seq integer, OUT sorted_v bigint | SETOF record + pgrouting | public | pgr_transitiveclosure | text, OUT seq integer, OUT vid bigint, OUT target_array bigint[] | SETOF record + pgrouting | public | pgr_trsp | text, text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, integer, double precision, integer, double precision, boolean, boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, integer, integer, boolean, boolean, restrictions_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp_withpoints | text, text, text, anyarray, bigint, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp_withpoints | text, text, text, bigint, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp_withpoints | text, text, text, anyarray, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp_withpoints | text, text, text, bigint, bigint, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp_withpoints | text, text, text, text, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trspvia | text, text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | pgr_trspvia_withpoints | text, text, text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | pgr_trspviaedges | text, integer[], double precision[], boolean, boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT id3 integer, OUT cost double precision | SETOF record + pgrouting | public | pgr_trspviavertices | text, anyarray, boolean, boolean, restrictions_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT id3 integer, OUT cost double precision | SETOF record + pgrouting | public | pgr_tsp | text, start_id bigint, end_id bigint, max_processing_time double precision, tries_per_temperature integer, max_changes_per_temperature integer, max_consecutive_non_changes integer, initial_temperature double precision, final_temperature double precision, cooling_factor double precision, randomize boolean, OUT seq integer, OUT node bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_tspeuclidean | text, start_id bigint, end_id bigint, max_processing_time double precision, tries_per_temperature integer, max_changes_per_temperature integer, max_consecutive_non_changes integer, initial_temperature double precision, final_temperature double precision, cooling_factor double precision, randomize boolean, OUT seq integer, OUT node bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_turnrestrictedpath | text, text, bigint, bigint, integer, directed boolean, heap_paths boolean, stop_on_first boolean, strict boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_version | | text + pgrouting | public | pgr_vrponedepot | text, text, text, integer, OUT oid integer, OUT opos integer, OUT vid integer, OUT tarrival integer, OUT tdepart integer | SETOF record + pgrouting | public | pgr_withpoints | text, text, anyarray, bigint, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpoints | text, text, bigint, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpoints | text, text, text, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpoints | text, text, bigint, bigint, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpoints | text, text, anyarray, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscost | text, text, text, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscost | text, text, bigint, bigint, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscost | text, text, anyarray, anyarray, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscost | text, text, anyarray, bigint, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscost | text, text, bigint, anyarray, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscostmatrix | text, text, anyarray, directed boolean, driving_side character, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsdd | text, text, bigint, double precision, directed boolean, driving_side character, details boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsdd | text, text, anyarray, double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, bigint, bigint, integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsvia | text, text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrowlocks | public | pgrowlocks | relname text, OUT locked_row tid, OUT locker xid, OUT multi boolean, OUT xids xid[], OUT modes text[], OUT pids integer[] | SETOF record + pgsodium | pgsodium | create_key | key_type pgsodium.key_type, name text, raw_key bytea, raw_key_nonce bytea, parent_key uuid, key_context bytea, expires timestamp with time zone, associated_data text | pgsodium.valid_key + pgsodium | pgsodium | create_mask_view | relid oid, debug boolean | void + pgsodium | pgsodium | create_mask_view | relid oid, subid integer, debug boolean | void + pgsodium | pgsodium | crypto_aead_det_decrypt | message bytea, additional bytea, key_uuid uuid, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_decrypt | message bytea, additional bytea, key_id bigint, context bytea, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_decrypt | message bytea, additional bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_aead_det_decrypt | ciphertext bytea, additional bytea, key bytea, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_encrypt | message bytea, additional bytea, key_uuid uuid, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_encrypt | message bytea, additional bytea, key_id bigint, context bytea, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_encrypt | message bytea, additional bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_aead_det_encrypt | message bytea, additional bytea, key bytea, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_keygen | | bytea + pgsodium | pgsodium | crypto_aead_det_noncegen | | bytea + pgsodium | pgsodium | crypto_aead_ietf_decrypt | message bytea, additional bytea, nonce bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_aead_ietf_decrypt | message bytea, additional bytea, nonce bytea, key bytea | bytea + pgsodium | pgsodium | crypto_aead_ietf_decrypt | message bytea, additional bytea, nonce bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_aead_ietf_encrypt | message bytea, additional bytea, nonce bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_aead_ietf_encrypt | message bytea, additional bytea, nonce bytea, key bytea | bytea + pgsodium | pgsodium | crypto_aead_ietf_encrypt | message bytea, additional bytea, nonce bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_aead_ietf_keygen | | bytea + pgsodium | pgsodium | crypto_aead_ietf_noncegen | | bytea + pgsodium | pgsodium | crypto_auth | message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_auth | message bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_auth | message bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_auth_hmacsha256 | message bytea, secret bytea | bytea + pgsodium | pgsodium | crypto_auth_hmacsha256 | message bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_auth_hmacsha256 | message bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_auth_hmacsha256_keygen | | bytea + pgsodium | pgsodium | crypto_auth_hmacsha256_verify | hash bytea, message bytea, key_id bigint, context bytea | boolean + pgsodium | pgsodium | crypto_auth_hmacsha256_verify | signature bytea, message bytea, key_uuid uuid | boolean + pgsodium | pgsodium | crypto_auth_hmacsha256_verify | hash bytea, message bytea, secret bytea | boolean + pgsodium | pgsodium | crypto_auth_hmacsha512 | message bytea, secret bytea | bytea + pgsodium | pgsodium | crypto_auth_hmacsha512 | message bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_auth_hmacsha512 | message bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_auth_hmacsha512_keygen | | bytea + pgsodium | pgsodium | crypto_auth_hmacsha512_verify | hash bytea, message bytea, key_id bigint, context bytea | boolean + pgsodium | pgsodium | crypto_auth_hmacsha512_verify | signature bytea, message bytea, key_uuid uuid | boolean + pgsodium | pgsodium | crypto_auth_hmacsha512_verify | hash bytea, message bytea, secret bytea | boolean + pgsodium | pgsodium | crypto_auth_keygen | | bytea + pgsodium | pgsodium | crypto_auth_verify | mac bytea, message bytea, key_uuid uuid | boolean + pgsodium | pgsodium | crypto_auth_verify | mac bytea, message bytea, key bytea | boolean + pgsodium | pgsodium | crypto_auth_verify | mac bytea, message bytea, key_id bigint, context bytea | boolean + pgsodium | pgsodium | crypto_box | message bytea, nonce bytea, public bytea, secret bytea | bytea + pgsodium | pgsodium | crypto_box_new_keypair | | pgsodium.crypto_box_keypair + pgsodium | pgsodium | crypto_box_new_seed | | bytea + pgsodium | pgsodium | crypto_box_noncegen | | bytea + pgsodium | pgsodium | crypto_box_open | ciphertext bytea, nonce bytea, public bytea, secret bytea | bytea + pgsodium | pgsodium | crypto_box_seal | message bytea, public_key bytea | bytea + pgsodium | pgsodium | crypto_box_seal_open | ciphertext bytea, public_key bytea, secret_key bytea | bytea + pgsodium | pgsodium | crypto_box_seed_new_keypair | seed bytea | pgsodium.crypto_box_keypair + pgsodium | pgsodium | crypto_cmp | text, text | boolean + pgsodium | pgsodium | crypto_generichash | message bytea, key bigint, context bytea | bytea + pgsodium | pgsodium | crypto_generichash | message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_generichash | message bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_generichash_keygen | | bytea + pgsodium | pgsodium | crypto_hash_sha256 | message bytea | bytea + pgsodium | pgsodium | crypto_hash_sha512 | message bytea | bytea + pgsodium | pgsodium | crypto_kdf_derive_from_key | subkey_size integer, subkey_id bigint, context bytea, primary_key uuid | bytea + pgsodium | pgsodium | crypto_kdf_derive_from_key | subkey_size bigint, subkey_id bigint, context bytea, primary_key bytea | bytea + pgsodium | pgsodium | crypto_kdf_keygen | | bytea + pgsodium | pgsodium | crypto_kx_client_session_keys | client_pk bytea, client_sk bytea, server_pk bytea | pgsodium.crypto_kx_session + pgsodium | pgsodium | crypto_kx_new_keypair | | pgsodium.crypto_kx_keypair + pgsodium | pgsodium | crypto_kx_new_seed | | bytea + pgsodium | pgsodium | crypto_kx_seed_new_keypair | seed bytea | pgsodium.crypto_kx_keypair + pgsodium | pgsodium | crypto_kx_server_session_keys | server_pk bytea, server_sk bytea, client_pk bytea | pgsodium.crypto_kx_session + pgsodium | pgsodium | crypto_pwhash | password bytea, salt bytea | bytea + pgsodium | pgsodium | crypto_pwhash_saltgen | | bytea + pgsodium | pgsodium | crypto_pwhash_str | password bytea | bytea + pgsodium | pgsodium | crypto_pwhash_str_verify | hashed_password bytea, password bytea | boolean + pgsodium | pgsodium | crypto_secretbox | message bytea, nonce bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_secretbox | message bytea, nonce bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_secretbox | message bytea, nonce bytea, key bytea | bytea + pgsodium | pgsodium | crypto_secretbox_keygen | | bytea + pgsodium | pgsodium | crypto_secretbox_noncegen | | bytea + pgsodium | pgsodium | crypto_secretbox_open | ciphertext bytea, nonce bytea, key bytea | bytea + pgsodium | pgsodium | crypto_secretbox_open | message bytea, nonce bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_secretbox_open | message bytea, nonce bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_secretstream_keygen | | bytea + pgsodium | pgsodium | crypto_shorthash | message bytea, key bigint, context bytea | bytea + pgsodium | pgsodium | crypto_shorthash | message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_shorthash | message bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_shorthash_keygen | | bytea + pgsodium | pgsodium | crypto_sign | message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_sign_detached | message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_sign_final_create | state bytea, key bytea | bytea + pgsodium | pgsodium | crypto_sign_final_verify | state bytea, signature bytea, key bytea | boolean + pgsodium | pgsodium | crypto_sign_init | | bytea + pgsodium | pgsodium | crypto_sign_new_keypair | | pgsodium.crypto_sign_keypair + pgsodium | pgsodium | crypto_sign_new_seed | | bytea + pgsodium | pgsodium | crypto_sign_open | signed_message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_sign_seed_new_keypair | seed bytea | pgsodium.crypto_sign_keypair + pgsodium | pgsodium | crypto_sign_update | state bytea, message bytea | bytea + pgsodium | pgsodium | crypto_sign_update_agg | message bytea | bytea + pgsodium | pgsodium | crypto_sign_update_agg | state bytea, message bytea | bytea + pgsodium | pgsodium | crypto_sign_update_agg1 | state bytea, message bytea | bytea + pgsodium | pgsodium | crypto_sign_update_agg2 | cur_state bytea, initial_state bytea, message bytea | bytea + pgsodium | pgsodium | crypto_sign_verify_detached | sig bytea, message bytea, key bytea | boolean + pgsodium | pgsodium | crypto_signcrypt_new_keypair | | pgsodium.crypto_signcrypt_keypair + pgsodium | pgsodium | crypto_signcrypt_sign_after | state bytea, sender_sk bytea, ciphertext bytea | bytea + pgsodium | pgsodium | crypto_signcrypt_sign_before | sender bytea, recipient bytea, sender_sk bytea, recipient_pk bytea, additional bytea | pgsodium.crypto_signcrypt_state_key + pgsodium | pgsodium | crypto_signcrypt_verify_after | state bytea, signature bytea, sender_pk bytea, ciphertext bytea | boolean + pgsodium | pgsodium | crypto_signcrypt_verify_before | signature bytea, sender bytea, recipient bytea, additional bytea, sender_pk bytea, recipient_sk bytea | pgsodium.crypto_signcrypt_state_key + pgsodium | pgsodium | crypto_signcrypt_verify_public | signature bytea, sender bytea, recipient bytea, additional bytea, sender_pk bytea, ciphertext bytea | boolean + pgsodium | pgsodium | crypto_stream_xchacha20 | bigint, bytea, bytea | bytea + pgsodium | pgsodium | crypto_stream_xchacha20 | bigint, bytea, bigint, context bytea | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_keygen | | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_noncegen | | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_xor | bytea, bytea, bigint, context bytea | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_xor | bytea, bytea, bytea | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_xor_ic | bytea, bytea, bigint, bigint, context bytea | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_xor_ic | bytea, bytea, bigint, bytea | bytea + pgsodium | pgsodium | decrypted_columns | relid oid | text + pgsodium | pgsodium | derive_key | key_id bigint, key_len integer, context bytea | bytea + pgsodium | pgsodium | disable_security_label_trigger | | void + pgsodium | pgsodium | enable_security_label_trigger | | void + pgsodium | pgsodium | encrypted_column | relid oid, m record | text + pgsodium | pgsodium | encrypted_columns | relid oid | text + pgsodium | pgsodium | get_key_by_id | uuid | pgsodium.valid_key + pgsodium | pgsodium | get_key_by_name | text | pgsodium.valid_key + pgsodium | pgsodium | get_named_keys | filter text | SETOF pgsodium.valid_key + pgsodium | pgsodium | has_mask | role regrole, source_name text | boolean + pgsodium | pgsodium | key_encrypt_secret_raw_key | | trigger + pgsodium | pgsodium | mask_columns | source_relid oid | TABLE(attname name, key_id text, key_id_column text, associated_column text, nonce_column text, format_type text) + pgsodium | pgsodium | mask_role | masked_role regrole, source_name text, view_name text | void + pgsodium | pgsodium | pgsodium_derive | key_id bigint, key_len integer, context bytea | bytea + pgsodium | pgsodium | quote_assoc | text, boolean | text + pgsodium | pgsodium | randombytes_buf | size integer | bytea + pgsodium | pgsodium | randombytes_buf_deterministic | size integer, seed bytea | bytea + pgsodium | pgsodium | randombytes_new_seed | | bytea + pgsodium | pgsodium | randombytes_random | | integer + pgsodium | pgsodium | randombytes_uniform | upper_bound integer | integer + pgsodium | pgsodium | sodium_base642bin | base64 text | bytea + pgsodium | pgsodium | sodium_bin2base64 | bin bytea | text + pgsodium | pgsodium | trg_mask_update | | event_trigger + pgsodium | pgsodium | update_mask | target oid, debug boolean | void + pgsodium | pgsodium | update_masks | debug boolean | void + pgsodium | pgsodium | version | | text + pgstattuple | public | pg_relpages | relname text | bigint + pgstattuple | public | pg_relpages | relname regclass | bigint + pgstattuple | public | pgstatginindex | relname regclass, OUT version integer, OUT pending_pages integer, OUT pending_tuples bigint | record + pgstattuple | public | pgstathashindex | relname regclass, OUT version integer, OUT bucket_pages bigint, OUT overflow_pages bigint, OUT bitmap_pages bigint, OUT unused_pages bigint, OUT live_items bigint, OUT dead_items bigint, OUT free_percent double precision | record + pgstattuple | public | pgstatindex | relname regclass, OUT version integer, OUT tree_level integer, OUT index_size bigint, OUT root_block_no bigint, OUT internal_pages bigint, OUT leaf_pages bigint, OUT empty_pages bigint, OUT deleted_pages bigint, OUT avg_leaf_density double precision, OUT leaf_fragmentation double precision | record + pgstattuple | public | pgstatindex | relname text, OUT version integer, OUT tree_level integer, OUT index_size bigint, OUT root_block_no bigint, OUT internal_pages bigint, OUT leaf_pages bigint, OUT empty_pages bigint, OUT deleted_pages bigint, OUT avg_leaf_density double precision, OUT leaf_fragmentation double precision | record + pgstattuple | public | pgstattuple | reloid regclass, OUT table_len bigint, OUT tuple_count bigint, OUT tuple_len bigint, OUT tuple_percent double precision, OUT dead_tuple_count bigint, OUT dead_tuple_len bigint, OUT dead_tuple_percent double precision, OUT free_space bigint, OUT free_percent double precision | record + pgstattuple | public | pgstattuple | relname text, OUT table_len bigint, OUT tuple_count bigint, OUT tuple_len bigint, OUT tuple_percent double precision, OUT dead_tuple_count bigint, OUT dead_tuple_len bigint, OUT dead_tuple_percent double precision, OUT free_space bigint, OUT free_percent double precision | record + pgstattuple | public | pgstattuple_approx | reloid regclass, OUT table_len bigint, OUT scanned_percent double precision, OUT approx_tuple_count bigint, OUT approx_tuple_len bigint, OUT approx_tuple_percent double precision, OUT dead_tuple_count bigint, OUT dead_tuple_len bigint, OUT dead_tuple_percent double precision, OUT approx_free_space bigint, OUT approx_free_percent double precision | record + pgtap | public | _add | text, integer | integer + pgtap | public | _add | text, integer, text | integer + pgtap | public | _alike | boolean, anyelement, text, text | text + pgtap | public | _ancestor_of | name, name, integer | boolean + pgtap | public | _ancestor_of | name, name, name, name, integer | boolean + pgtap | public | _are | text, name[], name[], text | text + pgtap | public | _areni | text, text[], text[], text | text + pgtap | public | _array_to_sorted_string | name[], text | text + pgtap | public | _assets_are | text, text[], text[], text | text + pgtap | public | _cast_exists | name, name, name, name | boolean + pgtap | public | _cast_exists | name, name | boolean + pgtap | public | _cast_exists | name, name, name | boolean + pgtap | public | _cdi | name, name, anyelement | text + pgtap | public | _cdi | name, name, anyelement, text | text + pgtap | public | _cdi | name, name, name, anyelement, text | text + pgtap | public | _cexists | name, name | boolean + pgtap | public | _cexists | name, name, name | boolean + pgtap | public | _ckeys | name, character | name[] + pgtap | public | _ckeys | name, name, character | name[] + pgtap | public | _cleanup | | boolean + pgtap | public | _cmp_types | oid, name | boolean + pgtap | public | _col_is_null | name, name, name, text, boolean | text + pgtap | public | _col_is_null | name, name, text, boolean | text + pgtap | public | _constraint | name, character, name[], text, text | text + pgtap | public | _constraint | name, name, character, name[], text, text | text + pgtap | public | _contract_on | text | "char" + pgtap | public | _currtest | | integer + pgtap | public | _db_privs | | name[] + pgtap | public | _def_is | text, text, anyelement, text | text + pgtap | public | _definer | name, name, name[] | boolean + pgtap | public | _definer | name, name[] | boolean + pgtap | public | _definer | name | boolean + pgtap | public | _definer | name, name | boolean + pgtap | public | _dexists | name | boolean + pgtap | public | _dexists | name, name | boolean + pgtap | public | _do_ne | text, text, text, text | text + pgtap | public | _docomp | text, text, text, text | text + pgtap | public | _error_diag | text, text, text, text, text, text, text, text, text, text | text + pgtap | public | _expand_context | character | text + pgtap | public | _expand_on | character | text + pgtap | public | _expand_vol | character | text + pgtap | public | _ext_exists | name | boolean + pgtap | public | _ext_exists | name, name | boolean + pgtap | public | _extensions | name | SETOF name + pgtap | public | _extensions | | SETOF name + pgtap | public | _extras | character, name, name[] | name[] + pgtap | public | _extras | character[], name[] | name[] + pgtap | public | _extras | character, name[] | name[] + pgtap | public | _extras | character[], name, name[] | name[] + pgtap | public | _finish | integer, integer, integer, boolean | SETOF text + pgtap | public | _fkexists | name, name, name[] | boolean + pgtap | public | _fkexists | name, name[] | boolean + pgtap | public | _fprivs_are | text, name, name[], text | text + pgtap | public | _func_compare | name, name, boolean, text | text + pgtap | public | _func_compare | name, name, name[], anyelement, anyelement, text | text + pgtap | public | _func_compare | name, name, name[], boolean, text | text + pgtap | public | _func_compare | name, name, anyelement, anyelement, text | text + pgtap | public | _funkargs | name[] | text + pgtap | public | _get | text | integer + pgtap | public | _get_ac_privs | name, text | text[] + pgtap | public | _get_col_ns_type | name, name, name | text + pgtap | public | _get_col_privs | name, text, name | text[] + pgtap | public | _get_col_type | name, name | text + pgtap | public | _get_col_type | name, name, name | text + pgtap | public | _get_context | name, name | "char" + pgtap | public | _get_db_owner | name | name + pgtap | public | _get_db_privs | name, text | text[] + pgtap | public | _get_dtype | name, text, boolean | text + pgtap | public | _get_dtype | name | text + pgtap | public | _get_fdw_privs | name, text | text[] + pgtap | public | _get_func_owner | name, name, name[] | name + pgtap | public | _get_func_owner | name, name[] | name + pgtap | public | _get_func_privs | text, text | text[] + pgtap | public | _get_index_owner | name, name | name + pgtap | public | _get_index_owner | name, name, name | name + pgtap | public | _get_lang_privs | name, text | text[] + pgtap | public | _get_language_owner | name | name + pgtap | public | _get_latest | text | integer[] + pgtap | public | _get_latest | text, integer | integer + pgtap | public | _get_note | integer | text + pgtap | public | _get_note | text | text + pgtap | public | _get_opclass_owner | name | name + pgtap | public | _get_opclass_owner | name, name | name + pgtap | public | _get_rel_owner | character[], name, name | name + pgtap | public | _get_rel_owner | character, name | name + pgtap | public | _get_rel_owner | name | name + pgtap | public | _get_rel_owner | name, name | name + pgtap | public | _get_rel_owner | character[], name | name + pgtap | public | _get_rel_owner | character, name, name | name + pgtap | public | _get_schema_owner | name | name + pgtap | public | _get_schema_privs | name, text | text[] + pgtap | public | _get_sequence_privs | name, text | text[] + pgtap | public | _get_server_privs | name, text | text[] + pgtap | public | _get_table_privs | name, text | text[] + pgtap | public | _get_tablespace_owner | name | name + pgtap | public | _get_tablespaceprivs | name, text | text[] + pgtap | public | _get_type_owner | name | name + pgtap | public | _get_type_owner | name, name | name + pgtap | public | _got_func | name, name, name[] | boolean + pgtap | public | _got_func | name, name[] | boolean + pgtap | public | _got_func | name | boolean + pgtap | public | _got_func | name, name | boolean + pgtap | public | _grolist | name | oid[] + pgtap | public | _has_def | name, name | boolean + pgtap | public | _has_def | name, name, name | boolean + pgtap | public | _has_group | name | boolean + pgtap | public | _has_role | name | boolean + pgtap | public | _has_type | name, name, character[] | boolean + pgtap | public | _has_type | name, character[] | boolean + pgtap | public | _has_user | name | boolean + pgtap | public | _hasc | name, character | boolean + pgtap | public | _hasc | name, name, character | boolean + pgtap | public | _have_index | name, name | boolean + pgtap | public | _have_index | name, name, name | boolean + pgtap | public | _ident_array_to_sorted_string | name[], text | text + pgtap | public | _ident_array_to_string | name[], text | text + pgtap | public | _ikeys | name, name | text[] + pgtap | public | _ikeys | name, name, name | text[] + pgtap | public | _inherited | name | boolean + pgtap | public | _inherited | name, name | boolean + pgtap | public | _is_indexed | name, name, text[] | boolean + pgtap | public | _is_instead | name, name | boolean + pgtap | public | _is_instead | name, name, name | boolean + pgtap | public | _is_schema | name | boolean + pgtap | public | _is_super | name | boolean + pgtap | public | _is_trusted | name | boolean + pgtap | public | _is_verbose | | boolean + pgtap | public | _keys | name, character | SETOF name[] + pgtap | public | _keys | name, name, character | SETOF name[] + pgtap | public | _lang | name, name, name[] | name + pgtap | public | _lang | name, name[] | name + pgtap | public | _lang | name | name + pgtap | public | _lang | name, name | name + pgtap | public | _missing | character, name, name[] | name[] + pgtap | public | _missing | character[], name[] | name[] + pgtap | public | _missing | character, name[] | name[] + pgtap | public | _missing | character[], name, name[] | name[] + pgtap | public | _nosuch | name, name, name[] | text + pgtap | public | _op_exists | name, name, name, name | boolean + pgtap | public | _op_exists | name, name, name, name, name | boolean + pgtap | public | _op_exists | name, name, name | boolean + pgtap | public | _opc_exists | name | boolean + pgtap | public | _opc_exists | name, name | boolean + pgtap | public | _partof | name, name, name, name | boolean + pgtap | public | _partof | name, name | boolean + pgtap | public | _parts | name | SETOF name + pgtap | public | _parts | name, name | SETOF name + pgtap | public | _pg_sv_column_array | oid, smallint[] | name[] + pgtap | public | _pg_sv_table_accessible | oid, oid | boolean + pgtap | public | _pg_sv_type_array | oid[] | name[] + pgtap | public | _prokind | p_oid oid | "char" + pgtap | public | _query | text | text + pgtap | public | _quote_ident_like | text, text | text + pgtap | public | _refine_vol | text | text + pgtap | public | _relcomp | text, text, text, text, text | text + pgtap | public | _relcomp | text, text, text, text | text + pgtap | public | _relcomp | text, anyarray, text, text | text + pgtap | public | _relexists | name | boolean + pgtap | public | _relexists | name, name | boolean + pgtap | public | _relne | text, text, text, text | text + pgtap | public | _relne | text, anyarray, text, text | text + pgtap | public | _returns | name, name, name[] | text + pgtap | public | _returns | name, name[] | text + pgtap | public | _returns | name | text + pgtap | public | _returns | name, name | text + pgtap | public | _rexists | character[], name, name | boolean + pgtap | public | _rexists | character, name | boolean + pgtap | public | _rexists | character[], name | boolean + pgtap | public | _rexists | character, name, name | boolean + pgtap | public | _rule_on | name, name | "char" + pgtap | public | _rule_on | name, name, name | "char" + pgtap | public | _runem | text[], boolean | SETOF text + pgtap | public | _runner | text[], text[], text[], text[], text[] | SETOF text + pgtap | public | _set | text, integer | integer + pgtap | public | _set | integer, integer | integer + pgtap | public | _set | text, integer, text | integer + pgtap | public | _strict | name, name, name[] | boolean + pgtap | public | _strict | name, name[] | boolean + pgtap | public | _strict | name | boolean + pgtap | public | _strict | name, name | boolean + pgtap | public | _table_privs | | name[] + pgtap | public | _temptable | text, text | text + pgtap | public | _temptable | anyarray, text | text + pgtap | public | _temptypes | text | text + pgtap | public | _time_trials | text, integer, numeric | SETOF _time_trial_type + pgtap | public | _tlike | boolean, text, text, text | text + pgtap | public | _todo | | text + pgtap | public | _trig | name, name | boolean + pgtap | public | _trig | name, name, name | boolean + pgtap | public | _type_func | "char", name | boolean + pgtap | public | _type_func | "char", name, name, name[] | boolean + pgtap | public | _type_func | "char", name, name[] | boolean + pgtap | public | _type_func | "char", name, name | boolean + pgtap | public | _types_are | name, name[], text, character[] | text + pgtap | public | _types_are | name[], text, character[] | text + pgtap | public | _unalike | boolean, anyelement, text, text | text + pgtap | public | _vol | name, name, name[] | text + pgtap | public | _vol | name, name[] | text + pgtap | public | _vol | name | text + pgtap | public | _vol | name, name | text + pgtap | public | add_result | boolean, boolean, text, text, text | integer + pgtap | public | alike | anyelement, text | text + pgtap | public | alike | anyelement, text, text | text + pgtap | public | any_column_privs_are | name, name, name, name[], text | text + pgtap | public | any_column_privs_are | name, name, name[] | text + pgtap | public | any_column_privs_are | name, name, name, name[] | text + pgtap | public | any_column_privs_are | name, name, name[], text | text + pgtap | public | bag_eq | text, anyarray, text | text + pgtap | public | bag_eq | text, text | text + pgtap | public | bag_eq | text, text, text | text + pgtap | public | bag_eq | text, anyarray | text + pgtap | public | bag_has | text, text | text + pgtap | public | bag_has | text, text, text | text + pgtap | public | bag_hasnt | text, text | text + pgtap | public | bag_hasnt | text, text, text | text + pgtap | public | bag_ne | text, anyarray, text | text + pgtap | public | bag_ne | text, text | text + pgtap | public | bag_ne | text, text, text | text + pgtap | public | bag_ne | text, anyarray | text + pgtap | public | can | name[] | text + pgtap | public | can | name[], text | text + pgtap | public | can | name, name[], text | text + pgtap | public | can | name, name[] | text + pgtap | public | cast_context_is | name, name, text, text | text + pgtap | public | cast_context_is | name, name, text | text + pgtap | public | casts_are | text[] | text + pgtap | public | casts_are | text[], text | text + pgtap | public | check_test | text, boolean | SETOF text + pgtap | public | check_test | text, boolean, text, text, text, boolean | SETOF text + pgtap | public | check_test | text, boolean, text, text | SETOF text + pgtap | public | check_test | text, boolean, text | SETOF text + pgtap | public | check_test | text, boolean, text, text, text | SETOF text + pgtap | public | cmp_ok | anyelement, text, anyelement | text + pgtap | public | cmp_ok | anyelement, text, anyelement, text | text + pgtap | public | col_default_is | name, name, anyelement | text + pgtap | public | col_default_is | name, name, text, text | text + pgtap | public | col_default_is | name, name, name, text, text | text + pgtap | public | col_default_is | name, name, text | text + pgtap | public | col_default_is | name, name, anyelement, text | text + pgtap | public | col_default_is | name, name, name, anyelement, text | text + pgtap | public | col_has_check | name, name, name, text | text + pgtap | public | col_has_check | name, name[], text | text + pgtap | public | col_has_check | name, name[] | text + pgtap | public | col_has_check | name, name, text | text + pgtap | public | col_has_check | name, name, name[], text | text + pgtap | public | col_has_check | name, name | text + pgtap | public | col_has_default | name, name, name, text | text + pgtap | public | col_has_default | name, name, text | text + pgtap | public | col_has_default | name, name | text + pgtap | public | col_hasnt_default | name, name, name, text | text + pgtap | public | col_hasnt_default | name, name, text | text + pgtap | public | col_hasnt_default | name, name | text + pgtap | public | col_is_fk | name, name, name, text | text + pgtap | public | col_is_fk | name, name[], text | text + pgtap | public | col_is_fk | name, name[] | text + pgtap | public | col_is_fk | name, name, text | text + pgtap | public | col_is_fk | name, name, name[], text | text + pgtap | public | col_is_fk | name, name | text + pgtap | public | col_is_null | table_name name, column_name name, description text | text + pgtap | public | col_is_null | schema_name name, table_name name, column_name name, description text | text + pgtap | public | col_is_pk | name, name, name, text | text + pgtap | public | col_is_pk | name, name[], text | text + pgtap | public | col_is_pk | name, name[] | text + pgtap | public | col_is_pk | name, name, text | text + pgtap | public | col_is_pk | name, name, name[], text | text + pgtap | public | col_is_pk | name, name | text + pgtap | public | col_is_unique | name, name, name, text | text + pgtap | public | col_is_unique | name, name[], text | text + pgtap | public | col_is_unique | name, name, name[] | text + pgtap | public | col_is_unique | name, name[] | text + pgtap | public | col_is_unique | name, name, text | text + pgtap | public | col_is_unique | name, name, name[], text | text + pgtap | public | col_is_unique | name, name | text + pgtap | public | col_is_unique | name, name, name | text + pgtap | public | col_isnt_fk | name, name, name, text | text + pgtap | public | col_isnt_fk | name, name[], text | text + pgtap | public | col_isnt_fk | name, name[] | text + pgtap | public | col_isnt_fk | name, name, text | text + pgtap | public | col_isnt_fk | name, name, name[], text | text + pgtap | public | col_isnt_fk | name, name | text + pgtap | public | col_isnt_pk | name, name, name, text | text + pgtap | public | col_isnt_pk | name, name[], text | text + pgtap | public | col_isnt_pk | name, name[] | text + pgtap | public | col_isnt_pk | name, name, text | text + pgtap | public | col_isnt_pk | name, name, name[], text | text + pgtap | public | col_isnt_pk | name, name | text + pgtap | public | col_not_null | table_name name, column_name name, description text | text + pgtap | public | col_not_null | schema_name name, table_name name, column_name name, description text | text + pgtap | public | col_type_is | name, name, name, text | text + pgtap | public | col_type_is | name, name, text, text | text + pgtap | public | col_type_is | name, name, name, text, text | text + pgtap | public | col_type_is | name, name, name, name, text, text | text + pgtap | public | col_type_is | name, name, text | text + pgtap | public | col_type_is | name, name, name, name, text | text + pgtap | public | collect_tap | VARIADIC text[] | text + pgtap | public | collect_tap | character varying[] | text + pgtap | public | column_privs_are | name, name, name, name[], text | text + pgtap | public | column_privs_are | name, name, name, name, name[] | text + pgtap | public | column_privs_are | name, name, name, name[] | text + pgtap | public | column_privs_are | name, name, name, name, name[], text | text + pgtap | public | columns_are | name, name[], text | text + pgtap | public | columns_are | name, name, name[] | text + pgtap | public | columns_are | name, name[] | text + pgtap | public | columns_are | name, name, name[], text | text + pgtap | public | composite_owner_is | name, name, name, text | text + pgtap | public | composite_owner_is | name, name, text | text + pgtap | public | composite_owner_is | name, name | text + pgtap | public | composite_owner_is | name, name, name | text + pgtap | public | database_privs_are | name, name, name[] | text + pgtap | public | database_privs_are | name, name, name[], text | text + pgtap | public | db_owner_is | name, name, text | text + pgtap | public | db_owner_is | name, name | text + pgtap | public | diag | msg text | text + pgtap | public | diag | VARIADIC text[] | text + pgtap | public | diag | VARIADIC anyarray | text + pgtap | public | diag | msg anyelement | text + pgtap | public | diag_test_name | text | text + pgtap | public | display_oper | name, oid | text + pgtap | public | do_tap | text | SETOF text + pgtap | public | do_tap | name, text | SETOF text + pgtap | public | do_tap | name | SETOF text + pgtap | public | do_tap | | SETOF text + pgtap | public | doesnt_imatch | anyelement, text | text + pgtap | public | doesnt_imatch | anyelement, text, text | text + pgtap | public | doesnt_match | anyelement, text | text + pgtap | public | doesnt_match | anyelement, text, text | text + pgtap | public | domain_type_is | name, text, name, text, text | text + pgtap | public | domain_type_is | text, text | text + pgtap | public | domain_type_is | name, text, text, text | text + pgtap | public | domain_type_is | name, text, text | text + pgtap | public | domain_type_is | text, text, text | text + pgtap | public | domain_type_is | name, text, name, text | text + pgtap | public | domain_type_isnt | name, text, name, text, text | text + pgtap | public | domain_type_isnt | text, text | text + pgtap | public | domain_type_isnt | name, text, text, text | text + pgtap | public | domain_type_isnt | name, text, text | text + pgtap | public | domain_type_isnt | text, text, text | text + pgtap | public | domain_type_isnt | name, text, name, text | text + pgtap | public | domains_are | name[] | text + pgtap | public | domains_are | name[], text | text + pgtap | public | domains_are | name, name[], text | text + pgtap | public | domains_are | name, name[] | text + pgtap | public | enum_has_labels | name, name[], text | text + pgtap | public | enum_has_labels | name, name, name[] | text + pgtap | public | enum_has_labels | name, name[] | text + pgtap | public | enum_has_labels | name, name, name[], text | text + pgtap | public | enums_are | name[] | text + pgtap | public | enums_are | name[], text | text + pgtap | public | enums_are | name, name[], text | text + pgtap | public | enums_are | name, name[] | text + pgtap | public | extensions_are | name[] | text + pgtap | public | extensions_are | name[], text | text + pgtap | public | extensions_are | name, name[], text | text + pgtap | public | extensions_are | name, name[] | text + pgtap | public | fail | text | text + pgtap | public | fail | | text + pgtap | public | fdw_privs_are | name, name, name[] | text + pgtap | public | fdw_privs_are | name, name, name[], text | text + pgtap | public | findfuncs | text | text[] + pgtap | public | findfuncs | text, text | text[] + pgtap | public | findfuncs | name, text, text | text[] + pgtap | public | findfuncs | name, text | text[] + pgtap | public | finish | exception_on_failure boolean | SETOF text + pgtap | public | fk_ok | name, name, name, name, name, text | text + pgtap | public | fk_ok | name, name, name, name, name, name, text | text + pgtap | public | fk_ok | name, name, name, name | text + pgtap | public | fk_ok | name, name, name, name, text | text + pgtap | public | fk_ok | name, name, name[], name, name, name[], text | text + pgtap | public | fk_ok | name, name, name[], name, name, name[] | text + pgtap | public | fk_ok | name, name[], name, name[] | text + pgtap | public | fk_ok | name, name[], name, name[], text | text + pgtap | public | foreign_table_owner_is | name, name, name, text | text + pgtap | public | foreign_table_owner_is | name, name, text | text + pgtap | public | foreign_table_owner_is | name, name | text + pgtap | public | foreign_table_owner_is | name, name, name | text + pgtap | public | foreign_tables_are | name[] | text + pgtap | public | foreign_tables_are | name[], text | text + pgtap | public | foreign_tables_are | name, name[], text | text + pgtap | public | foreign_tables_are | name, name[] | text + pgtap | public | function_lang_is | name, name, name, text | text + pgtap | public | function_lang_is | name, name, text | text + pgtap | public | function_lang_is | name, name[], name, text | text + pgtap | public | function_lang_is | name, name, name[], name | text + pgtap | public | function_lang_is | name, name | text + pgtap | public | function_lang_is | name, name, name | text + pgtap | public | function_lang_is | name, name[], name | text + pgtap | public | function_lang_is | name, name, name[], name, text | text + pgtap | public | function_owner_is | name, name[], name, text | text + pgtap | public | function_owner_is | name, name, name[], name | text + pgtap | public | function_owner_is | name, name[], name | text + pgtap | public | function_owner_is | name, name, name[], name, text | text + pgtap | public | function_privs_are | name, name, name[], name, name[], text | text + pgtap | public | function_privs_are | name, name[], name, name[] | text + pgtap | public | function_privs_are | name, name[], name, name[], text | text + pgtap | public | function_privs_are | name, name, name[], name, name[] | text + pgtap | public | function_returns | name, name, name[], text, text | text + pgtap | public | function_returns | name, name[], text | text + pgtap | public | function_returns | name, name, text, text | text + pgtap | public | function_returns | name, name, text | text + pgtap | public | function_returns | name, text, text | text + pgtap | public | function_returns | name, text | text + pgtap | public | function_returns | name, name, name[], text | text + pgtap | public | function_returns | name, name[], text, text | text + pgtap | public | functions_are | name[] | text + pgtap | public | functions_are | name[], text | text + pgtap | public | functions_are | name, name[], text | text + pgtap | public | functions_are | name, name[] | text + pgtap | public | groups_are | name[] | text + pgtap | public | groups_are | name[], text | text + pgtap | public | has_cast | name, name, name, text | text + pgtap | public | has_cast | name, name, name, name | text + pgtap | public | has_cast | name, name, text | text + pgtap | public | has_cast | name, name, name, name, text | text + pgtap | public | has_cast | name, name | text + pgtap | public | has_cast | name, name, name | text + pgtap | public | has_check | name, name, text | text + pgtap | public | has_check | name, text | text + pgtap | public | has_check | name | text + pgtap | public | has_column | name, name, name, text | text + pgtap | public | has_column | name, name, text | text + pgtap | public | has_column | name, name | text + pgtap | public | has_composite | name, name, text | text + pgtap | public | has_composite | name, text | text + pgtap | public | has_composite | name | text + pgtap | public | has_domain | name, name, text | text + pgtap | public | has_domain | name, text | text + pgtap | public | has_domain | name | text + pgtap | public | has_domain | name, name | text + pgtap | public | has_enum | name, name, text | text + pgtap | public | has_enum | name, text | text + pgtap | public | has_enum | name | text + pgtap | public | has_enum | name, name | text + pgtap | public | has_extension | name, name, text | text + pgtap | public | has_extension | name, text | text + pgtap | public | has_extension | name | text + pgtap | public | has_extension | name, name | text + pgtap | public | has_fk | name, name, text | text + pgtap | public | has_fk | name, text | text + pgtap | public | has_fk | name | text + pgtap | public | has_foreign_table | name, name, text | text + pgtap | public | has_foreign_table | name, text | text + pgtap | public | has_foreign_table | name | text + pgtap | public | has_foreign_table | name, name | text + pgtap | public | has_function | name, name[], text | text + pgtap | public | has_function | name, name, name[] | text + pgtap | public | has_function | name, name[] | text + pgtap | public | has_function | name, name, text | text + pgtap | public | has_function | name, text | text + pgtap | public | has_function | name | text + pgtap | public | has_function | name, name, name[], text | text + pgtap | public | has_function | name, name | text + pgtap | public | has_group | name, text | text + pgtap | public | has_group | name | text + pgtap | public | has_index | name, name, name, text | text + pgtap | public | has_index | name, name, name, name[], text | text + pgtap | public | has_index | name, name, name[] | text + pgtap | public | has_index | name, name, name, name | text + pgtap | public | has_index | name, name, text | text + pgtap | public | has_index | name, name, name, name[] | text + pgtap | public | has_index | name, name, name, name, text | text + pgtap | public | has_index | name, name, name[], text | text + pgtap | public | has_index | name, name | text + pgtap | public | has_index | name, name, name | text + pgtap | public | has_inherited_tables | name, name, text | text + pgtap | public | has_inherited_tables | name, text | text + pgtap | public | has_inherited_tables | name | text + pgtap | public | has_inherited_tables | name, name | text + pgtap | public | has_language | name, text | text + pgtap | public | has_language | name | text + pgtap | public | has_leftop | name, name, name, text | text + pgtap | public | has_leftop | name, name, name, name | text + pgtap | public | has_leftop | name, name, text | text + pgtap | public | has_leftop | name, name, name, name, text | text + pgtap | public | has_leftop | name, name | text + pgtap | public | has_leftop | name, name, name | text + pgtap | public | has_materialized_view | name, name, text | text + pgtap | public | has_materialized_view | name, text | text + pgtap | public | has_materialized_view | name | text + pgtap | public | has_opclass | name, name, text | text + pgtap | public | has_opclass | name, text | text + pgtap | public | has_opclass | name | text + pgtap | public | has_opclass | name, name | text + pgtap | public | has_operator | name, name, name, text | text + pgtap | public | has_operator | name, name, name, name, name, text | text + pgtap | public | has_operator | name, name, name, name | text + pgtap | public | has_operator | name, name, name, name, text | text + pgtap | public | has_operator | name, name, name, name, name | text + pgtap | public | has_operator | name, name, name | text + pgtap | public | has_pk | name, name, text | text + pgtap | public | has_pk | name, text | text + pgtap | public | has_pk | name | text + pgtap | public | has_relation | name, name, text | text + pgtap | public | has_relation | name, text | text + pgtap | public | has_relation | name | text + pgtap | public | has_rightop | name, name, name, text | text + pgtap | public | has_rightop | name, name, name, name | text + pgtap | public | has_rightop | name, name, text | text + pgtap | public | has_rightop | name, name, name, name, text | text + pgtap | public | has_rightop | name, name | text + pgtap | public | has_rightop | name, name, name | text + pgtap | public | has_role | name, text | text + pgtap | public | has_role | name | text + pgtap | public | has_rule | name, name, name, text | text + pgtap | public | has_rule | name, name, text | text + pgtap | public | has_rule | name, name | text + pgtap | public | has_rule | name, name, name | text + pgtap | public | has_schema | name, text | text + pgtap | public | has_schema | name | text + pgtap | public | has_sequence | name, name, text | text + pgtap | public | has_sequence | name, text | text + pgtap | public | has_sequence | name | text + pgtap | public | has_sequence | name, name | text + pgtap | public | has_table | name, name, text | text + pgtap | public | has_table | name, text | text + pgtap | public | has_table | name | text + pgtap | public | has_table | name, name | text + pgtap | public | has_tablespace | name, text, text | text + pgtap | public | has_tablespace | name, text | text + pgtap | public | has_tablespace | name | text + pgtap | public | has_trigger | name, name, name, text | text + pgtap | public | has_trigger | name, name, text | text + pgtap | public | has_trigger | name, name | text + pgtap | public | has_trigger | name, name, name | text + pgtap | public | has_type | name, name, text | text + pgtap | public | has_type | name, text | text + pgtap | public | has_type | name | text + pgtap | public | has_type | name, name | text + pgtap | public | has_unique | text | text + pgtap | public | has_unique | text, text | text + pgtap | public | has_unique | text, text, text | text + pgtap | public | has_user | name, text | text + pgtap | public | has_user | name | text + pgtap | public | has_view | name, name, text | text + pgtap | public | has_view | name, text | text + pgtap | public | has_view | name | text + pgtap | public | has_view | name, name | text + pgtap | public | hasnt_cast | name, name, name, text | text + pgtap | public | hasnt_cast | name, name, name, name | text + pgtap | public | hasnt_cast | name, name, text | text + pgtap | public | hasnt_cast | name, name, name, name, text | text + pgtap | public | hasnt_cast | name, name | text + pgtap | public | hasnt_cast | name, name, name | text + pgtap | public | hasnt_column | name, name, name, text | text + pgtap | public | hasnt_column | name, name, text | text + pgtap | public | hasnt_column | name, name | text + pgtap | public | hasnt_composite | name, name, text | text + pgtap | public | hasnt_composite | name, text | text + pgtap | public | hasnt_composite | name | text + pgtap | public | hasnt_domain | name, name, text | text + pgtap | public | hasnt_domain | name, text | text + pgtap | public | hasnt_domain | name | text + pgtap | public | hasnt_domain | name, name | text + pgtap | public | hasnt_enum | name, name, text | text + pgtap | public | hasnt_enum | name, text | text + pgtap | public | hasnt_enum | name | text + pgtap | public | hasnt_enum | name, name | text + pgtap | public | hasnt_extension | name, name, text | text + pgtap | public | hasnt_extension | name, text | text + pgtap | public | hasnt_extension | name | text + pgtap | public | hasnt_extension | name, name | text + pgtap | public | hasnt_fk | name, name, text | text + pgtap | public | hasnt_fk | name, text | text + pgtap | public | hasnt_fk | name | text + pgtap | public | hasnt_foreign_table | name, name, text | text + pgtap | public | hasnt_foreign_table | name, text | text + pgtap | public | hasnt_foreign_table | name | text + pgtap | public | hasnt_foreign_table | name, name | text + pgtap | public | hasnt_function | name, name[], text | text + pgtap | public | hasnt_function | name, name, name[] | text + pgtap | public | hasnt_function | name, name[] | text + pgtap | public | hasnt_function | name, name, text | text + pgtap | public | hasnt_function | name, text | text + pgtap | public | hasnt_function | name | text + pgtap | public | hasnt_function | name, name, name[], text | text + pgtap | public | hasnt_function | name, name | text + pgtap | public | hasnt_group | name, text | text + pgtap | public | hasnt_group | name | text + pgtap | public | hasnt_index | name, name, name, text | text + pgtap | public | hasnt_index | name, name, text | text + pgtap | public | hasnt_index | name, name | text + pgtap | public | hasnt_index | name, name, name | text + pgtap | public | hasnt_inherited_tables | name, name, text | text + pgtap | public | hasnt_inherited_tables | name, text | text + pgtap | public | hasnt_inherited_tables | name | text + pgtap | public | hasnt_inherited_tables | name, name | text + pgtap | public | hasnt_language | name, text | text + pgtap | public | hasnt_language | name | text + pgtap | public | hasnt_leftop | name, name, name, text | text + pgtap | public | hasnt_leftop | name, name, name, name | text + pgtap | public | hasnt_leftop | name, name, text | text + pgtap | public | hasnt_leftop | name, name, name, name, text | text + pgtap | public | hasnt_leftop | name, name | text + pgtap | public | hasnt_leftop | name, name, name | text + pgtap | public | hasnt_materialized_view | name, name, text | text + pgtap | public | hasnt_materialized_view | name, text | text + pgtap | public | hasnt_materialized_view | name | text + pgtap | public | hasnt_opclass | name, name, text | text + pgtap | public | hasnt_opclass | name, text | text + pgtap | public | hasnt_opclass | name | text + pgtap | public | hasnt_opclass | name, name | text + pgtap | public | hasnt_operator | name, name, name, text | text + pgtap | public | hasnt_operator | name, name, name, name, name, text | text + pgtap | public | hasnt_operator | name, name, name, name | text + pgtap | public | hasnt_operator | name, name, name, name, text | text + pgtap | public | hasnt_operator | name, name, name, name, name | text + pgtap | public | hasnt_operator | name, name, name | text + pgtap | public | hasnt_pk | name, name, text | text + pgtap | public | hasnt_pk | name, text | text + pgtap | public | hasnt_pk | name | text + pgtap | public | hasnt_relation | name, name, text | text + pgtap | public | hasnt_relation | name, text | text + pgtap | public | hasnt_relation | name | text + pgtap | public | hasnt_rightop | name, name, name, text | text + pgtap | public | hasnt_rightop | name, name, name, name | text + pgtap | public | hasnt_rightop | name, name, text | text + pgtap | public | hasnt_rightop | name, name, name, name, text | text + pgtap | public | hasnt_rightop | name, name | text + pgtap | public | hasnt_rightop | name, name, name | text + pgtap | public | hasnt_role | name, text | text + pgtap | public | hasnt_role | name | text + pgtap | public | hasnt_rule | name, name, name, text | text + pgtap | public | hasnt_rule | name, name, text | text + pgtap | public | hasnt_rule | name, name | text + pgtap | public | hasnt_rule | name, name, name | text + pgtap | public | hasnt_schema | name, text | text + pgtap | public | hasnt_schema | name | text + pgtap | public | hasnt_sequence | name, name, text | text + pgtap | public | hasnt_sequence | name, text | text + pgtap | public | hasnt_sequence | name | text + pgtap | public | hasnt_table | name, name, text | text + pgtap | public | hasnt_table | name, text | text + pgtap | public | hasnt_table | name | text + pgtap | public | hasnt_table | name, name | text + pgtap | public | hasnt_tablespace | name, text | text + pgtap | public | hasnt_tablespace | name | text + pgtap | public | hasnt_trigger | name, name, name, text | text + pgtap | public | hasnt_trigger | name, name, text | text + pgtap | public | hasnt_trigger | name, name | text + pgtap | public | hasnt_trigger | name, name, name | text + pgtap | public | hasnt_type | name, name, text | text + pgtap | public | hasnt_type | name, text | text + pgtap | public | hasnt_type | name | text + pgtap | public | hasnt_type | name, name | text + pgtap | public | hasnt_user | name, text | text + pgtap | public | hasnt_user | name | text + pgtap | public | hasnt_view | name, name, text | text + pgtap | public | hasnt_view | name, text | text + pgtap | public | hasnt_view | name | text + pgtap | public | hasnt_view | name, name | text + pgtap | public | ialike | anyelement, text | text + pgtap | public | ialike | anyelement, text, text | text + pgtap | public | imatches | anyelement, text | text + pgtap | public | imatches | anyelement, text, text | text + pgtap | public | in_todo | | boolean + pgtap | public | index_is_primary | name, name, name, text | text + pgtap | public | index_is_primary | name | text + pgtap | public | index_is_primary | name, name | text + pgtap | public | index_is_primary | name, name, name | text + pgtap | public | index_is_type | name, name, name, name | text + pgtap | public | index_is_type | name, name, name, name, text | text + pgtap | public | index_is_type | name, name | text + pgtap | public | index_is_type | name, name, name | text + pgtap | public | index_is_unique | name, name, name, text | text + pgtap | public | index_is_unique | name | text + pgtap | public | index_is_unique | name, name | text + pgtap | public | index_is_unique | name, name, name | text + pgtap | public | index_owner_is | name, name, name, text | text + pgtap | public | index_owner_is | name, name, name, name | text + pgtap | public | index_owner_is | name, name, name, name, text | text + pgtap | public | index_owner_is | name, name, name | text + pgtap | public | indexes_are | name, name[], text | text + pgtap | public | indexes_are | name, name, name[] | text + pgtap | public | indexes_are | name, name[] | text + pgtap | public | indexes_are | name, name, name[], text | text + pgtap | public | is | anyelement, anyelement, text | text + pgtap | public | is | anyelement, anyelement | text + pgtap | public | is_aggregate | name, name[], text | text + pgtap | public | is_aggregate | name, name, name[] | text + pgtap | public | is_aggregate | name, name[] | text + pgtap | public | is_aggregate | name, name, text | text + pgtap | public | is_aggregate | name, text | text + pgtap | public | is_aggregate | name | text + pgtap | public | is_aggregate | name, name, name[], text | text + pgtap | public | is_aggregate | name, name | text + pgtap | public | is_ancestor_of | name, name, name, name, integer, text | text + pgtap | public | is_ancestor_of | name, name, integer | text + pgtap | public | is_ancestor_of | name, name, name, name | text + pgtap | public | is_ancestor_of | name, name, text | text + pgtap | public | is_ancestor_of | name, name, name, name, text | text + pgtap | public | is_ancestor_of | name, name, name, name, integer | text + pgtap | public | is_ancestor_of | name, name | text + pgtap | public | is_ancestor_of | name, name, integer, text | text + pgtap | public | is_clustered | name, name, name, text | text + pgtap | public | is_clustered | name | text + pgtap | public | is_clustered | name, name | text + pgtap | public | is_clustered | name, name, name | text + pgtap | public | is_definer | name, name[], text | text + pgtap | public | is_definer | name, name, name[] | text + pgtap | public | is_definer | name, name[] | text + pgtap | public | is_definer | name, name, text | text + pgtap | public | is_definer | name, text | text + pgtap | public | is_definer | name | text + pgtap | public | is_definer | name, name, name[], text | text + pgtap | public | is_definer | name, name | text + pgtap | public | is_descendent_of | name, name, name, name, integer, text | text + pgtap | public | is_descendent_of | name, name, integer | text + pgtap | public | is_descendent_of | name, name, name, name | text + pgtap | public | is_descendent_of | name, name, text | text + pgtap | public | is_descendent_of | name, name, name, name, text | text + pgtap | public | is_descendent_of | name, name, name, name, integer | text + pgtap | public | is_descendent_of | name, name | text + pgtap | public | is_descendent_of | name, name, integer, text | text + pgtap | public | is_empty | text | text + pgtap | public | is_empty | text, text | text + pgtap | public | is_indexed | name, name, name, text | text + pgtap | public | is_indexed | name, name[], text | text + pgtap | public | is_indexed | name, name, name[] | text + pgtap | public | is_indexed | name, name[] | text + pgtap | public | is_indexed | name, name, name[], text | text + pgtap | public | is_indexed | name, name | text + pgtap | public | is_indexed | name, name, name | text + pgtap | public | is_member_of | name, name[], text | text + pgtap | public | is_member_of | name, name[] | text + pgtap | public | is_member_of | name, name, text | text + pgtap | public | is_member_of | name, name | text + pgtap | public | is_normal_function | name, name[], text | text + pgtap | public | is_normal_function | name, name, name[] | text + pgtap | public | is_normal_function | name, name[] | text + pgtap | public | is_normal_function | name, name, text | text + pgtap | public | is_normal_function | name, text | text + pgtap | public | is_normal_function | name | text + pgtap | public | is_normal_function | name, name, name[], text | text + pgtap | public | is_normal_function | name, name | text + pgtap | public | is_partition_of | name, name, name, name | text + pgtap | public | is_partition_of | name, name, text | text + pgtap | public | is_partition_of | name, name, name, name, text | text + pgtap | public | is_partition_of | name, name | text + pgtap | public | is_partitioned | name, name, text | text + pgtap | public | is_partitioned | name, text | text + pgtap | public | is_partitioned | name | text + pgtap | public | is_partitioned | name, name | text + pgtap | public | is_procedure | name, name[], text | text + pgtap | public | is_procedure | name, name, name[] | text + pgtap | public | is_procedure | name, name[] | text + pgtap | public | is_procedure | name, name, text | text + pgtap | public | is_procedure | name, text | text + pgtap | public | is_procedure | name | text + pgtap | public | is_procedure | name, name, name[], text | text + pgtap | public | is_procedure | name, name | text + pgtap | public | is_strict | name, name[], text | text + pgtap | public | is_strict | name, name, name[] | text + pgtap | public | is_strict | name, name[] | text + pgtap | public | is_strict | name, name, text | text + pgtap | public | is_strict | name, text | text + pgtap | public | is_strict | name | text + pgtap | public | is_strict | name, name, name[], text | text + pgtap | public | is_strict | name, name | text + pgtap | public | is_superuser | name, text | text + pgtap | public | is_superuser | name | text + pgtap | public | is_window | name, name[], text | text + pgtap | public | is_window | name, name, name[] | text + pgtap | public | is_window | name, name[] | text + pgtap | public | is_window | name, name, text | text + pgtap | public | is_window | name, text | text + pgtap | public | is_window | name | text + pgtap | public | is_window | name, name, name[], text | text + pgtap | public | is_window | name, name | text + pgtap | public | isa_ok | anyelement, regtype | text + pgtap | public | isa_ok | anyelement, regtype, text | text + pgtap | public | isnt | anyelement, anyelement, text | text + pgtap | public | isnt | anyelement, anyelement | text + pgtap | public | isnt_aggregate | name, name[], text | text + pgtap | public | isnt_aggregate | name, name, name[] | text + pgtap | public | isnt_aggregate | name, name[] | text + pgtap | public | isnt_aggregate | name, name, text | text + pgtap | public | isnt_aggregate | name, text | text + pgtap | public | isnt_aggregate | name | text + pgtap | public | isnt_aggregate | name, name, name[], text | text + pgtap | public | isnt_aggregate | name, name | text + pgtap | public | isnt_ancestor_of | name, name, name, name, integer, text | text + pgtap | public | isnt_ancestor_of | name, name, integer | text + pgtap | public | isnt_ancestor_of | name, name, name, name | text + pgtap | public | isnt_ancestor_of | name, name, text | text + pgtap | public | isnt_ancestor_of | name, name, name, name, text | text + pgtap | public | isnt_ancestor_of | name, name, name, name, integer | text + pgtap | public | isnt_ancestor_of | name, name | text + pgtap | public | isnt_ancestor_of | name, name, integer, text | text + pgtap | public | isnt_definer | name, name[], text | text + pgtap | public | isnt_definer | name, name, name[] | text + pgtap | public | isnt_definer | name, name[] | text + pgtap | public | isnt_definer | name, name, text | text + pgtap | public | isnt_definer | name, text | text + pgtap | public | isnt_definer | name | text + pgtap | public | isnt_definer | name, name, name[], text | text + pgtap | public | isnt_definer | name, name | text + pgtap | public | isnt_descendent_of | name, name, name, name, integer, text | text + pgtap | public | isnt_descendent_of | name, name, integer | text + pgtap | public | isnt_descendent_of | name, name, name, name | text + pgtap | public | isnt_descendent_of | name, name, text | text + pgtap | public | isnt_descendent_of | name, name, name, name, text | text + pgtap | public | isnt_descendent_of | name, name, name, name, integer | text + pgtap | public | isnt_descendent_of | name, name | text + pgtap | public | isnt_descendent_of | name, name, integer, text | text + pgtap | public | isnt_empty | text | text + pgtap | public | isnt_empty | text, text | text + pgtap | public | isnt_member_of | name, name[], text | text + pgtap | public | isnt_member_of | name, name[] | text + pgtap | public | isnt_member_of | name, name, text | text + pgtap | public | isnt_member_of | name, name | text + pgtap | public | isnt_normal_function | name, name[], text | text + pgtap | public | isnt_normal_function | name, name, name[] | text + pgtap | public | isnt_normal_function | name, name[] | text + pgtap | public | isnt_normal_function | name, name, text | text + pgtap | public | isnt_normal_function | name, text | text + pgtap | public | isnt_normal_function | name | text + pgtap | public | isnt_normal_function | name, name, name[], text | text + pgtap | public | isnt_normal_function | name, name | text + pgtap | public | isnt_partitioned | name, name, text | text + pgtap | public | isnt_partitioned | name, text | text + pgtap | public | isnt_partitioned | name | text + pgtap | public | isnt_partitioned | name, name | text + pgtap | public | isnt_procedure | name, name[], text | text + pgtap | public | isnt_procedure | name, name, name[] | text + pgtap | public | isnt_procedure | name, name[] | text + pgtap | public | isnt_procedure | name, name, text | text + pgtap | public | isnt_procedure | name, text | text + pgtap | public | isnt_procedure | name | text + pgtap | public | isnt_procedure | name, name, name[], text | text + pgtap | public | isnt_procedure | name, name | text + pgtap | public | isnt_strict | name, name[], text | text + pgtap | public | isnt_strict | name, name, name[] | text + pgtap | public | isnt_strict | name, name[] | text + pgtap | public | isnt_strict | name, name, text | text + pgtap | public | isnt_strict | name, text | text + pgtap | public | isnt_strict | name | text + pgtap | public | isnt_strict | name, name, name[], text | text + pgtap | public | isnt_strict | name, name | text + pgtap | public | isnt_superuser | name, text | text + pgtap | public | isnt_superuser | name | text + pgtap | public | isnt_window | name, name[], text | text + pgtap | public | isnt_window | name, name, name[] | text + pgtap | public | isnt_window | name, name[] | text + pgtap | public | isnt_window | name, name, text | text + pgtap | public | isnt_window | name, text | text + pgtap | public | isnt_window | name | text + pgtap | public | isnt_window | name, name, name[], text | text + pgtap | public | isnt_window | name, name | text + pgtap | public | language_is_trusted | name, text | text + pgtap | public | language_is_trusted | name | text + pgtap | public | language_owner_is | name, name, text | text + pgtap | public | language_owner_is | name, name | text + pgtap | public | language_privs_are | name, name, name[] | text + pgtap | public | language_privs_are | name, name, name[], text | text + pgtap | public | languages_are | name[] | text + pgtap | public | languages_are | name[], text | text + pgtap | public | lives_ok | text | text + pgtap | public | lives_ok | text, text | text + pgtap | public | matches | anyelement, text | text + pgtap | public | matches | anyelement, text, text | text + pgtap | public | materialized_view_owner_is | name, name, name, text | text + pgtap | public | materialized_view_owner_is | name, name, text | text + pgtap | public | materialized_view_owner_is | name, name | text + pgtap | public | materialized_view_owner_is | name, name, name | text + pgtap | public | materialized_views_are | name[] | text + pgtap | public | materialized_views_are | name[], text | text + pgtap | public | materialized_views_are | name, name[], text | text + pgtap | public | materialized_views_are | name, name[] | text + pgtap | public | no_plan | | SETOF boolean + pgtap | public | num_failed | | integer + pgtap | public | ok | boolean | text + pgtap | public | ok | boolean, text | text + pgtap | public | opclass_owner_is | name, name, name, text | text + pgtap | public | opclass_owner_is | name, name, text | text + pgtap | public | opclass_owner_is | name, name | text + pgtap | public | opclass_owner_is | name, name, name | text + pgtap | public | opclasses_are | name[] | text + pgtap | public | opclasses_are | name[], text | text + pgtap | public | opclasses_are | name, name[], text | text + pgtap | public | opclasses_are | name, name[] | text + pgtap | public | operators_are | name, text[] | text + pgtap | public | operators_are | text[] | text + pgtap | public | operators_are | text[], text | text + pgtap | public | operators_are | name, text[], text | text + pgtap | public | os_name | | text + pgtap | public | partitions_are | name, name[], text | text + pgtap | public | partitions_are | name, name, name[] | text + pgtap | public | partitions_are | name, name[] | text + pgtap | public | partitions_are | name, name, name[], text | text + pgtap | public | pass | text | text + pgtap | public | pass | | text + pgtap | public | performs_ok | text, numeric, text | text + pgtap | public | performs_ok | text, numeric | text + pgtap | public | performs_within | text, numeric, numeric, integer | text + pgtap | public | performs_within | text, numeric, numeric | text + pgtap | public | performs_within | text, numeric, numeric, integer, text | text + pgtap | public | performs_within | text, numeric, numeric, text | text + pgtap | public | pg_version | | text + pgtap | public | pg_version_num | | integer + pgtap | public | pgtap_version | | numeric + pgtap | public | plan | integer | text + pgtap | public | policies_are | name, name[], text | text + pgtap | public | policies_are | name, name, name[] | text + pgtap | public | policies_are | name, name[] | text + pgtap | public | policies_are | name, name, name[], text | text + pgtap | public | policy_cmd_is | name, name, name, text | text + pgtap | public | policy_cmd_is | name, name, text, text | text + pgtap | public | policy_cmd_is | name, name, name, text, text | text + pgtap | public | policy_cmd_is | name, name, text | text + pgtap | public | policy_roles_are | name, name, name, name[], text | text + pgtap | public | policy_roles_are | name, name, name[] | text + pgtap | public | policy_roles_are | name, name, name, name[] | text + pgtap | public | policy_roles_are | name, name, name[], text | text + pgtap | public | relation_owner_is | name, name, name, text | text + pgtap | public | relation_owner_is | name, name, text | text + pgtap | public | relation_owner_is | name, name | text + pgtap | public | relation_owner_is | name, name, name | text + pgtap | public | results_eq | text, refcursor | text + pgtap | public | results_eq | text, anyarray, text | text + pgtap | public | results_eq | text, text | text + pgtap | public | results_eq | text, refcursor, text | text + pgtap | public | results_eq | refcursor, anyarray | text + pgtap | public | results_eq | refcursor, anyarray, text | text + pgtap | public | results_eq | text, text, text | text + pgtap | public | results_eq | text, anyarray | text + pgtap | public | results_eq | refcursor, refcursor, text | text + pgtap | public | results_eq | refcursor, text, text | text + pgtap | public | results_eq | refcursor, text | text + pgtap | public | results_eq | refcursor, refcursor | text + pgtap | public | results_ne | text, refcursor | text + pgtap | public | results_ne | text, anyarray, text | text + pgtap | public | results_ne | text, text | text + pgtap | public | results_ne | text, refcursor, text | text + pgtap | public | results_ne | refcursor, anyarray | text + pgtap | public | results_ne | refcursor, anyarray, text | text + pgtap | public | results_ne | text, text, text | text + pgtap | public | results_ne | text, anyarray | text + pgtap | public | results_ne | refcursor, refcursor, text | text + pgtap | public | results_ne | refcursor, text, text | text + pgtap | public | results_ne | refcursor, text | text + pgtap | public | results_ne | refcursor, refcursor | text + pgtap | public | roles_are | name[] | text + pgtap | public | roles_are | name[], text | text + pgtap | public | row_eq | text, anyelement | text + pgtap | public | row_eq | text, anyelement, text | text + pgtap | public | rule_is_instead | name, name, name, text | text + pgtap | public | rule_is_instead | name, name, text | text + pgtap | public | rule_is_instead | name, name | text + pgtap | public | rule_is_instead | name, name, name | text + pgtap | public | rule_is_on | name, name, name, text | text + pgtap | public | rule_is_on | name, name, text, text | text + pgtap | public | rule_is_on | name, name, name, text, text | text + pgtap | public | rule_is_on | name, name, text | text + pgtap | public | rules_are | name, name[], text | text + pgtap | public | rules_are | name, name, name[] | text + pgtap | public | rules_are | name, name[] | text + pgtap | public | rules_are | name, name, name[], text | text + pgtap | public | runtests | text | SETOF text + pgtap | public | runtests | name, text | SETOF text + pgtap | public | runtests | name | SETOF text + pgtap | public | runtests | | SETOF text + pgtap | public | schema_owner_is | name, name, text | text + pgtap | public | schema_owner_is | name, name | text + pgtap | public | schema_privs_are | name, name, name[] | text + pgtap | public | schema_privs_are | name, name, name[], text | text + pgtap | public | schemas_are | name[] | text + pgtap | public | schemas_are | name[], text | text + pgtap | public | sequence_owner_is | name, name, name, text | text + pgtap | public | sequence_owner_is | name, name, text | text + pgtap | public | sequence_owner_is | name, name | text + pgtap | public | sequence_owner_is | name, name, name | text + pgtap | public | sequence_privs_are | name, name, name, name[], text | text + pgtap | public | sequence_privs_are | name, name, name[] | text + pgtap | public | sequence_privs_are | name, name, name, name[] | text + pgtap | public | sequence_privs_are | name, name, name[], text | text + pgtap | public | sequences_are | name[] | text + pgtap | public | sequences_are | name[], text | text + pgtap | public | sequences_are | name, name[], text | text + pgtap | public | sequences_are | name, name[] | text + pgtap | public | server_privs_are | name, name, name[] | text + pgtap | public | server_privs_are | name, name, name[], text | text + pgtap | public | set_eq | text, anyarray, text | text + pgtap | public | set_eq | text, text | text + pgtap | public | set_eq | text, text, text | text + pgtap | public | set_eq | text, anyarray | text + pgtap | public | set_has | text, text | text + pgtap | public | set_has | text, text, text | text + pgtap | public | set_hasnt | text, text | text + pgtap | public | set_hasnt | text, text, text | text + pgtap | public | set_ne | text, anyarray, text | text + pgtap | public | set_ne | text, text | text + pgtap | public | set_ne | text, text, text | text + pgtap | public | set_ne | text, anyarray | text + pgtap | public | skip | integer | text + pgtap | public | skip | text | text + pgtap | public | skip | why text, how_many integer | text + pgtap | public | skip | integer, text | text + pgtap | public | table_owner_is | name, name, name, text | text + pgtap | public | table_owner_is | name, name, text | text + pgtap | public | table_owner_is | name, name | text + pgtap | public | table_owner_is | name, name, name | text + pgtap | public | table_privs_are | name, name, name, name[], text | text + pgtap | public | table_privs_are | name, name, name[] | text + pgtap | public | table_privs_are | name, name, name, name[] | text + pgtap | public | table_privs_are | name, name, name[], text | text + pgtap | public | tables_are | name[] | text + pgtap | public | tables_are | name[], text | text + pgtap | public | tables_are | name, name[], text | text + pgtap | public | tables_are | name, name[] | text + pgtap | public | tablespace_owner_is | name, name, text | text + pgtap | public | tablespace_owner_is | name, name | text + pgtap | public | tablespace_privs_are | name, name, name[] | text + pgtap | public | tablespace_privs_are | name, name, name[], text | text + pgtap | public | tablespaces_are | name[] | text + pgtap | public | tablespaces_are | name[], text | text + pgtap | public | throws_ilike | text, text | text + pgtap | public | throws_ilike | text, text, text | text + pgtap | public | throws_imatching | text, text | text + pgtap | public | throws_imatching | text, text, text | text + pgtap | public | throws_like | text, text | text + pgtap | public | throws_like | text, text, text | text + pgtap | public | throws_matching | text, text | text + pgtap | public | throws_matching | text, text, text | text + pgtap | public | throws_ok | text | text + pgtap | public | throws_ok | text, integer | text + pgtap | public | throws_ok | text, text | text + pgtap | public | throws_ok | text, character, text, text | text + pgtap | public | throws_ok | text, text, text | text + pgtap | public | throws_ok | text, integer, text, text | text + pgtap | public | throws_ok | text, integer, text | text + pgtap | public | todo | how_many integer, why text | SETOF boolean + pgtap | public | todo | why text, how_many integer | SETOF boolean + pgtap | public | todo | why text | SETOF boolean + pgtap | public | todo | how_many integer | SETOF boolean + pgtap | public | todo_end | | SETOF boolean + pgtap | public | todo_start | text | SETOF boolean + pgtap | public | todo_start | | SETOF boolean + pgtap | public | trigger_is | name, name, name, text | text + pgtap | public | trigger_is | name, name, name, name, name, text | text + pgtap | public | trigger_is | name, name, name, name, name | text + pgtap | public | trigger_is | name, name, name | text + pgtap | public | triggers_are | name, name[], text | text + pgtap | public | triggers_are | name, name, name[] | text + pgtap | public | triggers_are | name, name[] | text + pgtap | public | triggers_are | name, name, name[], text | text + pgtap | public | type_owner_is | name, name, name, text | text + pgtap | public | type_owner_is | name, name, text | text + pgtap | public | type_owner_is | name, name | text + pgtap | public | type_owner_is | name, name, name | text + pgtap | public | types_are | name[] | text + pgtap | public | types_are | name[], text | text + pgtap | public | types_are | name, name[], text | text + pgtap | public | types_are | name, name[] | text + pgtap | public | unalike | anyelement, text | text + pgtap | public | unalike | anyelement, text, text | text + pgtap | public | unialike | anyelement, text | text + pgtap | public | unialike | anyelement, text, text | text + pgtap | public | users_are | name[] | text + pgtap | public | users_are | name[], text | text + pgtap | public | view_owner_is | name, name, name, text | text + pgtap | public | view_owner_is | name, name, text | text + pgtap | public | view_owner_is | name, name | text + pgtap | public | view_owner_is | name, name, name | text + pgtap | public | views_are | name[] | text + pgtap | public | views_are | name[], text | text + pgtap | public | views_are | name, name[], text | text + pgtap | public | views_are | name, name[] | text + pgtap | public | volatility_is | name, name, name[], text, text | text + pgtap | public | volatility_is | name, name[], text | text + pgtap | public | volatility_is | name, name, text, text | text + pgtap | public | volatility_is | name, name, text | text + pgtap | public | volatility_is | name, text, text | text + pgtap | public | volatility_is | name, text | text + pgtap | public | volatility_is | name, name, name[], text | text + pgtap | public | volatility_is | name, name[], text, text | text + plcoffee | pg_catalog | plcoffee_call_handler | | language_handler + plcoffee | pg_catalog | plcoffee_call_validator | oid | void + plcoffee | pg_catalog | plcoffee_inline_handler | internal | void + plls | pg_catalog | plls_call_handler | | language_handler + plls | pg_catalog | plls_call_validator | oid | void + plls | pg_catalog | plls_inline_handler | internal | void + plpgsql | pg_catalog | plpgsql_call_handler | | language_handler + plpgsql | pg_catalog | plpgsql_inline_handler | internal | void + plpgsql | pg_catalog | plpgsql_validator | oid | void + plpgsql_check | public | __plpgsql_show_dependency_tb | funcoid regprocedure, relid regclass, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype | TABLE(type text, oid oid, schema text, name text, params text) + plpgsql_check | public | __plpgsql_show_dependency_tb | name text, relid regclass, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype | TABLE(type text, oid oid, schema text, name text, params text) + plpgsql_check | public | plpgsql_check_function | funcoid regprocedure, relid regclass, format text, fatal_errors boolean, other_warnings boolean, performance_warnings boolean, extra_warnings boolean, security_warnings boolean, compatibility_warnings boolean, oldtable name, newtable name, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype, without_warnings boolean, all_warnings boolean, use_incomment_options boolean, incomment_options_usage_warning boolean, constant_tracing boolean | SETOF text + plpgsql_check | public | plpgsql_check_function | name text, relid regclass, format text, fatal_errors boolean, other_warnings boolean, performance_warnings boolean, extra_warnings boolean, security_warnings boolean, compatibility_warnings boolean, oldtable name, newtable name, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype, without_warnings boolean, all_warnings boolean, use_incomment_options boolean, incomment_options_usage_warning boolean, constant_tracing boolean | SETOF text + plpgsql_check | public | plpgsql_check_function_tb | funcoid regprocedure, relid regclass, fatal_errors boolean, other_warnings boolean, performance_warnings boolean, extra_warnings boolean, security_warnings boolean, compatibility_warnings boolean, oldtable name, newtable name, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype, without_warnings boolean, all_warnings boolean, use_incomment_options boolean, incomment_options_usage_warning boolean, constant_tracing boolean | TABLE(functionid regproc, lineno integer, statement text, sqlstate text, message text, detail text, hint text, level text, "position" integer, query text, context text) + plpgsql_check | public | plpgsql_check_function_tb | name text, relid regclass, fatal_errors boolean, other_warnings boolean, performance_warnings boolean, extra_warnings boolean, security_warnings boolean, compatibility_warnings boolean, oldtable name, newtable name, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype, without_warnings boolean, all_warnings boolean, use_incomment_options boolean, incomment_options_usage_warning boolean, constant_tracing boolean | TABLE(functionid regproc, lineno integer, statement text, sqlstate text, message text, detail text, hint text, level text, "position" integer, query text, context text) + plpgsql_check | public | plpgsql_check_pragma | VARIADIC name text[] | integer + plpgsql_check | public | plpgsql_check_profiler | enable boolean | boolean + plpgsql_check | public | plpgsql_check_tracer | enable boolean, verbosity text | boolean + plpgsql_check | public | plpgsql_coverage_branches | funcoid regprocedure | double precision + plpgsql_check | public | plpgsql_coverage_branches | name text | double precision + plpgsql_check | public | plpgsql_coverage_statements | funcoid regprocedure | double precision + plpgsql_check | public | plpgsql_coverage_statements | name text | double precision + plpgsql_check | public | plpgsql_profiler_function_statements_tb | funcoid regprocedure | TABLE(stmtid integer, parent_stmtid integer, parent_note text, block_num integer, lineno integer, queryid bigint, exec_stmts bigint, exec_stmts_err bigint, total_time double precision, avg_time double precision, max_time double precision, processed_rows bigint, stmtname text) + plpgsql_check | public | plpgsql_profiler_function_statements_tb | name text | TABLE(stmtid integer, parent_stmtid integer, parent_note text, block_num integer, lineno integer, queryid bigint, exec_stmts bigint, exec_stmts_err bigint, total_time double precision, avg_time double precision, max_time double precision, processed_rows bigint, stmtname text) + plpgsql_check | public | plpgsql_profiler_function_tb | funcoid regprocedure | TABLE(lineno integer, stmt_lineno integer, queryids bigint[], cmds_on_row integer, exec_stmts bigint, exec_stmts_err bigint, total_time double precision, avg_time double precision, max_time double precision[], processed_rows bigint[], source text) + plpgsql_check | public | plpgsql_profiler_function_tb | name text | TABLE(lineno integer, stmt_lineno integer, queryids bigint[], cmds_on_row integer, exec_stmts bigint, exec_stmts_err bigint, total_time double precision, avg_time double precision, max_time double precision[], processed_rows bigint[], source text) + plpgsql_check | public | plpgsql_profiler_functions_all | | TABLE(funcoid regprocedure, exec_count bigint, exec_stmts_err bigint, total_time double precision, avg_time double precision, stddev_time double precision, min_time double precision, max_time double precision) + plpgsql_check | public | plpgsql_profiler_install_fake_queryid_hook | | void + plpgsql_check | public | plpgsql_profiler_remove_fake_queryid_hook | | void + plpgsql_check | public | plpgsql_profiler_reset | funcoid regprocedure | void + plpgsql_check | public | plpgsql_profiler_reset_all | | void + plpgsql_check | public | plpgsql_show_dependency_tb | funcoid regprocedure, relid regclass, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype | TABLE(type text, oid oid, schema text, name text, params text) + plpgsql_check | public | plpgsql_show_dependency_tb | fnname text, relid regclass, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype | TABLE(type text, oid oid, schema text, name text, params text) + plv8 | pg_catalog | plv8_call_handler | | language_handler + plv8 | pg_catalog | plv8_call_validator | oid | void + plv8 | pg_catalog | plv8_info | | json + plv8 | pg_catalog | plv8_inline_handler | internal | void + plv8 | pg_catalog | plv8_reset | | void + plv8 | pg_catalog | plv8_version | | text + postgis | public | _postgis_deprecate | oldname text, newname text, version text | void + postgis | public | _postgis_index_extent | tbl regclass, col text | box2d + postgis | public | _postgis_join_selectivity | regclass, text, regclass, text, text | double precision + postgis | public | _postgis_pgsql_version | | text + postgis | public | _postgis_scripts_pgsql_version | | text + postgis | public | _postgis_selectivity | tbl regclass, att_name text, geom geometry, mode text | double precision + postgis | public | _postgis_stats | tbl regclass, att_name text, text | text + postgis | public | _st_3ddfullywithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | _st_3ddwithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | _st_3dintersects | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_asgml | integer, geometry, integer, integer, text, text | text + postgis | public | _st_asx3d | integer, geometry, integer, integer, text | text + postgis | public | _st_bestsrid | geography | integer + postgis | public | _st_bestsrid | geography, geography | integer + postgis | public | _st_contains | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_containsproperly | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_coveredby | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_coveredby | geog1 geography, geog2 geography | boolean + postgis | public | _st_covers | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_covers | geog1 geography, geog2 geography | boolean + postgis | public | _st_crosses | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_dfullywithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | _st_distancetree | geography, geography, double precision, boolean | double precision + postgis | public | _st_distancetree | geography, geography | double precision + postgis | public | _st_distanceuncached | geography, geography, double precision, boolean | double precision + postgis | public | _st_distanceuncached | geography, geography, boolean | double precision + postgis | public | _st_distanceuncached | geography, geography | double precision + postgis | public | _st_dwithin | geog1 geography, geog2 geography, tolerance double precision, use_spheroid boolean | boolean + postgis | public | _st_dwithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | _st_dwithinuncached | geography, geography, double precision, boolean | boolean + postgis | public | _st_dwithinuncached | geography, geography, double precision | boolean + postgis | public | _st_equals | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_expand | geography, double precision | geography + postgis | public | _st_geomfromgml | text, integer | geometry + postgis | public | _st_intersects | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_linecrossingdirection | line1 geometry, line2 geometry | integer + postgis | public | _st_longestline | geom1 geometry, geom2 geometry | geometry + postgis | public | _st_maxdistance | geom1 geometry, geom2 geometry | double precision + postgis | public | _st_orderingequals | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_overlaps | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_pointoutside | geography | geography + postgis | public | _st_sortablehash | geom geometry | bigint + postgis | public | _st_touches | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_voronoi | g1 geometry, clip geometry, tolerance double precision, return_polygons boolean | geometry + postgis | public | _st_within | geom1 geometry, geom2 geometry | boolean + postgis | public | addauth | text | boolean + postgis | public | addgeometrycolumn | schema_name character varying, table_name character varying, column_name character varying, new_srid integer, new_type character varying, new_dim integer, use_typmod boolean | text + postgis | public | addgeometrycolumn | catalog_name character varying, schema_name character varying, table_name character varying, column_name character varying, new_srid_in integer, new_type character varying, new_dim integer, use_typmod boolean | text + postgis | public | addgeometrycolumn | table_name character varying, column_name character varying, new_srid integer, new_type character varying, new_dim integer, use_typmod boolean | text + postgis | public | box | box3d | box + postgis | public | box | geometry | box + postgis | public | box2d | box3d | box2d + postgis | public | box2d | geometry | box2d + postgis | public | box2d_in | cstring | box2d + postgis | public | box2d_out | box2d | cstring + postgis | public | box2df_in | cstring | box2df + postgis | public | box2df_out | box2df | cstring + postgis | public | box3d | geometry | box3d + postgis | public | box3d | box2d | box3d + postgis | public | box3d_in | cstring | box3d + postgis | public | box3d_out | box3d | cstring + postgis | public | box3dtobox | box3d | box + postgis | public | bytea | geography | bytea + postgis | public | bytea | geometry | bytea + postgis | public | checkauth | text, text | integer + postgis | public | checkauth | text, text, text | integer + postgis | public | checkauthtrigger | | trigger + postgis | public | contains_2d | geometry, box2df | boolean + postgis | public | contains_2d | box2df, geometry | boolean + postgis | public | contains_2d | box2df, box2df | boolean + postgis | public | disablelongtransactions | | text + postgis | public | dropgeometrycolumn | schema_name character varying, table_name character varying, column_name character varying | text + postgis | public | dropgeometrycolumn | table_name character varying, column_name character varying | text + postgis | public | dropgeometrycolumn | catalog_name character varying, schema_name character varying, table_name character varying, column_name character varying | text + postgis | public | dropgeometrytable | table_name character varying | text + postgis | public | dropgeometrytable | schema_name character varying, table_name character varying | text + postgis | public | dropgeometrytable | catalog_name character varying, schema_name character varying, table_name character varying | text + postgis | public | enablelongtransactions | | text + postgis | public | equals | geom1 geometry, geom2 geometry | boolean + postgis | public | find_srid | character varying, character varying, character varying | integer + postgis | public | geog_brin_inclusion_add_value | internal, internal, internal, internal | boolean + postgis | public | geography | bytea | geography + postgis | public | geography | geometry | geography + postgis | public | geography | geography, integer, boolean | geography + postgis | public | geography_analyze | internal | boolean + postgis | public | geography_cmp | geography, geography | integer + postgis | public | geography_distance_knn | geography, geography | double precision + postgis | public | geography_eq | geography, geography | boolean + postgis | public | geography_ge | geography, geography | boolean + postgis | public | geography_gist_compress | internal | internal + postgis | public | geography_gist_consistent | internal, geography, integer | boolean + postgis | public | geography_gist_decompress | internal | internal + postgis | public | geography_gist_distance | internal, geography, integer | double precision + postgis | public | geography_gist_penalty | internal, internal, internal | internal + postgis | public | geography_gist_picksplit | internal, internal | internal + postgis | public | geography_gist_same | box2d, box2d, internal | internal + postgis | public | geography_gist_union | bytea, internal | internal + postgis | public | geography_gt | geography, geography | boolean + postgis | public | geography_in | cstring, oid, integer | geography + postgis | public | geography_le | geography, geography | boolean + postgis | public | geography_lt | geography, geography | boolean + postgis | public | geography_out | geography | cstring + postgis | public | geography_overlaps | geography, geography | boolean + postgis | public | geography_recv | internal, oid, integer | geography + postgis | public | geography_send | geography | bytea + postgis | public | geography_spgist_choose_nd | internal, internal | void + postgis | public | geography_spgist_compress_nd | internal | internal + postgis | public | geography_spgist_config_nd | internal, internal | void + postgis | public | geography_spgist_inner_consistent_nd | internal, internal | void + postgis | public | geography_spgist_leaf_consistent_nd | internal, internal | boolean + postgis | public | geography_spgist_picksplit_nd | internal, internal | void + postgis | public | geography_typmod_in | cstring[] | integer + postgis | public | geography_typmod_out | integer | cstring + postgis | public | geom2d_brin_inclusion_add_value | internal, internal, internal, internal | boolean + postgis | public | geom3d_brin_inclusion_add_value | internal, internal, internal, internal | boolean + postgis | public | geom4d_brin_inclusion_add_value | internal, internal, internal, internal | boolean + postgis | public | geometry | geometry, integer, boolean | geometry + postgis | public | geometry | box3d | geometry + postgis | public | geometry | text | geometry + postgis | public | geometry | point | geometry + postgis | public | geometry | bytea | geometry + postgis | public | geometry | geography | geometry + postgis | public | geometry | path | geometry + postgis | public | geometry | polygon | geometry + postgis | public | geometry | box2d | geometry + postgis | public | geometry_above | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_analyze | internal | boolean + postgis | public | geometry_below | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_cmp | geom1 geometry, geom2 geometry | integer + postgis | public | geometry_contained_3d | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_contains | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_contains_3d | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_contains_nd | geometry, geometry | boolean + postgis | public | geometry_distance_box | geom1 geometry, geom2 geometry | double precision + postgis | public | geometry_distance_centroid | geom1 geometry, geom2 geometry | double precision + postgis | public | geometry_distance_centroid_nd | geometry, geometry | double precision + postgis | public | geometry_distance_cpa | geometry, geometry | double precision + postgis | public | geometry_eq | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_ge | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_gist_compress_2d | internal | internal + postgis | public | geometry_gist_compress_nd | internal | internal + postgis | public | geometry_gist_consistent_2d | internal, geometry, integer | boolean + postgis | public | geometry_gist_consistent_nd | internal, geometry, integer | boolean + postgis | public | geometry_gist_decompress_2d | internal | internal + postgis | public | geometry_gist_decompress_nd | internal | internal + postgis | public | geometry_gist_distance_2d | internal, geometry, integer | double precision + postgis | public | geometry_gist_distance_nd | internal, geometry, integer | double precision + postgis | public | geometry_gist_penalty_2d | internal, internal, internal | internal + postgis | public | geometry_gist_penalty_nd | internal, internal, internal | internal + postgis | public | geometry_gist_picksplit_2d | internal, internal | internal + postgis | public | geometry_gist_picksplit_nd | internal, internal | internal + postgis | public | geometry_gist_same_2d | geom1 geometry, geom2 geometry, internal | internal + postgis | public | geometry_gist_same_nd | geometry, geometry, internal | internal + postgis | public | geometry_gist_sortsupport_2d | internal | void + postgis | public | geometry_gist_union_2d | bytea, internal | internal + postgis | public | geometry_gist_union_nd | bytea, internal | internal + postgis | public | geometry_gt | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_hash | geometry | integer + postgis | public | geometry_in | cstring | geometry + postgis | public | geometry_le | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_left | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_lt | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_out | geometry | cstring + postgis | public | geometry_overabove | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_overbelow | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_overlaps | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_overlaps_3d | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_overlaps_nd | geometry, geometry | boolean + postgis | public | geometry_overleft | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_overright | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_recv | internal | geometry + postgis | public | geometry_right | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_same | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_same_3d | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_same_nd | geometry, geometry | boolean + postgis | public | geometry_send | geometry | bytea + postgis | public | geometry_sortsupport | internal | void + postgis | public | geometry_spgist_choose_2d | internal, internal | void + postgis | public | geometry_spgist_choose_3d | internal, internal | void + postgis | public | geometry_spgist_choose_nd | internal, internal | void + postgis | public | geometry_spgist_compress_2d | internal | internal + postgis | public | geometry_spgist_compress_3d | internal | internal + postgis | public | geometry_spgist_compress_nd | internal | internal + postgis | public | geometry_spgist_config_2d | internal, internal | void + postgis | public | geometry_spgist_config_3d | internal, internal | void + postgis | public | geometry_spgist_config_nd | internal, internal | void + postgis | public | geometry_spgist_inner_consistent_2d | internal, internal | void + postgis | public | geometry_spgist_inner_consistent_3d | internal, internal | void + postgis | public | geometry_spgist_inner_consistent_nd | internal, internal | void + postgis | public | geometry_spgist_leaf_consistent_2d | internal, internal | boolean + postgis | public | geometry_spgist_leaf_consistent_3d | internal, internal | boolean + postgis | public | geometry_spgist_leaf_consistent_nd | internal, internal | boolean + postgis | public | geometry_spgist_picksplit_2d | internal, internal | void + postgis | public | geometry_spgist_picksplit_3d | internal, internal | void + postgis | public | geometry_spgist_picksplit_nd | internal, internal | void + postgis | public | geometry_typmod_in | cstring[] | integer + postgis | public | geometry_typmod_out | integer | cstring + postgis | public | geometry_within | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_within_nd | geometry, geometry | boolean + postgis | public | geometrytype | geography | text + postgis | public | geometrytype | geometry | text + postgis | public | geomfromewkb | bytea | geometry + postgis | public | geomfromewkt | text | geometry + postgis | public | get_proj4_from_srid | integer | text + postgis | public | gettransactionid | | xid + postgis | public | gidx_in | cstring | gidx + postgis | public | gidx_out | gidx | cstring + postgis | public | gserialized_gist_joinsel_2d | internal, oid, internal, smallint | double precision + postgis | public | gserialized_gist_joinsel_nd | internal, oid, internal, smallint | double precision + postgis | public | gserialized_gist_sel_2d | internal, oid, internal, integer | double precision + postgis | public | gserialized_gist_sel_nd | internal, oid, internal, integer | double precision + postgis | public | is_contained_2d | geometry, box2df | boolean + postgis | public | is_contained_2d | box2df, geometry | boolean + postgis | public | is_contained_2d | box2df, box2df | boolean + postgis | public | json | geometry | json + postgis | public | jsonb | geometry | jsonb + postgis | public | lockrow | text, text, text, timestamp without time zone | integer + postgis | public | lockrow | text, text, text, text | integer + postgis | public | lockrow | text, text, text | integer + postgis | public | lockrow | text, text, text, text, timestamp without time zone | integer + postgis | public | longtransactionsenabled | | boolean + postgis | public | overlaps_2d | geometry, box2df | boolean + postgis | public | overlaps_2d | box2df, geometry | boolean + postgis | public | overlaps_2d | box2df, box2df | boolean + postgis | public | overlaps_geog | gidx, gidx | boolean + postgis | public | overlaps_geog | geography, gidx | boolean + postgis | public | overlaps_geog | gidx, geography | boolean + postgis | public | overlaps_nd | gidx, gidx | boolean + postgis | public | overlaps_nd | geometry, gidx | boolean + postgis | public | overlaps_nd | gidx, geometry | boolean + postgis | public | path | geometry | path + postgis | public | pgis_asflatgeobuf_finalfn | internal | bytea + postgis | public | pgis_asflatgeobuf_transfn | internal, anyelement, boolean | internal + postgis | public | pgis_asflatgeobuf_transfn | internal, anyelement | internal + postgis | public | pgis_asflatgeobuf_transfn | internal, anyelement, boolean, text | internal + postgis | public | pgis_asgeobuf_finalfn | internal | bytea + postgis | public | pgis_asgeobuf_transfn | internal, anyelement | internal + postgis | public | pgis_asgeobuf_transfn | internal, anyelement, text | internal + postgis | public | pgis_asmvt_combinefn | internal, internal | internal + postgis | public | pgis_asmvt_deserialfn | bytea, internal | internal + postgis | public | pgis_asmvt_finalfn | internal | bytea + postgis | public | pgis_asmvt_serialfn | internal | bytea + postgis | public | pgis_asmvt_transfn | internal, anyelement, text, integer, text | internal + postgis | public | pgis_asmvt_transfn | internal, anyelement | internal + postgis | public | pgis_asmvt_transfn | internal, anyelement, text, integer | internal + postgis | public | pgis_asmvt_transfn | internal, anyelement, text | internal + postgis | public | pgis_asmvt_transfn | internal, anyelement, text, integer, text, text | internal + postgis | public | pgis_geometry_accum_transfn | internal, geometry, double precision | internal + postgis | public | pgis_geometry_accum_transfn | internal, geometry | internal + postgis | public | pgis_geometry_accum_transfn | internal, geometry, double precision, integer | internal + postgis | public | pgis_geometry_clusterintersecting_finalfn | internal | geometry[] + postgis | public | pgis_geometry_clusterwithin_finalfn | internal | geometry[] + postgis | public | pgis_geometry_collect_finalfn | internal | geometry + postgis | public | pgis_geometry_makeline_finalfn | internal | geometry + postgis | public | pgis_geometry_polygonize_finalfn | internal | geometry + postgis | public | pgis_geometry_union_parallel_combinefn | internal, internal | internal + postgis | public | pgis_geometry_union_parallel_deserialfn | bytea, internal | internal + postgis | public | pgis_geometry_union_parallel_finalfn | internal | geometry + postgis | public | pgis_geometry_union_parallel_serialfn | internal | bytea + postgis | public | pgis_geometry_union_parallel_transfn | internal, geometry, double precision | internal + postgis | public | pgis_geometry_union_parallel_transfn | internal, geometry | internal + postgis | public | point | geometry | point + postgis | public | polygon | geometry | polygon + postgis | public | populate_geometry_columns | tbl_oid oid, use_typmod boolean | integer + postgis | public | populate_geometry_columns | use_typmod boolean | text + postgis | public | postgis_addbbox | geometry | geometry + postgis | public | postgis_cache_bbox | | trigger + postgis | public | postgis_constraint_dims | geomschema text, geomtable text, geomcolumn text | integer + postgis | public | postgis_constraint_srid | geomschema text, geomtable text, geomcolumn text | integer + postgis | public | postgis_constraint_type | geomschema text, geomtable text, geomcolumn text | character varying + postgis | public | postgis_dropbbox | geometry | geometry + postgis | public | postgis_extensions_upgrade | | text + postgis | public | postgis_full_version | | text + postgis | public | postgis_geos_noop | geometry | geometry + postgis | public | postgis_geos_version | | text + postgis | public | postgis_getbbox | geometry | box2d + postgis | public | postgis_hasbbox | geometry | boolean + postgis | public | postgis_index_supportfn | internal | internal + postgis | public | postgis_lib_build_date | | text + postgis | public | postgis_lib_revision | | text + postgis | public | postgis_lib_version | | text + postgis | public | postgis_libjson_version | | text + postgis | public | postgis_liblwgeom_version | | text + postgis | public | postgis_libprotobuf_version | | text + postgis | public | postgis_libxml_version | | text + postgis | public | postgis_noop | geometry | geometry + postgis | public | postgis_proj_version | | text + postgis | public | postgis_scripts_build_date | | text + postgis | public | postgis_scripts_installed | | text + postgis | public | postgis_scripts_released | | text + postgis | public | postgis_svn_version | | text + postgis | public | postgis_transform_geometry | geom geometry, text, text, integer | geometry + postgis | public | postgis_type_name | geomname character varying, coord_dimension integer, use_new_name boolean | character varying + postgis | public | postgis_typmod_dims | integer | integer + postgis | public | postgis_typmod_srid | integer | integer + postgis | public | postgis_typmod_type | integer | text + postgis | public | postgis_version | | text + postgis | public | postgis_wagyu_version | | text + postgis | public | spheroid_in | cstring | spheroid + postgis | public | spheroid_out | spheroid | cstring + postgis | public | st_3dclosestpoint | geom1 geometry, geom2 geometry | geometry + postgis | public | st_3ddfullywithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | st_3ddistance | geom1 geometry, geom2 geometry | double precision + postgis | public | st_3ddwithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | st_3dextent | geometry | box3d + postgis | public | st_3dintersects | geom1 geometry, geom2 geometry | boolean + postgis | public | st_3dlength | geometry | double precision + postgis | public | st_3dlineinterpolatepoint | geometry, double precision | geometry + postgis | public | st_3dlongestline | geom1 geometry, geom2 geometry | geometry + postgis | public | st_3dmakebox | geom1 geometry, geom2 geometry | box3d + postgis | public | st_3dmaxdistance | geom1 geometry, geom2 geometry | double precision + postgis | public | st_3dperimeter | geometry | double precision + postgis | public | st_3dshortestline | geom1 geometry, geom2 geometry | geometry + postgis | public | st_addmeasure | geometry, double precision, double precision | geometry + postgis | public | st_addpoint | geom1 geometry, geom2 geometry, integer | geometry + postgis | public | st_addpoint | geom1 geometry, geom2 geometry | geometry + postgis | public | st_affine | geometry, double precision, double precision, double precision, double precision, double precision, double precision | geometry + postgis | public | st_affine | geometry, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision | geometry + postgis | public | st_angle | pt1 geometry, pt2 geometry, pt3 geometry, pt4 geometry | double precision + postgis | public | st_angle | line1 geometry, line2 geometry | double precision + postgis | public | st_area | geog geography, use_spheroid boolean | double precision + postgis | public | st_area | text | double precision + postgis | public | st_area | geometry | double precision + postgis | public | st_area2d | geometry | double precision + postgis | public | st_asbinary | geography | bytea + postgis | public | st_asbinary | geometry, text | bytea + postgis | public | st_asbinary | geometry | bytea + postgis | public | st_asbinary | geography, text | bytea + postgis | public | st_asencodedpolyline | geom geometry, nprecision integer | text + postgis | public | st_asewkb | geometry, text | bytea + postgis | public | st_asewkb | geometry | bytea + postgis | public | st_asewkt | text | text + postgis | public | st_asewkt | geography, integer | text + postgis | public | st_asewkt | geography | text + postgis | public | st_asewkt | geometry, integer | text + postgis | public | st_asewkt | geometry | text + postgis | public | st_asflatgeobuf | anyelement | bytea + postgis | public | st_asflatgeobuf | anyelement, boolean | bytea + postgis | public | st_asflatgeobuf | anyelement, boolean, text | bytea + postgis | public | st_asgeobuf | anyelement | bytea + postgis | public | st_asgeobuf | anyelement, text | bytea + postgis | public | st_asgeojson | text | text + postgis | public | st_asgeojson | geom geometry, maxdecimaldigits integer, options integer | text + postgis | public | st_asgeojson | geog geography, maxdecimaldigits integer, options integer | text + postgis | public | st_asgeojson | r record, geom_column text, maxdecimaldigits integer, pretty_bool boolean | text + postgis | public | st_asgml | text | text + postgis | public | st_asgml | version integer, geog geography, maxdecimaldigits integer, options integer, nprefix text, id text | text + postgis | public | st_asgml | geog geography, maxdecimaldigits integer, options integer, nprefix text, id text | text + postgis | public | st_asgml | geom geometry, maxdecimaldigits integer, options integer | text + postgis | public | st_asgml | version integer, geom geometry, maxdecimaldigits integer, options integer, nprefix text, id text | text + postgis | public | st_ashexewkb | geometry, text | text + postgis | public | st_ashexewkb | geometry | text + postgis | public | st_askml | text | text + postgis | public | st_askml | geom geometry, maxdecimaldigits integer, nprefix text | text + postgis | public | st_askml | geog geography, maxdecimaldigits integer, nprefix text | text + postgis | public | st_aslatlontext | geom geometry, tmpl text | text + postgis | public | st_asmarc21 | geom geometry, format text | text + postgis | public | st_asmvt | anyelement | bytea + postgis | public | st_asmvt | anyelement, text, integer, text, text | bytea + postgis | public | st_asmvt | anyelement, text, integer | bytea + postgis | public | st_asmvt | anyelement, text | bytea + postgis | public | st_asmvt | anyelement, text, integer, text | bytea + postgis | public | st_asmvtgeom | geom geometry, bounds box2d, extent integer, buffer integer, clip_geom boolean | geometry + postgis | public | st_assvg | geog geography, rel integer, maxdecimaldigits integer | text + postgis | public | st_assvg | geom geometry, rel integer, maxdecimaldigits integer | text + postgis | public | st_assvg | text | text + postgis | public | st_astext | text | text + postgis | public | st_astext | geography, integer | text + postgis | public | st_astext | geography | text + postgis | public | st_astext | geometry, integer | text + postgis | public | st_astext | geometry | text + postgis | public | st_astwkb | geom geometry[], ids bigint[], prec integer, prec_z integer, prec_m integer, with_sizes boolean, with_boxes boolean | bytea + postgis | public | st_astwkb | geom geometry, prec integer, prec_z integer, prec_m integer, with_sizes boolean, with_boxes boolean | bytea + postgis | public | st_asx3d | geom geometry, maxdecimaldigits integer, options integer | text + postgis | public | st_azimuth | geom1 geometry, geom2 geometry | double precision + postgis | public | st_azimuth | geog1 geography, geog2 geography | double precision + postgis | public | st_bdmpolyfromtext | text, integer | geometry + postgis | public | st_bdpolyfromtext | text, integer | geometry + postgis | public | st_boundary | geometry | geometry + postgis | public | st_boundingdiagonal | geom geometry, fits boolean | geometry + postgis | public | st_box2dfromgeohash | text, integer | box2d + postgis | public | st_buffer | geom geometry, radius double precision, options text | geometry + postgis | public | st_buffer | geography, double precision, text | geography + postgis | public | st_buffer | geography, double precision, integer | geography + postgis | public | st_buffer | geom geometry, radius double precision, quadsegs integer | geometry + postgis | public | st_buffer | text, double precision, text | geometry + postgis | public | st_buffer | geography, double precision | geography + postgis | public | st_buffer | text, double precision, integer | geometry + postgis | public | st_buffer | text, double precision | geometry + postgis | public | st_buildarea | geometry | geometry + postgis | public | st_centroid | text | geometry + postgis | public | st_centroid | geography, use_spheroid boolean | geography + postgis | public | st_centroid | geometry | geometry + postgis | public | st_chaikinsmoothing | geometry, integer, boolean | geometry + postgis | public | st_cleangeometry | geometry | geometry + postgis | public | st_clipbybox2d | geom geometry, box box2d | geometry + postgis | public | st_closestpoint | geom1 geometry, geom2 geometry | geometry + postgis | public | st_closestpointofapproach | geometry, geometry | double precision + postgis | public | st_clusterdbscan | geometry, eps double precision, minpoints integer | integer + postgis | public | st_clusterintersecting | geometry[] | geometry[] + postgis | public | st_clusterintersecting | geometry | geometry[] + postgis | public | st_clusterkmeans | geom geometry, k integer, max_radius double precision | integer + postgis | public | st_clusterwithin | geometry[], double precision | geometry[] + postgis | public | st_clusterwithin | geometry, double precision | geometry[] + postgis | public | st_collect | geom1 geometry, geom2 geometry | geometry + postgis | public | st_collect | geometry[] | geometry + postgis | public | st_collect | geometry | geometry + postgis | public | st_collectionextract | geometry, integer | geometry + postgis | public | st_collectionextract | geometry | geometry + postgis | public | st_collectionhomogenize | geometry | geometry + postgis | public | st_combinebbox | box2d, geometry | box2d + postgis | public | st_combinebbox | box3d, geometry | box3d + postgis | public | st_combinebbox | box3d, box3d | box3d + postgis | public | st_concavehull | param_geom geometry, param_pctconvex double precision, param_allow_holes boolean | geometry + postgis | public | st_contains | geom1 geometry, geom2 geometry | boolean + postgis | public | st_containsproperly | geom1 geometry, geom2 geometry | boolean + postgis | public | st_convexhull | geometry | geometry + postgis | public | st_coorddim | geometry geometry | smallint + postgis | public | st_coveredby | geom1 geometry, geom2 geometry | boolean + postgis | public | st_coveredby | text, text | boolean + postgis | public | st_coveredby | geog1 geography, geog2 geography | boolean + postgis | public | st_covers | geom1 geometry, geom2 geometry | boolean + postgis | public | st_covers | text, text | boolean + postgis | public | st_covers | geog1 geography, geog2 geography | boolean + postgis | public | st_cpawithin | geometry, geometry, double precision | boolean + postgis | public | st_crosses | geom1 geometry, geom2 geometry | boolean + postgis | public | st_curvetoline | geom geometry, tol double precision, toltype integer, flags integer | geometry + postgis | public | st_delaunaytriangles | g1 geometry, tolerance double precision, flags integer | geometry + postgis | public | st_dfullywithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | st_difference | geom1 geometry, geom2 geometry, gridsize double precision | geometry + postgis | public | st_dimension | geometry | integer + postgis | public | st_disjoint | geom1 geometry, geom2 geometry | boolean + postgis | public | st_distance | geom1 geometry, geom2 geometry | double precision + postgis | public | st_distance | text, text | double precision + postgis | public | st_distance | geog1 geography, geog2 geography, use_spheroid boolean | double precision + postgis | public | st_distancecpa | geometry, geometry | double precision + postgis | public | st_distancesphere | geom1 geometry, geom2 geometry | double precision + postgis | public | st_distancesphere | geom1 geometry, geom2 geometry, radius double precision | double precision + postgis | public | st_distancespheroid | geom1 geometry, geom2 geometry, spheroid | double precision + postgis | public | st_distancespheroid | geom1 geometry, geom2 geometry | double precision + postgis | public | st_dump | geometry | SETOF geometry_dump + postgis | public | st_dumppoints | geometry | SETOF geometry_dump + postgis | public | st_dumprings | geometry | SETOF geometry_dump + postgis | public | st_dumpsegments | geometry | SETOF geometry_dump + postgis | public | st_dwithin | text, text, double precision | boolean + postgis | public | st_dwithin | geog1 geography, geog2 geography, tolerance double precision, use_spheroid boolean | boolean + postgis | public | st_dwithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | st_endpoint | geometry | geometry + postgis | public | st_envelope | geometry | geometry + postgis | public | st_equals | geom1 geometry, geom2 geometry | boolean + postgis | public | st_estimatedextent | text, text, text, boolean | box2d + postgis | public | st_estimatedextent | text, text | box2d + postgis | public | st_estimatedextent | text, text, text | box2d + postgis | public | st_expand | box3d, double precision | box3d + postgis | public | st_expand | box box3d, dx double precision, dy double precision, dz double precision | box3d + postgis | public | st_expand | box2d, double precision | box2d + postgis | public | st_expand | box box2d, dx double precision, dy double precision | box2d + postgis | public | st_expand | geometry, double precision | geometry + postgis | public | st_expand | geom geometry, dx double precision, dy double precision, dz double precision, dm double precision | geometry + postgis | public | st_extent | geometry | box2d + postgis | public | st_exteriorring | geometry | geometry + postgis | public | st_filterbym | geometry, double precision, double precision, boolean | geometry + postgis | public | st_findextent | text, text | box2d + postgis | public | st_findextent | text, text, text | box2d + postgis | public | st_flipcoordinates | geometry | geometry + postgis | public | st_force2d | geometry | geometry + postgis | public | st_force3d | geom geometry, zvalue double precision | geometry + postgis | public | st_force3dm | geom geometry, mvalue double precision | geometry + postgis | public | st_force3dz | geom geometry, zvalue double precision | geometry + postgis | public | st_force4d | geom geometry, zvalue double precision, mvalue double precision | geometry + postgis | public | st_forcecollection | geometry | geometry + postgis | public | st_forcecurve | geometry | geometry + postgis | public | st_forcepolygonccw | geometry | geometry + postgis | public | st_forcepolygoncw | geometry | geometry + postgis | public | st_forcerhr | geometry | geometry + postgis | public | st_forcesfs | geometry, version text | geometry + postgis | public | st_forcesfs | geometry | geometry + postgis | public | st_frechetdistance | geom1 geometry, geom2 geometry, double precision | double precision + postgis | public | st_fromflatgeobuf | anyelement, bytea | SETOF anyelement + postgis | public | st_fromflatgeobuftotable | text, text, bytea | void + postgis | public | st_generatepoints | area geometry, npoints integer, seed integer | geometry + postgis | public | st_generatepoints | area geometry, npoints integer | geometry + postgis | public | st_geogfromtext | text | geography + postgis | public | st_geogfromwkb | bytea | geography + postgis | public | st_geographyfromtext | text | geography + postgis | public | st_geohash | geog geography, maxchars integer | text + postgis | public | st_geohash | geom geometry, maxchars integer | text + postgis | public | st_geomcollfromtext | text | geometry + postgis | public | st_geomcollfromtext | text, integer | geometry + postgis | public | st_geomcollfromwkb | bytea, integer | geometry + postgis | public | st_geomcollfromwkb | bytea | geometry + postgis | public | st_geometricmedian | g geometry, tolerance double precision, max_iter integer, fail_if_not_converged boolean | geometry + postgis | public | st_geometryfromtext | text | geometry + postgis | public | st_geometryfromtext | text, integer | geometry + postgis | public | st_geometryn | geometry, integer | geometry + postgis | public | st_geometrytype | geometry | text + postgis | public | st_geomfromewkb | bytea | geometry + postgis | public | st_geomfromewkt | text | geometry + postgis | public | st_geomfromgeohash | text, integer | geometry + postgis | public | st_geomfromgeojson | text | geometry + postgis | public | st_geomfromgeojson | json | geometry + postgis | public | st_geomfromgeojson | jsonb | geometry + postgis | public | st_geomfromgml | text | geometry + postgis | public | st_geomfromgml | text, integer | geometry + postgis | public | st_geomfromkml | text | geometry + postgis | public | st_geomfrommarc21 | marc21xml text | geometry + postgis | public | st_geomfromtext | text | geometry + postgis | public | st_geomfromtext | text, integer | geometry + postgis | public | st_geomfromtwkb | bytea | geometry + postgis | public | st_geomfromwkb | bytea, integer | geometry + postgis | public | st_geomfromwkb | bytea | geometry + postgis | public | st_gmltosql | text | geometry + postgis | public | st_gmltosql | text, integer | geometry + postgis | public | st_hasarc | geometry geometry | boolean + postgis | public | st_hausdorffdistance | geom1 geometry, geom2 geometry | double precision + postgis | public | st_hausdorffdistance | geom1 geometry, geom2 geometry, double precision | double precision + postgis | public | st_hexagon | size double precision, cell_i integer, cell_j integer, origin geometry | geometry + postgis | public | st_hexagongrid | size double precision, bounds geometry, OUT geom geometry, OUT i integer, OUT j integer | SETOF record + postgis | public | st_interiorringn | geometry, integer | geometry + postgis | public | st_interpolatepoint | line geometry, point geometry | double precision + postgis | public | st_intersection | geom1 geometry, geom2 geometry, gridsize double precision | geometry + postgis | public | st_intersection | text, text | geometry + postgis | public | st_intersection | geography, geography | geography + postgis | public | st_intersects | geom1 geometry, geom2 geometry | boolean + postgis | public | st_intersects | text, text | boolean + postgis | public | st_intersects | geog1 geography, geog2 geography | boolean + postgis | public | st_isclosed | geometry | boolean + postgis | public | st_iscollection | geometry | boolean + postgis | public | st_isempty | geometry | boolean + postgis | public | st_ispolygonccw | geometry | boolean + postgis | public | st_ispolygoncw | geometry | boolean + postgis | public | st_isring | geometry | boolean + postgis | public | st_issimple | geometry | boolean + postgis | public | st_isvalid | geometry, integer | boolean + postgis | public | st_isvalid | geometry | boolean + postgis | public | st_isvaliddetail | geom geometry, flags integer | valid_detail + postgis | public | st_isvalidreason | geometry, integer | text + postgis | public | st_isvalidreason | geometry | text + postgis | public | st_isvalidtrajectory | geometry | boolean + postgis | public | st_length | geog geography, use_spheroid boolean | double precision + postgis | public | st_length | text | double precision + postgis | public | st_length | geometry | double precision + postgis | public | st_length2d | geometry | double precision + postgis | public | st_length2dspheroid | geometry, spheroid | double precision + postgis | public | st_lengthspheroid | geometry, spheroid | double precision + postgis | public | st_letters | letters text, font json | geometry + postgis | public | st_linecrossingdirection | line1 geometry, line2 geometry | integer + postgis | public | st_linefromencodedpolyline | txtin text, nprecision integer | geometry + postgis | public | st_linefrommultipoint | geometry | geometry + postgis | public | st_linefromtext | text | geometry + postgis | public | st_linefromtext | text, integer | geometry + postgis | public | st_linefromwkb | bytea, integer | geometry + postgis | public | st_linefromwkb | bytea | geometry + postgis | public | st_lineinterpolatepoint | geometry, double precision | geometry + postgis | public | st_lineinterpolatepoints | geometry, double precision, repeat boolean | geometry + postgis | public | st_linelocatepoint | geom1 geometry, geom2 geometry | double precision + postgis | public | st_linemerge | geometry, boolean | geometry + postgis | public | st_linemerge | geometry | geometry + postgis | public | st_linestringfromwkb | bytea, integer | geometry + postgis | public | st_linestringfromwkb | bytea | geometry + postgis | public | st_linesubstring | geometry, double precision, double precision | geometry + postgis | public | st_linetocurve | geometry geometry | geometry + postgis | public | st_locatealong | geometry geometry, measure double precision, leftrightoffset double precision | geometry + postgis | public | st_locatebetween | geometry geometry, frommeasure double precision, tomeasure double precision, leftrightoffset double precision | geometry + postgis | public | st_locatebetweenelevations | geometry geometry, fromelevation double precision, toelevation double precision | geometry + postgis | public | st_longestline | geom1 geometry, geom2 geometry | geometry + postgis | public | st_m | geometry | double precision + postgis | public | st_makebox2d | geom1 geometry, geom2 geometry | box2d + postgis | public | st_makeenvelope | double precision, double precision, double precision, double precision, integer | geometry + postgis | public | st_makeline | geom1 geometry, geom2 geometry | geometry + postgis | public | st_makeline | geometry[] | geometry + postgis | public | st_makeline | geometry | geometry + postgis | public | st_makepoint | double precision, double precision, double precision, double precision | geometry + postgis | public | st_makepoint | double precision, double precision | geometry + postgis | public | st_makepoint | double precision, double precision, double precision | geometry + postgis | public | st_makepointm | double precision, double precision, double precision | geometry + postgis | public | st_makepolygon | geometry, geometry[] | geometry + postgis | public | st_makepolygon | geometry | geometry + postgis | public | st_makevalid | geom geometry, params text | geometry + postgis | public | st_makevalid | geometry | geometry + postgis | public | st_maxdistance | geom1 geometry, geom2 geometry | double precision + postgis | public | st_maximuminscribedcircle | geometry, OUT center geometry, OUT nearest geometry, OUT radius double precision | record + postgis | public | st_memcollect | geometry | geometry + postgis | public | st_memsize | geometry | integer + postgis | public | st_memunion | geometry | geometry + postgis | public | st_minimumboundingcircle | inputgeom geometry, segs_per_quarter integer | geometry + postgis | public | st_minimumboundingradius | geometry, OUT center geometry, OUT radius double precision | record + postgis | public | st_minimumclearance | geometry | double precision + postgis | public | st_minimumclearanceline | geometry | geometry + postgis | public | st_mlinefromtext | text | geometry + postgis | public | st_mlinefromtext | text, integer | geometry + postgis | public | st_mlinefromwkb | bytea, integer | geometry + postgis | public | st_mlinefromwkb | bytea | geometry + postgis | public | st_mpointfromtext | text | geometry + postgis | public | st_mpointfromtext | text, integer | geometry + postgis | public | st_mpointfromwkb | bytea, integer | geometry + postgis | public | st_mpointfromwkb | bytea | geometry + postgis | public | st_mpolyfromtext | text | geometry + postgis | public | st_mpolyfromtext | text, integer | geometry + postgis | public | st_mpolyfromwkb | bytea, integer | geometry + postgis | public | st_mpolyfromwkb | bytea | geometry + postgis | public | st_multi | geometry | geometry + postgis | public | st_multilinefromwkb | bytea | geometry + postgis | public | st_multilinestringfromtext | text | geometry + postgis | public | st_multilinestringfromtext | text, integer | geometry + postgis | public | st_multipointfromtext | text | geometry + postgis | public | st_multipointfromwkb | bytea, integer | geometry + postgis | public | st_multipointfromwkb | bytea | geometry + postgis | public | st_multipolyfromwkb | bytea, integer | geometry + postgis | public | st_multipolyfromwkb | bytea | geometry + postgis | public | st_multipolygonfromtext | text | geometry + postgis | public | st_multipolygonfromtext | text, integer | geometry + postgis | public | st_ndims | geometry | smallint + postgis | public | st_node | g geometry | geometry + postgis | public | st_normalize | geom geometry | geometry + postgis | public | st_npoints | geometry | integer + postgis | public | st_nrings | geometry | integer + postgis | public | st_numgeometries | geometry | integer + postgis | public | st_numinteriorring | geometry | integer + postgis | public | st_numinteriorrings | geometry | integer + postgis | public | st_numpatches | geometry | integer + postgis | public | st_numpoints | geometry | integer + postgis | public | st_offsetcurve | line geometry, distance double precision, params text | geometry + postgis | public | st_orderingequals | geom1 geometry, geom2 geometry | boolean + postgis | public | st_orientedenvelope | geometry | geometry + postgis | public | st_overlaps | geom1 geometry, geom2 geometry | boolean + postgis | public | st_patchn | geometry, integer | geometry + postgis | public | st_perimeter | geog geography, use_spheroid boolean | double precision + postgis | public | st_perimeter | geometry | double precision + postgis | public | st_perimeter2d | geometry | double precision + postgis | public | st_point | double precision, double precision, srid integer | geometry + postgis | public | st_point | double precision, double precision | geometry + postgis | public | st_pointfromgeohash | text, integer | geometry + postgis | public | st_pointfromtext | text | geometry + postgis | public | st_pointfromtext | text, integer | geometry + postgis | public | st_pointfromwkb | bytea, integer | geometry + postgis | public | st_pointfromwkb | bytea | geometry + postgis | public | st_pointinsidecircle | geometry, double precision, double precision, double precision | boolean + postgis | public | st_pointm | xcoordinate double precision, ycoordinate double precision, mcoordinate double precision, srid integer | geometry + postgis | public | st_pointn | geometry, integer | geometry + postgis | public | st_pointonsurface | geometry | geometry + postgis | public | st_points | geometry | geometry + postgis | public | st_pointz | xcoordinate double precision, ycoordinate double precision, zcoordinate double precision, srid integer | geometry + postgis | public | st_pointzm | xcoordinate double precision, ycoordinate double precision, zcoordinate double precision, mcoordinate double precision, srid integer | geometry + postgis | public | st_polyfromtext | text | geometry + postgis | public | st_polyfromtext | text, integer | geometry + postgis | public | st_polyfromwkb | bytea, integer | geometry + postgis | public | st_polyfromwkb | bytea | geometry + postgis | public | st_polygon | geometry, integer | geometry + postgis | public | st_polygonfromtext | text | geometry + postgis | public | st_polygonfromtext | text, integer | geometry + postgis | public | st_polygonfromwkb | bytea, integer | geometry + postgis | public | st_polygonfromwkb | bytea | geometry + postgis | public | st_polygonize | geometry[] | geometry + postgis | public | st_polygonize | geometry | geometry + postgis | public | st_project | geog geography, distance double precision, azimuth double precision | geography + postgis | public | st_quantizecoordinates | g geometry, prec_x integer, prec_y integer, prec_z integer, prec_m integer | geometry + postgis | public | st_reduceprecision | geom geometry, gridsize double precision | geometry + postgis | public | st_relate | geom1 geometry, geom2 geometry, integer | text + postgis | public | st_relate | geom1 geometry, geom2 geometry | text + postgis | public | st_relate | geom1 geometry, geom2 geometry, text | boolean + postgis | public | st_relatematch | text, text | boolean + postgis | public | st_removepoint | geometry, integer | geometry + postgis | public | st_removerepeatedpoints | geom geometry, tolerance double precision | geometry + postgis | public | st_reverse | geometry | geometry + postgis | public | st_rotate | geometry, double precision, geometry | geometry + postgis | public | st_rotate | geometry, double precision, double precision, double precision | geometry + postgis | public | st_rotate | geometry, double precision | geometry + postgis | public | st_rotatex | geometry, double precision | geometry + postgis | public | st_rotatey | geometry, double precision | geometry + postgis | public | st_rotatez | geometry, double precision | geometry + postgis | public | st_scale | geometry, double precision, double precision | geometry + postgis | public | st_scale | geometry, double precision, double precision, double precision | geometry + postgis | public | st_scale | geometry, geometry, origin geometry | geometry + postgis | public | st_scale | geometry, geometry | geometry + postgis | public | st_scroll | geometry, geometry | geometry + postgis | public | st_segmentize | geog geography, max_segment_length double precision | geography + postgis | public | st_segmentize | geometry, double precision | geometry + postgis | public | st_seteffectivearea | geometry, double precision, integer | geometry + postgis | public | st_setpoint | geometry, integer, geometry | geometry + postgis | public | st_setsrid | geog geography, srid integer | geography + postgis | public | st_setsrid | geom geometry, srid integer | geometry + postgis | public | st_sharedpaths | geom1 geometry, geom2 geometry | geometry + postgis | public | st_shiftlongitude | geometry | geometry + postgis | public | st_shortestline | geom1 geometry, geom2 geometry | geometry + postgis | public | st_simplify | geometry, double precision, boolean | geometry + postgis | public | st_simplify | geometry, double precision | geometry + postgis | public | st_simplifypolygonhull | geom geometry, vertex_fraction double precision, is_outer boolean | geometry + postgis | public | st_simplifypreservetopology | geometry, double precision | geometry + postgis | public | st_simplifyvw | geometry, double precision | geometry + postgis | public | st_snap | geom1 geometry, geom2 geometry, double precision | geometry + postgis | public | st_snaptogrid | geometry, double precision, double precision | geometry + postgis | public | st_snaptogrid | geom1 geometry, geom2 geometry, double precision, double precision, double precision, double precision | geometry + postgis | public | st_snaptogrid | geometry, double precision, double precision, double precision, double precision | geometry + postgis | public | st_snaptogrid | geometry, double precision | geometry + postgis | public | st_split | geom1 geometry, geom2 geometry | geometry + postgis | public | st_square | size double precision, cell_i integer, cell_j integer, origin geometry | geometry + postgis | public | st_squaregrid | size double precision, bounds geometry, OUT geom geometry, OUT i integer, OUT j integer | SETOF record + postgis | public | st_srid | geog geography | integer + postgis | public | st_srid | geom geometry | integer + postgis | public | st_startpoint | geometry | geometry + postgis | public | st_subdivide | geom geometry, maxvertices integer, gridsize double precision | SETOF geometry + postgis | public | st_summary | geography | text + postgis | public | st_summary | geometry | text + postgis | public | st_swapordinates | geom geometry, ords cstring | geometry + postgis | public | st_symdifference | geom1 geometry, geom2 geometry, gridsize double precision | geometry + postgis | public | st_symmetricdifference | geom1 geometry, geom2 geometry | geometry + postgis | public | st_tileenvelope | zoom integer, x integer, y integer, bounds geometry, margin double precision | geometry + postgis | public | st_touches | geom1 geometry, geom2 geometry | boolean + postgis | public | st_transform | geom geometry, to_proj text | geometry + postgis | public | st_transform | geom geometry, from_proj text, to_srid integer | geometry + postgis | public | st_transform | geometry, integer | geometry + postgis | public | st_transform | geom geometry, from_proj text, to_proj text | geometry + postgis | public | st_translate | geometry, double precision, double precision | geometry + postgis | public | st_translate | geometry, double precision, double precision, double precision | geometry + postgis | public | st_transscale | geometry, double precision, double precision, double precision, double precision | geometry + postgis | public | st_triangulatepolygon | g1 geometry | geometry + postgis | public | st_unaryunion | geometry, gridsize double precision | geometry + postgis | public | st_union | geom1 geometry, geom2 geometry, gridsize double precision | geometry + postgis | public | st_union | geom1 geometry, geom2 geometry | geometry + postgis | public | st_union | geometry[] | geometry + postgis | public | st_union | geometry, gridsize double precision | geometry + postgis | public | st_union | geometry | geometry + postgis | public | st_voronoilines | g1 geometry, tolerance double precision, extend_to geometry | geometry + postgis | public | st_voronoipolygons | g1 geometry, tolerance double precision, extend_to geometry | geometry + postgis | public | st_within | geom1 geometry, geom2 geometry | boolean + postgis | public | st_wkbtosql | wkb bytea | geometry + postgis | public | st_wkttosql | text | geometry + postgis | public | st_wrapx | geom geometry, wrap double precision, move double precision | geometry + postgis | public | st_x | geometry | double precision + postgis | public | st_xmax | box3d | double precision + postgis | public | st_xmin | box3d | double precision + postgis | public | st_y | geometry | double precision + postgis | public | st_ymax | box3d | double precision + postgis | public | st_ymin | box3d | double precision + postgis | public | st_z | geometry | double precision + postgis | public | st_zmax | box3d | double precision + postgis | public | st_zmflag | geometry | smallint + postgis | public | st_zmin | box3d | double precision + postgis | public | text | geometry | text + postgis | public | unlockrows | text | integer + postgis | public | updategeometrysrid | catalogn_name character varying, schema_name character varying, table_name character varying, column_name character varying, new_srid_in integer | text + postgis | public | updategeometrysrid | character varying, character varying, character varying, integer | text + postgis | public | updategeometrysrid | character varying, character varying, integer | text + postgis_raster | public | __st_countagg_transfn | agg agg_count, rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | agg_count + postgis_raster | public | _add_overview_constraint | ovschema name, ovtable name, ovcolumn name, refschema name, reftable name, refcolumn name, factor integer | boolean + postgis_raster | public | _add_raster_constraint | cn name, sql text | boolean + postgis_raster | public | _add_raster_constraint_alignment | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_blocksize | rastschema name, rasttable name, rastcolumn name, axis text | boolean + postgis_raster | public | _add_raster_constraint_coverage_tile | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_extent | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_nodata_values | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_num_bands | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_out_db | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_pixel_types | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_scale | rastschema name, rasttable name, rastcolumn name, axis character | boolean + postgis_raster | public | _add_raster_constraint_spatially_unique | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_srid | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_overview_constraint | ovschema name, ovtable name, ovcolumn name | boolean + postgis_raster | public | _drop_raster_constraint | rastschema name, rasttable name, cn name | boolean + postgis_raster | public | _drop_raster_constraint_alignment | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_blocksize | rastschema name, rasttable name, rastcolumn name, axis text | boolean + postgis_raster | public | _drop_raster_constraint_coverage_tile | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_extent | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_nodata_values | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_num_bands | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_out_db | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_pixel_types | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_regular_blocking | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_scale | rastschema name, rasttable name, rastcolumn name, axis character | boolean + postgis_raster | public | _drop_raster_constraint_spatially_unique | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_srid | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _overview_constraint | ov raster, factor integer, refschema name, reftable name, refcolumn name | boolean + postgis_raster | public | _overview_constraint_info | ovschema name, ovtable name, ovcolumn name, OUT refschema name, OUT reftable name, OUT refcolumn name, OUT factor integer | record + postgis_raster | public | _raster_constraint_info_alignment | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _raster_constraint_info_blocksize | rastschema name, rasttable name, rastcolumn name, axis text | integer + postgis_raster | public | _raster_constraint_info_coverage_tile | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _raster_constraint_info_extent | rastschema name, rasttable name, rastcolumn name | geometry + postgis_raster | public | _raster_constraint_info_index | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _raster_constraint_info_nodata_values | rastschema name, rasttable name, rastcolumn name | double precision[] + postgis_raster | public | _raster_constraint_info_num_bands | rastschema name, rasttable name, rastcolumn name | integer + postgis_raster | public | _raster_constraint_info_out_db | rastschema name, rasttable name, rastcolumn name | boolean[] + postgis_raster | public | _raster_constraint_info_pixel_types | rastschema name, rasttable name, rastcolumn name | text[] + postgis_raster | public | _raster_constraint_info_regular_blocking | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _raster_constraint_info_scale | rastschema name, rasttable name, rastcolumn name, axis character | double precision + postgis_raster | public | _raster_constraint_info_spatially_unique | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _raster_constraint_info_srid | rastschema name, rasttable name, rastcolumn name | integer + postgis_raster | public | _raster_constraint_nodata_values | rast raster | numeric[] + postgis_raster | public | _raster_constraint_out_db | rast raster | boolean[] + postgis_raster | public | _raster_constraint_pixel_types | rast raster | text[] + postgis_raster | public | _st_aspect4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_asraster | geom geometry, scalex double precision, scaley double precision, width integer, height integer, pixeltype text[], value double precision[], nodataval double precision[], upperleftx double precision, upperlefty double precision, gridx double precision, gridy double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | _st_clip | rast raster, nband integer[], geom geometry, nodataval double precision[], crop boolean | raster + postgis_raster | public | _st_colormap | rast raster, nband integer, colormap text, method text | raster + postgis_raster | public | _st_contains | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_containsproperly | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_convertarray4ma | value double precision[] | double precision[] + postgis_raster | public | _st_count | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | bigint + postgis_raster | public | _st_countagg_finalfn | agg agg_count | bigint + postgis_raster | public | _st_countagg_transfn | agg agg_count, rast raster, nband integer, exclude_nodata_value boolean | agg_count + postgis_raster | public | _st_countagg_transfn | agg agg_count, rast raster, exclude_nodata_value boolean | agg_count + postgis_raster | public | _st_countagg_transfn | agg agg_count, rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | agg_count + postgis_raster | public | _st_coveredby | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_covers | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_dfullywithin | rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision | boolean + postgis_raster | public | _st_dwithin | rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision | boolean + postgis_raster | public | _st_gdalwarp | rast raster, algorithm text, maxerr double precision, srid integer, scalex double precision, scaley double precision, gridx double precision, gridy double precision, skewx double precision, skewy double precision, width integer, height integer | raster + postgis_raster | public | _st_grayscale4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_hillshade4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_histogram | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, bins integer, width double precision[], "right" boolean, min double precision, max double precision, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | _st_intersects | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_intersects | geom geometry, rast raster, nband integer | boolean + postgis_raster | public | _st_mapalgebra | rastbandargset rastbandarg[], expression text, pixeltype text, extenttype text, nodata1expr text, nodata2expr text, nodatanodataval double precision | raster + postgis_raster | public | _st_mapalgebra | rastbandargset rastbandarg[], callbackfunc regprocedure, pixeltype text, distancex integer, distancey integer, extenttype text, customextent raster, mask double precision[], weighted boolean, VARIADIC userargs text[] | raster + postgis_raster | public | _st_neighborhood | rast raster, band integer, columnx integer, rowy integer, distancex integer, distancey integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | _st_overlaps | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_pixelascentroids | rast raster, band integer, columnx integer, rowy integer, exclude_nodata_value boolean | TABLE(geom geometry, val double precision, x integer, y integer) + postgis_raster | public | _st_pixelaspolygons | rast raster, band integer, columnx integer, rowy integer, exclude_nodata_value boolean | TABLE(geom geometry, val double precision, x integer, y integer) + postgis_raster | public | _st_quantile | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | _st_rastertoworldcoord | rast raster, columnx integer, rowy integer, OUT longitude double precision, OUT latitude double precision | record + postgis_raster | public | _st_reclass | rast raster, VARIADIC reclassargset reclassarg[] | raster + postgis_raster | public | _st_roughness4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_samealignment_finalfn | agg agg_samealignment | boolean + postgis_raster | public | _st_samealignment_transfn | agg agg_samealignment, rast raster | agg_samealignment + postgis_raster | public | _st_setvalues | rast raster, nband integer, x integer, y integer, newvalueset double precision[], noset boolean[], hasnosetvalue boolean, nosetvalue double precision, keepnodata boolean | raster + postgis_raster | public | _st_slope4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_summarystats | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | summarystats + postgis_raster | public | _st_summarystats_finalfn | internal | summarystats + postgis_raster | public | _st_summarystats_transfn | internal, raster, integer, boolean, double precision | internal + postgis_raster | public | _st_summarystats_transfn | internal, raster, boolean, double precision | internal + postgis_raster | public | _st_summarystats_transfn | internal, raster, integer, boolean | internal + postgis_raster | public | _st_tile | rast raster, width integer, height integer, nband integer[], padwithnodata boolean, nodataval double precision | SETOF raster + postgis_raster | public | _st_touches | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_tpi4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_tri4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_union_finalfn | internal | raster + postgis_raster | public | _st_union_transfn | internal, raster, integer, text | internal + postgis_raster | public | _st_union_transfn | internal, raster | internal + postgis_raster | public | _st_union_transfn | internal, raster, text | internal + postgis_raster | public | _st_union_transfn | internal, raster, integer | internal + postgis_raster | public | _st_union_transfn | internal, raster, unionarg[] | internal + postgis_raster | public | _st_valuecount | rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer, OUT percent double precision | SETOF record + postgis_raster | public | _st_valuecount | rast raster, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer, OUT percent double precision | SETOF record + postgis_raster | public | _st_within | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_worldtorastercoord | rast raster, longitude double precision, latitude double precision, OUT columnx integer, OUT rowy integer | record + postgis_raster | public | _updaterastersrid | schema_name name, table_name name, column_name name, new_srid integer | boolean + postgis_raster | public | addoverviewconstraints | ovschema name, ovtable name, ovcolumn name, refschema name, reftable name, refcolumn name, ovfactor integer | boolean + postgis_raster | public | addoverviewconstraints | ovtable name, ovcolumn name, reftable name, refcolumn name, ovfactor integer | boolean + postgis_raster | public | addrasterconstraints | rastschema name, rasttable name, rastcolumn name, srid boolean, scale_x boolean, scale_y boolean, blocksize_x boolean, blocksize_y boolean, same_alignment boolean, regular_blocking boolean, num_bands boolean, pixel_types boolean, nodata_values boolean, out_db boolean, extent boolean | boolean + postgis_raster | public | addrasterconstraints | rasttable name, rastcolumn name, VARIADIC constraints text[] | boolean + postgis_raster | public | addrasterconstraints | rastschema name, rasttable name, rastcolumn name, VARIADIC constraints text[] | boolean + postgis_raster | public | addrasterconstraints | rasttable name, rastcolumn name, srid boolean, scale_x boolean, scale_y boolean, blocksize_x boolean, blocksize_y boolean, same_alignment boolean, regular_blocking boolean, num_bands boolean, pixel_types boolean, nodata_values boolean, out_db boolean, extent boolean | boolean + postgis_raster | public | box3d | raster | box3d + postgis_raster | public | bytea | raster | bytea + postgis_raster | public | dropoverviewconstraints | ovtable name, ovcolumn name | boolean + postgis_raster | public | dropoverviewconstraints | ovschema name, ovtable name, ovcolumn name | boolean + postgis_raster | public | droprasterconstraints | rastschema name, rasttable name, rastcolumn name, srid boolean, scale_x boolean, scale_y boolean, blocksize_x boolean, blocksize_y boolean, same_alignment boolean, regular_blocking boolean, num_bands boolean, pixel_types boolean, nodata_values boolean, out_db boolean, extent boolean | boolean + postgis_raster | public | droprasterconstraints | rasttable name, rastcolumn name, VARIADIC constraints text[] | boolean + postgis_raster | public | droprasterconstraints | rastschema name, rasttable name, rastcolumn name, VARIADIC constraints text[] | boolean + postgis_raster | public | droprasterconstraints | rasttable name, rastcolumn name, srid boolean, scale_x boolean, scale_y boolean, blocksize_x boolean, blocksize_y boolean, same_alignment boolean, regular_blocking boolean, num_bands boolean, pixel_types boolean, nodata_values boolean, out_db boolean, extent boolean | boolean + postgis_raster | public | geometry_contained_by_raster | geometry, raster | boolean + postgis_raster | public | geometry_raster_contain | geometry, raster | boolean + postgis_raster | public | geometry_raster_overlap | geometry, raster | boolean + postgis_raster | public | postgis_gdal_version | | text + postgis_raster | public | postgis_noop | raster | geometry + postgis_raster | public | postgis_raster_lib_build_date | | text + postgis_raster | public | postgis_raster_lib_version | | text + postgis_raster | public | postgis_raster_scripts_installed | | text + postgis_raster | public | raster_above | raster, raster | boolean + postgis_raster | public | raster_below | raster, raster | boolean + postgis_raster | public | raster_contain | raster, raster | boolean + postgis_raster | public | raster_contained | raster, raster | boolean + postgis_raster | public | raster_contained_by_geometry | raster, geometry | boolean + postgis_raster | public | raster_eq | raster, raster | boolean + postgis_raster | public | raster_geometry_contain | raster, geometry | boolean + postgis_raster | public | raster_geometry_overlap | raster, geometry | boolean + postgis_raster | public | raster_hash | raster | integer + postgis_raster | public | raster_in | cstring | raster + postgis_raster | public | raster_left | raster, raster | boolean + postgis_raster | public | raster_out | raster | cstring + postgis_raster | public | raster_overabove | raster, raster | boolean + postgis_raster | public | raster_overbelow | raster, raster | boolean + postgis_raster | public | raster_overlap | raster, raster | boolean + postgis_raster | public | raster_overleft | raster, raster | boolean + postgis_raster | public | raster_overright | raster, raster | boolean + postgis_raster | public | raster_right | raster, raster | boolean + postgis_raster | public | raster_same | raster, raster | boolean + postgis_raster | public | st_addband | rast raster, index integer, outdbfile text, outdbindex integer[], nodataval double precision | raster + postgis_raster | public | st_addband | rast raster, outdbfile text, outdbindex integer[], index integer, nodataval double precision | raster + postgis_raster | public | st_addband | rast raster, addbandargset addbandarg[] | raster + postgis_raster | public | st_addband | rast raster, pixeltype text, initialvalue double precision, nodataval double precision | raster + postgis_raster | public | st_addband | rast raster, index integer, pixeltype text, initialvalue double precision, nodataval double precision | raster + postgis_raster | public | st_addband | torast raster, fromrast raster, fromband integer, torastindex integer | raster + postgis_raster | public | st_addband | torast raster, fromrasts raster[], fromband integer, torastindex integer | raster + postgis_raster | public | st_approxcount | rast raster, exclude_nodata_value boolean, sample_percent double precision | bigint + postgis_raster | public | st_approxcount | rast raster, sample_percent double precision | bigint + postgis_raster | public | st_approxcount | rast raster, nband integer, sample_percent double precision | bigint + postgis_raster | public | st_approxcount | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | bigint + postgis_raster | public | st_approxhistogram | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, bins integer, "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxhistogram | rast raster, sample_percent double precision, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxhistogram | rast raster, nband integer, sample_percent double precision, bins integer, width double precision[], "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxhistogram | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, bins integer, width double precision[], "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxhistogram | rast raster, nband integer, sample_percent double precision, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxhistogram | rast raster, nband integer, sample_percent double precision, bins integer, "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxquantile | rast raster, exclude_nodata_value boolean, quantile double precision | double precision + postgis_raster | public | st_approxquantile | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, quantile double precision | double precision + postgis_raster | public | st_approxquantile | rast raster, nband integer, sample_percent double precision, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_approxquantile | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_approxquantile | rast raster, quantile double precision | double precision + postgis_raster | public | st_approxquantile | rast raster, sample_percent double precision, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_approxquantile | rast raster, nband integer, sample_percent double precision, quantile double precision | double precision + postgis_raster | public | st_approxquantile | rast raster, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_approxquantile | rast raster, sample_percent double precision, quantile double precision | double precision + postgis_raster | public | st_approxsummarystats | rast raster, exclude_nodata_value boolean, sample_percent double precision | summarystats + postgis_raster | public | st_approxsummarystats | rast raster, sample_percent double precision | summarystats + postgis_raster | public | st_approxsummarystats | rast raster, nband integer, sample_percent double precision | summarystats + postgis_raster | public | st_approxsummarystats | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | summarystats + postgis_raster | public | st_asbinary | raster, outasin boolean | bytea + postgis_raster | public | st_asgdalraster | rast raster, format text, options text[], srid integer | bytea + postgis_raster | public | st_ashexwkb | raster, outasin boolean | text + postgis_raster | public | st_asjpeg | rast raster, options text[] | bytea + postgis_raster | public | st_asjpeg | rast raster, nbands integer[], options text[] | bytea + postgis_raster | public | st_asjpeg | rast raster, nband integer, options text[] | bytea + postgis_raster | public | st_asjpeg | rast raster, nbands integer[], quality integer | bytea + postgis_raster | public | st_asjpeg | rast raster, nband integer, quality integer | bytea + postgis_raster | public | st_aspect | rast raster, nband integer, customextent raster, pixeltype text, units text, interpolate_nodata boolean | raster + postgis_raster | public | st_aspect | rast raster, nband integer, pixeltype text, units text, interpolate_nodata boolean | raster + postgis_raster | public | st_aspng | rast raster, options text[] | bytea + postgis_raster | public | st_aspng | rast raster, nbands integer[], options text[] | bytea + postgis_raster | public | st_aspng | rast raster, nband integer, compression integer | bytea + postgis_raster | public | st_aspng | rast raster, nband integer, options text[] | bytea + postgis_raster | public | st_aspng | rast raster, nbands integer[], compression integer | bytea + postgis_raster | public | st_asraster | geom geometry, ref raster, pixeltype text[], value double precision[], nodataval double precision[], touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, scalex double precision, scaley double precision, pixeltype text, value double precision, nodataval double precision, upperleftx double precision, upperlefty double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, width integer, height integer, pixeltype text[], value double precision[], nodataval double precision[], upperleftx double precision, upperlefty double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, scalex double precision, scaley double precision, gridx double precision, gridy double precision, pixeltype text[], value double precision[], nodataval double precision[], skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, width integer, height integer, gridx double precision, gridy double precision, pixeltype text, value double precision, nodataval double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, ref raster, pixeltype text, value double precision, nodataval double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, scalex double precision, scaley double precision, gridx double precision, gridy double precision, pixeltype text, value double precision, nodataval double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, width integer, height integer, gridx double precision, gridy double precision, pixeltype text[], value double precision[], nodataval double precision[], skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, width integer, height integer, pixeltype text, value double precision, nodataval double precision, upperleftx double precision, upperlefty double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, scalex double precision, scaley double precision, pixeltype text[], value double precision[], nodataval double precision[], upperleftx double precision, upperlefty double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_astiff | rast raster, options text[], srid integer | bytea + postgis_raster | public | st_astiff | rast raster, compression text, srid integer | bytea + postgis_raster | public | st_astiff | rast raster, nbands integer[], compression text, srid integer | bytea + postgis_raster | public | st_astiff | rast raster, nbands integer[], options text[], srid integer | bytea + postgis_raster | public | st_aswkb | raster, outasin boolean | bytea + postgis_raster | public | st_band | rast raster, nbands text, delimiter character | raster + postgis_raster | public | st_band | rast raster, nbands integer[] | raster + postgis_raster | public | st_band | rast raster, nband integer | raster + postgis_raster | public | st_bandfilesize | rast raster, band integer | bigint + postgis_raster | public | st_bandfiletimestamp | rast raster, band integer | bigint + postgis_raster | public | st_bandisnodata | rast raster, forcechecking boolean | boolean + postgis_raster | public | st_bandisnodata | rast raster, band integer, forcechecking boolean | boolean + postgis_raster | public | st_bandmetadata | rast raster, band integer | TABLE(pixeltype text, nodatavalue double precision, isoutdb boolean, path text, outdbbandnum integer, filesize bigint, filetimestamp bigint) + postgis_raster | public | st_bandmetadata | rast raster, band integer[] | TABLE(bandnum integer, pixeltype text, nodatavalue double precision, isoutdb boolean, path text, outdbbandnum integer, filesize bigint, filetimestamp bigint) + postgis_raster | public | st_bandnodatavalue | rast raster, band integer | double precision + postgis_raster | public | st_bandpath | rast raster, band integer | text + postgis_raster | public | st_bandpixeltype | rast raster, band integer | text + postgis_raster | public | st_clip | rast raster, geom geometry, nodataval double precision[], crop boolean | raster + postgis_raster | public | st_clip | rast raster, geom geometry, nodataval double precision, crop boolean | raster + postgis_raster | public | st_clip | rast raster, nband integer, geom geometry, nodataval double precision, crop boolean | raster + postgis_raster | public | st_clip | rast raster, nband integer[], geom geometry, nodataval double precision[], crop boolean | raster + postgis_raster | public | st_clip | rast raster, geom geometry, crop boolean | raster + postgis_raster | public | st_clip | rast raster, nband integer, geom geometry, crop boolean | raster + postgis_raster | public | st_colormap | rast raster, colormap text, method text | raster + postgis_raster | public | st_colormap | rast raster, nband integer, colormap text, method text | raster + postgis_raster | public | st_contains | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_contains | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_containsproperly | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_containsproperly | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_contour | rast raster, bandnumber integer, level_interval double precision, level_base double precision, fixed_levels double precision[], polygonize boolean | TABLE(geom geometry, id integer, value double precision) + postgis_raster | public | st_convexhull | raster | geometry + postgis_raster | public | st_count | rast raster, nband integer, exclude_nodata_value boolean | bigint + postgis_raster | public | st_count | rast raster, exclude_nodata_value boolean | bigint + postgis_raster | public | st_countagg | raster, integer, boolean, double precision | bigint + postgis_raster | public | st_countagg | raster, integer, boolean | bigint + postgis_raster | public | st_countagg | raster, boolean | bigint + postgis_raster | public | st_coveredby | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_coveredby | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_covers | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_covers | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_createoverview | tab regclass, col name, factor integer, algo text | regclass + postgis_raster | public | st_dfullywithin | rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision | boolean + postgis_raster | public | st_dfullywithin | rast1 raster, rast2 raster, distance double precision | boolean + postgis_raster | public | st_disjoint | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_disjoint | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_distinct4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_distinct4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_dumpaspolygons | rast raster, band integer, exclude_nodata_value boolean | SETOF geomval + postgis_raster | public | st_dumpvalues | rast raster, nband integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | st_dumpvalues | rast raster, nband integer[], exclude_nodata_value boolean | TABLE(nband integer, valarray double precision[]) + postgis_raster | public | st_dwithin | rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision | boolean + postgis_raster | public | st_dwithin | rast1 raster, rast2 raster, distance double precision | boolean + postgis_raster | public | st_envelope | raster | geometry + postgis_raster | public | st_fromgdalraster | gdaldata bytea, srid integer | raster + postgis_raster | public | st_gdaldrivers | OUT idx integer, OUT short_name text, OUT long_name text, OUT can_read boolean, OUT can_write boolean, OUT create_options text | SETOF record + postgis_raster | public | st_georeference | rast raster, format text | text + postgis_raster | public | st_geotransform | raster, OUT imag double precision, OUT jmag double precision, OUT theta_i double precision, OUT theta_ij double precision, OUT xoffset double precision, OUT yoffset double precision | record + postgis_raster | public | st_grayscale | rastbandargset rastbandarg[], extenttype text | raster + postgis_raster | public | st_grayscale | rast raster, redband integer, greenband integer, blueband integer, extenttype text | raster + postgis_raster | public | st_hasnoband | rast raster, nband integer | boolean + postgis_raster | public | st_height | raster | integer + postgis_raster | public | st_hillshade | rast raster, nband integer, customextent raster, pixeltype text, azimuth double precision, altitude double precision, max_bright double precision, scale double precision, interpolate_nodata boolean | raster + postgis_raster | public | st_hillshade | rast raster, nband integer, pixeltype text, azimuth double precision, altitude double precision, max_bright double precision, scale double precision, interpolate_nodata boolean | raster + postgis_raster | public | st_histogram | rast raster, nband integer, bins integer, "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_histogram | rast raster, nband integer, bins integer, width double precision[], "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_histogram | rast raster, nband integer, exclude_nodata_value boolean, bins integer, "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_histogram | rast raster, nband integer, exclude_nodata_value boolean, bins integer, width double precision[], "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_interpolateraster | geom geometry, options text, rast raster, bandnumber integer | raster + postgis_raster | public | st_intersection | rast1 raster, rast2 raster, returnband text, nodataval double precision[] | raster + postgis_raster | public | st_intersection | rast1 raster, band1 integer, rast2 raster, band2 integer, returnband text, nodataval double precision | raster + postgis_raster | public | st_intersection | rast1 raster, band1 integer, rast2 raster, band2 integer, returnband text, nodataval double precision[] | raster + postgis_raster | public | st_intersection | geomin geometry, rast raster, band integer | SETOF geomval + postgis_raster | public | st_intersection | rast1 raster, rast2 raster, nodataval double precision | raster + postgis_raster | public | st_intersection | rast1 raster, band1 integer, rast2 raster, band2 integer, nodataval double precision | raster + postgis_raster | public | st_intersection | rast1 raster, rast2 raster, returnband text, nodataval double precision | raster + postgis_raster | public | st_intersection | rast raster, band integer, geomin geometry | SETOF geomval + postgis_raster | public | st_intersection | rast1 raster, band1 integer, rast2 raster, band2 integer, nodataval double precision[] | raster + postgis_raster | public | st_intersection | rast raster, geomin geometry | SETOF geomval + postgis_raster | public | st_intersection | rast1 raster, rast2 raster, nodataval double precision[] | raster + postgis_raster | public | st_intersects | rast raster, geom geometry, nband integer | boolean + postgis_raster | public | st_intersects | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_intersects | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_intersects | rast raster, nband integer, geom geometry | boolean + postgis_raster | public | st_intersects | geom geometry, rast raster, nband integer | boolean + postgis_raster | public | st_invdistweight4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_iscoveragetile | rast raster, coverage raster, tilewidth integer, tileheight integer | boolean + postgis_raster | public | st_isempty | rast raster | boolean + postgis_raster | public | st_makeemptycoverage | tilewidth integer, tileheight integer, width integer, height integer, upperleftx double precision, upperlefty double precision, scalex double precision, scaley double precision, skewx double precision, skewy double precision, srid integer | SETOF raster + postgis_raster | public | st_makeemptyraster | width integer, height integer, upperleftx double precision, upperlefty double precision, scalex double precision, scaley double precision, skewx double precision, skewy double precision, srid integer | raster + postgis_raster | public | st_makeemptyraster | width integer, height integer, upperleftx double precision, upperlefty double precision, pixelsize double precision | raster + postgis_raster | public | st_makeemptyraster | rast raster | raster + postgis_raster | public | st_mapalgebra | rast1 raster, rast2 raster, expression text, pixeltype text, extenttype text, nodata1expr text, nodata2expr text, nodatanodataval double precision | raster + postgis_raster | public | st_mapalgebra | rast raster, pixeltype text, expression text, nodataval double precision | raster + postgis_raster | public | st_mapalgebra | rast1 raster, band1 integer, rast2 raster, band2 integer, expression text, pixeltype text, extenttype text, nodata1expr text, nodata2expr text, nodatanodataval double precision | raster + postgis_raster | public | st_mapalgebra | rast raster, nband integer[], callbackfunc regprocedure, pixeltype text, extenttype text, customextent raster, distancex integer, distancey integer, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebra | rast raster, nband integer, callbackfunc regprocedure, mask double precision[], weighted boolean, pixeltype text, extenttype text, customextent raster, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebra | rastbandargset rastbandarg[], callbackfunc regprocedure, pixeltype text, extenttype text, customextent raster, distancex integer, distancey integer, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebra | rast1 raster, nband1 integer, rast2 raster, nband2 integer, callbackfunc regprocedure, pixeltype text, extenttype text, customextent raster, distancex integer, distancey integer, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebra | rast raster, nband integer, callbackfunc regprocedure, pixeltype text, extenttype text, customextent raster, distancex integer, distancey integer, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebra | rast raster, nband integer, pixeltype text, expression text, nodataval double precision | raster + postgis_raster | public | st_mapalgebraexpr | rast1 raster, rast2 raster, expression text, pixeltype text, extenttype text, nodata1expr text, nodata2expr text, nodatanodataval double precision | raster + postgis_raster | public | st_mapalgebraexpr | rast raster, pixeltype text, expression text, nodataval double precision | raster + postgis_raster | public | st_mapalgebraexpr | rast1 raster, band1 integer, rast2 raster, band2 integer, expression text, pixeltype text, extenttype text, nodata1expr text, nodata2expr text, nodatanodataval double precision | raster + postgis_raster | public | st_mapalgebraexpr | rast raster, band integer, pixeltype text, expression text, nodataval double precision | raster + postgis_raster | public | st_mapalgebrafct | rast raster, onerastuserfunc regprocedure | raster + postgis_raster | public | st_mapalgebrafct | rast1 raster, band1 integer, rast2 raster, band2 integer, tworastuserfunc regprocedure, pixeltype text, extenttype text, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, pixeltype text, onerastuserfunc regprocedure | raster + postgis_raster | public | st_mapalgebrafct | rast raster, onerastuserfunc regprocedure, VARIADIC args text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, pixeltype text, onerastuserfunc regprocedure, VARIADIC args text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, band integer, onerastuserfunc regprocedure, VARIADIC args text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, band integer, pixeltype text, onerastuserfunc regprocedure | raster + postgis_raster | public | st_mapalgebrafct | rast1 raster, rast2 raster, tworastuserfunc regprocedure, pixeltype text, extenttype text, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, band integer, pixeltype text, onerastuserfunc regprocedure, VARIADIC args text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, band integer, onerastuserfunc regprocedure | raster + postgis_raster | public | st_mapalgebrafctngb | rast raster, band integer, pixeltype text, ngbwidth integer, ngbheight integer, onerastngbuserfunc regprocedure, nodatamode text, VARIADIC args text[] | raster + postgis_raster | public | st_max4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_max4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_mean4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_mean4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_memsize | raster | integer + postgis_raster | public | st_metadata | rast raster, OUT upperleftx double precision, OUT upperlefty double precision, OUT width integer, OUT height integer, OUT scalex double precision, OUT scaley double precision, OUT skewx double precision, OUT skewy double precision, OUT srid integer, OUT numbands integer | record + postgis_raster | public | st_min4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_min4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_minconvexhull | rast raster, nband integer | geometry + postgis_raster | public | st_mindist4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_minpossiblevalue | pixeltype text | double precision + postgis_raster | public | st_nearestvalue | rast raster, columnx integer, rowy integer, exclude_nodata_value boolean | double precision + postgis_raster | public | st_nearestvalue | rast raster, band integer, columnx integer, rowy integer, exclude_nodata_value boolean | double precision + postgis_raster | public | st_nearestvalue | rast raster, band integer, pt geometry, exclude_nodata_value boolean | double precision + postgis_raster | public | st_nearestvalue | rast raster, pt geometry, exclude_nodata_value boolean | double precision + postgis_raster | public | st_neighborhood | rast raster, columnx integer, rowy integer, distancex integer, distancey integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | st_neighborhood | rast raster, band integer, pt geometry, distancex integer, distancey integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | st_neighborhood | rast raster, band integer, columnx integer, rowy integer, distancex integer, distancey integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | st_neighborhood | rast raster, pt geometry, distancex integer, distancey integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | st_notsamealignmentreason | rast1 raster, rast2 raster | text + postgis_raster | public | st_numbands | raster | integer + postgis_raster | public | st_overlaps | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_overlaps | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_pixelascentroid | rast raster, x integer, y integer | geometry + postgis_raster | public | st_pixelascentroids | rast raster, band integer, exclude_nodata_value boolean | TABLE(geom geometry, val double precision, x integer, y integer) + postgis_raster | public | st_pixelaspoint | rast raster, x integer, y integer | geometry + postgis_raster | public | st_pixelaspoints | rast raster, band integer, exclude_nodata_value boolean | TABLE(geom geometry, val double precision, x integer, y integer) + postgis_raster | public | st_pixelaspolygon | rast raster, x integer, y integer | geometry + postgis_raster | public | st_pixelaspolygons | rast raster, band integer, exclude_nodata_value boolean | TABLE(geom geometry, val double precision, x integer, y integer) + postgis_raster | public | st_pixelheight | raster | double precision + postgis_raster | public | st_pixelofvalue | rast raster, nband integer, search double precision, exclude_nodata_value boolean | TABLE(x integer, y integer) + postgis_raster | public | st_pixelofvalue | rast raster, search double precision, exclude_nodata_value boolean | TABLE(x integer, y integer) + postgis_raster | public | st_pixelofvalue | rast raster, nband integer, search double precision[], exclude_nodata_value boolean | TABLE(val double precision, x integer, y integer) + postgis_raster | public | st_pixelofvalue | rast raster, search double precision[], exclude_nodata_value boolean | TABLE(val double precision, x integer, y integer) + postgis_raster | public | st_pixelwidth | raster | double precision + postgis_raster | public | st_polygon | rast raster, band integer | geometry + postgis_raster | public | st_quantile | rast raster, exclude_nodata_value boolean, quantile double precision | double precision + postgis_raster | public | st_quantile | rast raster, nband integer, quantile double precision | double precision + postgis_raster | public | st_quantile | rast raster, nband integer, exclude_nodata_value boolean, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_quantile | rast raster, quantile double precision | double precision + postgis_raster | public | st_quantile | rast raster, nband integer, exclude_nodata_value boolean, quantile double precision | double precision + postgis_raster | public | st_quantile | rast raster, nband integer, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_quantile | rast raster, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_range4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_range4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_rastertoworldcoord | rast raster, columnx integer, rowy integer, OUT longitude double precision, OUT latitude double precision | record + postgis_raster | public | st_rastertoworldcoordx | rast raster, xr integer | double precision + postgis_raster | public | st_rastertoworldcoordx | rast raster, xr integer, yr integer | double precision + postgis_raster | public | st_rastertoworldcoordy | rast raster, xr integer, yr integer | double precision + postgis_raster | public | st_rastertoworldcoordy | rast raster, yr integer | double precision + postgis_raster | public | st_rastfromhexwkb | text | raster + postgis_raster | public | st_rastfromwkb | bytea | raster + postgis_raster | public | st_reclass | rast raster, nband integer, reclassexpr text, pixeltype text, nodataval double precision | raster + postgis_raster | public | st_reclass | rast raster, VARIADIC reclassargset reclassarg[] | raster + postgis_raster | public | st_reclass | rast raster, reclassexpr text, pixeltype text | raster + postgis_raster | public | st_resample | rast raster, ref raster, usescale boolean, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resample | rast raster, width integer, height integer, gridx double precision, gridy double precision, skewx double precision, skewy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resample | rast raster, scalex double precision, scaley double precision, gridx double precision, gridy double precision, skewx double precision, skewy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resample | rast raster, ref raster, algorithm text, maxerr double precision, usescale boolean | raster + postgis_raster | public | st_rescale | rast raster, scalexy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_rescale | rast raster, scalex double precision, scaley double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resize | rast raster, width integer, height integer, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resize | rast raster, width text, height text, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resize | rast raster, percentwidth double precision, percentheight double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_reskew | rast raster, skewx double precision, skewy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_reskew | rast raster, skewxy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_retile | tab regclass, col name, ext geometry, sfx double precision, sfy double precision, tw integer, th integer, algo text | SETOF raster + postgis_raster | public | st_rotation | raster | double precision + postgis_raster | public | st_roughness | rast raster, nband integer, customextent raster, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_roughness | rast raster, nband integer, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_samealignment | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_samealignment | raster | boolean + postgis_raster | public | st_samealignment | ulx1 double precision, uly1 double precision, scalex1 double precision, scaley1 double precision, skewx1 double precision, skewy1 double precision, ulx2 double precision, uly2 double precision, scalex2 double precision, scaley2 double precision, skewx2 double precision, skewy2 double precision | boolean + postgis_raster | public | st_scalex | raster | double precision + postgis_raster | public | st_scaley | raster | double precision + postgis_raster | public | st_setbandindex | rast raster, band integer, outdbindex integer, force boolean | raster + postgis_raster | public | st_setbandisnodata | rast raster, band integer | raster + postgis_raster | public | st_setbandnodatavalue | rast raster, band integer, nodatavalue double precision, forcechecking boolean | raster + postgis_raster | public | st_setbandnodatavalue | rast raster, nodatavalue double precision | raster + postgis_raster | public | st_setbandpath | rast raster, band integer, outdbpath text, outdbindex integer, force boolean | raster + postgis_raster | public | st_setgeoreference | rast raster, upperleftx double precision, upperlefty double precision, scalex double precision, scaley double precision, skewx double precision, skewy double precision | raster + postgis_raster | public | st_setgeoreference | rast raster, georef text, format text | raster + postgis_raster | public | st_setgeotransform | rast raster, imag double precision, jmag double precision, theta_i double precision, theta_ij double precision, xoffset double precision, yoffset double precision | raster + postgis_raster | public | st_setm | rast raster, geom geometry, resample text, band integer | geometry + postgis_raster | public | st_setrotation | rast raster, rotation double precision | raster + postgis_raster | public | st_setscale | rast raster, scalex double precision, scaley double precision | raster + postgis_raster | public | st_setscale | rast raster, scale double precision | raster + postgis_raster | public | st_setskew | rast raster, skewx double precision, skewy double precision | raster + postgis_raster | public | st_setskew | rast raster, skew double precision | raster + postgis_raster | public | st_setsrid | rast raster, srid integer | raster + postgis_raster | public | st_setupperleft | rast raster, upperleftx double precision, upperlefty double precision | raster + postgis_raster | public | st_setvalue | rast raster, nband integer, geom geometry, newvalue double precision | raster + postgis_raster | public | st_setvalue | rast raster, geom geometry, newvalue double precision | raster + postgis_raster | public | st_setvalue | rast raster, x integer, y integer, newvalue double precision | raster + postgis_raster | public | st_setvalue | rast raster, band integer, x integer, y integer, newvalue double precision | raster + postgis_raster | public | st_setvalues | rast raster, nband integer, x integer, y integer, newvalueset double precision[], nosetvalue double precision, keepnodata boolean | raster + postgis_raster | public | st_setvalues | rast raster, nband integer, x integer, y integer, newvalueset double precision[], noset boolean[], keepnodata boolean | raster + postgis_raster | public | st_setvalues | rast raster, nband integer, x integer, y integer, width integer, height integer, newvalue double precision, keepnodata boolean | raster + postgis_raster | public | st_setvalues | rast raster, x integer, y integer, width integer, height integer, newvalue double precision, keepnodata boolean | raster + postgis_raster | public | st_setvalues | rast raster, nband integer, geomvalset geomval[], keepnodata boolean | raster + postgis_raster | public | st_setz | rast raster, geom geometry, resample text, band integer | geometry + postgis_raster | public | st_skewx | raster | double precision + postgis_raster | public | st_skewy | raster | double precision + postgis_raster | public | st_slope | rast raster, nband integer, customextent raster, pixeltype text, units text, scale double precision, interpolate_nodata boolean | raster + postgis_raster | public | st_slope | rast raster, nband integer, pixeltype text, units text, scale double precision, interpolate_nodata boolean | raster + postgis_raster | public | st_snaptogrid | rast raster, gridx double precision, gridy double precision, scalex double precision, scaley double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_snaptogrid | rast raster, gridx double precision, gridy double precision, algorithm text, maxerr double precision, scalex double precision, scaley double precision | raster + postgis_raster | public | st_snaptogrid | rast raster, gridx double precision, gridy double precision, scalexy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_srid | raster | integer + postgis_raster | public | st_stddev4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_stddev4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_sum4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_sum4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_summary | rast raster | text + postgis_raster | public | st_summarystats | rast raster, nband integer, exclude_nodata_value boolean | summarystats + postgis_raster | public | st_summarystats | rast raster, exclude_nodata_value boolean | summarystats + postgis_raster | public | st_summarystatsagg | raster, integer, boolean, double precision | summarystats + postgis_raster | public | st_summarystatsagg | raster, integer, boolean | summarystats + postgis_raster | public | st_summarystatsagg | raster, boolean, double precision | summarystats + postgis_raster | public | st_tile | rast raster, nband integer, width integer, height integer, padwithnodata boolean, nodataval double precision | SETOF raster + postgis_raster | public | st_tile | rast raster, nband integer[], width integer, height integer, padwithnodata boolean, nodataval double precision | SETOF raster + postgis_raster | public | st_tile | rast raster, width integer, height integer, padwithnodata boolean, nodataval double precision | SETOF raster + postgis_raster | public | st_touches | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_touches | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_tpi | rast raster, nband integer, customextent raster, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_tpi | rast raster, nband integer, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_transform | rast raster, srid integer, algorithm text, maxerr double precision, scalex double precision, scaley double precision | raster + postgis_raster | public | st_transform | rast raster, srid integer, scalexy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_transform | rast raster, alignto raster, algorithm text, maxerr double precision | raster + postgis_raster | public | st_transform | rast raster, srid integer, scalex double precision, scaley double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_tri | rast raster, nband integer, customextent raster, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_tri | rast raster, nband integer, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_union | raster, integer | raster + postgis_raster | public | st_union | raster | raster + postgis_raster | public | st_union | raster, unionarg[] | raster + postgis_raster | public | st_union | raster, integer, text | raster + postgis_raster | public | st_union | raster, text | raster + postgis_raster | public | st_upperleftx | raster | double precision + postgis_raster | public | st_upperlefty | raster | double precision + postgis_raster | public | st_value | rast raster, band integer, x integer, y integer, exclude_nodata_value boolean | double precision + postgis_raster | public | st_value | rast raster, x integer, y integer, exclude_nodata_value boolean | double precision + postgis_raster | public | st_value | rast raster, band integer, pt geometry, exclude_nodata_value boolean, resample text | double precision + postgis_raster | public | st_value | rast raster, pt geometry, exclude_nodata_value boolean | double precision + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, nband integer, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rast raster, nband integer, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, nband integer, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuecount | rast raster, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rast raster, nband integer, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuecount | rast raster, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuecount | rast raster, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rast raster, nband integer, exclude_nodata_value boolean, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuepercent | rast raster, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, nband integer, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_valuepercent | rast raster, nband integer, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rast raster, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rast raster, nband integer, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, nband integer, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_valuepercent | rast raster, nband integer, exclude_nodata_value boolean, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rast raster, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_width | raster | integer + postgis_raster | public | st_within | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_within | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_worldtorastercoord | rast raster, longitude double precision, latitude double precision, OUT columnx integer, OUT rowy integer | record + postgis_raster | public | st_worldtorastercoord | rast raster, pt geometry, OUT columnx integer, OUT rowy integer | record + postgis_raster | public | st_worldtorastercoordx | rast raster, xw double precision | integer + postgis_raster | public | st_worldtorastercoordx | rast raster, xw double precision, yw double precision | integer + postgis_raster | public | st_worldtorastercoordx | rast raster, pt geometry | integer + postgis_raster | public | st_worldtorastercoordy | rast raster, xw double precision, yw double precision | integer + postgis_raster | public | st_worldtorastercoordy | rast raster, pt geometry | integer + postgis_raster | public | st_worldtorastercoordy | rast raster, yw double precision | integer + postgis_raster | public | updaterastersrid | table_name name, column_name name, new_srid integer | boolean + postgis_raster | public | updaterastersrid | schema_name name, table_name name, column_name name, new_srid integer | boolean + postgis_sfcgal | public | postgis_sfcgal_full_version | | text + postgis_sfcgal | public | postgis_sfcgal_noop | geometry | geometry + postgis_sfcgal | public | postgis_sfcgal_scripts_installed | | text + postgis_sfcgal | public | postgis_sfcgal_version | | text + postgis_sfcgal | public | st_3darea | geometry | double precision + postgis_sfcgal | public | st_3dconvexhull | geometry | geometry + postgis_sfcgal | public | st_3ddifference | geom1 geometry, geom2 geometry | geometry + postgis_sfcgal | public | st_3dintersection | geom1 geometry, geom2 geometry | geometry + postgis_sfcgal | public | st_3dunion | geom1 geometry, geom2 geometry | geometry + postgis_sfcgal | public | st_3dunion | geometry | geometry + postgis_sfcgal | public | st_alphashape | g1 geometry, alpha double precision, allow_holes boolean | geometry + postgis_sfcgal | public | st_approximatemedialaxis | geometry | geometry + postgis_sfcgal | public | st_constraineddelaunaytriangles | geometry | geometry + postgis_sfcgal | public | st_extrude | geometry, double precision, double precision, double precision | geometry + postgis_sfcgal | public | st_forcelhr | geometry | geometry + postgis_sfcgal | public | st_isplanar | geometry | boolean + postgis_sfcgal | public | st_issolid | geometry | boolean + postgis_sfcgal | public | st_makesolid | geometry | geometry + postgis_sfcgal | public | st_minkowskisum | geometry, geometry | geometry + postgis_sfcgal | public | st_optimalalphashape | g1 geometry, allow_holes boolean, nb_components integer | geometry + postgis_sfcgal | public | st_orientation | geometry | integer + postgis_sfcgal | public | st_straightskeleton | geometry | geometry + postgis_sfcgal | public | st_tesselate | geometry | geometry + postgis_sfcgal | public | st_volume | geometry | double precision + postgis_tiger_geocoder | tiger | count_words | character varying | integer + postgis_tiger_geocoder | tiger | create_census_base_tables | | text + postgis_tiger_geocoder | tiger | cull_null | character varying | character varying + postgis_tiger_geocoder | tiger | diff_zip | zip1 character varying, zip2 character varying | integer + postgis_tiger_geocoder | tiger | drop_dupe_featnames_generate_script | | text + postgis_tiger_geocoder | tiger | drop_indexes_generate_script | tiger_data_schema text | text + postgis_tiger_geocoder | tiger | drop_nation_tables_generate_script | param_schema text | text + postgis_tiger_geocoder | tiger | drop_state_tables_generate_script | param_state text, param_schema text | text + postgis_tiger_geocoder | tiger | end_soundex | character varying | character varying + postgis_tiger_geocoder | tiger | geocode | input character varying, max_results integer, restrict_geom geometry, OUT addy norm_addy, OUT geomout geometry, OUT rating integer | SETOF record + postgis_tiger_geocoder | tiger | geocode | in_addy norm_addy, max_results integer, restrict_geom geometry, OUT addy norm_addy, OUT geomout geometry, OUT rating integer | SETOF record + postgis_tiger_geocoder | tiger | geocode_address | parsed norm_addy, max_results integer, restrict_geom geometry, OUT addy norm_addy, OUT geomout geometry, OUT rating integer | SETOF record + postgis_tiger_geocoder | tiger | geocode_intersection | roadway1 text, roadway2 text, in_state text, in_city text, in_zip text, num_results integer, OUT addy norm_addy, OUT geomout geometry, OUT rating integer | SETOF record + postgis_tiger_geocoder | tiger | geocode_location | parsed norm_addy, restrict_geom geometry, OUT addy norm_addy, OUT geomout geometry, OUT rating integer | SETOF record + postgis_tiger_geocoder | tiger | get_geocode_setting | setting_name text | text + postgis_tiger_geocoder | tiger | get_last_words | inputstring character varying, count integer | character varying + postgis_tiger_geocoder | tiger | get_tract | loc_geom geometry, output_field text | text + postgis_tiger_geocoder | tiger | greatest_hn | fromhn character varying, tohn character varying | integer + postgis_tiger_geocoder | tiger | includes_address | given_address integer, addr1 integer, addr2 integer, addr3 integer, addr4 integer | boolean + postgis_tiger_geocoder | tiger | install_geocode_settings | | void + postgis_tiger_geocoder | tiger | install_missing_indexes | | boolean + postgis_tiger_geocoder | tiger | install_pagc_tables | | void + postgis_tiger_geocoder | tiger | interpolate_from_address | given_address integer, in_addr1 character varying, in_addr2 character varying, in_road geometry, in_side character varying, in_offset_m double precision | geometry + postgis_tiger_geocoder | tiger | is_pretype | text | boolean + postgis_tiger_geocoder | tiger | least_hn | fromhn character varying, tohn character varying | integer + postgis_tiger_geocoder | tiger | levenshtein_ignore_case | character varying, character varying | integer + postgis_tiger_geocoder | tiger | loader_generate_census_script | param_states text[], os text | SETOF text + postgis_tiger_geocoder | tiger | loader_generate_nation_script | os text | SETOF text + postgis_tiger_geocoder | tiger | loader_generate_script | param_states text[], os text | SETOF text + postgis_tiger_geocoder | tiger | loader_load_staged_data | param_staging_table text, param_target_table text | integer + postgis_tiger_geocoder | tiger | loader_load_staged_data | param_staging_table text, param_target_table text, param_columns_exclude text[] | integer + postgis_tiger_geocoder | tiger | loader_macro_replace | param_input text, param_keys text[], param_values text[] | text + postgis_tiger_geocoder | tiger | location_extract | fullstreet character varying, stateabbrev character varying | character varying + postgis_tiger_geocoder | tiger | location_extract_countysub_exact | fullstreet character varying, stateabbrev character varying | character varying + postgis_tiger_geocoder | tiger | location_extract_countysub_fuzzy | fullstreet character varying, stateabbrev character varying | character varying + postgis_tiger_geocoder | tiger | location_extract_place_exact | fullstreet character varying, stateabbrev character varying | character varying + postgis_tiger_geocoder | tiger | location_extract_place_fuzzy | fullstreet character varying, stateabbrev character varying | character varying + postgis_tiger_geocoder | tiger | missing_indexes_generate_script | | text + postgis_tiger_geocoder | tiger | normalize_address | in_rawinput character varying | norm_addy + postgis_tiger_geocoder | tiger | nullable_levenshtein | character varying, character varying | integer + postgis_tiger_geocoder | tiger | numeric_streets_equal | input_street character varying, output_street character varying | boolean + postgis_tiger_geocoder | tiger | pagc_normalize_address | in_rawinput character varying | norm_addy + postgis_tiger_geocoder | tiger | pprint_addy | input norm_addy | character varying + postgis_tiger_geocoder | tiger | rate_attributes | dirpa character varying, dirpb character varying, streetnamea character varying, streetnameb character varying, streettypea character varying, streettypeb character varying, dirsa character varying, dirsb character varying, prequalabr character varying | integer + postgis_tiger_geocoder | tiger | rate_attributes | dirpa character varying, dirpb character varying, streetnamea character varying, streetnameb character varying, streettypea character varying, streettypeb character varying, dirsa character varying, dirsb character varying, locationa character varying, locationb character varying, prequalabr character varying | integer + postgis_tiger_geocoder | tiger | reverse_geocode | pt geometry, include_strnum_range boolean, OUT intpt geometry[], OUT addy norm_addy[], OUT street character varying[] | record + postgis_tiger_geocoder | tiger | set_geocode_setting | setting_name text, setting_value text | text + postgis_tiger_geocoder | tiger | setsearchpathforinstall | a_schema_name text | text + postgis_tiger_geocoder | tiger | state_extract | rawinput character varying | character varying + postgis_tiger_geocoder | tiger | topology_load_tiger | toponame character varying, region_type character varying, region_id character varying | text + postgis_tiger_geocoder | tiger | utmzone | geometry | integer + postgis_tiger_geocoder | tiger | zip_range | zip text, range_start integer, range_end integer | character varying[] + postgis_topology | topology | _asgmledge | edge_id integer, start_node integer, end_node integer, line geometry, visitedtable regclass, nsprefix_in text, prec integer, options integer, idprefix text, gmlver integer | text + postgis_topology | topology | _asgmlface | toponame text, face_id integer, visitedtable regclass, nsprefix_in text, prec integer, options integer, idprefix text, gmlver integer | text + postgis_topology | topology | _asgmlnode | id integer, point geometry, nsprefix_in text, prec integer, options integer, idprefix text, gmlver integer | text + postgis_topology | topology | _checkedgelinking | curedge_edge_id integer, prevedge_edge_id integer, prevedge_next_left_edge integer, prevedge_next_right_edge integer | validatetopology_returntype + postgis_topology | topology | _st_adjacentedges | atopology character varying, anode integer, anedge integer | integer[] + postgis_topology | topology | _st_mintolerance | ageom geometry | double precision + postgis_topology | topology | _st_mintolerance | atopology character varying, ageom geometry | double precision + postgis_topology | topology | _validatetopologyedgelinking | bbox geometry | SETOF validatetopology_returntype + postgis_topology | topology | _validatetopologygetfaceshellmaximaledgering | atopology character varying, aface integer | geometry + postgis_topology | topology | _validatetopologygetringedges | starting_edge integer | integer[] + postgis_topology | topology | _validatetopologyrings | bbox geometry | SETOF validatetopology_returntype + postgis_topology | topology | addedge | atopology character varying, aline geometry | integer + postgis_topology | topology | addface | atopology character varying, apoly geometry, force_new boolean | integer + postgis_topology | topology | addnode | atopology character varying, apoint geometry, allowedgesplitting boolean, setcontainingface boolean | integer + postgis_topology | topology | addtopogeometrycolumn | toponame character varying, schema character varying, tbl character varying, col character varying, ltype character varying, child integer | integer + postgis_topology | topology | addtopogeometrycolumn | character varying, character varying, character varying, character varying, character varying | integer + postgis_topology | topology | addtosearchpath | a_schema_name character varying | text + postgis_topology | topology | asgml | tg topogeometry, nsprefix text, prec integer, options integer, vis regclass | text + postgis_topology | topology | asgml | tg topogeometry, nsprefix text, prec integer, opts integer | text + postgis_topology | topology | asgml | tg topogeometry, nsprefix text | text + postgis_topology | topology | asgml | tg topogeometry, nsprefix_in text, precision_in integer, options_in integer, visitedtable regclass, idprefix text, gmlver integer | text + postgis_topology | topology | asgml | tg topogeometry | text + postgis_topology | topology | asgml | tg topogeometry, nsprefix text, prec integer, options integer, visitedtable regclass, idprefix text | text + postgis_topology | topology | asgml | tg topogeometry, visitedtable regclass, nsprefix text | text + postgis_topology | topology | asgml | tg topogeometry, visitedtable regclass | text + postgis_topology | topology | astopojson | tg topogeometry, edgemaptable regclass | text + postgis_topology | topology | cleartopogeom | tg topogeometry | topogeometry + postgis_topology | topology | copytopology | atopology character varying, newtopo character varying | integer + postgis_topology | topology | createtopogeom | toponame character varying, tg_type integer, layer_id integer, tg_objs topoelementarray | topogeometry + postgis_topology | topology | createtopogeom | toponame character varying, tg_type integer, layer_id integer | topogeometry + postgis_topology | topology | createtopology | atopology character varying, srid integer, prec double precision, hasz boolean | integer + postgis_topology | topology | createtopology | character varying, integer | integer + postgis_topology | topology | createtopology | toponame character varying, srid integer, prec double precision | integer + postgis_topology | topology | createtopology | character varying | integer + postgis_topology | topology | droptopogeometrycolumn | schema character varying, tbl character varying, col character varying | text + postgis_topology | topology | droptopology | atopology character varying | text + postgis_topology | topology | equals | tg1 topogeometry, tg2 topogeometry | boolean + postgis_topology | topology | findlayer | schema_name name, table_name name, feature_column name | layer + postgis_topology | topology | findlayer | topology_id integer, layer_id integer | layer + postgis_topology | topology | findlayer | layer_table regclass, feature_column name | layer + postgis_topology | topology | findlayer | tg topogeometry | layer + postgis_topology | topology | findtopology | integer | topology + postgis_topology | topology | findtopology | text | topology + postgis_topology | topology | findtopology | topogeometry | topology + postgis_topology | topology | findtopology | name, name, name | topology + postgis_topology | topology | findtopology | regclass, name | topology + postgis_topology | topology | geometry | topogeom topogeometry | geometry + postgis_topology | topology | geometrytype | tg topogeometry | text + postgis_topology | topology | getedgebypoint | atopology character varying, apoint geometry, tol1 double precision | integer + postgis_topology | topology | getfacebypoint | atopology character varying, apoint geometry, tol1 double precision | integer + postgis_topology | topology | getfacecontainingpoint | atopology text, apoint geometry | integer + postgis_topology | topology | getnodebypoint | atopology character varying, apoint geometry, tol1 double precision | integer + postgis_topology | topology | getnodeedges | atopology character varying, anode integer | SETOF getfaceedges_returntype + postgis_topology | topology | getringedges | atopology character varying, anedge integer, maxedges integer | SETOF getfaceedges_returntype + postgis_topology | topology | gettopogeomelementarray | toponame character varying, layer_id integer, tgid integer | topoelementarray + postgis_topology | topology | gettopogeomelementarray | tg topogeometry | topoelementarray + postgis_topology | topology | gettopogeomelements | tg topogeometry | SETOF topoelement + postgis_topology | topology | gettopogeomelements | toponame character varying, layerid integer, tgid integer | SETOF topoelement + postgis_topology | topology | gettopologyid | toponame character varying | integer + postgis_topology | topology | gettopologyname | topoid integer | character varying + postgis_topology | topology | gettopologysrid | toponame character varying | integer + postgis_topology | topology | intersects | tg1 topogeometry, tg2 topogeometry | boolean + postgis_topology | topology | layertrigger | | trigger + postgis_topology | topology | polygonize | toponame character varying | text + postgis_topology | topology | populate_topology_layer | | TABLE(schema_name text, table_name text, feature_column text) + postgis_topology | topology | postgis_topology_scripts_installed | | text + postgis_topology | topology | relationtrigger | | trigger + postgis_topology | topology | removeunusedprimitives | atopology text, bbox geometry | integer + postgis_topology | topology | st_addedgemodface | atopology character varying, anode integer, anothernode integer, acurve geometry | integer + postgis_topology | topology | st_addedgenewfaces | atopology character varying, anode integer, anothernode integer, acurve geometry | integer + postgis_topology | topology | st_addisoedge | atopology character varying, anode integer, anothernode integer, acurve geometry | integer + postgis_topology | topology | st_addisonode | atopology character varying, aface integer, apoint geometry | integer + postgis_topology | topology | st_changeedgegeom | atopology character varying, anedge integer, acurve geometry | text + postgis_topology | topology | st_createtopogeo | atopology character varying, acollection geometry | text + postgis_topology | topology | st_geometrytype | tg topogeometry | text + postgis_topology | topology | st_getfaceedges | toponame character varying, face_id integer | SETOF getfaceedges_returntype + postgis_topology | topology | st_getfacegeometry | toponame character varying, aface integer | geometry + postgis_topology | topology | st_inittopogeo | atopology character varying | text + postgis_topology | topology | st_modedgeheal | toponame character varying, e1id integer, e2id integer | integer + postgis_topology | topology | st_modedgesplit | atopology character varying, anedge integer, apoint geometry | integer + postgis_topology | topology | st_moveisonode | atopology character varying, anode integer, apoint geometry | text + postgis_topology | topology | st_newedgeheal | toponame character varying, e1id integer, e2id integer | integer + postgis_topology | topology | st_newedgessplit | atopology character varying, anedge integer, apoint geometry | integer + postgis_topology | topology | st_remedgemodface | toponame character varying, e1id integer | integer + postgis_topology | topology | st_remedgenewface | toponame character varying, e1id integer | integer + postgis_topology | topology | st_remisonode | character varying, integer | text + postgis_topology | topology | st_removeisoedge | atopology character varying, anedge integer | text + postgis_topology | topology | st_removeisonode | atopology character varying, anode integer | text + postgis_topology | topology | st_simplify | tg topogeometry, tolerance double precision | geometry + postgis_topology | topology | st_srid | tg topogeometry | integer + postgis_topology | topology | topoelementarray_agg | topoelement | topoelementarray + postgis_topology | topology | topoelementarray_append | topoelementarray, topoelement | topoelementarray + postgis_topology | topology | topogeo_addgeometry | atopology character varying, ageom geometry, tolerance double precision | void + postgis_topology | topology | topogeo_addlinestring | atopology character varying, aline geometry, tolerance double precision | SETOF integer + postgis_topology | topology | topogeo_addpoint | atopology character varying, apoint geometry, tolerance double precision | integer + postgis_topology | topology | topogeo_addpolygon | atopology character varying, apoly geometry, tolerance double precision | SETOF integer + postgis_topology | topology | topogeom_addelement | tg topogeometry, el topoelement | topogeometry + postgis_topology | topology | topogeom_addtopogeom | tgt topogeometry, src topogeometry | topogeometry + postgis_topology | topology | topogeom_remelement | tg topogeometry, el topoelement | topogeometry + postgis_topology | topology | topologysummary | atopology character varying | text + postgis_topology | topology | totopogeom | ageom geometry, atopology character varying, alayer integer, atolerance double precision | topogeometry + postgis_topology | topology | totopogeom | ageom geometry, tg topogeometry, atolerance double precision | topogeometry + postgis_topology | topology | validatetopology | toponame character varying, bbox geometry | SETOF validatetopology_returntype + postgis_topology | topology | validatetopologyrelation | toponame character varying | TABLE(error text, layer_id integer, topogeo_id integer, element_id integer) + postgres_fdw | public | postgres_fdw_disconnect | text | boolean + postgres_fdw | public | postgres_fdw_disconnect_all | | boolean + postgres_fdw | public | postgres_fdw_get_connections | OUT server_name text, OUT valid boolean | SETOF record + postgres_fdw | public | postgres_fdw_handler | | fdw_handler + postgres_fdw | public | postgres_fdw_validator | text[], oid | void + refint | public | check_foreign_key | | trigger + refint | public | check_primary_key | | trigger + rum | public | rum_anyarray_config | internal | void + rum | public | rum_anyarray_consistent | internal, smallint, anyarray, integer, internal, internal, internal, internal | boolean + rum | public | rum_anyarray_distance | anyarray, anyarray | double precision + rum | public | rum_anyarray_ordering | internal, smallint, anyarray, integer, internal, internal, internal, internal, internal | double precision + rum | public | rum_anyarray_similar | anyarray, anyarray | boolean + rum | public | rum_bit_compare_prefix | bit, bit, smallint, internal | integer + rum | public | rum_bit_extract_query | bit, internal, smallint, internal, internal | internal + rum | public | rum_bit_extract_value | bit, internal | internal + rum | public | rum_btree_consistent | internal, smallint, internal, integer, internal, internal, internal, internal | boolean + rum | public | rum_bytea_compare_prefix | bytea, bytea, smallint, internal | integer + rum | public | rum_bytea_extract_query | bytea, internal, smallint, internal, internal | internal + rum | public | rum_bytea_extract_value | bytea, internal | internal + rum | public | rum_char_compare_prefix | "char", "char", smallint, internal | integer + rum | public | rum_char_extract_query | "char", internal, smallint, internal, internal | internal + rum | public | rum_char_extract_value | "char", internal | internal + rum | public | rum_cidr_compare_prefix | cidr, cidr, smallint, internal | integer + rum | public | rum_cidr_extract_query | cidr, internal, smallint, internal, internal | internal + rum | public | rum_cidr_extract_value | cidr, internal | internal + rum | public | rum_date_compare_prefix | date, date, smallint, internal | integer + rum | public | rum_date_extract_query | date, internal, smallint, internal, internal | internal + rum | public | rum_date_extract_value | date, internal | internal + rum | public | rum_extract_anyarray | anyarray, internal, internal, internal, internal | internal + rum | public | rum_extract_anyarray_query | anyarray, internal, smallint, internal, internal, internal, internal | internal + rum | public | rum_extract_tsquery | tsquery, internal, smallint, internal, internal, internal, internal | internal + rum | public | rum_extract_tsquery_hash | tsquery, internal, smallint, internal, internal, internal, internal | internal + rum | public | rum_extract_tsvector | tsvector, internal, internal, internal, internal | internal + rum | public | rum_extract_tsvector_hash | tsvector, internal, internal, internal, internal | internal + rum | public | rum_float4_compare_prefix | real, real, smallint, internal | integer + rum | public | rum_float4_config | internal | void + rum | public | rum_float4_distance | real, real | double precision + rum | public | rum_float4_extract_query | real, internal, smallint, internal, internal | internal + rum | public | rum_float4_extract_value | real, internal | internal + rum | public | rum_float4_key_distance | real, real, smallint | double precision + rum | public | rum_float4_left_distance | real, real | double precision + rum | public | rum_float4_outer_distance | real, real, smallint | double precision + rum | public | rum_float4_right_distance | real, real | double precision + rum | public | rum_float8_compare_prefix | double precision, double precision, smallint, internal | integer + rum | public | rum_float8_config | internal | void + rum | public | rum_float8_distance | double precision, double precision | double precision + rum | public | rum_float8_extract_query | double precision, internal, smallint, internal, internal | internal + rum | public | rum_float8_extract_value | double precision, internal | internal + rum | public | rum_float8_key_distance | double precision, double precision, smallint | double precision + rum | public | rum_float8_left_distance | double precision, double precision | double precision + rum | public | rum_float8_outer_distance | double precision, double precision, smallint | double precision + rum | public | rum_float8_right_distance | double precision, double precision | double precision + rum | public | rum_inet_compare_prefix | inet, inet, smallint, internal | integer + rum | public | rum_inet_extract_query | inet, internal, smallint, internal, internal | internal + rum | public | rum_inet_extract_value | inet, internal | internal + rum | public | rum_int2_compare_prefix | smallint, smallint, smallint, internal | integer + rum | public | rum_int2_config | internal | void + rum | public | rum_int2_distance | smallint, smallint | double precision + rum | public | rum_int2_extract_query | smallint, internal, smallint, internal, internal | internal + rum | public | rum_int2_extract_value | smallint, internal | internal + rum | public | rum_int2_key_distance | smallint, smallint, smallint | double precision + rum | public | rum_int2_left_distance | smallint, smallint | double precision + rum | public | rum_int2_outer_distance | smallint, smallint, smallint | double precision + rum | public | rum_int2_right_distance | smallint, smallint | double precision + rum | public | rum_int4_compare_prefix | integer, integer, smallint, internal | integer + rum | public | rum_int4_config | internal | void + rum | public | rum_int4_distance | integer, integer | double precision + rum | public | rum_int4_extract_query | integer, internal, smallint, internal, internal | internal + rum | public | rum_int4_extract_value | integer, internal | internal + rum | public | rum_int4_key_distance | integer, integer, smallint | double precision + rum | public | rum_int4_left_distance | integer, integer | double precision + rum | public | rum_int4_outer_distance | integer, integer, smallint | double precision + rum | public | rum_int4_right_distance | integer, integer | double precision + rum | public | rum_int8_compare_prefix | bigint, bigint, smallint, internal | integer + rum | public | rum_int8_config | internal | void + rum | public | rum_int8_distance | bigint, bigint | double precision + rum | public | rum_int8_extract_query | bigint, internal, smallint, internal, internal | internal + rum | public | rum_int8_extract_value | bigint, internal | internal + rum | public | rum_int8_key_distance | bigint, bigint, smallint | double precision + rum | public | rum_int8_left_distance | bigint, bigint | double precision + rum | public | rum_int8_outer_distance | bigint, bigint, smallint | double precision + rum | public | rum_int8_right_distance | bigint, bigint | double precision + rum | public | rum_interval_compare_prefix | interval, interval, smallint, internal | integer + rum | public | rum_interval_extract_query | interval, internal, smallint, internal, internal | internal + rum | public | rum_interval_extract_value | interval, internal | internal + rum | public | rum_macaddr_compare_prefix | macaddr, macaddr, smallint, internal | integer + rum | public | rum_macaddr_extract_query | macaddr, internal, smallint, internal, internal | internal + rum | public | rum_macaddr_extract_value | macaddr, internal | internal + rum | public | rum_money_compare_prefix | money, money, smallint, internal | integer + rum | public | rum_money_config | internal | void + rum | public | rum_money_distance | money, money | double precision + rum | public | rum_money_extract_query | money, internal, smallint, internal, internal | internal + rum | public | rum_money_extract_value | money, internal | internal + rum | public | rum_money_key_distance | money, money, smallint | double precision + rum | public | rum_money_left_distance | money, money | double precision + rum | public | rum_money_outer_distance | money, money, smallint | double precision + rum | public | rum_money_right_distance | money, money | double precision + rum | public | rum_numeric_cmp | numeric, numeric | integer + rum | public | rum_numeric_compare_prefix | numeric, numeric, smallint, internal | integer + rum | public | rum_numeric_extract_query | numeric, internal, smallint, internal, internal | internal + rum | public | rum_numeric_extract_value | numeric, internal | internal + rum | public | rum_oid_compare_prefix | oid, oid, smallint, internal | integer + rum | public | rum_oid_config | internal | void + rum | public | rum_oid_distance | oid, oid | double precision + rum | public | rum_oid_extract_query | oid, internal, smallint, internal, internal | internal + rum | public | rum_oid_extract_value | oid, internal | internal + rum | public | rum_oid_key_distance | oid, oid, smallint | double precision + rum | public | rum_oid_left_distance | oid, oid | double precision + rum | public | rum_oid_outer_distance | oid, oid, smallint | double precision + rum | public | rum_oid_right_distance | oid, oid | double precision + rum | public | rum_text_compare_prefix | text, text, smallint, internal | integer + rum | public | rum_text_extract_query | text, internal, smallint, internal, internal | internal + rum | public | rum_text_extract_value | text, internal | internal + rum | public | rum_time_compare_prefix | time without time zone, time without time zone, smallint, internal | integer + rum | public | rum_time_extract_query | time without time zone, internal, smallint, internal, internal | internal + rum | public | rum_time_extract_value | time without time zone, internal | internal + rum | public | rum_timestamp_compare_prefix | timestamp without time zone, timestamp without time zone, smallint, internal | integer + rum | public | rum_timestamp_config | internal | void + rum | public | rum_timestamp_consistent | internal, smallint, timestamp without time zone, integer, internal, internal, internal, internal | boolean + rum | public | rum_timestamp_distance | timestamp without time zone, timestamp without time zone | double precision + rum | public | rum_timestamp_extract_query | timestamp without time zone, internal, smallint, internal, internal, internal, internal | internal + rum | public | rum_timestamp_extract_value | timestamp without time zone, internal, internal, internal, internal | internal + rum | public | rum_timestamp_key_distance | timestamp without time zone, timestamp without time zone, smallint | double precision + rum | public | rum_timestamp_left_distance | timestamp without time zone, timestamp without time zone | double precision + rum | public | rum_timestamp_outer_distance | timestamp without time zone, timestamp without time zone, smallint | double precision + rum | public | rum_timestamp_right_distance | timestamp without time zone, timestamp without time zone | double precision + rum | public | rum_timestamptz_distance | timestamp with time zone, timestamp with time zone | double precision + rum | public | rum_timestamptz_key_distance | timestamp with time zone, timestamp with time zone, smallint | double precision + rum | public | rum_timestamptz_left_distance | timestamp with time zone, timestamp with time zone | double precision + rum | public | rum_timestamptz_right_distance | timestamp with time zone, timestamp with time zone | double precision + rum | public | rum_timetz_compare_prefix | time with time zone, time with time zone, smallint, internal | integer + rum | public | rum_timetz_extract_query | time with time zone, internal, smallint, internal, internal | internal + rum | public | rum_timetz_extract_value | time with time zone, internal | internal + rum | public | rum_ts_distance | tsvector, tsquery, integer | real + rum | public | rum_ts_distance | tsvector, tsquery | real + rum | public | rum_ts_distance | tsvector, rum_distance_query | real + rum | public | rum_ts_join_pos | internal, internal | bytea + rum | public | rum_ts_score | tsvector, tsquery, integer | real + rum | public | rum_ts_score | tsvector, tsquery | real + rum | public | rum_ts_score | tsvector, rum_distance_query | real + rum | public | rum_tsquery_addon_consistent | internal, smallint, tsvector, integer, internal, internal, internal, internal | boolean + rum | public | rum_tsquery_consistent | internal, smallint, tsvector, integer, internal, internal, internal, internal | boolean + rum | public | rum_tsquery_distance | internal, smallint, tsvector, integer, internal, internal, internal, internal, internal | double precision + rum | public | rum_tsquery_pre_consistent | internal, smallint, tsvector, integer, internal, internal, internal, internal | boolean + rum | public | rum_tsvector_config | internal | void + rum | public | rum_varbit_compare_prefix | bit varying, bit varying, smallint, internal | integer + rum | public | rum_varbit_extract_query | bit varying, internal, smallint, internal, internal | internal + rum | public | rum_varbit_extract_value | bit varying, internal | internal + rum | public | rumhandler | internal | index_am_handler + rum | public | ruminv_extract_tsquery | tsquery, internal, internal, internal, internal | internal + rum | public | ruminv_extract_tsvector | tsvector, internal, smallint, internal, internal, internal, internal | internal + rum | public | ruminv_tsquery_config | internal | void + rum | public | ruminv_tsvector_consistent | internal, smallint, tsvector, integer, internal, internal, internal, internal | boolean + rum | public | tsquery_to_distance_query | tsquery | rum_distance_query + seg | public | gseg_consistent | internal, seg, smallint, oid, internal | boolean + seg | public | gseg_penalty | internal, internal, internal | internal + seg | public | gseg_picksplit | internal, internal | internal + seg | public | gseg_same | seg, seg, internal | internal + seg | public | gseg_union | internal, internal | seg + seg | public | seg_center | seg | real + seg | public | seg_cmp | seg, seg | integer + seg | public | seg_contained | seg, seg | boolean + seg | public | seg_contains | seg, seg | boolean + seg | public | seg_different | seg, seg | boolean + seg | public | seg_ge | seg, seg | boolean + seg | public | seg_gt | seg, seg | boolean + seg | public | seg_in | cstring | seg + seg | public | seg_inter | seg, seg | seg + seg | public | seg_le | seg, seg | boolean + seg | public | seg_left | seg, seg | boolean + seg | public | seg_lower | seg | real + seg | public | seg_lt | seg, seg | boolean + seg | public | seg_out | seg | cstring + seg | public | seg_over_left | seg, seg | boolean + seg | public | seg_over_right | seg, seg | boolean + seg | public | seg_overlap | seg, seg | boolean + seg | public | seg_right | seg, seg | boolean + seg | public | seg_same | seg, seg | boolean + seg | public | seg_size | seg | real + seg | public | seg_union | seg, seg | seg + seg | public | seg_upper | seg | real + sslinfo | public | ssl_cipher | | text + sslinfo | public | ssl_client_cert_present | | boolean + sslinfo | public | ssl_client_dn | | text + sslinfo | public | ssl_client_dn_field | text | text + sslinfo | public | ssl_client_serial | | numeric + sslinfo | public | ssl_extension_info | OUT name text, OUT value text, OUT critical boolean | SETOF record + sslinfo | public | ssl_is_used | | boolean + sslinfo | public | ssl_issuer_dn | | text + sslinfo | public | ssl_issuer_field | text | text + sslinfo | public | ssl_version | | text + supabase_vault | vault | _crypto_aead_det_decrypt | message bytea, additional bytea, key_id bigint, context bytea, nonce bytea | bytea + supabase_vault | vault | _crypto_aead_det_encrypt | message bytea, additional bytea, key_id bigint, context bytea, nonce bytea | bytea + supabase_vault | vault | _crypto_aead_det_noncegen | | bytea + supabase_vault | vault | create_secret | new_secret text, new_name text, new_description text, new_key_id uuid | uuid + supabase_vault | vault | update_secret | secret_id uuid, new_secret text, new_name text, new_description text, new_key_id uuid | void + tablefunc | public | connectby | text, text, text, text, integer, text | SETOF record + tablefunc | public | connectby | text, text, text, text, text, integer, text | SETOF record + tablefunc | public | connectby | text, text, text, text, integer | SETOF record + tablefunc | public | connectby | text, text, text, text, text, integer | SETOF record + tablefunc | public | crosstab | text | SETOF record + tablefunc | public | crosstab | text, integer | SETOF record + tablefunc | public | crosstab | text, text | SETOF record + tablefunc | public | crosstab2 | text | SETOF tablefunc_crosstab_2 + tablefunc | public | crosstab3 | text | SETOF tablefunc_crosstab_3 + tablefunc | public | crosstab4 | text | SETOF tablefunc_crosstab_4 + tablefunc | public | normal_rand | integer, double precision, double precision | SETOF double precision + tcn | public | triggered_change_notification | | trigger + timescaledb | _timescaledb_debug | extension_state | | text + timescaledb | _timescaledb_functions | alter_job_set_hypertable_id | job_id integer, hypertable regclass | integer + timescaledb | _timescaledb_functions | attach_osm_table_chunk | hypertable regclass, chunk regclass | boolean + timescaledb | _timescaledb_functions | bookend_deserializefunc | bytea, internal | internal + timescaledb | _timescaledb_functions | bookend_finalfunc | internal, anyelement, "any" | anyelement + timescaledb | _timescaledb_functions | bookend_serializefunc | internal | bytea + timescaledb | _timescaledb_functions | cagg_get_bucket_function_info | mat_hypertable_id integer, OUT bucket_func regprocedure, OUT bucket_width text, OUT bucket_origin text, OUT bucket_offset text, OUT bucket_timezone text, OUT bucket_fixed_width boolean | record + timescaledb | _timescaledb_functions | cagg_migrate_create_plan | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _cagg_name_new text, IN _override boolean, IN _drop_old boolean | + timescaledb | _timescaledb_functions | cagg_migrate_execute_copy_data | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _plan_step _timescaledb_catalog.continuous_agg_migrate_plan_step | + timescaledb | _timescaledb_functions | cagg_migrate_execute_copy_policies | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _plan_step _timescaledb_catalog.continuous_agg_migrate_plan_step | + timescaledb | _timescaledb_functions | cagg_migrate_execute_create_new_cagg | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _plan_step _timescaledb_catalog.continuous_agg_migrate_plan_step | + timescaledb | _timescaledb_functions | cagg_migrate_execute_disable_policies | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _plan_step _timescaledb_catalog.continuous_agg_migrate_plan_step | + timescaledb | _timescaledb_functions | cagg_migrate_execute_drop_old_cagg | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _plan_step _timescaledb_catalog.continuous_agg_migrate_plan_step | + timescaledb | _timescaledb_functions | cagg_migrate_execute_enable_policies | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _plan_step _timescaledb_catalog.continuous_agg_migrate_plan_step | + timescaledb | _timescaledb_functions | cagg_migrate_execute_override_cagg | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _plan_step _timescaledb_catalog.continuous_agg_migrate_plan_step | + timescaledb | _timescaledb_functions | cagg_migrate_execute_plan | IN _cagg_data _timescaledb_catalog.continuous_agg | + timescaledb | _timescaledb_functions | cagg_migrate_execute_refresh_new_cagg | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _plan_step _timescaledb_catalog.continuous_agg_migrate_plan_step | + timescaledb | _timescaledb_functions | cagg_migrate_plan_exists | _hypertable_id integer | boolean + timescaledb | _timescaledb_functions | cagg_migrate_pre_validation | _cagg_schema text, _cagg_name text, _cagg_name_new text | _timescaledb_catalog.continuous_agg + timescaledb | _timescaledb_functions | cagg_migrate_to_time_bucket | IN cagg regclass | + timescaledb | _timescaledb_functions | cagg_validate_query | query text, OUT is_valid boolean, OUT error_level text, OUT error_code text, OUT error_message text, OUT error_detail text, OUT error_hint text | record + timescaledb | _timescaledb_functions | cagg_watermark | hypertable_id integer | bigint + timescaledb | _timescaledb_functions | cagg_watermark_materialized | hypertable_id integer | bigint + timescaledb | _timescaledb_functions | calculate_chunk_interval | dimension_id integer, dimension_coord bigint, chunk_target_size bigint | bigint + timescaledb | _timescaledb_functions | chunk_constraint_add_table_constraint | chunk_constraint_row _timescaledb_catalog.chunk_constraint | void + timescaledb | _timescaledb_functions | chunk_id_from_relid | relid oid | integer + timescaledb | _timescaledb_functions | chunk_index_clone | chunk_index_oid oid | oid + timescaledb | _timescaledb_functions | chunk_index_replace | chunk_index_oid_old oid, chunk_index_oid_new oid | void + timescaledb | _timescaledb_functions | chunk_status | regclass | integer + timescaledb | _timescaledb_functions | chunks_local_size | schema_name_in name, table_name_in name | TABLE(chunk_id integer, chunk_schema name, chunk_name name, table_bytes bigint, index_bytes bigint, toast_bytes bigint, total_bytes bigint) + timescaledb | _timescaledb_functions | compressed_chunk_local_stats | schema_name_in name, table_name_in name | TABLE(chunk_schema name, chunk_name name, compression_status text, before_compression_table_bytes bigint, before_compression_index_bytes bigint, before_compression_toast_bytes bigint, before_compression_total_bytes bigint, after_compression_table_bytes bigint, after_compression_index_bytes bigint, after_compression_toast_bytes bigint, after_compression_total_bytes bigint) + timescaledb | _timescaledb_functions | compressed_data_in | cstring | _timescaledb_internal.compressed_data + timescaledb | _timescaledb_functions | compressed_data_out | _timescaledb_internal.compressed_data | cstring + timescaledb | _timescaledb_functions | compressed_data_recv | internal | _timescaledb_internal.compressed_data + timescaledb | _timescaledb_functions | compressed_data_send | _timescaledb_internal.compressed_data | bytea + timescaledb | _timescaledb_functions | constraint_clone | constraint_oid oid, target_oid regclass | void + timescaledb | _timescaledb_functions | continuous_agg_invalidation_trigger | | trigger + timescaledb | _timescaledb_functions | create_chunk | hypertable regclass, slices jsonb, schema_name name, table_name name, chunk_table regclass | TABLE(chunk_id integer, hypertable_id integer, schema_name name, table_name name, relkind "char", slices jsonb, created boolean) + timescaledb | _timescaledb_functions | create_chunk_table | hypertable regclass, slices jsonb, schema_name name, table_name name | boolean + timescaledb | _timescaledb_functions | create_compressed_chunk | chunk regclass, chunk_table regclass, uncompressed_heap_size bigint, uncompressed_toast_size bigint, uncompressed_index_size bigint, compressed_heap_size bigint, compressed_toast_size bigint, compressed_index_size bigint, numrows_pre_compression bigint, numrows_post_compression bigint | regclass + timescaledb | _timescaledb_functions | dimension_info_in | cstring | _timescaledb_internal.dimension_info + timescaledb | _timescaledb_functions | dimension_info_out | _timescaledb_internal.dimension_info | cstring + timescaledb | _timescaledb_functions | drop_chunk | chunk regclass | boolean + timescaledb | _timescaledb_functions | finalize_agg | agg_name text, inner_agg_collation_schema name, inner_agg_collation_name name, inner_agg_input_types name[], inner_agg_serialized_state bytea, return_type_dummy_val anyelement | anyelement + timescaledb | _timescaledb_functions | finalize_agg_ffunc | tstate internal, aggfn text, inner_agg_collation_schema name, inner_agg_collation_name name, inner_agg_input_types name[], inner_agg_serialized_state bytea, return_type_dummy_val anyelement | anyelement + timescaledb | _timescaledb_functions | finalize_agg_sfunc | tstate internal, aggfn text, inner_agg_collation_schema name, inner_agg_collation_name name, inner_agg_input_types name[], inner_agg_serialized_state bytea, return_type_dummy_val anyelement | internal + timescaledb | _timescaledb_functions | first_combinefunc | internal, internal | internal + timescaledb | _timescaledb_functions | first_sfunc | internal, anyelement, "any" | internal + timescaledb | _timescaledb_functions | freeze_chunk | chunk regclass | boolean + timescaledb | _timescaledb_functions | generate_uuid | | uuid + timescaledb | _timescaledb_functions | get_approx_row_count | relation regclass | bigint + timescaledb | _timescaledb_functions | get_compressed_chunk_index_for_recompression | uncompressed_chunk regclass | regclass + timescaledb | _timescaledb_functions | get_create_command | table_name name | text + timescaledb | _timescaledb_functions | get_git_commit | | TABLE(commit_tag text, commit_hash text, commit_time timestamp with time zone) + timescaledb | _timescaledb_functions | get_orderby_defaults | relation regclass, segment_by_cols text[] | jsonb + timescaledb | _timescaledb_functions | get_os_info | | TABLE(sysname text, version text, release text, version_pretty text) + timescaledb | _timescaledb_functions | get_partition_for_key | val anyelement | integer + timescaledb | _timescaledb_functions | get_partition_hash | val anyelement | integer + timescaledb | _timescaledb_functions | get_segmentby_defaults | relation regclass | jsonb + timescaledb | _timescaledb_functions | hist_combinefunc | state1 internal, state2 internal | internal + timescaledb | _timescaledb_functions | hist_deserializefunc | bytea, internal | internal + timescaledb | _timescaledb_functions | hist_finalfunc | state internal, val double precision, min double precision, max double precision, nbuckets integer | integer[] + timescaledb | _timescaledb_functions | hist_serializefunc | internal | bytea + timescaledb | _timescaledb_functions | hist_sfunc | state internal, val double precision, min double precision, max double precision, nbuckets integer | internal + timescaledb | _timescaledb_functions | hypertable_local_size | schema_name_in name, table_name_in name | TABLE(table_bytes bigint, index_bytes bigint, toast_bytes bigint, total_bytes bigint) + timescaledb | _timescaledb_functions | hypertable_osm_range_update | hypertable regclass, range_start anyelement, range_end anyelement, empty boolean | boolean + timescaledb | _timescaledb_functions | indexes_local_size | schema_name_in name, index_name_in name | TABLE(hypertable_id integer, total_bytes bigint) + timescaledb | _timescaledb_functions | insert_blocker | | trigger + timescaledb | _timescaledb_functions | interval_to_usec | chunk_interval interval | bigint + timescaledb | _timescaledb_functions | last_combinefunc | internal, internal | internal + timescaledb | _timescaledb_functions | last_sfunc | internal, anyelement, "any" | internal + timescaledb | _timescaledb_functions | makeaclitem | regrole, regrole, text, boolean | aclitem + timescaledb | _timescaledb_functions | metadata_insert_trigger | | trigger + timescaledb | _timescaledb_functions | partialize_agg | arg anyelement | bytea + timescaledb | _timescaledb_functions | policy_compression | IN job_id integer, IN config jsonb | + timescaledb | _timescaledb_functions | policy_compression_check | config jsonb | void + timescaledb | _timescaledb_functions | policy_compression_execute | IN job_id integer, IN htid integer, IN lag anyelement, IN maxchunks integer, IN verbose_log boolean, IN recompress_enabled boolean, IN use_creation_time boolean | + timescaledb | _timescaledb_functions | policy_job_stat_history_retention | job_id integer, config jsonb | integer + timescaledb | _timescaledb_functions | policy_job_stat_history_retention_check | config jsonb | void + timescaledb | _timescaledb_functions | policy_recompression | IN job_id integer, IN config jsonb | + timescaledb | _timescaledb_functions | policy_refresh_continuous_aggregate | IN job_id integer, IN config jsonb | + timescaledb | _timescaledb_functions | policy_refresh_continuous_aggregate_check | config jsonb | void + timescaledb | _timescaledb_functions | policy_reorder | IN job_id integer, IN config jsonb | + timescaledb | _timescaledb_functions | policy_reorder_check | config jsonb | void + timescaledb | _timescaledb_functions | policy_retention | IN job_id integer, IN config jsonb | + timescaledb | _timescaledb_functions | policy_retention_check | config jsonb | void + timescaledb | _timescaledb_functions | process_ddl_event | | event_trigger + timescaledb | _timescaledb_functions | range_value_to_pretty | time_value bigint, column_type regtype | text + timescaledb | _timescaledb_functions | recompress_chunk_segmentwise | uncompressed_chunk regclass, if_compressed boolean | regclass + timescaledb | _timescaledb_functions | relation_approximate_size | relation regclass | TABLE(total_size bigint, heap_size bigint, index_size bigint, toast_size bigint) + timescaledb | _timescaledb_functions | relation_size | relation regclass | TABLE(total_size bigint, heap_size bigint, index_size bigint, toast_size bigint) + timescaledb | _timescaledb_functions | remove_dropped_chunk_metadata | _hypertable_id integer | integer + timescaledb | _timescaledb_functions | repair_relation_acls | | + timescaledb | _timescaledb_functions | restart_background_workers | | boolean + timescaledb | _timescaledb_functions | show_chunk | chunk regclass | TABLE(chunk_id integer, hypertable_id integer, schema_name name, table_name name, relkind "char", slices jsonb) + timescaledb | _timescaledb_functions | start_background_workers | | boolean + timescaledb | _timescaledb_functions | stop_background_workers | | boolean + timescaledb | _timescaledb_functions | subtract_integer_from_now | hypertable_relid regclass, lag bigint | bigint + timescaledb | _timescaledb_functions | time_to_internal | time_val anyelement | bigint + timescaledb | _timescaledb_functions | to_date | unixtime_us bigint | date + timescaledb | _timescaledb_functions | to_interval | unixtime_us bigint | interval + timescaledb | _timescaledb_functions | to_timestamp | unixtime_us bigint | timestamp with time zone + timescaledb | _timescaledb_functions | to_timestamp_without_timezone | unixtime_us bigint | timestamp without time zone + timescaledb | _timescaledb_functions | to_unix_microseconds | ts timestamp with time zone | bigint + timescaledb | _timescaledb_functions | tsl_loaded | | boolean + timescaledb | _timescaledb_functions | unfreeze_chunk | chunk regclass | boolean + timescaledb | _timescaledb_internal | alter_job_set_hypertable_id | job_id integer, hypertable regclass | integer + timescaledb | _timescaledb_internal | attach_osm_table_chunk | hypertable regclass, chunk regclass | boolean + timescaledb | _timescaledb_internal | cagg_migrate_create_plan | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _cagg_name_new text, IN _override boolean, IN _drop_old boolean | + timescaledb | _timescaledb_internal | cagg_migrate_execute_copy_data | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _plan_step _timescaledb_catalog.continuous_agg_migrate_plan_step | + timescaledb | _timescaledb_internal | cagg_migrate_execute_copy_policies | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _plan_step _timescaledb_catalog.continuous_agg_migrate_plan_step | + timescaledb | _timescaledb_internal | cagg_migrate_execute_create_new_cagg | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _plan_step _timescaledb_catalog.continuous_agg_migrate_plan_step | + timescaledb | _timescaledb_internal | cagg_migrate_execute_disable_policies | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _plan_step _timescaledb_catalog.continuous_agg_migrate_plan_step | + timescaledb | _timescaledb_internal | cagg_migrate_execute_drop_old_cagg | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _plan_step _timescaledb_catalog.continuous_agg_migrate_plan_step | + timescaledb | _timescaledb_internal | cagg_migrate_execute_enable_policies | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _plan_step _timescaledb_catalog.continuous_agg_migrate_plan_step | + timescaledb | _timescaledb_internal | cagg_migrate_execute_override_cagg | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _plan_step _timescaledb_catalog.continuous_agg_migrate_plan_step | + timescaledb | _timescaledb_internal | cagg_migrate_execute_plan | IN _cagg_data _timescaledb_catalog.continuous_agg | + timescaledb | _timescaledb_internal | cagg_migrate_execute_refresh_new_cagg | IN _cagg_data _timescaledb_catalog.continuous_agg, IN _plan_step _timescaledb_catalog.continuous_agg_migrate_plan_step | + timescaledb | _timescaledb_internal | cagg_migrate_plan_exists | _hypertable_id integer | boolean + timescaledb | _timescaledb_internal | cagg_migrate_pre_validation | _cagg_schema text, _cagg_name text, _cagg_name_new text | _timescaledb_catalog.continuous_agg + timescaledb | _timescaledb_internal | cagg_watermark | hypertable_id integer | bigint + timescaledb | _timescaledb_internal | cagg_watermark_materialized | hypertable_id integer | bigint + timescaledb | _timescaledb_internal | calculate_chunk_interval | dimension_id integer, dimension_coord bigint, chunk_target_size bigint | bigint + timescaledb | _timescaledb_internal | chunk_constraint_add_table_constraint | chunk_constraint_row _timescaledb_catalog.chunk_constraint | void + timescaledb | _timescaledb_internal | chunk_id_from_relid | relid oid | integer + timescaledb | _timescaledb_internal | chunk_index_clone | chunk_index_oid oid | oid + timescaledb | _timescaledb_internal | chunk_index_replace | chunk_index_oid_old oid, chunk_index_oid_new oid | void + timescaledb | _timescaledb_internal | chunk_status | regclass | integer + timescaledb | _timescaledb_internal | chunks_local_size | schema_name_in name, table_name_in name | TABLE(chunk_id integer, chunk_schema name, chunk_name name, table_bytes bigint, index_bytes bigint, toast_bytes bigint, total_bytes bigint) + timescaledb | _timescaledb_internal | compressed_chunk_local_stats | schema_name_in name, table_name_in name | TABLE(chunk_schema name, chunk_name name, compression_status text, before_compression_table_bytes bigint, before_compression_index_bytes bigint, before_compression_toast_bytes bigint, before_compression_total_bytes bigint, after_compression_table_bytes bigint, after_compression_index_bytes bigint, after_compression_toast_bytes bigint, after_compression_total_bytes bigint) + timescaledb | _timescaledb_internal | compressed_chunk_remote_stats | schema_name_in name, table_name_in name | TABLE(chunk_schema name, chunk_name name, compression_status text, before_compression_table_bytes bigint, before_compression_index_bytes bigint, before_compression_toast_bytes bigint, before_compression_total_bytes bigint, after_compression_table_bytes bigint, after_compression_index_bytes bigint, after_compression_toast_bytes bigint, after_compression_total_bytes bigint, node_name name) + timescaledb | _timescaledb_internal | continuous_agg_invalidation_trigger | | trigger + timescaledb | _timescaledb_internal | create_chunk | hypertable regclass, _slices jsonb, _schema_name name, _table_name name, chunk_table regclass | TABLE(chunk_id integer, hypertable_id integer, schema_name name, table_name name, relkind "char", slices jsonb, created boolean) + timescaledb | _timescaledb_internal | create_chunk_table | hypertable regclass, slices jsonb, schema_name name, table_name name | boolean + timescaledb | _timescaledb_internal | create_compressed_chunk | chunk regclass, chunk_table regclass, uncompressed_heap_size bigint, uncompressed_toast_size bigint, uncompressed_index_size bigint, compressed_heap_size bigint, compressed_toast_size bigint, compressed_index_size bigint, numrows_pre_compression bigint, numrows_post_compression bigint | regclass + timescaledb | _timescaledb_internal | drop_chunk | chunk regclass | boolean + timescaledb | _timescaledb_internal | finalize_agg | agg_name text, inner_agg_collation_schema name, inner_agg_collation_name name, inner_agg_input_types name[], inner_agg_serialized_state bytea, return_type_dummy_val anyelement | anyelement + timescaledb | _timescaledb_internal | finalize_agg_ffunc | tstate internal, aggfn text, inner_agg_collation_schema name, inner_agg_collation_name name, inner_agg_input_types name[], inner_agg_serialized_state bytea, return_type_dummy_val anyelement | anyelement + timescaledb | _timescaledb_internal | finalize_agg_sfunc | tstate internal, aggfn text, inner_agg_collation_schema name, inner_agg_collation_name name, inner_agg_input_types name[], inner_agg_serialized_state bytea, return_type_dummy_val anyelement | internal + timescaledb | _timescaledb_internal | freeze_chunk | chunk regclass | boolean + timescaledb | _timescaledb_internal | generate_uuid | | uuid + timescaledb | _timescaledb_internal | get_approx_row_count | relation regclass | bigint + timescaledb | _timescaledb_internal | get_compressed_chunk_index_for_recompression | uncompressed_chunk regclass | regclass + timescaledb | _timescaledb_internal | get_create_command | table_name name | text + timescaledb | _timescaledb_internal | get_git_commit | | TABLE(commit_tag text, commit_hash text, commit_time timestamp with time zone) + timescaledb | _timescaledb_internal | get_os_info | | TABLE(sysname text, version text, release text, version_pretty text) + timescaledb | _timescaledb_internal | get_partition_for_key | val anyelement | integer + timescaledb | _timescaledb_internal | get_partition_hash | val anyelement | integer + timescaledb | _timescaledb_internal | hypertable_local_size | schema_name_in name, table_name_in name | TABLE(table_bytes bigint, index_bytes bigint, toast_bytes bigint, total_bytes bigint) + timescaledb | _timescaledb_internal | indexes_local_size | schema_name_in name, table_name_in name | TABLE(hypertable_id integer, total_bytes bigint) + timescaledb | _timescaledb_internal | insert_blocker | | trigger + timescaledb | _timescaledb_internal | interval_to_usec | chunk_interval interval | bigint + timescaledb | _timescaledb_internal | partialize_agg | arg anyelement | bytea + timescaledb | _timescaledb_internal | policy_compression | IN job_id integer, IN config jsonb | + timescaledb | _timescaledb_internal | policy_compression_check | config jsonb | void + timescaledb | _timescaledb_internal | policy_compression_execute | IN job_id integer, IN htid integer, IN lag anyelement, IN maxchunks integer, IN verbose_log boolean, IN recompress_enabled boolean, IN use_creation_time boolean | + timescaledb | _timescaledb_internal | policy_job_stat_history_retention | job_id integer, config jsonb | integer + timescaledb | _timescaledb_internal | policy_job_stat_history_retention_check | config jsonb | void + timescaledb | _timescaledb_internal | policy_recompression | IN job_id integer, IN config jsonb | + timescaledb | _timescaledb_internal | policy_refresh_continuous_aggregate | IN job_id integer, IN config jsonb | + timescaledb | _timescaledb_internal | policy_refresh_continuous_aggregate_check | config jsonb | void + timescaledb | _timescaledb_internal | policy_reorder | IN job_id integer, IN config jsonb | + timescaledb | _timescaledb_internal | policy_reorder_check | config jsonb | void + timescaledb | _timescaledb_internal | policy_retention | IN job_id integer, IN config jsonb | + timescaledb | _timescaledb_internal | policy_retention_check | config jsonb | void + timescaledb | _timescaledb_internal | process_ddl_event | | event_trigger + timescaledb | _timescaledb_internal | range_value_to_pretty | time_value bigint, column_type regtype | text + timescaledb | _timescaledb_internal | recompress_chunk_segmentwise | uncompressed_chunk regclass, if_compressed boolean | regclass + timescaledb | _timescaledb_internal | relation_size | relation regclass | TABLE(total_size bigint, heap_size bigint, index_size bigint, toast_size bigint) + timescaledb | _timescaledb_internal | restart_background_workers | | boolean + timescaledb | _timescaledb_internal | show_chunk | chunk regclass | TABLE(chunk_id integer, hypertable_id integer, schema_name name, table_name name, relkind "char", slices jsonb) + timescaledb | _timescaledb_internal | start_background_workers | | boolean + timescaledb | _timescaledb_internal | stop_background_workers | | boolean + timescaledb | _timescaledb_internal | subtract_integer_from_now | hypertable_relid regclass, lag bigint | bigint + timescaledb | _timescaledb_internal | time_to_internal | time_val anyelement | bigint + timescaledb | _timescaledb_internal | to_date | unixtime_us bigint | date + timescaledb | _timescaledb_internal | to_interval | unixtime_us bigint | interval + timescaledb | _timescaledb_internal | to_timestamp | unixtime_us bigint | timestamp with time zone + timescaledb | _timescaledb_internal | to_timestamp_without_timezone | unixtime_us bigint | timestamp without time zone + timescaledb | _timescaledb_internal | to_unix_microseconds | ts timestamp with time zone | bigint + timescaledb | _timescaledb_internal | tsl_loaded | | boolean + timescaledb | _timescaledb_internal | unfreeze_chunk | chunk regclass | boolean + timescaledb | public | add_compression_policy | hypertable regclass, compress_after "any", if_not_exists boolean, schedule_interval interval, initial_start timestamp with time zone, timezone text, compress_created_before interval | integer + timescaledb | public | add_continuous_aggregate_policy | continuous_aggregate regclass, start_offset "any", end_offset "any", schedule_interval interval, if_not_exists boolean, initial_start timestamp with time zone, timezone text | integer + timescaledb | public | add_dimension | hypertable regclass, column_name name, number_partitions integer, chunk_time_interval anyelement, partitioning_func regproc, if_not_exists boolean | TABLE(dimension_id integer, schema_name name, table_name name, column_name name, created boolean) + timescaledb | public | add_dimension | hypertable regclass, dimension _timescaledb_internal.dimension_info, if_not_exists boolean | TABLE(dimension_id integer, created boolean) + timescaledb | public | add_job | proc regproc, schedule_interval interval, config jsonb, initial_start timestamp with time zone, scheduled boolean, check_config regproc, fixed_schedule boolean, timezone text | integer + timescaledb | public | add_reorder_policy | hypertable regclass, index_name name, if_not_exists boolean, initial_start timestamp with time zone, timezone text | integer + timescaledb | public | add_retention_policy | relation regclass, drop_after "any", if_not_exists boolean, schedule_interval interval, initial_start timestamp with time zone, timezone text, drop_created_before interval | integer + timescaledb | public | alter_job | job_id integer, schedule_interval interval, max_runtime interval, max_retries integer, retry_period interval, scheduled boolean, config jsonb, next_start timestamp with time zone, if_exists boolean, check_config regproc, fixed_schedule boolean, initial_start timestamp with time zone, timezone text | TABLE(job_id integer, schedule_interval interval, max_runtime interval, max_retries integer, retry_period interval, scheduled boolean, config jsonb, next_start timestamp with time zone, check_config text, fixed_schedule boolean, initial_start timestamp with time zone, timezone text) + timescaledb | public | approximate_row_count | relation regclass | bigint + timescaledb | public | attach_tablespace | tablespace name, hypertable regclass, if_not_attached boolean | void + timescaledb | public | by_hash | column_name name, number_partitions integer, partition_func regproc | _timescaledb_internal.dimension_info + timescaledb | public | by_range | column_name name, partition_interval anyelement, partition_func regproc | _timescaledb_internal.dimension_info + timescaledb | public | cagg_migrate | IN cagg regclass, IN override boolean, IN drop_old boolean | + timescaledb | public | chunk_compression_stats | hypertable regclass | TABLE(chunk_schema name, chunk_name name, compression_status text, before_compression_table_bytes bigint, before_compression_index_bytes bigint, before_compression_toast_bytes bigint, before_compression_total_bytes bigint, after_compression_table_bytes bigint, after_compression_index_bytes bigint, after_compression_toast_bytes bigint, after_compression_total_bytes bigint, node_name name) + timescaledb | public | chunks_detailed_size | hypertable regclass | TABLE(chunk_schema name, chunk_name name, table_bytes bigint, index_bytes bigint, toast_bytes bigint, total_bytes bigint, node_name name) + timescaledb | public | compress_chunk | uncompressed_chunk regclass, if_not_compressed boolean, recompress boolean | regclass + timescaledb | public | create_hypertable | relation regclass, time_column_name name, partitioning_column name, number_partitions integer, associated_schema_name name, associated_table_prefix name, chunk_time_interval anyelement, create_default_indexes boolean, if_not_exists boolean, partitioning_func regproc, migrate_data boolean, chunk_target_size text, chunk_sizing_func regproc, time_partitioning_func regproc | TABLE(hypertable_id integer, schema_name name, table_name name, created boolean) + timescaledb | public | create_hypertable | relation regclass, dimension _timescaledb_internal.dimension_info, create_default_indexes boolean, if_not_exists boolean, migrate_data boolean | TABLE(hypertable_id integer, created boolean) + timescaledb | public | decompress_chunk | uncompressed_chunk regclass, if_compressed boolean | regclass + timescaledb | public | delete_job | job_id integer | void + timescaledb | public | detach_tablespace | tablespace name, hypertable regclass, if_attached boolean | integer + timescaledb | public | detach_tablespaces | hypertable regclass | integer + timescaledb | public | disable_chunk_skipping | hypertable regclass, column_name name, if_not_exists boolean | TABLE(hypertable_id integer, column_name name, disabled boolean) + timescaledb | public | drop_chunks | relation regclass, older_than "any", newer_than "any", "verbose" boolean, created_before "any", created_after "any" | SETOF text + timescaledb | public | enable_chunk_skipping | hypertable regclass, column_name name, if_not_exists boolean | TABLE(column_stats_id integer, enabled boolean) + timescaledb | public | first | anyelement, "any" | anyelement + timescaledb | public | get_telemetry_report | | jsonb + timescaledb | public | histogram | double precision, double precision, double precision, integer | integer[] + timescaledb | public | hypertable_approximate_detailed_size | relation regclass | TABLE(table_bytes bigint, index_bytes bigint, toast_bytes bigint, total_bytes bigint) + timescaledb | public | hypertable_approximate_size | hypertable regclass | bigint + timescaledb | public | hypertable_compression_stats | hypertable regclass | TABLE(total_chunks bigint, number_compressed_chunks bigint, before_compression_table_bytes bigint, before_compression_index_bytes bigint, before_compression_toast_bytes bigint, before_compression_total_bytes bigint, after_compression_table_bytes bigint, after_compression_index_bytes bigint, after_compression_toast_bytes bigint, after_compression_total_bytes bigint, node_name name) + timescaledb | public | hypertable_detailed_size | hypertable regclass | TABLE(table_bytes bigint, index_bytes bigint, toast_bytes bigint, total_bytes bigint, node_name name) + timescaledb | public | hypertable_index_size | index_name regclass | bigint + timescaledb | public | hypertable_size | hypertable regclass | bigint + timescaledb | public | interpolate | value double precision, prev record, next record | double precision + timescaledb | public | interpolate | value real, prev record, next record | real + timescaledb | public | interpolate | value bigint, prev record, next record | bigint + timescaledb | public | interpolate | value integer, prev record, next record | integer + timescaledb | public | interpolate | value smallint, prev record, next record | smallint + timescaledb | public | last | anyelement, "any" | anyelement + timescaledb | public | locf | value anyelement, prev anyelement, treat_null_as_missing boolean | anyelement + timescaledb | public | move_chunk | chunk regclass, destination_tablespace name, index_destination_tablespace name, reorder_index regclass, "verbose" boolean | void + timescaledb | public | recompress_chunk | IN chunk regclass, IN if_not_compressed boolean | + timescaledb | public | refresh_continuous_aggregate | IN continuous_aggregate regclass, IN window_start "any", IN window_end "any" | + timescaledb | public | remove_compression_policy | hypertable regclass, if_exists boolean | boolean + timescaledb | public | remove_continuous_aggregate_policy | continuous_aggregate regclass, if_not_exists boolean, if_exists boolean | void + timescaledb | public | remove_reorder_policy | hypertable regclass, if_exists boolean | void + timescaledb | public | remove_retention_policy | relation regclass, if_exists boolean | void + timescaledb | public | reorder_chunk | chunk regclass, index regclass, "verbose" boolean | void + timescaledb | public | run_job | IN job_id integer | + timescaledb | public | set_adaptive_chunking | hypertable regclass, chunk_target_size text, INOUT chunk_sizing_func regproc, OUT chunk_target_size bigint | record + timescaledb | public | set_chunk_time_interval | hypertable regclass, chunk_time_interval anyelement, dimension_name name | void + timescaledb | public | set_integer_now_func | hypertable regclass, integer_now_func regproc, replace_if_exists boolean | void + timescaledb | public | set_number_partitions | hypertable regclass, number_partitions integer, dimension_name name | void + timescaledb | public | set_partitioning_interval | hypertable regclass, partition_interval anyelement, dimension_name name | void + timescaledb | public | show_chunks | relation regclass, older_than "any", newer_than "any", created_before "any", created_after "any" | SETOF regclass + timescaledb | public | show_tablespaces | hypertable regclass | SETOF name + timescaledb | public | time_bucket | bucket_width bigint, ts bigint | bigint + timescaledb | public | time_bucket | bucket_width interval, ts timestamp with time zone, "offset" interval | timestamp with time zone + timescaledb | public | time_bucket | bucket_width interval, ts timestamp with time zone, origin timestamp with time zone | timestamp with time zone + timescaledb | public | time_bucket | bucket_width smallint, ts smallint, "offset" smallint | smallint + timescaledb | public | time_bucket | bucket_width interval, ts timestamp without time zone, "offset" interval | timestamp without time zone + timescaledb | public | time_bucket | bucket_width interval, ts timestamp without time zone | timestamp without time zone + timescaledb | public | time_bucket | bucket_width integer, ts integer | integer + timescaledb | public | time_bucket | bucket_width bigint, ts bigint, "offset" bigint | bigint + timescaledb | public | time_bucket | bucket_width smallint, ts smallint | smallint + timescaledb | public | time_bucket | bucket_width interval, ts date | date + timescaledb | public | time_bucket | bucket_width interval, ts timestamp with time zone, timezone text, origin timestamp with time zone, "offset" interval | timestamp with time zone + timescaledb | public | time_bucket | bucket_width interval, ts date, "offset" interval | date + timescaledb | public | time_bucket | bucket_width interval, ts timestamp without time zone, origin timestamp without time zone | timestamp without time zone + timescaledb | public | time_bucket | bucket_width integer, ts integer, "offset" integer | integer + timescaledb | public | time_bucket | bucket_width interval, ts timestamp with time zone | timestamp with time zone + timescaledb | public | time_bucket | bucket_width interval, ts date, origin date | date + timescaledb | public | time_bucket_gapfill | bucket_width interval, ts timestamp with time zone, timezone text, start timestamp with time zone, finish timestamp with time zone | timestamp with time zone + timescaledb | public | time_bucket_gapfill | bucket_width interval, ts date, start date, finish date | date + timescaledb | public | time_bucket_gapfill | bucket_width smallint, ts smallint, start smallint, finish smallint | smallint + timescaledb | public | time_bucket_gapfill | bucket_width interval, ts timestamp with time zone, start timestamp with time zone, finish timestamp with time zone | timestamp with time zone + timescaledb | public | time_bucket_gapfill | bucket_width bigint, ts bigint, start bigint, finish bigint | bigint + timescaledb | public | time_bucket_gapfill | bucket_width interval, ts timestamp without time zone, start timestamp without time zone, finish timestamp without time zone | timestamp without time zone + timescaledb | public | time_bucket_gapfill | bucket_width integer, ts integer, start integer, finish integer | integer + timescaledb | public | timescaledb_post_restore | | boolean + timescaledb | public | timescaledb_pre_restore | | boolean + timescaledb | timescaledb_experimental | add_policies | relation regclass, if_not_exists boolean, refresh_start_offset "any", refresh_end_offset "any", compress_after "any", drop_after "any" | boolean + timescaledb | timescaledb_experimental | alter_policies | relation regclass, if_exists boolean, refresh_start_offset "any", refresh_end_offset "any", compress_after "any", drop_after "any" | boolean + timescaledb | timescaledb_experimental | remove_all_policies | relation regclass, if_exists boolean | boolean + timescaledb | timescaledb_experimental | remove_policies | relation regclass, if_exists boolean, VARIADIC policy_names text[] | boolean + timescaledb | timescaledb_experimental | show_policies | relation regclass | SETOF jsonb + timescaledb | timescaledb_experimental | time_bucket_ng | bucket_width interval, ts timestamp with time zone, origin timestamp with time zone, timezone text | timestamp with time zone + timescaledb | timescaledb_experimental | time_bucket_ng | bucket_width interval, ts timestamp with time zone, origin timestamp with time zone | timestamp with time zone + timescaledb | timescaledb_experimental | time_bucket_ng | bucket_width interval, ts timestamp without time zone | timestamp without time zone + timescaledb | timescaledb_experimental | time_bucket_ng | bucket_width interval, ts timestamp with time zone, timezone text | timestamp with time zone + timescaledb | timescaledb_experimental | time_bucket_ng | bucket_width interval, ts date | date + timescaledb | timescaledb_experimental | time_bucket_ng | bucket_width interval, ts timestamp without time zone, origin timestamp without time zone | timestamp without time zone + timescaledb | timescaledb_experimental | time_bucket_ng | bucket_width interval, ts timestamp with time zone | timestamp with time zone + timescaledb | timescaledb_experimental | time_bucket_ng | bucket_width interval, ts date, origin date | date + tsm_system_rows | public | system_rows | internal | tsm_handler + unaccent | public | unaccent | text | text + unaccent | public | unaccent | regdictionary, text | text + unaccent | public | unaccent_init | internal | internal + unaccent | public | unaccent_lexize | internal, internal, internal, internal | internal + uuid-ossp | extensions | uuid_generate_v1 | | uuid + uuid-ossp | extensions | uuid_generate_v1mc | | uuid + uuid-ossp | extensions | uuid_generate_v3 | namespace uuid, name text | uuid + uuid-ossp | extensions | uuid_generate_v4 | | uuid + uuid-ossp | extensions | uuid_generate_v5 | namespace uuid, name text | uuid + uuid-ossp | extensions | uuid_nil | | uuid + uuid-ossp | extensions | uuid_ns_dns | | uuid + uuid-ossp | extensions | uuid_ns_oid | | uuid + uuid-ossp | extensions | uuid_ns_url | | uuid + uuid-ossp | extensions | uuid_ns_x500 | | uuid + vector | public | array_to_halfvec | real[], integer, boolean | halfvec + vector | public | array_to_halfvec | integer[], integer, boolean | halfvec + vector | public | array_to_halfvec | numeric[], integer, boolean | halfvec + vector | public | array_to_halfvec | double precision[], integer, boolean | halfvec + vector | public | array_to_sparsevec | real[], integer, boolean | sparsevec + vector | public | array_to_sparsevec | integer[], integer, boolean | sparsevec + vector | public | array_to_sparsevec | numeric[], integer, boolean | sparsevec + vector | public | array_to_sparsevec | double precision[], integer, boolean | sparsevec + vector | public | array_to_vector | real[], integer, boolean | vector + vector | public | array_to_vector | integer[], integer, boolean | vector + vector | public | array_to_vector | numeric[], integer, boolean | vector + vector | public | array_to_vector | double precision[], integer, boolean | vector + vector | public | avg | vector | vector + vector | public | avg | halfvec | halfvec + vector | public | binary_quantize | vector | bit + vector | public | binary_quantize | halfvec | bit + vector | public | cosine_distance | vector, vector | double precision + vector | public | cosine_distance | halfvec, halfvec | double precision + vector | public | cosine_distance | sparsevec, sparsevec | double precision + vector | public | halfvec | halfvec, integer, boolean | halfvec + vector | public | halfvec_accum | double precision[], halfvec | double precision[] + vector | public | halfvec_add | halfvec, halfvec | halfvec + vector | public | halfvec_avg | double precision[] | halfvec + vector | public | halfvec_cmp | halfvec, halfvec | integer + vector | public | halfvec_combine | double precision[], double precision[] | double precision[] + vector | public | halfvec_concat | halfvec, halfvec | halfvec + vector | public | halfvec_eq | halfvec, halfvec | boolean + vector | public | halfvec_ge | halfvec, halfvec | boolean + vector | public | halfvec_gt | halfvec, halfvec | boolean + vector | public | halfvec_in | cstring, oid, integer | halfvec + vector | public | halfvec_l2_squared_distance | halfvec, halfvec | double precision + vector | public | halfvec_le | halfvec, halfvec | boolean + vector | public | halfvec_lt | halfvec, halfvec | boolean + vector | public | halfvec_mul | halfvec, halfvec | halfvec + vector | public | halfvec_ne | halfvec, halfvec | boolean + vector | public | halfvec_negative_inner_product | halfvec, halfvec | double precision + vector | public | halfvec_out | halfvec | cstring + vector | public | halfvec_recv | internal, oid, integer | halfvec + vector | public | halfvec_send | halfvec | bytea + vector | public | halfvec_spherical_distance | halfvec, halfvec | double precision + vector | public | halfvec_sub | halfvec, halfvec | halfvec + vector | public | halfvec_to_float4 | halfvec, integer, boolean | real[] + vector | public | halfvec_to_sparsevec | halfvec, integer, boolean | sparsevec + vector | public | halfvec_to_vector | halfvec, integer, boolean | vector + vector | public | halfvec_typmod_in | cstring[] | integer + vector | public | hamming_distance | bit, bit | double precision + vector | public | hnsw_bit_support | internal | internal + vector | public | hnsw_halfvec_support | internal | internal + vector | public | hnsw_sparsevec_support | internal | internal + vector | public | hnswhandler | internal | index_am_handler + vector | public | inner_product | vector, vector | double precision + vector | public | inner_product | halfvec, halfvec | double precision + vector | public | inner_product | sparsevec, sparsevec | double precision + vector | public | ivfflat_bit_support | internal | internal + vector | public | ivfflat_halfvec_support | internal | internal + vector | public | ivfflathandler | internal | index_am_handler + vector | public | jaccard_distance | bit, bit | double precision + vector | public | l1_distance | vector, vector | double precision + vector | public | l1_distance | halfvec, halfvec | double precision + vector | public | l1_distance | sparsevec, sparsevec | double precision + vector | public | l2_distance | vector, vector | double precision + vector | public | l2_distance | halfvec, halfvec | double precision + vector | public | l2_distance | sparsevec, sparsevec | double precision + vector | public | l2_norm | halfvec | double precision + vector | public | l2_norm | sparsevec | double precision + vector | public | l2_normalize | vector | vector + vector | public | l2_normalize | halfvec | halfvec + vector | public | l2_normalize | sparsevec | sparsevec + vector | public | sparsevec | sparsevec, integer, boolean | sparsevec + vector | public | sparsevec_cmp | sparsevec, sparsevec | integer + vector | public | sparsevec_eq | sparsevec, sparsevec | boolean + vector | public | sparsevec_ge | sparsevec, sparsevec | boolean + vector | public | sparsevec_gt | sparsevec, sparsevec | boolean + vector | public | sparsevec_in | cstring, oid, integer | sparsevec + vector | public | sparsevec_l2_squared_distance | sparsevec, sparsevec | double precision + vector | public | sparsevec_le | sparsevec, sparsevec | boolean + vector | public | sparsevec_lt | sparsevec, sparsevec | boolean + vector | public | sparsevec_ne | sparsevec, sparsevec | boolean + vector | public | sparsevec_negative_inner_product | sparsevec, sparsevec | double precision + vector | public | sparsevec_out | sparsevec | cstring + vector | public | sparsevec_recv | internal, oid, integer | sparsevec + vector | public | sparsevec_send | sparsevec | bytea + vector | public | sparsevec_to_halfvec | sparsevec, integer, boolean | halfvec + vector | public | sparsevec_to_vector | sparsevec, integer, boolean | vector + vector | public | sparsevec_typmod_in | cstring[] | integer + vector | public | subvector | halfvec, integer, integer | halfvec + vector | public | subvector | vector, integer, integer | vector + vector | public | sum | vector | vector + vector | public | sum | halfvec | halfvec + vector | public | vector | vector, integer, boolean | vector + vector | public | vector_accum | double precision[], vector | double precision[] + vector | public | vector_add | vector, vector | vector + vector | public | vector_avg | double precision[] | vector + vector | public | vector_cmp | vector, vector | integer + vector | public | vector_combine | double precision[], double precision[] | double precision[] + vector | public | vector_concat | vector, vector | vector + vector | public | vector_dims | vector | integer + vector | public | vector_dims | halfvec | integer + vector | public | vector_eq | vector, vector | boolean + vector | public | vector_ge | vector, vector | boolean + vector | public | vector_gt | vector, vector | boolean + vector | public | vector_in | cstring, oid, integer | vector + vector | public | vector_l2_squared_distance | vector, vector | double precision + vector | public | vector_le | vector, vector | boolean + vector | public | vector_lt | vector, vector | boolean + vector | public | vector_mul | vector, vector | vector + vector | public | vector_ne | vector, vector | boolean + vector | public | vector_negative_inner_product | vector, vector | double precision + vector | public | vector_norm | vector | double precision + vector | public | vector_out | vector | cstring + vector | public | vector_recv | internal, oid, integer | vector + vector | public | vector_send | vector | bytea + vector | public | vector_spherical_distance | vector, vector | double precision + vector | public | vector_sub | vector, vector | vector + vector | public | vector_to_float4 | vector, integer, boolean | real[] + vector | public | vector_to_halfvec | vector, integer, boolean | halfvec + vector | public | vector_to_sparsevec | vector, integer, boolean | sparsevec + vector | public | vector_typmod_in | cstring[] | integer + wrappers | public | airtable_fdw_handler | | fdw_handler + wrappers | public | airtable_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | airtable_fdw_validator | options text[], catalog oid | void + wrappers | public | auth0_fdw_handler | | fdw_handler + wrappers | public | auth0_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | auth0_fdw_validator | options text[], catalog oid | void + wrappers | public | big_query_fdw_handler | | fdw_handler + wrappers | public | big_query_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | big_query_fdw_validator | options text[], catalog oid | void + wrappers | public | click_house_fdw_handler | | fdw_handler + wrappers | public | click_house_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | click_house_fdw_validator | options text[], catalog oid | void + wrappers | public | cognito_fdw_handler | | fdw_handler + wrappers | public | cognito_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | cognito_fdw_validator | options text[], catalog oid | void + wrappers | public | firebase_fdw_handler | | fdw_handler + wrappers | public | firebase_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | firebase_fdw_validator | options text[], catalog oid | void + wrappers | public | hello_world_fdw_handler | | fdw_handler + wrappers | public | hello_world_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | hello_world_fdw_validator | options text[], catalog oid | void + wrappers | public | logflare_fdw_handler | | fdw_handler + wrappers | public | logflare_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | logflare_fdw_validator | options text[], catalog oid | void + wrappers | public | mssql_fdw_handler | | fdw_handler + wrappers | public | mssql_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | mssql_fdw_validator | options text[], catalog oid | void + wrappers | public | redis_fdw_handler | | fdw_handler + wrappers | public | redis_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | redis_fdw_validator | options text[], catalog oid | void + wrappers | public | s3_fdw_handler | | fdw_handler + wrappers | public | s3_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | s3_fdw_validator | options text[], catalog oid | void + wrappers | public | stripe_fdw_handler | | fdw_handler + wrappers | public | stripe_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | stripe_fdw_validator | options text[], catalog oid | void + wrappers | public | wasm_fdw_handler | | fdw_handler + wrappers | public | wasm_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | wasm_fdw_validator | options text[], catalog oid | void + xml2 | public | xml_encode_special_chars | text | text + xml2 | public | xml_valid | text | boolean + xml2 | public | xpath_bool | text, text | boolean + xml2 | public | xpath_list | text, text | text + xml2 | public | xpath_list | text, text, text | text + xml2 | public | xpath_nodeset | text, text, text, text | text + xml2 | public | xpath_nodeset | text, text | text + xml2 | public | xpath_nodeset | text, text, text | text + xml2 | public | xpath_number | text, text | real + xml2 | public | xpath_string | text, text | text + xml2 | public | xpath_table | text, text, text, text, text | SETOF record + xml2 | public | xslt_process | text, text | text + xml2 | public | xslt_process | text, text, text | text +(5057 rows) + +/* + +Monitor extension public table/view/matview/index interface + +*/ +select + e.extname as extension_name, + n.nspname as schema_name, + pc.relname as entity_name, + pa.attname +from + pg_catalog.pg_class pc + join pg_catalog.pg_namespace n + on n.oid = pc.relnamespace + join pg_catalog.pg_depend d + on d.objid = pc.oid + join pg_catalog.pg_extension e + on e.oid = d.refobjid + left join pg_catalog.pg_attribute pa + on pa.attrelid = pc.oid + and pa.attnum > 0 + and not pa.attisdropped +where + d.deptype = 'e' + and pc.relkind in ('r', 'v', 'm', 'i') +order by + e.extname, + n.nspname, + pc.relname, + pa.attname; + extension_name | schema_name | entity_name | attname +------------------------------+--------------------------+--------------------------------------------------+----------------------------------- + address_standardizer_data_us | public | us_gaz | id + address_standardizer_data_us | public | us_gaz | is_custom + address_standardizer_data_us | public | us_gaz | seq + address_standardizer_data_us | public | us_gaz | stdword + address_standardizer_data_us | public | us_gaz | token + address_standardizer_data_us | public | us_gaz | word + address_standardizer_data_us | public | us_lex | id + address_standardizer_data_us | public | us_lex | is_custom + address_standardizer_data_us | public | us_lex | seq + address_standardizer_data_us | public | us_lex | stdword + address_standardizer_data_us | public | us_lex | token + address_standardizer_data_us | public | us_lex | word + address_standardizer_data_us | public | us_rules | id + address_standardizer_data_us | public | us_rules | is_custom + address_standardizer_data_us | public | us_rules | rule + hypopg | public | hypopg_hidden_indexes | am_name + hypopg | public | hypopg_hidden_indexes | index_name + hypopg | public | hypopg_hidden_indexes | indexrelid + hypopg | public | hypopg_hidden_indexes | is_hypo + hypopg | public | hypopg_hidden_indexes | schema_name + hypopg | public | hypopg_hidden_indexes | table_name + hypopg | public | hypopg_list_indexes | am_name + hypopg | public | hypopg_list_indexes | index_name + hypopg | public | hypopg_list_indexes | indexrelid + hypopg | public | hypopg_list_indexes | schema_name + hypopg | public | hypopg_list_indexes | table_name + pg_buffercache | public | pg_buffercache | bufferid + pg_buffercache | public | pg_buffercache | isdirty + pg_buffercache | public | pg_buffercache | pinning_backends + pg_buffercache | public | pg_buffercache | relblocknumber + pg_buffercache | public | pg_buffercache | reldatabase + pg_buffercache | public | pg_buffercache | relfilenode + pg_buffercache | public | pg_buffercache | relforknumber + pg_buffercache | public | pg_buffercache | reltablespace + pg_buffercache | public | pg_buffercache | usagecount + pg_net | net | _http_response | content + pg_net | net | _http_response | content_type + pg_net | net | _http_response | created + pg_net | net | _http_response | error_msg + pg_net | net | _http_response | headers + pg_net | net | _http_response | id + pg_net | net | _http_response | status_code + pg_net | net | _http_response | timed_out + pg_net | net | http_request_queue | body + pg_net | net | http_request_queue | headers + pg_net | net | http_request_queue | id + pg_net | net | http_request_queue | method + pg_net | net | http_request_queue | timeout_milliseconds + pg_net | net | http_request_queue | url + pg_repack | repack | primary_keys | indexrelid + pg_repack | repack | primary_keys | indrelid + pg_repack | repack | tables | alter_col_storage + pg_repack | repack | tables | ckey + pg_repack | repack | tables | ckid + pg_repack | repack | tables | copy_data + pg_repack | repack | tables | create_log + pg_repack | repack | tables | create_pktype + pg_repack | repack | tables | create_table + pg_repack | repack | tables | create_trigger + pg_repack | repack | tables | delete_log + pg_repack | repack | tables | drop_columns + pg_repack | repack | tables | enable_trigger + pg_repack | repack | tables | lock_table + pg_repack | repack | tables | pkid + pg_repack | repack | tables | relid + pg_repack | repack | tables | relname + pg_repack | repack | tables | reltoastidxid + pg_repack | repack | tables | reltoastrelid + pg_repack | repack | tables | schemaname + pg_repack | repack | tables | sql_delete + pg_repack | repack | tables | sql_insert + pg_repack | repack | tables | sql_peek + pg_repack | repack | tables | sql_pop + pg_repack | repack | tables | sql_update + pg_repack | repack | tables | tablespace_orig + pg_stat_monitor | public | pg_stat_monitor | application_name + pg_stat_monitor | public | pg_stat_monitor | blk_read_time + pg_stat_monitor | public | pg_stat_monitor | blk_write_time + pg_stat_monitor | public | pg_stat_monitor | bucket + pg_stat_monitor | public | pg_stat_monitor | bucket_done + pg_stat_monitor | public | pg_stat_monitor | bucket_start_time + pg_stat_monitor | public | pg_stat_monitor | calls + pg_stat_monitor | public | pg_stat_monitor | client_ip + pg_stat_monitor | public | pg_stat_monitor | cmd_type + pg_stat_monitor | public | pg_stat_monitor | cmd_type_text + pg_stat_monitor | public | pg_stat_monitor | comments + pg_stat_monitor | public | pg_stat_monitor | cpu_sys_time + pg_stat_monitor | public | pg_stat_monitor | cpu_user_time + pg_stat_monitor | public | pg_stat_monitor | datname + pg_stat_monitor | public | pg_stat_monitor | dbid + pg_stat_monitor | public | pg_stat_monitor | elevel + pg_stat_monitor | public | pg_stat_monitor | jit_emission_count + pg_stat_monitor | public | pg_stat_monitor | jit_emission_time + pg_stat_monitor | public | pg_stat_monitor | jit_functions + pg_stat_monitor | public | pg_stat_monitor | jit_generation_time + pg_stat_monitor | public | pg_stat_monitor | jit_inlining_count + pg_stat_monitor | public | pg_stat_monitor | jit_inlining_time + pg_stat_monitor | public | pg_stat_monitor | jit_optimization_count + pg_stat_monitor | public | pg_stat_monitor | jit_optimization_time + pg_stat_monitor | public | pg_stat_monitor | local_blks_dirtied + pg_stat_monitor | public | pg_stat_monitor | local_blks_hit + pg_stat_monitor | public | pg_stat_monitor | local_blks_read + pg_stat_monitor | public | pg_stat_monitor | local_blks_written + pg_stat_monitor | public | pg_stat_monitor | max_exec_time + pg_stat_monitor | public | pg_stat_monitor | max_plan_time + pg_stat_monitor | public | pg_stat_monitor | mean_exec_time + pg_stat_monitor | public | pg_stat_monitor | mean_plan_time + pg_stat_monitor | public | pg_stat_monitor | message + pg_stat_monitor | public | pg_stat_monitor | min_exec_time + pg_stat_monitor | public | pg_stat_monitor | min_plan_time + pg_stat_monitor | public | pg_stat_monitor | pgsm_query_id + pg_stat_monitor | public | pg_stat_monitor | planid + pg_stat_monitor | public | pg_stat_monitor | plans + pg_stat_monitor | public | pg_stat_monitor | query + pg_stat_monitor | public | pg_stat_monitor | query_plan + pg_stat_monitor | public | pg_stat_monitor | queryid + pg_stat_monitor | public | pg_stat_monitor | relations + pg_stat_monitor | public | pg_stat_monitor | resp_calls + pg_stat_monitor | public | pg_stat_monitor | rows + pg_stat_monitor | public | pg_stat_monitor | shared_blks_dirtied + pg_stat_monitor | public | pg_stat_monitor | shared_blks_hit + pg_stat_monitor | public | pg_stat_monitor | shared_blks_read + pg_stat_monitor | public | pg_stat_monitor | shared_blks_written + pg_stat_monitor | public | pg_stat_monitor | sqlcode + pg_stat_monitor | public | pg_stat_monitor | stddev_exec_time + pg_stat_monitor | public | pg_stat_monitor | stddev_plan_time + pg_stat_monitor | public | pg_stat_monitor | temp_blk_read_time + pg_stat_monitor | public | pg_stat_monitor | temp_blk_write_time + pg_stat_monitor | public | pg_stat_monitor | temp_blks_read + pg_stat_monitor | public | pg_stat_monitor | temp_blks_written + pg_stat_monitor | public | pg_stat_monitor | top_query + pg_stat_monitor | public | pg_stat_monitor | top_queryid + pg_stat_monitor | public | pg_stat_monitor | toplevel + pg_stat_monitor | public | pg_stat_monitor | total_exec_time + pg_stat_monitor | public | pg_stat_monitor | total_plan_time + pg_stat_monitor | public | pg_stat_monitor | userid + pg_stat_monitor | public | pg_stat_monitor | username + pg_stat_monitor | public | pg_stat_monitor | wal_bytes + pg_stat_monitor | public | pg_stat_monitor | wal_fpi + pg_stat_monitor | public | pg_stat_monitor | wal_records + pg_stat_statements | extensions | pg_stat_statements | blk_read_time + pg_stat_statements | extensions | pg_stat_statements | blk_write_time + pg_stat_statements | extensions | pg_stat_statements | calls + pg_stat_statements | extensions | pg_stat_statements | dbid + pg_stat_statements | extensions | pg_stat_statements | jit_emission_count + pg_stat_statements | extensions | pg_stat_statements | jit_emission_time + pg_stat_statements | extensions | pg_stat_statements | jit_functions + pg_stat_statements | extensions | pg_stat_statements | jit_generation_time + pg_stat_statements | extensions | pg_stat_statements | jit_inlining_count + pg_stat_statements | extensions | pg_stat_statements | jit_inlining_time + pg_stat_statements | extensions | pg_stat_statements | jit_optimization_count + pg_stat_statements | extensions | pg_stat_statements | jit_optimization_time + pg_stat_statements | extensions | pg_stat_statements | local_blks_dirtied + pg_stat_statements | extensions | pg_stat_statements | local_blks_hit + pg_stat_statements | extensions | pg_stat_statements | local_blks_read + pg_stat_statements | extensions | pg_stat_statements | local_blks_written + pg_stat_statements | extensions | pg_stat_statements | max_exec_time + pg_stat_statements | extensions | pg_stat_statements | max_plan_time + pg_stat_statements | extensions | pg_stat_statements | mean_exec_time + pg_stat_statements | extensions | pg_stat_statements | mean_plan_time + pg_stat_statements | extensions | pg_stat_statements | min_exec_time + pg_stat_statements | extensions | pg_stat_statements | min_plan_time + pg_stat_statements | extensions | pg_stat_statements | plans + pg_stat_statements | extensions | pg_stat_statements | query + pg_stat_statements | extensions | pg_stat_statements | queryid + pg_stat_statements | extensions | pg_stat_statements | rows + pg_stat_statements | extensions | pg_stat_statements | shared_blks_dirtied + pg_stat_statements | extensions | pg_stat_statements | shared_blks_hit + pg_stat_statements | extensions | pg_stat_statements | shared_blks_read + pg_stat_statements | extensions | pg_stat_statements | shared_blks_written + pg_stat_statements | extensions | pg_stat_statements | stddev_exec_time + pg_stat_statements | extensions | pg_stat_statements | stddev_plan_time + pg_stat_statements | extensions | pg_stat_statements | temp_blk_read_time + pg_stat_statements | extensions | pg_stat_statements | temp_blk_write_time + pg_stat_statements | extensions | pg_stat_statements | temp_blks_read + pg_stat_statements | extensions | pg_stat_statements | temp_blks_written + pg_stat_statements | extensions | pg_stat_statements | toplevel + pg_stat_statements | extensions | pg_stat_statements | total_exec_time + pg_stat_statements | extensions | pg_stat_statements | total_plan_time + pg_stat_statements | extensions | pg_stat_statements | userid + pg_stat_statements | extensions | pg_stat_statements | wal_bytes + pg_stat_statements | extensions | pg_stat_statements | wal_fpi + pg_stat_statements | extensions | pg_stat_statements | wal_records + pg_stat_statements | extensions | pg_stat_statements_info | dealloc + pg_stat_statements | extensions | pg_stat_statements_info | stats_reset + pg_tle | pgtle | feature_info | feature + pg_tle | pgtle | feature_info | obj_identity + pg_tle | pgtle | feature_info | proname + pg_tle | pgtle | feature_info | schema_name + pgmq | pgmq | a_foo | archived_at + pgmq | pgmq | a_foo | enqueued_at + pgmq | pgmq | a_foo | message + pgmq | pgmq | a_foo | msg_id + pgmq | pgmq | a_foo | read_ct + pgmq | pgmq | a_foo | vt + pgmq | pgmq | meta | created_at + pgmq | pgmq | meta | is_partitioned + pgmq | pgmq | meta | is_unlogged + pgmq | pgmq | meta | queue_name + pgmq | pgmq | q_foo | enqueued_at + pgmq | pgmq | q_foo | message + pgmq | pgmq | q_foo | msg_id + pgmq | pgmq | q_foo | read_ct + pgmq | pgmq | q_foo | vt + pgsodium | pgsodium | decrypted_key | associated_data + pgsodium | pgsodium | decrypted_key | comment + pgsodium | pgsodium | decrypted_key | created + pgsodium | pgsodium | decrypted_key | decrypted_raw_key + pgsodium | pgsodium | decrypted_key | expires + pgsodium | pgsodium | decrypted_key | id + pgsodium | pgsodium | decrypted_key | key_context + pgsodium | pgsodium | decrypted_key | key_id + pgsodium | pgsodium | decrypted_key | key_type + pgsodium | pgsodium | decrypted_key | name + pgsodium | pgsodium | decrypted_key | parent_key + pgsodium | pgsodium | decrypted_key | raw_key + pgsodium | pgsodium | decrypted_key | raw_key_nonce + pgsodium | pgsodium | decrypted_key | status + pgsodium | pgsodium | key | associated_data + pgsodium | pgsodium | key | comment + pgsodium | pgsodium | key | created + pgsodium | pgsodium | key | expires + pgsodium | pgsodium | key | id + pgsodium | pgsodium | key | key_context + pgsodium | pgsodium | key | key_id + pgsodium | pgsodium | key | key_type + pgsodium | pgsodium | key | name + pgsodium | pgsodium | key | parent_key + pgsodium | pgsodium | key | raw_key + pgsodium | pgsodium | key | raw_key_nonce + pgsodium | pgsodium | key | status + pgsodium | pgsodium | key | user_data + pgsodium | pgsodium | mask_columns | associated_columns + pgsodium | pgsodium | mask_columns | attname + pgsodium | pgsodium | mask_columns | attrelid + pgsodium | pgsodium | mask_columns | format_type + pgsodium | pgsodium | mask_columns | key_id + pgsodium | pgsodium | mask_columns | key_id_column + pgsodium | pgsodium | mask_columns | nonce_column + pgsodium | pgsodium | masking_rule | associated_columns + pgsodium | pgsodium | masking_rule | attname + pgsodium | pgsodium | masking_rule | attnum + pgsodium | pgsodium | masking_rule | attrelid + pgsodium | pgsodium | masking_rule | col_description + pgsodium | pgsodium | masking_rule | format_type + pgsodium | pgsodium | masking_rule | key_id + pgsodium | pgsodium | masking_rule | key_id_column + pgsodium | pgsodium | masking_rule | nonce_column + pgsodium | pgsodium | masking_rule | priority + pgsodium | pgsodium | masking_rule | relname + pgsodium | pgsodium | masking_rule | relnamespace + pgsodium | pgsodium | masking_rule | security_invoker + pgsodium | pgsodium | masking_rule | view_name + pgsodium | pgsodium | valid_key | associated_data + pgsodium | pgsodium | valid_key | created + pgsodium | pgsodium | valid_key | expires + pgsodium | pgsodium | valid_key | id + pgsodium | pgsodium | valid_key | key_context + pgsodium | pgsodium | valid_key | key_id + pgsodium | pgsodium | valid_key | key_type + pgsodium | pgsodium | valid_key | name + pgsodium | pgsodium | valid_key | status + pgtap | public | pg_all_foreign_keys | fk_columns + pgtap | public | pg_all_foreign_keys | fk_constraint_name + pgtap | public | pg_all_foreign_keys | fk_schema_name + pgtap | public | pg_all_foreign_keys | fk_table_name + pgtap | public | pg_all_foreign_keys | fk_table_oid + pgtap | public | pg_all_foreign_keys | is_deferrable + pgtap | public | pg_all_foreign_keys | is_deferred + pgtap | public | pg_all_foreign_keys | match_type + pgtap | public | pg_all_foreign_keys | on_delete + pgtap | public | pg_all_foreign_keys | on_update + pgtap | public | pg_all_foreign_keys | pk_columns + pgtap | public | pg_all_foreign_keys | pk_constraint_name + pgtap | public | pg_all_foreign_keys | pk_index_name + pgtap | public | pg_all_foreign_keys | pk_schema_name + pgtap | public | pg_all_foreign_keys | pk_table_name + pgtap | public | pg_all_foreign_keys | pk_table_oid + pgtap | public | tap_funky | args + pgtap | public | tap_funky | is_definer + pgtap | public | tap_funky | is_strict + pgtap | public | tap_funky | is_visible + pgtap | public | tap_funky | kind + pgtap | public | tap_funky | langoid + pgtap | public | tap_funky | name + pgtap | public | tap_funky | oid + pgtap | public | tap_funky | owner + pgtap | public | tap_funky | returns + pgtap | public | tap_funky | returns_set + pgtap | public | tap_funky | schema + pgtap | public | tap_funky | volatility + postgis | public | geography_columns | coord_dimension + postgis | public | geography_columns | f_geography_column + postgis | public | geography_columns | f_table_catalog + postgis | public | geography_columns | f_table_name + postgis | public | geography_columns | f_table_schema + postgis | public | geography_columns | srid + postgis | public | geography_columns | type + postgis | public | geometry_columns | coord_dimension + postgis | public | geometry_columns | f_geometry_column + postgis | public | geometry_columns | f_table_catalog + postgis | public | geometry_columns | f_table_name + postgis | public | geometry_columns | f_table_schema + postgis | public | geometry_columns | srid + postgis | public | geometry_columns | type + postgis | public | spatial_ref_sys | auth_name + postgis | public | spatial_ref_sys | auth_srid + postgis | public | spatial_ref_sys | proj4text + postgis | public | spatial_ref_sys | srid + postgis | public | spatial_ref_sys | srtext + postgis_raster | public | raster_columns | blocksize_x + postgis_raster | public | raster_columns | blocksize_y + postgis_raster | public | raster_columns | extent + postgis_raster | public | raster_columns | nodata_values + postgis_raster | public | raster_columns | num_bands + postgis_raster | public | raster_columns | out_db + postgis_raster | public | raster_columns | pixel_types + postgis_raster | public | raster_columns | r_raster_column + postgis_raster | public | raster_columns | r_table_catalog + postgis_raster | public | raster_columns | r_table_name + postgis_raster | public | raster_columns | r_table_schema + postgis_raster | public | raster_columns | regular_blocking + postgis_raster | public | raster_columns | same_alignment + postgis_raster | public | raster_columns | scale_x + postgis_raster | public | raster_columns | scale_y + postgis_raster | public | raster_columns | spatial_index + postgis_raster | public | raster_columns | srid + postgis_raster | public | raster_overviews | o_raster_column + postgis_raster | public | raster_overviews | o_table_catalog + postgis_raster | public | raster_overviews | o_table_name + postgis_raster | public | raster_overviews | o_table_schema + postgis_raster | public | raster_overviews | overview_factor + postgis_raster | public | raster_overviews | r_raster_column + postgis_raster | public | raster_overviews | r_table_catalog + postgis_raster | public | raster_overviews | r_table_name + postgis_raster | public | raster_overviews | r_table_schema + postgis_tiger_geocoder | tiger | addr | arid + postgis_tiger_geocoder | tiger | addr | fromarmid + postgis_tiger_geocoder | tiger | addr | fromhn + postgis_tiger_geocoder | tiger | addr | fromtyp + postgis_tiger_geocoder | tiger | addr | gid + postgis_tiger_geocoder | tiger | addr | mtfcc + postgis_tiger_geocoder | tiger | addr | plus4 + postgis_tiger_geocoder | tiger | addr | side + postgis_tiger_geocoder | tiger | addr | statefp + postgis_tiger_geocoder | tiger | addr | tlid + postgis_tiger_geocoder | tiger | addr | toarmid + postgis_tiger_geocoder | tiger | addr | tohn + postgis_tiger_geocoder | tiger | addr | totyp + postgis_tiger_geocoder | tiger | addr | zip + postgis_tiger_geocoder | tiger | addrfeat | aridl + postgis_tiger_geocoder | tiger | addrfeat | aridr + postgis_tiger_geocoder | tiger | addrfeat | edge_mtfcc + postgis_tiger_geocoder | tiger | addrfeat | fullname + postgis_tiger_geocoder | tiger | addrfeat | gid + postgis_tiger_geocoder | tiger | addrfeat | lfromhn + postgis_tiger_geocoder | tiger | addrfeat | lfromtyp + postgis_tiger_geocoder | tiger | addrfeat | linearid + postgis_tiger_geocoder | tiger | addrfeat | ltohn + postgis_tiger_geocoder | tiger | addrfeat | ltotyp + postgis_tiger_geocoder | tiger | addrfeat | offsetl + postgis_tiger_geocoder | tiger | addrfeat | offsetr + postgis_tiger_geocoder | tiger | addrfeat | parityl + postgis_tiger_geocoder | tiger | addrfeat | parityr + postgis_tiger_geocoder | tiger | addrfeat | plus4l + postgis_tiger_geocoder | tiger | addrfeat | plus4r + postgis_tiger_geocoder | tiger | addrfeat | rfromhn + postgis_tiger_geocoder | tiger | addrfeat | rfromtyp + postgis_tiger_geocoder | tiger | addrfeat | rtohn + postgis_tiger_geocoder | tiger | addrfeat | rtotyp + postgis_tiger_geocoder | tiger | addrfeat | statefp + postgis_tiger_geocoder | tiger | addrfeat | the_geom + postgis_tiger_geocoder | tiger | addrfeat | tlid + postgis_tiger_geocoder | tiger | addrfeat | zipl + postgis_tiger_geocoder | tiger | addrfeat | zipr + postgis_tiger_geocoder | tiger | bg | aland + postgis_tiger_geocoder | tiger | bg | awater + postgis_tiger_geocoder | tiger | bg | bg_id + postgis_tiger_geocoder | tiger | bg | blkgrpce + postgis_tiger_geocoder | tiger | bg | countyfp + postgis_tiger_geocoder | tiger | bg | funcstat + postgis_tiger_geocoder | tiger | bg | gid + postgis_tiger_geocoder | tiger | bg | intptlat + postgis_tiger_geocoder | tiger | bg | intptlon + postgis_tiger_geocoder | tiger | bg | mtfcc + postgis_tiger_geocoder | tiger | bg | namelsad + postgis_tiger_geocoder | tiger | bg | statefp + postgis_tiger_geocoder | tiger | bg | the_geom + postgis_tiger_geocoder | tiger | bg | tractce + postgis_tiger_geocoder | tiger | county | aland + postgis_tiger_geocoder | tiger | county | awater + postgis_tiger_geocoder | tiger | county | cbsafp + postgis_tiger_geocoder | tiger | county | classfp + postgis_tiger_geocoder | tiger | county | cntyidfp + postgis_tiger_geocoder | tiger | county | countyfp + postgis_tiger_geocoder | tiger | county | countyns + postgis_tiger_geocoder | tiger | county | csafp + postgis_tiger_geocoder | tiger | county | funcstat + postgis_tiger_geocoder | tiger | county | gid + postgis_tiger_geocoder | tiger | county | intptlat + postgis_tiger_geocoder | tiger | county | intptlon + postgis_tiger_geocoder | tiger | county | lsad + postgis_tiger_geocoder | tiger | county | metdivfp + postgis_tiger_geocoder | tiger | county | mtfcc + postgis_tiger_geocoder | tiger | county | name + postgis_tiger_geocoder | tiger | county | namelsad + postgis_tiger_geocoder | tiger | county | statefp + postgis_tiger_geocoder | tiger | county | the_geom + postgis_tiger_geocoder | tiger | county_lookup | co_code + postgis_tiger_geocoder | tiger | county_lookup | name + postgis_tiger_geocoder | tiger | county_lookup | st_code + postgis_tiger_geocoder | tiger | county_lookup | state + postgis_tiger_geocoder | tiger | countysub_lookup | co_code + postgis_tiger_geocoder | tiger | countysub_lookup | county + postgis_tiger_geocoder | tiger | countysub_lookup | cs_code + postgis_tiger_geocoder | tiger | countysub_lookup | name + postgis_tiger_geocoder | tiger | countysub_lookup | st_code + postgis_tiger_geocoder | tiger | countysub_lookup | state + postgis_tiger_geocoder | tiger | cousub | aland + postgis_tiger_geocoder | tiger | cousub | awater + postgis_tiger_geocoder | tiger | cousub | classfp + postgis_tiger_geocoder | tiger | cousub | cnectafp + postgis_tiger_geocoder | tiger | cousub | cosbidfp + postgis_tiger_geocoder | tiger | cousub | countyfp + postgis_tiger_geocoder | tiger | cousub | cousubfp + postgis_tiger_geocoder | tiger | cousub | cousubns + postgis_tiger_geocoder | tiger | cousub | funcstat + postgis_tiger_geocoder | tiger | cousub | gid + postgis_tiger_geocoder | tiger | cousub | intptlat + postgis_tiger_geocoder | tiger | cousub | intptlon + postgis_tiger_geocoder | tiger | cousub | lsad + postgis_tiger_geocoder | tiger | cousub | mtfcc + postgis_tiger_geocoder | tiger | cousub | name + postgis_tiger_geocoder | tiger | cousub | namelsad + postgis_tiger_geocoder | tiger | cousub | nctadvfp + postgis_tiger_geocoder | tiger | cousub | nectafp + postgis_tiger_geocoder | tiger | cousub | statefp + postgis_tiger_geocoder | tiger | cousub | the_geom + postgis_tiger_geocoder | tiger | direction_lookup | abbrev + postgis_tiger_geocoder | tiger | direction_lookup | name + postgis_tiger_geocoder | tiger | edges | artpath + postgis_tiger_geocoder | tiger | edges | countyfp + postgis_tiger_geocoder | tiger | edges | deckedroad + postgis_tiger_geocoder | tiger | edges | divroad + postgis_tiger_geocoder | tiger | edges | exttyp + postgis_tiger_geocoder | tiger | edges | featcat + postgis_tiger_geocoder | tiger | edges | fullname + postgis_tiger_geocoder | tiger | edges | gcseflg + postgis_tiger_geocoder | tiger | edges | gid + postgis_tiger_geocoder | tiger | edges | hydroflg + postgis_tiger_geocoder | tiger | edges | lfromadd + postgis_tiger_geocoder | tiger | edges | ltoadd + postgis_tiger_geocoder | tiger | edges | mtfcc + postgis_tiger_geocoder | tiger | edges | offsetl + postgis_tiger_geocoder | tiger | edges | offsetr + postgis_tiger_geocoder | tiger | edges | olfflg + postgis_tiger_geocoder | tiger | edges | passflg + postgis_tiger_geocoder | tiger | edges | persist + postgis_tiger_geocoder | tiger | edges | railflg + postgis_tiger_geocoder | tiger | edges | rfromadd + postgis_tiger_geocoder | tiger | edges | roadflg + postgis_tiger_geocoder | tiger | edges | rtoadd + postgis_tiger_geocoder | tiger | edges | smid + postgis_tiger_geocoder | tiger | edges | statefp + postgis_tiger_geocoder | tiger | edges | tfidl + postgis_tiger_geocoder | tiger | edges | tfidr + postgis_tiger_geocoder | tiger | edges | the_geom + postgis_tiger_geocoder | tiger | edges | tlid + postgis_tiger_geocoder | tiger | edges | tnidf + postgis_tiger_geocoder | tiger | edges | tnidt + postgis_tiger_geocoder | tiger | edges | ttyp + postgis_tiger_geocoder | tiger | edges | zipl + postgis_tiger_geocoder | tiger | edges | zipr + postgis_tiger_geocoder | tiger | faces | aiannhce + postgis_tiger_geocoder | tiger | faces | aiannhce00 + postgis_tiger_geocoder | tiger | faces | aiannhfp + postgis_tiger_geocoder | tiger | faces | aiannhfp00 + postgis_tiger_geocoder | tiger | faces | anrcfp + postgis_tiger_geocoder | tiger | faces | anrcfp00 + postgis_tiger_geocoder | tiger | faces | atotal + postgis_tiger_geocoder | tiger | faces | blkgrpce + postgis_tiger_geocoder | tiger | faces | blkgrpce00 + postgis_tiger_geocoder | tiger | faces | blkgrpce20 + postgis_tiger_geocoder | tiger | faces | blockce + postgis_tiger_geocoder | tiger | faces | blockce00 + postgis_tiger_geocoder | tiger | faces | blockce20 + postgis_tiger_geocoder | tiger | faces | cbsafp + postgis_tiger_geocoder | tiger | faces | cd108fp + postgis_tiger_geocoder | tiger | faces | cd111fp + postgis_tiger_geocoder | tiger | faces | cnectafp + postgis_tiger_geocoder | tiger | faces | comptyp + postgis_tiger_geocoder | tiger | faces | comptyp00 + postgis_tiger_geocoder | tiger | faces | conctyfp + postgis_tiger_geocoder | tiger | faces | conctyfp00 + postgis_tiger_geocoder | tiger | faces | countyfp + postgis_tiger_geocoder | tiger | faces | countyfp00 + postgis_tiger_geocoder | tiger | faces | countyfp20 + postgis_tiger_geocoder | tiger | faces | cousubfp + postgis_tiger_geocoder | tiger | faces | cousubfp00 + postgis_tiger_geocoder | tiger | faces | csafp + postgis_tiger_geocoder | tiger | faces | elsdlea + postgis_tiger_geocoder | tiger | faces | elsdlea00 + postgis_tiger_geocoder | tiger | faces | gid + postgis_tiger_geocoder | tiger | faces | intptlat + postgis_tiger_geocoder | tiger | faces | intptlon + postgis_tiger_geocoder | tiger | faces | lwflag + postgis_tiger_geocoder | tiger | faces | metdivfp + postgis_tiger_geocoder | tiger | faces | nctadvfp + postgis_tiger_geocoder | tiger | faces | nectafp + postgis_tiger_geocoder | tiger | faces | offset + postgis_tiger_geocoder | tiger | faces | placefp + postgis_tiger_geocoder | tiger | faces | placefp00 + postgis_tiger_geocoder | tiger | faces | puma5ce + postgis_tiger_geocoder | tiger | faces | puma5ce00 + postgis_tiger_geocoder | tiger | faces | scsdlea + postgis_tiger_geocoder | tiger | faces | scsdlea00 + postgis_tiger_geocoder | tiger | faces | sldlst + postgis_tiger_geocoder | tiger | faces | sldlst00 + postgis_tiger_geocoder | tiger | faces | sldust + postgis_tiger_geocoder | tiger | faces | sldust00 + postgis_tiger_geocoder | tiger | faces | statefp + postgis_tiger_geocoder | tiger | faces | statefp00 + postgis_tiger_geocoder | tiger | faces | statefp20 + postgis_tiger_geocoder | tiger | faces | submcdfp + postgis_tiger_geocoder | tiger | faces | submcdfp00 + postgis_tiger_geocoder | tiger | faces | tazce + postgis_tiger_geocoder | tiger | faces | tazce00 + postgis_tiger_geocoder | tiger | faces | tblkgpce + postgis_tiger_geocoder | tiger | faces | tfid + postgis_tiger_geocoder | tiger | faces | the_geom + postgis_tiger_geocoder | tiger | faces | tractce + postgis_tiger_geocoder | tiger | faces | tractce00 + postgis_tiger_geocoder | tiger | faces | tractce20 + postgis_tiger_geocoder | tiger | faces | trsubce + postgis_tiger_geocoder | tiger | faces | trsubce00 + postgis_tiger_geocoder | tiger | faces | trsubfp + postgis_tiger_geocoder | tiger | faces | trsubfp00 + postgis_tiger_geocoder | tiger | faces | ttractce + postgis_tiger_geocoder | tiger | faces | uace + postgis_tiger_geocoder | tiger | faces | uace00 + postgis_tiger_geocoder | tiger | faces | ugace + postgis_tiger_geocoder | tiger | faces | ugace00 + postgis_tiger_geocoder | tiger | faces | unsdlea + postgis_tiger_geocoder | tiger | faces | unsdlea00 + postgis_tiger_geocoder | tiger | faces | vtdst + postgis_tiger_geocoder | tiger | faces | vtdst00 + postgis_tiger_geocoder | tiger | faces | zcta5ce + postgis_tiger_geocoder | tiger | faces | zcta5ce00 + postgis_tiger_geocoder | tiger | featnames | fullname + postgis_tiger_geocoder | tiger | featnames | gid + postgis_tiger_geocoder | tiger | featnames | linearid + postgis_tiger_geocoder | tiger | featnames | mtfcc + postgis_tiger_geocoder | tiger | featnames | name + postgis_tiger_geocoder | tiger | featnames | paflag + postgis_tiger_geocoder | tiger | featnames | predir + postgis_tiger_geocoder | tiger | featnames | predirabrv + postgis_tiger_geocoder | tiger | featnames | prequal + postgis_tiger_geocoder | tiger | featnames | prequalabr + postgis_tiger_geocoder | tiger | featnames | pretyp + postgis_tiger_geocoder | tiger | featnames | pretypabrv + postgis_tiger_geocoder | tiger | featnames | statefp + postgis_tiger_geocoder | tiger | featnames | sufdir + postgis_tiger_geocoder | tiger | featnames | sufdirabrv + postgis_tiger_geocoder | tiger | featnames | sufqual + postgis_tiger_geocoder | tiger | featnames | sufqualabr + postgis_tiger_geocoder | tiger | featnames | suftyp + postgis_tiger_geocoder | tiger | featnames | suftypabrv + postgis_tiger_geocoder | tiger | featnames | tlid + postgis_tiger_geocoder | tiger | geocode_settings | category + postgis_tiger_geocoder | tiger | geocode_settings | name + postgis_tiger_geocoder | tiger | geocode_settings | setting + postgis_tiger_geocoder | tiger | geocode_settings | short_desc + postgis_tiger_geocoder | tiger | geocode_settings | unit + postgis_tiger_geocoder | tiger | geocode_settings_default | category + postgis_tiger_geocoder | tiger | geocode_settings_default | name + postgis_tiger_geocoder | tiger | geocode_settings_default | setting + postgis_tiger_geocoder | tiger | geocode_settings_default | short_desc + postgis_tiger_geocoder | tiger | geocode_settings_default | unit + postgis_tiger_geocoder | tiger | loader_lookuptables | columns_exclude + postgis_tiger_geocoder | tiger | loader_lookuptables | insert_mode + postgis_tiger_geocoder | tiger | loader_lookuptables | level_county + postgis_tiger_geocoder | tiger | loader_lookuptables | level_nation + postgis_tiger_geocoder | tiger | loader_lookuptables | level_state + postgis_tiger_geocoder | tiger | loader_lookuptables | load + postgis_tiger_geocoder | tiger | loader_lookuptables | lookup_name + postgis_tiger_geocoder | tiger | loader_lookuptables | post_load_process + postgis_tiger_geocoder | tiger | loader_lookuptables | pre_load_process + postgis_tiger_geocoder | tiger | loader_lookuptables | process_order + postgis_tiger_geocoder | tiger | loader_lookuptables | single_geom_mode + postgis_tiger_geocoder | tiger | loader_lookuptables | single_mode + postgis_tiger_geocoder | tiger | loader_lookuptables | table_name + postgis_tiger_geocoder | tiger | loader_lookuptables | website_root_override + postgis_tiger_geocoder | tiger | loader_platform | county_process_command + postgis_tiger_geocoder | tiger | loader_platform | declare_sect + postgis_tiger_geocoder | tiger | loader_platform | environ_set_command + postgis_tiger_geocoder | tiger | loader_platform | loader + postgis_tiger_geocoder | tiger | loader_platform | os + postgis_tiger_geocoder | tiger | loader_platform | path_sep + postgis_tiger_geocoder | tiger | loader_platform | pgbin + postgis_tiger_geocoder | tiger | loader_platform | psql + postgis_tiger_geocoder | tiger | loader_platform | unzip_command + postgis_tiger_geocoder | tiger | loader_platform | wget + postgis_tiger_geocoder | tiger | loader_variables | data_schema + postgis_tiger_geocoder | tiger | loader_variables | staging_fold + postgis_tiger_geocoder | tiger | loader_variables | staging_schema + postgis_tiger_geocoder | tiger | loader_variables | tiger_year + postgis_tiger_geocoder | tiger | loader_variables | website_root + postgis_tiger_geocoder | tiger | pagc_gaz | id + postgis_tiger_geocoder | tiger | pagc_gaz | is_custom + postgis_tiger_geocoder | tiger | pagc_gaz | seq + postgis_tiger_geocoder | tiger | pagc_gaz | stdword + postgis_tiger_geocoder | tiger | pagc_gaz | token + postgis_tiger_geocoder | tiger | pagc_gaz | word + postgis_tiger_geocoder | tiger | pagc_lex | id + postgis_tiger_geocoder | tiger | pagc_lex | is_custom + postgis_tiger_geocoder | tiger | pagc_lex | seq + postgis_tiger_geocoder | tiger | pagc_lex | stdword + postgis_tiger_geocoder | tiger | pagc_lex | token + postgis_tiger_geocoder | tiger | pagc_lex | word + postgis_tiger_geocoder | tiger | pagc_rules | id + postgis_tiger_geocoder | tiger | pagc_rules | is_custom + postgis_tiger_geocoder | tiger | pagc_rules | rule + postgis_tiger_geocoder | tiger | place | aland + postgis_tiger_geocoder | tiger | place | awater + postgis_tiger_geocoder | tiger | place | classfp + postgis_tiger_geocoder | tiger | place | cpi + postgis_tiger_geocoder | tiger | place | funcstat + postgis_tiger_geocoder | tiger | place | gid + postgis_tiger_geocoder | tiger | place | intptlat + postgis_tiger_geocoder | tiger | place | intptlon + postgis_tiger_geocoder | tiger | place | lsad + postgis_tiger_geocoder | tiger | place | mtfcc + postgis_tiger_geocoder | tiger | place | name + postgis_tiger_geocoder | tiger | place | namelsad + postgis_tiger_geocoder | tiger | place | pcicbsa + postgis_tiger_geocoder | tiger | place | pcinecta + postgis_tiger_geocoder | tiger | place | placefp + postgis_tiger_geocoder | tiger | place | placens + postgis_tiger_geocoder | tiger | place | plcidfp + postgis_tiger_geocoder | tiger | place | statefp + postgis_tiger_geocoder | tiger | place | the_geom + postgis_tiger_geocoder | tiger | place_lookup | name + postgis_tiger_geocoder | tiger | place_lookup | pl_code + postgis_tiger_geocoder | tiger | place_lookup | st_code + postgis_tiger_geocoder | tiger | place_lookup | state + postgis_tiger_geocoder | tiger | secondary_unit_lookup | abbrev + postgis_tiger_geocoder | tiger | secondary_unit_lookup | name + postgis_tiger_geocoder | tiger | state | aland + postgis_tiger_geocoder | tiger | state | awater + postgis_tiger_geocoder | tiger | state | division + postgis_tiger_geocoder | tiger | state | funcstat + postgis_tiger_geocoder | tiger | state | gid + postgis_tiger_geocoder | tiger | state | intptlat + postgis_tiger_geocoder | tiger | state | intptlon + postgis_tiger_geocoder | tiger | state | lsad + postgis_tiger_geocoder | tiger | state | mtfcc + postgis_tiger_geocoder | tiger | state | name + postgis_tiger_geocoder | tiger | state | region + postgis_tiger_geocoder | tiger | state | statefp + postgis_tiger_geocoder | tiger | state | statens + postgis_tiger_geocoder | tiger | state | stusps + postgis_tiger_geocoder | tiger | state | the_geom + postgis_tiger_geocoder | tiger | state_lookup | abbrev + postgis_tiger_geocoder | tiger | state_lookup | name + postgis_tiger_geocoder | tiger | state_lookup | st_code + postgis_tiger_geocoder | tiger | state_lookup | statefp + postgis_tiger_geocoder | tiger | street_type_lookup | abbrev + postgis_tiger_geocoder | tiger | street_type_lookup | is_hw + postgis_tiger_geocoder | tiger | street_type_lookup | name + postgis_tiger_geocoder | tiger | tabblock | aland + postgis_tiger_geocoder | tiger | tabblock | awater + postgis_tiger_geocoder | tiger | tabblock | blockce + postgis_tiger_geocoder | tiger | tabblock | countyfp + postgis_tiger_geocoder | tiger | tabblock | funcstat + postgis_tiger_geocoder | tiger | tabblock | gid + postgis_tiger_geocoder | tiger | tabblock | intptlat + postgis_tiger_geocoder | tiger | tabblock | intptlon + postgis_tiger_geocoder | tiger | tabblock | mtfcc + postgis_tiger_geocoder | tiger | tabblock | name + postgis_tiger_geocoder | tiger | tabblock | statefp + postgis_tiger_geocoder | tiger | tabblock | tabblock_id + postgis_tiger_geocoder | tiger | tabblock | the_geom + postgis_tiger_geocoder | tiger | tabblock | tractce + postgis_tiger_geocoder | tiger | tabblock | uace + postgis_tiger_geocoder | tiger | tabblock | ur + postgis_tiger_geocoder | tiger | tabblock20 | aland + postgis_tiger_geocoder | tiger | tabblock20 | awater + postgis_tiger_geocoder | tiger | tabblock20 | blockce + postgis_tiger_geocoder | tiger | tabblock20 | countyfp + postgis_tiger_geocoder | tiger | tabblock20 | funcstat + postgis_tiger_geocoder | tiger | tabblock20 | geoid + postgis_tiger_geocoder | tiger | tabblock20 | housing + postgis_tiger_geocoder | tiger | tabblock20 | intptlat + postgis_tiger_geocoder | tiger | tabblock20 | intptlon + postgis_tiger_geocoder | tiger | tabblock20 | mtfcc + postgis_tiger_geocoder | tiger | tabblock20 | name + postgis_tiger_geocoder | tiger | tabblock20 | pop + postgis_tiger_geocoder | tiger | tabblock20 | statefp + postgis_tiger_geocoder | tiger | tabblock20 | the_geom + postgis_tiger_geocoder | tiger | tabblock20 | tractce + postgis_tiger_geocoder | tiger | tabblock20 | uace + postgis_tiger_geocoder | tiger | tabblock20 | uatype + postgis_tiger_geocoder | tiger | tabblock20 | ur + postgis_tiger_geocoder | tiger | tract | aland + postgis_tiger_geocoder | tiger | tract | awater + postgis_tiger_geocoder | tiger | tract | countyfp + postgis_tiger_geocoder | tiger | tract | funcstat + postgis_tiger_geocoder | tiger | tract | gid + postgis_tiger_geocoder | tiger | tract | intptlat + postgis_tiger_geocoder | tiger | tract | intptlon + postgis_tiger_geocoder | tiger | tract | mtfcc + postgis_tiger_geocoder | tiger | tract | name + postgis_tiger_geocoder | tiger | tract | namelsad + postgis_tiger_geocoder | tiger | tract | statefp + postgis_tiger_geocoder | tiger | tract | the_geom + postgis_tiger_geocoder | tiger | tract | tract_id + postgis_tiger_geocoder | tiger | tract | tractce + postgis_tiger_geocoder | tiger | zcta5 | aland + postgis_tiger_geocoder | tiger | zcta5 | awater + postgis_tiger_geocoder | tiger | zcta5 | classfp + postgis_tiger_geocoder | tiger | zcta5 | funcstat + postgis_tiger_geocoder | tiger | zcta5 | gid + postgis_tiger_geocoder | tiger | zcta5 | intptlat + postgis_tiger_geocoder | tiger | zcta5 | intptlon + postgis_tiger_geocoder | tiger | zcta5 | mtfcc + postgis_tiger_geocoder | tiger | zcta5 | partflg + postgis_tiger_geocoder | tiger | zcta5 | statefp + postgis_tiger_geocoder | tiger | zcta5 | the_geom + postgis_tiger_geocoder | tiger | zcta5 | zcta5ce + postgis_tiger_geocoder | tiger | zip_lookup | cnt + postgis_tiger_geocoder | tiger | zip_lookup | co_code + postgis_tiger_geocoder | tiger | zip_lookup | county + postgis_tiger_geocoder | tiger | zip_lookup | cousub + postgis_tiger_geocoder | tiger | zip_lookup | cs_code + postgis_tiger_geocoder | tiger | zip_lookup | pl_code + postgis_tiger_geocoder | tiger | zip_lookup | place + postgis_tiger_geocoder | tiger | zip_lookup | st_code + postgis_tiger_geocoder | tiger | zip_lookup | state + postgis_tiger_geocoder | tiger | zip_lookup | zip + postgis_tiger_geocoder | tiger | zip_lookup_all | cnt + postgis_tiger_geocoder | tiger | zip_lookup_all | co_code + postgis_tiger_geocoder | tiger | zip_lookup_all | county + postgis_tiger_geocoder | tiger | zip_lookup_all | cousub + postgis_tiger_geocoder | tiger | zip_lookup_all | cs_code + postgis_tiger_geocoder | tiger | zip_lookup_all | pl_code + postgis_tiger_geocoder | tiger | zip_lookup_all | place + postgis_tiger_geocoder | tiger | zip_lookup_all | st_code + postgis_tiger_geocoder | tiger | zip_lookup_all | state + postgis_tiger_geocoder | tiger | zip_lookup_all | zip + postgis_tiger_geocoder | tiger | zip_lookup_base | city + postgis_tiger_geocoder | tiger | zip_lookup_base | county + postgis_tiger_geocoder | tiger | zip_lookup_base | state + postgis_tiger_geocoder | tiger | zip_lookup_base | statefp + postgis_tiger_geocoder | tiger | zip_lookup_base | zip + postgis_tiger_geocoder | tiger | zip_state | statefp + postgis_tiger_geocoder | tiger | zip_state | stusps + postgis_tiger_geocoder | tiger | zip_state | zip + postgis_tiger_geocoder | tiger | zip_state_loc | place + postgis_tiger_geocoder | tiger | zip_state_loc | statefp + postgis_tiger_geocoder | tiger | zip_state_loc | stusps + postgis_tiger_geocoder | tiger | zip_state_loc | zip + postgis_topology | topology | layer | child_id + postgis_topology | topology | layer | feature_column + postgis_topology | topology | layer | feature_type + postgis_topology | topology | layer | layer_id + postgis_topology | topology | layer | level + postgis_topology | topology | layer | schema_name + postgis_topology | topology | layer | table_name + postgis_topology | topology | layer | topology_id + postgis_topology | topology | topology | hasz + postgis_topology | topology | topology | id + postgis_topology | topology | topology | name + postgis_topology | topology | topology | precision + postgis_topology | topology | topology | srid + supabase_vault | vault | decrypted_secrets | created_at + supabase_vault | vault | decrypted_secrets | decrypted_secret + supabase_vault | vault | decrypted_secrets | description + supabase_vault | vault | decrypted_secrets | id + supabase_vault | vault | decrypted_secrets | key_id + supabase_vault | vault | decrypted_secrets | name + supabase_vault | vault | decrypted_secrets | nonce + supabase_vault | vault | decrypted_secrets | secret + supabase_vault | vault | decrypted_secrets | updated_at + supabase_vault | vault | secrets | created_at + supabase_vault | vault | secrets | description + supabase_vault | vault | secrets | id + supabase_vault | vault | secrets | key_id + supabase_vault | vault | secrets | name + supabase_vault | vault | secrets | nonce + supabase_vault | vault | secrets | secret + supabase_vault | vault | secrets | updated_at + timescaledb | _timescaledb_cache | cache_inval_bgw_job | + timescaledb | _timescaledb_cache | cache_inval_extension | + timescaledb | _timescaledb_cache | cache_inval_hypertable | + timescaledb | _timescaledb_catalog | chunk | compressed_chunk_id + timescaledb | _timescaledb_catalog | chunk | creation_time + timescaledb | _timescaledb_catalog | chunk | dropped + timescaledb | _timescaledb_catalog | chunk | hypertable_id + timescaledb | _timescaledb_catalog | chunk | id + timescaledb | _timescaledb_catalog | chunk | osm_chunk + timescaledb | _timescaledb_catalog | chunk | schema_name + timescaledb | _timescaledb_catalog | chunk | status + timescaledb | _timescaledb_catalog | chunk | table_name + timescaledb | _timescaledb_catalog | chunk_column_stats | chunk_id + timescaledb | _timescaledb_catalog | chunk_column_stats | column_name + timescaledb | _timescaledb_catalog | chunk_column_stats | hypertable_id + timescaledb | _timescaledb_catalog | chunk_column_stats | id + timescaledb | _timescaledb_catalog | chunk_column_stats | range_end + timescaledb | _timescaledb_catalog | chunk_column_stats | range_start + timescaledb | _timescaledb_catalog | chunk_column_stats | valid + timescaledb | _timescaledb_catalog | chunk_constraint | chunk_id + timescaledb | _timescaledb_catalog | chunk_constraint | constraint_name + timescaledb | _timescaledb_catalog | chunk_constraint | dimension_slice_id + timescaledb | _timescaledb_catalog | chunk_constraint | hypertable_constraint_name + timescaledb | _timescaledb_catalog | chunk_index | chunk_id + timescaledb | _timescaledb_catalog | chunk_index | hypertable_id + timescaledb | _timescaledb_catalog | chunk_index | hypertable_index_name + timescaledb | _timescaledb_catalog | chunk_index | index_name + timescaledb | _timescaledb_catalog | compression_algorithm | description + timescaledb | _timescaledb_catalog | compression_algorithm | id + timescaledb | _timescaledb_catalog | compression_algorithm | name + timescaledb | _timescaledb_catalog | compression_algorithm | version + timescaledb | _timescaledb_catalog | compression_chunk_size | chunk_id + timescaledb | _timescaledb_catalog | compression_chunk_size | compressed_chunk_id + timescaledb | _timescaledb_catalog | compression_chunk_size | compressed_heap_size + timescaledb | _timescaledb_catalog | compression_chunk_size | compressed_index_size + timescaledb | _timescaledb_catalog | compression_chunk_size | compressed_toast_size + timescaledb | _timescaledb_catalog | compression_chunk_size | numrows_frozen_immediately + timescaledb | _timescaledb_catalog | compression_chunk_size | numrows_post_compression + timescaledb | _timescaledb_catalog | compression_chunk_size | numrows_pre_compression + timescaledb | _timescaledb_catalog | compression_chunk_size | uncompressed_heap_size + timescaledb | _timescaledb_catalog | compression_chunk_size | uncompressed_index_size + timescaledb | _timescaledb_catalog | compression_chunk_size | uncompressed_toast_size + timescaledb | _timescaledb_catalog | compression_settings | orderby + timescaledb | _timescaledb_catalog | compression_settings | orderby_desc + timescaledb | _timescaledb_catalog | compression_settings | orderby_nullsfirst + timescaledb | _timescaledb_catalog | compression_settings | relid + timescaledb | _timescaledb_catalog | compression_settings | segmentby + timescaledb | _timescaledb_catalog | continuous_agg | direct_view_name + timescaledb | _timescaledb_catalog | continuous_agg | direct_view_schema + timescaledb | _timescaledb_catalog | continuous_agg | finalized + timescaledb | _timescaledb_catalog | continuous_agg | mat_hypertable_id + timescaledb | _timescaledb_catalog | continuous_agg | materialized_only + timescaledb | _timescaledb_catalog | continuous_agg | parent_mat_hypertable_id + timescaledb | _timescaledb_catalog | continuous_agg | partial_view_name + timescaledb | _timescaledb_catalog | continuous_agg | partial_view_schema + timescaledb | _timescaledb_catalog | continuous_agg | raw_hypertable_id + timescaledb | _timescaledb_catalog | continuous_agg | user_view_name + timescaledb | _timescaledb_catalog | continuous_agg | user_view_schema + timescaledb | _timescaledb_catalog | continuous_agg_migrate_plan | end_ts + timescaledb | _timescaledb_catalog | continuous_agg_migrate_plan | mat_hypertable_id + timescaledb | _timescaledb_catalog | continuous_agg_migrate_plan | start_ts + timescaledb | _timescaledb_catalog | continuous_agg_migrate_plan | user_view_definition + timescaledb | _timescaledb_catalog | continuous_agg_migrate_plan_step | config + timescaledb | _timescaledb_catalog | continuous_agg_migrate_plan_step | end_ts + timescaledb | _timescaledb_catalog | continuous_agg_migrate_plan_step | mat_hypertable_id + timescaledb | _timescaledb_catalog | continuous_agg_migrate_plan_step | start_ts + timescaledb | _timescaledb_catalog | continuous_agg_migrate_plan_step | status + timescaledb | _timescaledb_catalog | continuous_agg_migrate_plan_step | step_id + timescaledb | _timescaledb_catalog | continuous_agg_migrate_plan_step | type + timescaledb | _timescaledb_catalog | continuous_aggs_bucket_function | bucket_fixed_width + timescaledb | _timescaledb_catalog | continuous_aggs_bucket_function | bucket_func + timescaledb | _timescaledb_catalog | continuous_aggs_bucket_function | bucket_offset + timescaledb | _timescaledb_catalog | continuous_aggs_bucket_function | bucket_origin + timescaledb | _timescaledb_catalog | continuous_aggs_bucket_function | bucket_timezone + timescaledb | _timescaledb_catalog | continuous_aggs_bucket_function | bucket_width + timescaledb | _timescaledb_catalog | continuous_aggs_bucket_function | mat_hypertable_id + timescaledb | _timescaledb_catalog | continuous_aggs_hypertable_invalidation_log | greatest_modified_value + timescaledb | _timescaledb_catalog | continuous_aggs_hypertable_invalidation_log | hypertable_id + timescaledb | _timescaledb_catalog | continuous_aggs_hypertable_invalidation_log | lowest_modified_value + timescaledb | _timescaledb_catalog | continuous_aggs_invalidation_threshold | hypertable_id + timescaledb | _timescaledb_catalog | continuous_aggs_invalidation_threshold | watermark + timescaledb | _timescaledb_catalog | continuous_aggs_materialization_invalidation_log | greatest_modified_value + timescaledb | _timescaledb_catalog | continuous_aggs_materialization_invalidation_log | lowest_modified_value + timescaledb | _timescaledb_catalog | continuous_aggs_materialization_invalidation_log | materialization_id + timescaledb | _timescaledb_catalog | continuous_aggs_watermark | mat_hypertable_id + timescaledb | _timescaledb_catalog | continuous_aggs_watermark | watermark + timescaledb | _timescaledb_catalog | dimension | aligned + timescaledb | _timescaledb_catalog | dimension | column_name + timescaledb | _timescaledb_catalog | dimension | column_type + timescaledb | _timescaledb_catalog | dimension | compress_interval_length + timescaledb | _timescaledb_catalog | dimension | hypertable_id + timescaledb | _timescaledb_catalog | dimension | id + timescaledb | _timescaledb_catalog | dimension | integer_now_func + timescaledb | _timescaledb_catalog | dimension | integer_now_func_schema + timescaledb | _timescaledb_catalog | dimension | interval_length + timescaledb | _timescaledb_catalog | dimension | num_slices + timescaledb | _timescaledb_catalog | dimension | partitioning_func + timescaledb | _timescaledb_catalog | dimension | partitioning_func_schema + timescaledb | _timescaledb_catalog | dimension_slice | dimension_id + timescaledb | _timescaledb_catalog | dimension_slice | id + timescaledb | _timescaledb_catalog | dimension_slice | range_end + timescaledb | _timescaledb_catalog | dimension_slice | range_start + timescaledb | _timescaledb_catalog | hypertable | associated_schema_name + timescaledb | _timescaledb_catalog | hypertable | associated_table_prefix + timescaledb | _timescaledb_catalog | hypertable | chunk_sizing_func_name + timescaledb | _timescaledb_catalog | hypertable | chunk_sizing_func_schema + timescaledb | _timescaledb_catalog | hypertable | chunk_target_size + timescaledb | _timescaledb_catalog | hypertable | compressed_hypertable_id + timescaledb | _timescaledb_catalog | hypertable | compression_state + timescaledb | _timescaledb_catalog | hypertable | id + timescaledb | _timescaledb_catalog | hypertable | num_dimensions + timescaledb | _timescaledb_catalog | hypertable | schema_name + timescaledb | _timescaledb_catalog | hypertable | status + timescaledb | _timescaledb_catalog | hypertable | table_name + timescaledb | _timescaledb_catalog | metadata | include_in_telemetry + timescaledb | _timescaledb_catalog | metadata | key + timescaledb | _timescaledb_catalog | metadata | value + timescaledb | _timescaledb_catalog | tablespace | hypertable_id + timescaledb | _timescaledb_catalog | tablespace | id + timescaledb | _timescaledb_catalog | tablespace | tablespace_name + timescaledb | _timescaledb_catalog | telemetry_event | body + timescaledb | _timescaledb_catalog | telemetry_event | created + timescaledb | _timescaledb_catalog | telemetry_event | tag + timescaledb | _timescaledb_config | bgw_job | application_name + timescaledb | _timescaledb_config | bgw_job | check_name + timescaledb | _timescaledb_config | bgw_job | check_schema + timescaledb | _timescaledb_config | bgw_job | config + timescaledb | _timescaledb_config | bgw_job | fixed_schedule + timescaledb | _timescaledb_config | bgw_job | hypertable_id + timescaledb | _timescaledb_config | bgw_job | id + timescaledb | _timescaledb_config | bgw_job | initial_start + timescaledb | _timescaledb_config | bgw_job | max_retries + timescaledb | _timescaledb_config | bgw_job | max_runtime + timescaledb | _timescaledb_config | bgw_job | owner + timescaledb | _timescaledb_config | bgw_job | proc_name + timescaledb | _timescaledb_config | bgw_job | proc_schema + timescaledb | _timescaledb_config | bgw_job | retry_period + timescaledb | _timescaledb_config | bgw_job | schedule_interval + timescaledb | _timescaledb_config | bgw_job | scheduled + timescaledb | _timescaledb_config | bgw_job | timezone + timescaledb | _timescaledb_internal | bgw_job_stat | consecutive_crashes + timescaledb | _timescaledb_internal | bgw_job_stat | consecutive_failures + timescaledb | _timescaledb_internal | bgw_job_stat | flags + timescaledb | _timescaledb_internal | bgw_job_stat | job_id + timescaledb | _timescaledb_internal | bgw_job_stat | last_finish + timescaledb | _timescaledb_internal | bgw_job_stat | last_run_success + timescaledb | _timescaledb_internal | bgw_job_stat | last_start + timescaledb | _timescaledb_internal | bgw_job_stat | last_successful_finish + timescaledb | _timescaledb_internal | bgw_job_stat | next_start + timescaledb | _timescaledb_internal | bgw_job_stat | total_crashes + timescaledb | _timescaledb_internal | bgw_job_stat | total_duration + timescaledb | _timescaledb_internal | bgw_job_stat | total_duration_failures + timescaledb | _timescaledb_internal | bgw_job_stat | total_failures + timescaledb | _timescaledb_internal | bgw_job_stat | total_runs + timescaledb | _timescaledb_internal | bgw_job_stat | total_successes + timescaledb | _timescaledb_internal | bgw_job_stat_history | data + timescaledb | _timescaledb_internal | bgw_job_stat_history | execution_finish + timescaledb | _timescaledb_internal | bgw_job_stat_history | execution_start + timescaledb | _timescaledb_internal | bgw_job_stat_history | id + timescaledb | _timescaledb_internal | bgw_job_stat_history | job_id + timescaledb | _timescaledb_internal | bgw_job_stat_history | pid + timescaledb | _timescaledb_internal | bgw_job_stat_history | succeeded + timescaledb | _timescaledb_internal | bgw_policy_chunk_stats | chunk_id + timescaledb | _timescaledb_internal | bgw_policy_chunk_stats | job_id + timescaledb | _timescaledb_internal | bgw_policy_chunk_stats | last_time_job_run + timescaledb | _timescaledb_internal | bgw_policy_chunk_stats | num_times_job_run + timescaledb | _timescaledb_internal | compressed_chunk_stats | chunk_name + timescaledb | _timescaledb_internal | compressed_chunk_stats | chunk_schema + timescaledb | _timescaledb_internal | compressed_chunk_stats | compressed_heap_size + timescaledb | _timescaledb_internal | compressed_chunk_stats | compressed_index_size + timescaledb | _timescaledb_internal | compressed_chunk_stats | compressed_toast_size + timescaledb | _timescaledb_internal | compressed_chunk_stats | compressed_total_size + timescaledb | _timescaledb_internal | compressed_chunk_stats | compression_status + timescaledb | _timescaledb_internal | compressed_chunk_stats | hypertable_name + timescaledb | _timescaledb_internal | compressed_chunk_stats | hypertable_schema + timescaledb | _timescaledb_internal | compressed_chunk_stats | uncompressed_heap_size + timescaledb | _timescaledb_internal | compressed_chunk_stats | uncompressed_index_size + timescaledb | _timescaledb_internal | compressed_chunk_stats | uncompressed_toast_size + timescaledb | _timescaledb_internal | compressed_chunk_stats | uncompressed_total_size + timescaledb | _timescaledb_internal | hypertable_chunk_local_size | chunk_id + timescaledb | _timescaledb_internal | hypertable_chunk_local_size | chunk_name + timescaledb | _timescaledb_internal | hypertable_chunk_local_size | chunk_schema + timescaledb | _timescaledb_internal | hypertable_chunk_local_size | compressed_heap_size + timescaledb | _timescaledb_internal | hypertable_chunk_local_size | compressed_index_size + timescaledb | _timescaledb_internal | hypertable_chunk_local_size | compressed_toast_size + timescaledb | _timescaledb_internal | hypertable_chunk_local_size | compressed_total_size + timescaledb | _timescaledb_internal | hypertable_chunk_local_size | heap_bytes + timescaledb | _timescaledb_internal | hypertable_chunk_local_size | hypertable_id + timescaledb | _timescaledb_internal | hypertable_chunk_local_size | hypertable_name + timescaledb | _timescaledb_internal | hypertable_chunk_local_size | hypertable_schema + timescaledb | _timescaledb_internal | hypertable_chunk_local_size | index_bytes + timescaledb | _timescaledb_internal | hypertable_chunk_local_size | toast_bytes + timescaledb | _timescaledb_internal | hypertable_chunk_local_size | total_bytes + timescaledb | timescaledb_experimental | policies | config + timescaledb | timescaledb_experimental | policies | hypertable_name + timescaledb | timescaledb_experimental | policies | hypertable_schema + timescaledb | timescaledb_experimental | policies | proc_name + timescaledb | timescaledb_experimental | policies | proc_schema + timescaledb | timescaledb_experimental | policies | relation_name + timescaledb | timescaledb_experimental | policies | relation_schema + timescaledb | timescaledb_experimental | policies | schedule_interval + timescaledb | timescaledb_information | chunk_compression_settings | chunk + timescaledb | timescaledb_information | chunk_compression_settings | hypertable + timescaledb | timescaledb_information | chunk_compression_settings | orderby + timescaledb | timescaledb_information | chunk_compression_settings | segmentby + timescaledb | timescaledb_information | chunks | chunk_creation_time + timescaledb | timescaledb_information | chunks | chunk_name + timescaledb | timescaledb_information | chunks | chunk_schema + timescaledb | timescaledb_information | chunks | chunk_tablespace + timescaledb | timescaledb_information | chunks | hypertable_name + timescaledb | timescaledb_information | chunks | hypertable_schema + timescaledb | timescaledb_information | chunks | is_compressed + timescaledb | timescaledb_information | chunks | primary_dimension + timescaledb | timescaledb_information | chunks | primary_dimension_type + timescaledb | timescaledb_information | chunks | range_end + timescaledb | timescaledb_information | chunks | range_end_integer + timescaledb | timescaledb_information | chunks | range_start + timescaledb | timescaledb_information | chunks | range_start_integer + timescaledb | timescaledb_information | compression_settings | attname + timescaledb | timescaledb_information | compression_settings | hypertable_name + timescaledb | timescaledb_information | compression_settings | hypertable_schema + timescaledb | timescaledb_information | compression_settings | orderby_asc + timescaledb | timescaledb_information | compression_settings | orderby_column_index + timescaledb | timescaledb_information | compression_settings | orderby_nullsfirst + timescaledb | timescaledb_information | compression_settings | segmentby_column_index + timescaledb | timescaledb_information | continuous_aggregates | compression_enabled + timescaledb | timescaledb_information | continuous_aggregates | finalized + timescaledb | timescaledb_information | continuous_aggregates | hypertable_name + timescaledb | timescaledb_information | continuous_aggregates | hypertable_schema + timescaledb | timescaledb_information | continuous_aggregates | materialization_hypertable_name + timescaledb | timescaledb_information | continuous_aggregates | materialization_hypertable_schema + timescaledb | timescaledb_information | continuous_aggregates | materialized_only + timescaledb | timescaledb_information | continuous_aggregates | view_definition + timescaledb | timescaledb_information | continuous_aggregates | view_name + timescaledb | timescaledb_information | continuous_aggregates | view_owner + timescaledb | timescaledb_information | continuous_aggregates | view_schema + timescaledb | timescaledb_information | dimensions | column_name + timescaledb | timescaledb_information | dimensions | column_type + timescaledb | timescaledb_information | dimensions | dimension_number + timescaledb | timescaledb_information | dimensions | dimension_type + timescaledb | timescaledb_information | dimensions | hypertable_name + timescaledb | timescaledb_information | dimensions | hypertable_schema + timescaledb | timescaledb_information | dimensions | integer_interval + timescaledb | timescaledb_information | dimensions | integer_now_func + timescaledb | timescaledb_information | dimensions | num_partitions + timescaledb | timescaledb_information | dimensions | time_interval + timescaledb | timescaledb_information | hypertable_compression_settings | compress_interval_length + timescaledb | timescaledb_information | hypertable_compression_settings | hypertable + timescaledb | timescaledb_information | hypertable_compression_settings | orderby + timescaledb | timescaledb_information | hypertable_compression_settings | segmentby + timescaledb | timescaledb_information | hypertables | compression_enabled + timescaledb | timescaledb_information | hypertables | hypertable_name + timescaledb | timescaledb_information | hypertables | hypertable_schema + timescaledb | timescaledb_information | hypertables | num_chunks + timescaledb | timescaledb_information | hypertables | num_dimensions + timescaledb | timescaledb_information | hypertables | owner + timescaledb | timescaledb_information | hypertables | tablespaces + timescaledb | timescaledb_information | job_errors | err_message + timescaledb | timescaledb_information | job_errors | finish_time + timescaledb | timescaledb_information | job_errors | job_id + timescaledb | timescaledb_information | job_errors | pid + timescaledb | timescaledb_information | job_errors | proc_name + timescaledb | timescaledb_information | job_errors | proc_schema + timescaledb | timescaledb_information | job_errors | sqlerrcode + timescaledb | timescaledb_information | job_errors | start_time + timescaledb | timescaledb_information | job_history | config + timescaledb | timescaledb_information | job_history | err_message + timescaledb | timescaledb_information | job_history | finish_time + timescaledb | timescaledb_information | job_history | id + timescaledb | timescaledb_information | job_history | job_id + timescaledb | timescaledb_information | job_history | pid + timescaledb | timescaledb_information | job_history | proc_name + timescaledb | timescaledb_information | job_history | proc_schema + timescaledb | timescaledb_information | job_history | sqlerrcode + timescaledb | timescaledb_information | job_history | start_time + timescaledb | timescaledb_information | job_history | succeeded + timescaledb | timescaledb_information | job_stats | hypertable_name + timescaledb | timescaledb_information | job_stats | hypertable_schema + timescaledb | timescaledb_information | job_stats | job_id + timescaledb | timescaledb_information | job_stats | job_status + timescaledb | timescaledb_information | job_stats | last_run_duration + timescaledb | timescaledb_information | job_stats | last_run_started_at + timescaledb | timescaledb_information | job_stats | last_run_status + timescaledb | timescaledb_information | job_stats | last_successful_finish + timescaledb | timescaledb_information | job_stats | next_start + timescaledb | timescaledb_information | job_stats | total_failures + timescaledb | timescaledb_information | job_stats | total_runs + timescaledb | timescaledb_information | job_stats | total_successes + timescaledb | timescaledb_information | jobs | application_name + timescaledb | timescaledb_information | jobs | check_name + timescaledb | timescaledb_information | jobs | check_schema + timescaledb | timescaledb_information | jobs | config + timescaledb | timescaledb_information | jobs | fixed_schedule + timescaledb | timescaledb_information | jobs | hypertable_name + timescaledb | timescaledb_information | jobs | hypertable_schema + timescaledb | timescaledb_information | jobs | initial_start + timescaledb | timescaledb_information | jobs | job_id + timescaledb | timescaledb_information | jobs | max_retries + timescaledb | timescaledb_information | jobs | max_runtime + timescaledb | timescaledb_information | jobs | next_start + timescaledb | timescaledb_information | jobs | owner + timescaledb | timescaledb_information | jobs | proc_name + timescaledb | timescaledb_information | jobs | proc_schema + timescaledb | timescaledb_information | jobs | retry_period + timescaledb | timescaledb_information | jobs | schedule_interval + timescaledb | timescaledb_information | jobs | scheduled + wrappers | public | wrappers_fdw_stats | bytes_in + wrappers | public | wrappers_fdw_stats | bytes_out + wrappers | public | wrappers_fdw_stats | create_times + wrappers | public | wrappers_fdw_stats | created_at + wrappers | public | wrappers_fdw_stats | fdw_name + wrappers | public | wrappers_fdw_stats | metadata + wrappers | public | wrappers_fdw_stats | rows_in + wrappers | public | wrappers_fdw_stats | rows_out + wrappers | public | wrappers_fdw_stats | updated_at +(1106 rows) + diff --git a/nix/tests/expected/z_15_pg_stat_monitor.out b/nix/tests/expected/z_15_pg_stat_monitor.out new file mode 100644 index 000000000..f4d906932 --- /dev/null +++ b/nix/tests/expected/z_15_pg_stat_monitor.out @@ -0,0 +1,10 @@ +select + * +from + pg_stat_monitor +where + false; + bucket | bucket_start_time | userid | username | dbid | datname | client_ip | pgsm_query_id | queryid | toplevel | top_queryid | query | comments | planid | query_plan | top_query | application_name | relations | cmd_type | cmd_type_text | elevel | sqlcode | message | calls | total_exec_time | min_exec_time | max_exec_time | mean_exec_time | stddev_exec_time | rows | shared_blks_hit | shared_blks_read | shared_blks_dirtied | shared_blks_written | local_blks_hit | local_blks_read | local_blks_dirtied | local_blks_written | temp_blks_read | temp_blks_written | blk_read_time | blk_write_time | temp_blk_read_time | temp_blk_write_time | resp_calls | cpu_user_time | cpu_sys_time | wal_records | wal_fpi | wal_bytes | bucket_done | plans | total_plan_time | min_plan_time | max_plan_time | mean_plan_time | stddev_plan_time | jit_functions | jit_generation_time | jit_inlining_count | jit_inlining_time | jit_optimization_count | jit_optimization_time | jit_emission_count | jit_emission_time +--------+-------------------+--------+----------+------+---------+-----------+---------------+---------+----------+-------------+-------+----------+--------+------------+-----------+------------------+-----------+----------+---------------+--------+---------+---------+-------+-----------------+---------------+---------------+----------------+------------------+------+-----------------+------------------+---------------------+---------------------+----------------+-----------------+--------------------+--------------------+----------------+-------------------+---------------+----------------+--------------------+---------------------+------------+---------------+--------------+-------------+---------+-----------+-------------+-------+-----------------+---------------+---------------+----------------+------------------+---------------+---------------------+--------------------+-------------------+------------------------+-----------------------+--------------------+------------------- +(0 rows) + diff --git a/nix/tests/expected/z_15_pgjwt.out b/nix/tests/expected/z_15_pgjwt.out new file mode 100644 index 000000000..4e4500fd4 --- /dev/null +++ b/nix/tests/expected/z_15_pgjwt.out @@ -0,0 +1,22 @@ +select + sign( + payload := '{"sub":"1234567890","name":"John Doe","iat":1516239022}', + secret := 'secret', + algorithm := 'HS256' + ); + sign +------------------------------------------------------------------------------------------------------------------------------------------------------------- + eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o +(1 row) + +select + verify( + token := 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiRm9vIn0.Q8hKjuadCEhnCPuqIj9bfLhTh_9QSxshTRsA5Aq4IuM', + secret := 'secret', + algorithm := 'HS256' + ); + verify +---------------------------------------------------------------- + ("{""alg"":""HS256"",""typ"":""JWT""}","{""name"":""Foo""}",t) +(1 row) + diff --git a/nix/tests/expected/z_15_pgroonga.out b/nix/tests/expected/z_15_pgroonga.out new file mode 100644 index 000000000..5ceeed254 --- /dev/null +++ b/nix/tests/expected/z_15_pgroonga.out @@ -0,0 +1,76 @@ +create schema v; +create table v.roon( + id serial primary key, + content text +); +with tokenizers as ( + select + x + from + jsonb_array_elements( + (select pgroonga_command('tokenizer_list'))::jsonb + ) x(val) + limit + 1 + offset + 1 -- first record is unrelated and not stable +) +select + t.x::jsonb ->> 'name' +from + jsonb_array_elements((select * from tokenizers)) t(x) +order by + t.x::jsonb ->> 'name'; + ?column? +--------------------------------------------- + TokenBigram + TokenBigramIgnoreBlank + TokenBigramIgnoreBlankSplitSymbol + TokenBigramIgnoreBlankSplitSymbolAlpha + TokenBigramIgnoreBlankSplitSymbolAlphaDigit + TokenBigramSplitSymbol + TokenBigramSplitSymbolAlpha + TokenBigramSplitSymbolAlphaDigit + TokenDelimit + TokenDelimitNull + TokenDocumentVectorBM25 + TokenDocumentVectorTFIDF + TokenMecab + TokenNgram + TokenPattern + TokenRegexp + TokenTable + TokenTrigram + TokenUnigram +(19 rows) + +insert into v.roon (content) +values + ('Hello World'), + ('PostgreSQL with PGroonga is a thing'), + ('This is a full-text search test'), + ('PGroonga supports various languages'); +-- Create default index +create index pgroonga_index on v.roon using pgroonga (content); +-- Create mecab tokenizer index since we had a bug with this one once +create index pgroonga_index_mecab on v.roon using pgroonga (content) with (tokenizer='TokenMecab'); +-- Run some queries to test the index +select * from v.roon where content &@~ 'Hello'; + id | content +----+------------- + 1 | Hello World +(1 row) + +select * from v.roon where content &@~ 'powerful'; + id | content +----+--------- +(0 rows) + +select * from v.roon where content &@~ 'supports'; + id | content +----+------------------------------------- + 4 | PGroonga supports various languages +(1 row) + +drop schema v cascade; +NOTICE: drop cascades to table v.roon diff --git a/nix/tests/expected/z_15_pgvector.out b/nix/tests/expected/z_15_pgvector.out new file mode 100644 index 000000000..6564be5f4 --- /dev/null +++ b/nix/tests/expected/z_15_pgvector.out @@ -0,0 +1,90 @@ +create schema v; +create table v.items( + id serial primary key, + embedding vector(3), + half_embedding halfvec(3), + bit_embedding bit(3), + sparse_embedding sparsevec(3) +); +-- vector ops +create index on v.items using hnsw (embedding vector_l2_ops); +create index on v.items using hnsw (embedding vector_cosine_ops); +create index on v.items using hnsw (embedding vector_l1_ops); +create index on v.items using ivfflat (embedding vector_l2_ops); +NOTICE: ivfflat index created with little data +DETAIL: This will cause low recall. +HINT: Drop the index until the table has more data. +create index on v.items using ivfflat (embedding vector_cosine_ops); +NOTICE: ivfflat index created with little data +DETAIL: This will cause low recall. +HINT: Drop the index until the table has more data. +-- halfvec ops +create index on v.items using hnsw (half_embedding halfvec_l2_ops); +create index on v.items using hnsw (half_embedding halfvec_cosine_ops); +create index on v.items using hnsw (half_embedding halfvec_l1_ops); +create index on v.items using ivfflat (half_embedding halfvec_l2_ops); +NOTICE: ivfflat index created with little data +DETAIL: This will cause low recall. +HINT: Drop the index until the table has more data. +create index on v.items using ivfflat (half_embedding halfvec_cosine_ops); +NOTICE: ivfflat index created with little data +DETAIL: This will cause low recall. +HINT: Drop the index until the table has more data. +-- sparsevec +create index on v.items using hnsw (sparse_embedding sparsevec_l2_ops); +create index on v.items using hnsw (sparse_embedding sparsevec_cosine_ops); +create index on v.items using hnsw (sparse_embedding sparsevec_l1_ops); +-- bit ops +create index on v.items using hnsw (bit_embedding bit_hamming_ops); +create index on v.items using ivfflat (bit_embedding bit_hamming_ops); +NOTICE: ivfflat index created with little data +DETAIL: This will cause low recall. +HINT: Drop the index until the table has more data. +-- Populate some records +insert into v.items( + embedding, + half_embedding, + bit_embedding, + sparse_embedding +) +values + ('[1,2,3]', '[1,2,3]', '101', '{1:4}/3'), + ('[2,3,4]', '[2,3,4]', '010', '{1:7,3:0}/3'); +-- Test op types +select + * +from + v.items +order by + embedding <-> '[2,3,5]', + embedding <=> '[2,3,5]', + embedding <+> '[2,3,5]', + embedding <#> '[2,3,5]', + half_embedding <-> '[2,3,5]', + half_embedding <=> '[2,3,5]', + half_embedding <+> '[2,3,5]', + half_embedding <#> '[2,3,5]', + sparse_embedding <-> '{2:4,3:1}/3', + sparse_embedding <=> '{2:4,3:1}/3', + sparse_embedding <+> '{2:4,3:1}/3', + sparse_embedding <#> '{2:4,3:1}/3', + bit_embedding <~> '011'; + id | embedding | half_embedding | bit_embedding | sparse_embedding +----+-----------+----------------+---------------+------------------ + 2 | [2,3,4] | [2,3,4] | 010 | {1:7}/3 + 1 | [1,2,3] | [1,2,3] | 101 | {1:4}/3 +(2 rows) + +select + avg(embedding), + avg(half_embedding) +from + v.items; + avg | avg +---------------+--------------- + [1.5,2.5,3.5] | [1.5,2.5,3.5] +(1 row) + +-- Cleanup +drop schema v cascade; +NOTICE: drop cascades to table v.items diff --git a/nix/tests/expected/z_15_plv8.out b/nix/tests/expected/z_15_plv8.out new file mode 100644 index 000000000..bf909f0a8 --- /dev/null +++ b/nix/tests/expected/z_15_plv8.out @@ -0,0 +1,23 @@ +/* +This test is excluded from the Postgres 17 suite because it does not ship +with the Supabase PG17 image +*/ +create extension if not exists plv8; +NOTICE: extension "plv8" already exists, skipping +create schema v; +-- create a function to perform some JavaScript operations +create function v.multiply_numbers(a integer, b integer) + returns integer + language plv8 +as $$ + return a * b; +$$; +select + v.multiply_numbers(3, 4); + multiply_numbers +------------------ + 12 +(1 row) + +drop schema v cascade; +NOTICE: drop cascades to function v.multiply_numbers(integer,integer) diff --git a/nix/tests/expected/z_15_rum.out b/nix/tests/expected/z_15_rum.out new file mode 100644 index 000000000..1296befa7 --- /dev/null +++ b/nix/tests/expected/z_15_rum.out @@ -0,0 +1,41 @@ +/* +This extension is excluded from oriole-17 because it uses an unsupported index type +*/ +create schema v; +create table v.test_rum( + t text, + a tsvector +); +create trigger tsvectorupdate + before update or insert on v.test_rum + for each row + execute procedure + tsvector_update_trigger( + 'a', + 'pg_catalog.english', + 't' + ); +insert into v.test_rum(t) +values + ('the situation is most beautiful'), + ('it is a beautiful'), + ('it looks like a beautiful place'); +create index rumidx on v.test_rum using rum (a rum_tsvector_ops); +select + t, + round(a <=> to_tsquery('english', 'beautiful | place')) as rank +from + v.test_rum +where + a @@ to_tsquery('english', 'beautiful | place') +order by + a <=> to_tsquery('english', 'beautiful | place'); + t | rank +---------------------------------+------ + it looks like a beautiful place | 8 + the situation is most beautiful | 16 + it is a beautiful | 16 +(3 rows) + +drop schema v cascade; +NOTICE: drop cascades to table v.test_rum diff --git a/nix/tests/expected/z_15_timescale.out b/nix/tests/expected/z_15_timescale.out new file mode 100644 index 000000000..d0c0f2fcb --- /dev/null +++ b/nix/tests/expected/z_15_timescale.out @@ -0,0 +1,53 @@ +/* +This test is excluded from the Postgres 17 suite because it does not ship +with the Supabase PG17 image +*/ +create extension if not exists timescaledb; +NOTICE: extension "timescaledb" already exists, skipping +-- Confirm we're running the apache version +show timescaledb.license; + timescaledb.license +--------------------- + apache +(1 row) + +-- Create schema v +create schema v; +-- Create a table in the v schema +create table v.sensor_data ( + time timestamptz not null, + sensor_id int not null, + temperature double precision not null, + humidity double precision not null +); +-- Convert the table to a hypertable +select create_hypertable('v.sensor_data', 'time'); + create_hypertable +--------------------- + (1,v,sensor_data,t) +(1 row) + +-- Insert some data into the hypertable +insert into v.sensor_data (time, sensor_id, temperature, humidity) +values + ('2024-08-09', 1, 22.5, 60.2), + ('2024-08-08', 1, 23.0, 59.1), + ('2024-08-07', 2, 21.7, 63.3); +-- Select data from the hypertable +select + * +from + v.sensor_data; + time | sensor_id | temperature | humidity +------------------------------+-----------+-------------+---------- + Fri Aug 09 00:00:00 2024 PDT | 1 | 22.5 | 60.2 + Thu Aug 08 00:00:00 2024 PDT | 1 | 23 | 59.1 + Wed Aug 07 00:00:00 2024 PDT | 2 | 21.7 | 63.3 +(3 rows) + +-- Drop schema v and all its entities +drop schema v cascade; +NOTICE: drop cascades to 3 other objects +DETAIL: drop cascades to table v.sensor_data +drop cascades to table _timescaledb_internal._hyper_1_1_chunk +drop cascades to table _timescaledb_internal._hyper_1_2_chunk diff --git a/nix/tests/expected/z_17_ext_interface.out b/nix/tests/expected/z_17_ext_interface.out new file mode 100644 index 000000000..f7750f849 --- /dev/null +++ b/nix/tests/expected/z_17_ext_interface.out @@ -0,0 +1,5290 @@ +/* + +The purpose of this test is to monitor the SQL interface exposed +by Postgres extensions so we have to manually review/approve any difference +that emerge as versions change. + +*/ +/* + +List all extensions that are not enabled +If a new entry shows up in this list, that means a new extension has been +added and you should `create extension ...` to enable it in ./nix/tests/prime + +*/ +select + name +from + pg_available_extensions +where + installed_version is null +order by + name asc; + name +------------------------ + pg_cron + pgjwt + postgis_tiger_geocoder + tsm_system_time +(4 rows) + +/* + +Monitor relocatability and config of each extension +- lesson learned from pg_cron + +*/ +select + extname as extension_name, + extrelocatable as is_relocatable +from + pg_extension +order by + extname asc; + extension_name | is_relocatable +------------------------------+---------------- + address_standardizer | t + address_standardizer_data_us | t + amcheck | t + autoinc | t + bloom | t + btree_gin | t + btree_gist | t + citext | t + cube | t + dblink | t + dict_int | t + dict_xsyn | t + earthdistance | t + file_fdw | t + fuzzystrmatch | t + hstore | t + http | f + hypopg | t + index_advisor | t + insert_username | t + intagg | t + intarray | t + isn | t + lo | t + ltree | t + moddatetime | t + pageinspect | t + pg_buffercache | t + pg_freespacemap | t + pg_graphql | f + pg_hashids | t + pg_jsonschema | f + pg_net | f + pg_prewarm | t + pg_repack | f + pg_stat_monitor | t + pg_stat_statements | t + pg_surgery | t + pg_tle | f + pg_trgm | t + pg_visibility | t + pg_walinspect | t + pgaudit | t + pgcrypto | t + pgmq | f + pgroonga | f + pgroonga_database | f + pgrouting | t + pgrowlocks | t + pgsodium | f + pgstattuple | t + pgtap | t + plpgsql | f + plpgsql_check | f + postgis | f + postgis_raster | f + postgis_sfcgal | t + postgis_topology | f + postgres_fdw | t + refint | t + rum | t + seg | t + sslinfo | t + supabase_vault | f + tablefunc | t + tcn | t + tsm_system_rows | t + unaccent | t + uuid-ossp | t + vector | t + wrappers | f + xml2 | f +(72 rows) + +/* + +Monitor extension public function interface + +*/ +select + e.extname as extension_name, + n.nspname as schema_name, + p.proname as function_name, + pg_catalog.pg_get_function_identity_arguments(p.oid) as argument_types, + pg_catalog.pg_get_function_result(p.oid) as return_type +from + pg_catalog.pg_proc p + join pg_catalog.pg_namespace n + on n.oid = p.pronamespace + join pg_catalog.pg_depend d + on d.objid = p.oid + join pg_catalog.pg_extension e + on e.oid = d.refobjid +where + d.deptype = 'e' + -- Filter out changes between pg15 and pg16 from extensions that ship with postgres + -- new in pg16 + and not (e.extname = 'fuzzystrmatch' and p.proname = 'daitch_mokotoff') + and not (e.extname = 'pageinspect' and p.proname = 'bt_multi_page_stats') + and not (e.extname = 'pg_buffercache' and p.proname = 'pg_buffercache_summary') + and not (e.extname = 'pg_buffercache' and p.proname = 'pg_buffercache_usage_counts') + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_block_info') + -- removed in pg16 + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_records_info_till_end_of_wal') + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_stats_till_end_of_wal') + -- changed in pg16 - output signature added a column + and not (e.extname = 'pageinspect' and p.proname = 'brin_page_items') +order by + e.extname, + n.nspname, + p.proname, + md5(pg_catalog.pg_get_function_identity_arguments(p.oid)); + extension_name | schema_name | function_name | argument_types | return_type +----------------------+----------------+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + address_standardizer | public | parse_address | text, OUT num text, OUT street text, OUT street2 text, OUT address1 text, OUT city text, OUT state text, OUT zip text, OUT zipplus text, OUT country text | record + address_standardizer | public | standardize_address | lextab text, gaztab text, rultab text, address text | stdaddr + address_standardizer | public | standardize_address | lextab text, gaztab text, rultab text, micro text, macro text | stdaddr + amcheck | public | bt_index_check | index regclass | void + amcheck | public | bt_index_check | index regclass, heapallindexed boolean, checkunique boolean | void + amcheck | public | bt_index_check | index regclass, heapallindexed boolean | void + amcheck | public | bt_index_parent_check | index regclass | void + amcheck | public | bt_index_parent_check | index regclass, heapallindexed boolean, rootdescend boolean, checkunique boolean | void + amcheck | public | bt_index_parent_check | index regclass, heapallindexed boolean | void + amcheck | public | bt_index_parent_check | index regclass, heapallindexed boolean, rootdescend boolean | void + amcheck | public | verify_heapam | relation regclass, on_error_stop boolean, check_toast boolean, skip text, startblock bigint, endblock bigint, OUT blkno bigint, OUT offnum integer, OUT attnum integer, OUT msg text | SETOF record + autoinc | public | autoinc | | trigger + bloom | public | blhandler | internal | index_am_handler + btree_gin | public | gin_btree_consistent | internal, smallint, anyelement, integer, internal, internal | boolean + btree_gin | public | gin_compare_prefix_anyenum | anyenum, anyenum, smallint, internal | integer + btree_gin | public | gin_compare_prefix_bit | bit, bit, smallint, internal | integer + btree_gin | public | gin_compare_prefix_bool | boolean, boolean, smallint, internal | integer + btree_gin | public | gin_compare_prefix_bpchar | character, character, smallint, internal | integer + btree_gin | public | gin_compare_prefix_bytea | bytea, bytea, smallint, internal | integer + btree_gin | public | gin_compare_prefix_char | "char", "char", smallint, internal | integer + btree_gin | public | gin_compare_prefix_cidr | cidr, cidr, smallint, internal | integer + btree_gin | public | gin_compare_prefix_date | date, date, smallint, internal | integer + btree_gin | public | gin_compare_prefix_float4 | real, real, smallint, internal | integer + btree_gin | public | gin_compare_prefix_float8 | double precision, double precision, smallint, internal | integer + btree_gin | public | gin_compare_prefix_inet | inet, inet, smallint, internal | integer + btree_gin | public | gin_compare_prefix_int2 | smallint, smallint, smallint, internal | integer + btree_gin | public | gin_compare_prefix_int4 | integer, integer, smallint, internal | integer + btree_gin | public | gin_compare_prefix_int8 | bigint, bigint, smallint, internal | integer + btree_gin | public | gin_compare_prefix_interval | interval, interval, smallint, internal | integer + btree_gin | public | gin_compare_prefix_macaddr | macaddr, macaddr, smallint, internal | integer + btree_gin | public | gin_compare_prefix_macaddr8 | macaddr8, macaddr8, smallint, internal | integer + btree_gin | public | gin_compare_prefix_money | money, money, smallint, internal | integer + btree_gin | public | gin_compare_prefix_name | name, name, smallint, internal | integer + btree_gin | public | gin_compare_prefix_numeric | numeric, numeric, smallint, internal | integer + btree_gin | public | gin_compare_prefix_oid | oid, oid, smallint, internal | integer + btree_gin | public | gin_compare_prefix_text | text, text, smallint, internal | integer + btree_gin | public | gin_compare_prefix_time | time without time zone, time without time zone, smallint, internal | integer + btree_gin | public | gin_compare_prefix_timestamp | timestamp without time zone, timestamp without time zone, smallint, internal | integer + btree_gin | public | gin_compare_prefix_timestamptz | timestamp with time zone, timestamp with time zone, smallint, internal | integer + btree_gin | public | gin_compare_prefix_timetz | time with time zone, time with time zone, smallint, internal | integer + btree_gin | public | gin_compare_prefix_uuid | uuid, uuid, smallint, internal | integer + btree_gin | public | gin_compare_prefix_varbit | bit varying, bit varying, smallint, internal | integer + btree_gin | public | gin_enum_cmp | anyenum, anyenum | integer + btree_gin | public | gin_extract_query_anyenum | anyenum, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_bit | bit, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_bool | boolean, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_bpchar | character, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_bytea | bytea, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_char | "char", internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_cidr | cidr, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_date | date, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_float4 | real, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_float8 | double precision, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_inet | inet, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_int2 | smallint, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_int4 | integer, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_int8 | bigint, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_interval | interval, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_macaddr | macaddr, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_macaddr8 | macaddr8, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_money | money, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_name | name, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_numeric | numeric, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_oid | oid, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_text | text, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_time | time without time zone, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_timestamp | timestamp without time zone, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_timestamptz | timestamp with time zone, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_timetz | time with time zone, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_uuid | uuid, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_varbit | bit varying, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_value_anyenum | anyenum, internal | internal + btree_gin | public | gin_extract_value_bit | bit, internal | internal + btree_gin | public | gin_extract_value_bool | boolean, internal | internal + btree_gin | public | gin_extract_value_bpchar | character, internal | internal + btree_gin | public | gin_extract_value_bytea | bytea, internal | internal + btree_gin | public | gin_extract_value_char | "char", internal | internal + btree_gin | public | gin_extract_value_cidr | cidr, internal | internal + btree_gin | public | gin_extract_value_date | date, internal | internal + btree_gin | public | gin_extract_value_float4 | real, internal | internal + btree_gin | public | gin_extract_value_float8 | double precision, internal | internal + btree_gin | public | gin_extract_value_inet | inet, internal | internal + btree_gin | public | gin_extract_value_int2 | smallint, internal | internal + btree_gin | public | gin_extract_value_int4 | integer, internal | internal + btree_gin | public | gin_extract_value_int8 | bigint, internal | internal + btree_gin | public | gin_extract_value_interval | interval, internal | internal + btree_gin | public | gin_extract_value_macaddr | macaddr, internal | internal + btree_gin | public | gin_extract_value_macaddr8 | macaddr8, internal | internal + btree_gin | public | gin_extract_value_money | money, internal | internal + btree_gin | public | gin_extract_value_name | name, internal | internal + btree_gin | public | gin_extract_value_numeric | numeric, internal | internal + btree_gin | public | gin_extract_value_oid | oid, internal | internal + btree_gin | public | gin_extract_value_text | text, internal | internal + btree_gin | public | gin_extract_value_time | time without time zone, internal | internal + btree_gin | public | gin_extract_value_timestamp | timestamp without time zone, internal | internal + btree_gin | public | gin_extract_value_timestamptz | timestamp with time zone, internal | internal + btree_gin | public | gin_extract_value_timetz | time with time zone, internal | internal + btree_gin | public | gin_extract_value_uuid | uuid, internal | internal + btree_gin | public | gin_extract_value_varbit | bit varying, internal | internal + btree_gin | public | gin_numeric_cmp | numeric, numeric | integer + btree_gist | public | cash_dist | money, money | money + btree_gist | public | date_dist | date, date | integer + btree_gist | public | float4_dist | real, real | real + btree_gist | public | float8_dist | double precision, double precision | double precision + btree_gist | public | gbt_bit_compress | internal | internal + btree_gist | public | gbt_bit_consistent | internal, bit, smallint, oid, internal | boolean + btree_gist | public | gbt_bit_penalty | internal, internal, internal | internal + btree_gist | public | gbt_bit_picksplit | internal, internal | internal + btree_gist | public | gbt_bit_same | gbtreekey_var, gbtreekey_var, internal | internal + btree_gist | public | gbt_bit_union | internal, internal | gbtreekey_var + btree_gist | public | gbt_bool_compress | internal | internal + btree_gist | public | gbt_bool_consistent | internal, boolean, smallint, oid, internal | boolean + btree_gist | public | gbt_bool_fetch | internal | internal + btree_gist | public | gbt_bool_penalty | internal, internal, internal | internal + btree_gist | public | gbt_bool_picksplit | internal, internal | internal + btree_gist | public | gbt_bool_same | gbtreekey2, gbtreekey2, internal | internal + btree_gist | public | gbt_bool_union | internal, internal | gbtreekey2 + btree_gist | public | gbt_bpchar_compress | internal | internal + btree_gist | public | gbt_bpchar_consistent | internal, character, smallint, oid, internal | boolean + btree_gist | public | gbt_bytea_compress | internal | internal + btree_gist | public | gbt_bytea_consistent | internal, bytea, smallint, oid, internal | boolean + btree_gist | public | gbt_bytea_penalty | internal, internal, internal | internal + btree_gist | public | gbt_bytea_picksplit | internal, internal | internal + btree_gist | public | gbt_bytea_same | gbtreekey_var, gbtreekey_var, internal | internal + btree_gist | public | gbt_bytea_union | internal, internal | gbtreekey_var + btree_gist | public | gbt_cash_compress | internal | internal + btree_gist | public | gbt_cash_consistent | internal, money, smallint, oid, internal | boolean + btree_gist | public | gbt_cash_distance | internal, money, smallint, oid, internal | double precision + btree_gist | public | gbt_cash_fetch | internal | internal + btree_gist | public | gbt_cash_penalty | internal, internal, internal | internal + btree_gist | public | gbt_cash_picksplit | internal, internal | internal + btree_gist | public | gbt_cash_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_cash_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_date_compress | internal | internal + btree_gist | public | gbt_date_consistent | internal, date, smallint, oid, internal | boolean + btree_gist | public | gbt_date_distance | internal, date, smallint, oid, internal | double precision + btree_gist | public | gbt_date_fetch | internal | internal + btree_gist | public | gbt_date_penalty | internal, internal, internal | internal + btree_gist | public | gbt_date_picksplit | internal, internal | internal + btree_gist | public | gbt_date_same | gbtreekey8, gbtreekey8, internal | internal + btree_gist | public | gbt_date_union | internal, internal | gbtreekey8 + btree_gist | public | gbt_decompress | internal | internal + btree_gist | public | gbt_enum_compress | internal | internal + btree_gist | public | gbt_enum_consistent | internal, anyenum, smallint, oid, internal | boolean + btree_gist | public | gbt_enum_fetch | internal | internal + btree_gist | public | gbt_enum_penalty | internal, internal, internal | internal + btree_gist | public | gbt_enum_picksplit | internal, internal | internal + btree_gist | public | gbt_enum_same | gbtreekey8, gbtreekey8, internal | internal + btree_gist | public | gbt_enum_union | internal, internal | gbtreekey8 + btree_gist | public | gbt_float4_compress | internal | internal + btree_gist | public | gbt_float4_consistent | internal, real, smallint, oid, internal | boolean + btree_gist | public | gbt_float4_distance | internal, real, smallint, oid, internal | double precision + btree_gist | public | gbt_float4_fetch | internal | internal + btree_gist | public | gbt_float4_penalty | internal, internal, internal | internal + btree_gist | public | gbt_float4_picksplit | internal, internal | internal + btree_gist | public | gbt_float4_same | gbtreekey8, gbtreekey8, internal | internal + btree_gist | public | gbt_float4_union | internal, internal | gbtreekey8 + btree_gist | public | gbt_float8_compress | internal | internal + btree_gist | public | gbt_float8_consistent | internal, double precision, smallint, oid, internal | boolean + btree_gist | public | gbt_float8_distance | internal, double precision, smallint, oid, internal | double precision + btree_gist | public | gbt_float8_fetch | internal | internal + btree_gist | public | gbt_float8_penalty | internal, internal, internal | internal + btree_gist | public | gbt_float8_picksplit | internal, internal | internal + btree_gist | public | gbt_float8_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_float8_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_inet_compress | internal | internal + btree_gist | public | gbt_inet_consistent | internal, inet, smallint, oid, internal | boolean + btree_gist | public | gbt_inet_penalty | internal, internal, internal | internal + btree_gist | public | gbt_inet_picksplit | internal, internal | internal + btree_gist | public | gbt_inet_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_inet_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_int2_compress | internal | internal + btree_gist | public | gbt_int2_consistent | internal, smallint, smallint, oid, internal | boolean + btree_gist | public | gbt_int2_distance | internal, smallint, smallint, oid, internal | double precision + btree_gist | public | gbt_int2_fetch | internal | internal + btree_gist | public | gbt_int2_penalty | internal, internal, internal | internal + btree_gist | public | gbt_int2_picksplit | internal, internal | internal + btree_gist | public | gbt_int2_same | gbtreekey4, gbtreekey4, internal | internal + btree_gist | public | gbt_int2_union | internal, internal | gbtreekey4 + btree_gist | public | gbt_int4_compress | internal | internal + btree_gist | public | gbt_int4_consistent | internal, integer, smallint, oid, internal | boolean + btree_gist | public | gbt_int4_distance | internal, integer, smallint, oid, internal | double precision + btree_gist | public | gbt_int4_fetch | internal | internal + btree_gist | public | gbt_int4_penalty | internal, internal, internal | internal + btree_gist | public | gbt_int4_picksplit | internal, internal | internal + btree_gist | public | gbt_int4_same | gbtreekey8, gbtreekey8, internal | internal + btree_gist | public | gbt_int4_union | internal, internal | gbtreekey8 + btree_gist | public | gbt_int8_compress | internal | internal + btree_gist | public | gbt_int8_consistent | internal, bigint, smallint, oid, internal | boolean + btree_gist | public | gbt_int8_distance | internal, bigint, smallint, oid, internal | double precision + btree_gist | public | gbt_int8_fetch | internal | internal + btree_gist | public | gbt_int8_penalty | internal, internal, internal | internal + btree_gist | public | gbt_int8_picksplit | internal, internal | internal + btree_gist | public | gbt_int8_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_int8_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_intv_compress | internal | internal + btree_gist | public | gbt_intv_consistent | internal, interval, smallint, oid, internal | boolean + btree_gist | public | gbt_intv_decompress | internal | internal + btree_gist | public | gbt_intv_distance | internal, interval, smallint, oid, internal | double precision + btree_gist | public | gbt_intv_fetch | internal | internal + btree_gist | public | gbt_intv_penalty | internal, internal, internal | internal + btree_gist | public | gbt_intv_picksplit | internal, internal | internal + btree_gist | public | gbt_intv_same | gbtreekey32, gbtreekey32, internal | internal + btree_gist | public | gbt_intv_union | internal, internal | gbtreekey32 + btree_gist | public | gbt_macad8_compress | internal | internal + btree_gist | public | gbt_macad8_consistent | internal, macaddr8, smallint, oid, internal | boolean + btree_gist | public | gbt_macad8_fetch | internal | internal + btree_gist | public | gbt_macad8_penalty | internal, internal, internal | internal + btree_gist | public | gbt_macad8_picksplit | internal, internal | internal + btree_gist | public | gbt_macad8_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_macad8_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_macad_compress | internal | internal + btree_gist | public | gbt_macad_consistent | internal, macaddr, smallint, oid, internal | boolean + btree_gist | public | gbt_macad_fetch | internal | internal + btree_gist | public | gbt_macad_penalty | internal, internal, internal | internal + btree_gist | public | gbt_macad_picksplit | internal, internal | internal + btree_gist | public | gbt_macad_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_macad_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_numeric_compress | internal | internal + btree_gist | public | gbt_numeric_consistent | internal, numeric, smallint, oid, internal | boolean + btree_gist | public | gbt_numeric_penalty | internal, internal, internal | internal + btree_gist | public | gbt_numeric_picksplit | internal, internal | internal + btree_gist | public | gbt_numeric_same | gbtreekey_var, gbtreekey_var, internal | internal + btree_gist | public | gbt_numeric_union | internal, internal | gbtreekey_var + btree_gist | public | gbt_oid_compress | internal | internal + btree_gist | public | gbt_oid_consistent | internal, oid, smallint, oid, internal | boolean + btree_gist | public | gbt_oid_distance | internal, oid, smallint, oid, internal | double precision + btree_gist | public | gbt_oid_fetch | internal | internal + btree_gist | public | gbt_oid_penalty | internal, internal, internal | internal + btree_gist | public | gbt_oid_picksplit | internal, internal | internal + btree_gist | public | gbt_oid_same | gbtreekey8, gbtreekey8, internal | internal + btree_gist | public | gbt_oid_union | internal, internal | gbtreekey8 + btree_gist | public | gbt_text_compress | internal | internal + btree_gist | public | gbt_text_consistent | internal, text, smallint, oid, internal | boolean + btree_gist | public | gbt_text_penalty | internal, internal, internal | internal + btree_gist | public | gbt_text_picksplit | internal, internal | internal + btree_gist | public | gbt_text_same | gbtreekey_var, gbtreekey_var, internal | internal + btree_gist | public | gbt_text_union | internal, internal | gbtreekey_var + btree_gist | public | gbt_time_compress | internal | internal + btree_gist | public | gbt_time_consistent | internal, time without time zone, smallint, oid, internal | boolean + btree_gist | public | gbt_time_distance | internal, time without time zone, smallint, oid, internal | double precision + btree_gist | public | gbt_time_fetch | internal | internal + btree_gist | public | gbt_time_penalty | internal, internal, internal | internal + btree_gist | public | gbt_time_picksplit | internal, internal | internal + btree_gist | public | gbt_time_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_time_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_timetz_compress | internal | internal + btree_gist | public | gbt_timetz_consistent | internal, time with time zone, smallint, oid, internal | boolean + btree_gist | public | gbt_ts_compress | internal | internal + btree_gist | public | gbt_ts_consistent | internal, timestamp without time zone, smallint, oid, internal | boolean + btree_gist | public | gbt_ts_distance | internal, timestamp without time zone, smallint, oid, internal | double precision + btree_gist | public | gbt_ts_fetch | internal | internal + btree_gist | public | gbt_ts_penalty | internal, internal, internal | internal + btree_gist | public | gbt_ts_picksplit | internal, internal | internal + btree_gist | public | gbt_ts_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_ts_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_tstz_compress | internal | internal + btree_gist | public | gbt_tstz_consistent | internal, timestamp with time zone, smallint, oid, internal | boolean + btree_gist | public | gbt_tstz_distance | internal, timestamp with time zone, smallint, oid, internal | double precision + btree_gist | public | gbt_uuid_compress | internal | internal + btree_gist | public | gbt_uuid_consistent | internal, uuid, smallint, oid, internal | boolean + btree_gist | public | gbt_uuid_fetch | internal | internal + btree_gist | public | gbt_uuid_penalty | internal, internal, internal | internal + btree_gist | public | gbt_uuid_picksplit | internal, internal | internal + btree_gist | public | gbt_uuid_same | gbtreekey32, gbtreekey32, internal | internal + btree_gist | public | gbt_uuid_union | internal, internal | gbtreekey32 + btree_gist | public | gbt_var_decompress | internal | internal + btree_gist | public | gbt_var_fetch | internal | internal + btree_gist | public | gbtreekey16_in | cstring | gbtreekey16 + btree_gist | public | gbtreekey16_out | gbtreekey16 | cstring + btree_gist | public | gbtreekey2_in | cstring | gbtreekey2 + btree_gist | public | gbtreekey2_out | gbtreekey2 | cstring + btree_gist | public | gbtreekey32_in | cstring | gbtreekey32 + btree_gist | public | gbtreekey32_out | gbtreekey32 | cstring + btree_gist | public | gbtreekey4_in | cstring | gbtreekey4 + btree_gist | public | gbtreekey4_out | gbtreekey4 | cstring + btree_gist | public | gbtreekey8_in | cstring | gbtreekey8 + btree_gist | public | gbtreekey8_out | gbtreekey8 | cstring + btree_gist | public | gbtreekey_var_in | cstring | gbtreekey_var + btree_gist | public | gbtreekey_var_out | gbtreekey_var | cstring + btree_gist | public | int2_dist | smallint, smallint | smallint + btree_gist | public | int4_dist | integer, integer | integer + btree_gist | public | int8_dist | bigint, bigint | bigint + btree_gist | public | interval_dist | interval, interval | interval + btree_gist | public | oid_dist | oid, oid | oid + btree_gist | public | time_dist | time without time zone, time without time zone | interval + btree_gist | public | ts_dist | timestamp without time zone, timestamp without time zone | interval + btree_gist | public | tstz_dist | timestamp with time zone, timestamp with time zone | interval + citext | public | citext | boolean | citext + citext | public | citext | inet | citext + citext | public | citext | character | citext + citext | public | citext_cmp | citext, citext | integer + citext | public | citext_eq | citext, citext | boolean + citext | public | citext_ge | citext, citext | boolean + citext | public | citext_gt | citext, citext | boolean + citext | public | citext_hash | citext | integer + citext | public | citext_hash_extended | citext, bigint | bigint + citext | public | citext_larger | citext, citext | citext + citext | public | citext_le | citext, citext | boolean + citext | public | citext_lt | citext, citext | boolean + citext | public | citext_ne | citext, citext | boolean + citext | public | citext_pattern_cmp | citext, citext | integer + citext | public | citext_pattern_ge | citext, citext | boolean + citext | public | citext_pattern_gt | citext, citext | boolean + citext | public | citext_pattern_le | citext, citext | boolean + citext | public | citext_pattern_lt | citext, citext | boolean + citext | public | citext_smaller | citext, citext | citext + citext | public | citextin | cstring | citext + citext | public | citextout | citext | cstring + citext | public | citextrecv | internal | citext + citext | public | citextsend | citext | bytea + citext | public | max | citext | citext + citext | public | min | citext | citext + citext | public | regexp_match | citext, citext | text[] + citext | public | regexp_match | citext, citext, text | text[] + citext | public | regexp_matches | citext, citext | SETOF text[] + citext | public | regexp_matches | citext, citext, text | SETOF text[] + citext | public | regexp_replace | citext, citext, text, text | text + citext | public | regexp_replace | citext, citext, text | text + citext | public | regexp_split_to_array | citext, citext | text[] + citext | public | regexp_split_to_array | citext, citext, text | text[] + citext | public | regexp_split_to_table | citext, citext | SETOF text + citext | public | regexp_split_to_table | citext, citext, text | SETOF text + citext | public | replace | citext, citext, citext | text + citext | public | split_part | citext, citext, integer | text + citext | public | strpos | citext, citext | integer + citext | public | texticlike | citext, citext | boolean + citext | public | texticlike | citext, text | boolean + citext | public | texticnlike | citext, citext | boolean + citext | public | texticnlike | citext, text | boolean + citext | public | texticregexeq | citext, citext | boolean + citext | public | texticregexeq | citext, text | boolean + citext | public | texticregexne | citext, citext | boolean + citext | public | texticregexne | citext, text | boolean + citext | public | translate | citext, citext, text | text + cube | public | cube | cube, double precision, double precision | cube + cube | public | cube | double precision | cube + cube | public | cube | double precision[], double precision[] | cube + cube | public | cube | cube, double precision | cube + cube | public | cube | double precision, double precision | cube + cube | public | cube | double precision[] | cube + cube | public | cube_cmp | cube, cube | integer + cube | public | cube_contained | cube, cube | boolean + cube | public | cube_contains | cube, cube | boolean + cube | public | cube_coord | cube, integer | double precision + cube | public | cube_coord_llur | cube, integer | double precision + cube | public | cube_dim | cube | integer + cube | public | cube_distance | cube, cube | double precision + cube | public | cube_enlarge | cube, double precision, integer | cube + cube | public | cube_eq | cube, cube | boolean + cube | public | cube_ge | cube, cube | boolean + cube | public | cube_gt | cube, cube | boolean + cube | public | cube_in | cstring | cube + cube | public | cube_inter | cube, cube | cube + cube | public | cube_is_point | cube | boolean + cube | public | cube_le | cube, cube | boolean + cube | public | cube_ll_coord | cube, integer | double precision + cube | public | cube_lt | cube, cube | boolean + cube | public | cube_ne | cube, cube | boolean + cube | public | cube_out | cube | cstring + cube | public | cube_overlap | cube, cube | boolean + cube | public | cube_recv | internal | cube + cube | public | cube_send | cube | bytea + cube | public | cube_size | cube | double precision + cube | public | cube_subset | cube, integer[] | cube + cube | public | cube_union | cube, cube | cube + cube | public | cube_ur_coord | cube, integer | double precision + cube | public | distance_chebyshev | cube, cube | double precision + cube | public | distance_taxicab | cube, cube | double precision + cube | public | g_cube_consistent | internal, cube, smallint, oid, internal | boolean + cube | public | g_cube_distance | internal, cube, smallint, oid, internal | double precision + cube | public | g_cube_penalty | internal, internal, internal | internal + cube | public | g_cube_picksplit | internal, internal | internal + cube | public | g_cube_same | cube, cube, internal | internal + cube | public | g_cube_union | internal, internal | cube + dblink | public | dblink | text, boolean | SETOF record + dblink | public | dblink | text | SETOF record + dblink | public | dblink | text, text | SETOF record + dblink | public | dblink | text, text, boolean | SETOF record + dblink | public | dblink_build_sql_delete | text, int2vector, integer, text[] | text + dblink | public | dblink_build_sql_insert | text, int2vector, integer, text[], text[] | text + dblink | public | dblink_build_sql_update | text, int2vector, integer, text[], text[] | text + dblink | public | dblink_cancel_query | text | text + dblink | public | dblink_close | text, boolean | text + dblink | public | dblink_close | text | text + dblink | public | dblink_close | text, text | text + dblink | public | dblink_close | text, text, boolean | text + dblink | public | dblink_connect | text | text + dblink | public | dblink_connect | text, text | text + dblink | public | dblink_connect_u | text | text + dblink | public | dblink_connect_u | text, text | text + dblink | public | dblink_current_query | | text + dblink | public | dblink_disconnect | text | text + dblink | public | dblink_disconnect | | text + dblink | public | dblink_error_message | text | text + dblink | public | dblink_exec | text, boolean | text + dblink | public | dblink_exec | text | text + dblink | public | dblink_exec | text, text | text + dblink | public | dblink_exec | text, text, boolean | text + dblink | public | dblink_fdw_validator | options text[], catalog oid | void + dblink | public | dblink_fetch | text, text, integer, boolean | SETOF record + dblink | public | dblink_fetch | text, integer | SETOF record + dblink | public | dblink_fetch | text, text, integer | SETOF record + dblink | public | dblink_fetch | text, integer, boolean | SETOF record + dblink | public | dblink_get_connections | | text[] + dblink | public | dblink_get_notify | OUT notify_name text, OUT be_pid integer, OUT extra text | SETOF record + dblink | public | dblink_get_notify | conname text, OUT notify_name text, OUT be_pid integer, OUT extra text | SETOF record + dblink | public | dblink_get_pkey | text | SETOF dblink_pkey_results + dblink | public | dblink_get_result | text, boolean | SETOF record + dblink | public | dblink_get_result | text | SETOF record + dblink | public | dblink_is_busy | text | integer + dblink | public | dblink_open | text, text, text, boolean | text + dblink | public | dblink_open | text, text | text + dblink | public | dblink_open | text, text, boolean | text + dblink | public | dblink_open | text, text, text | text + dblink | public | dblink_send_query | text, text | integer + dict_int | public | dintdict_init | internal | internal + dict_int | public | dintdict_lexize | internal, internal, internal, internal | internal + dict_xsyn | public | dxsyn_init | internal | internal + dict_xsyn | public | dxsyn_lexize | internal, internal, internal, internal | internal + earthdistance | public | earth | | double precision + earthdistance | public | earth_box | earth, double precision | cube + earthdistance | public | earth_distance | earth, earth | double precision + earthdistance | public | gc_to_sec | double precision | double precision + earthdistance | public | geo_distance | point, point | double precision + earthdistance | public | latitude | earth | double precision + earthdistance | public | ll_to_earth | double precision, double precision | earth + earthdistance | public | longitude | earth | double precision + earthdistance | public | sec_to_gc | double precision | double precision + file_fdw | public | file_fdw_handler | | fdw_handler + file_fdw | public | file_fdw_validator | text[], oid | void + fuzzystrmatch | public | difference | text, text | integer + fuzzystrmatch | public | dmetaphone | text | text + fuzzystrmatch | public | dmetaphone_alt | text | text + fuzzystrmatch | public | levenshtein | text, text | integer + fuzzystrmatch | public | levenshtein | text, text, integer, integer, integer | integer + fuzzystrmatch | public | levenshtein_less_equal | text, text, integer, integer, integer, integer | integer + fuzzystrmatch | public | levenshtein_less_equal | text, text, integer | integer + fuzzystrmatch | public | metaphone | text, integer | text + fuzzystrmatch | public | soundex | text | text + fuzzystrmatch | public | text_soundex | text | text + hstore | public | akeys | hstore | text[] + hstore | public | avals | hstore | text[] + hstore | public | defined | hstore, text | boolean + hstore | public | delete | hstore, text | hstore + hstore | public | delete | hstore, text[] | hstore + hstore | public | delete | hstore, hstore | hstore + hstore | public | each | hs hstore, OUT key text, OUT value text | SETOF record + hstore | public | exist | hstore, text | boolean + hstore | public | exists_all | hstore, text[] | boolean + hstore | public | exists_any | hstore, text[] | boolean + hstore | public | fetchval | hstore, text | text + hstore | public | ghstore_compress | internal | internal + hstore | public | ghstore_consistent | internal, hstore, smallint, oid, internal | boolean + hstore | public | ghstore_decompress | internal | internal + hstore | public | ghstore_in | cstring | ghstore + hstore | public | ghstore_options | internal | void + hstore | public | ghstore_out | ghstore | cstring + hstore | public | ghstore_penalty | internal, internal, internal | internal + hstore | public | ghstore_picksplit | internal, internal | internal + hstore | public | ghstore_same | ghstore, ghstore, internal | internal + hstore | public | ghstore_union | internal, internal | ghstore + hstore | public | gin_consistent_hstore | internal, smallint, hstore, integer, internal, internal | boolean + hstore | public | gin_extract_hstore | hstore, internal | internal + hstore | public | gin_extract_hstore_query | hstore, internal, smallint, internal, internal | internal + hstore | public | hs_concat | hstore, hstore | hstore + hstore | public | hs_contained | hstore, hstore | boolean + hstore | public | hs_contains | hstore, hstore | boolean + hstore | public | hstore | text[], text[] | hstore + hstore | public | hstore | text, text | hstore + hstore | public | hstore | text[] | hstore + hstore | public | hstore | record | hstore + hstore | public | hstore_cmp | hstore, hstore | integer + hstore | public | hstore_eq | hstore, hstore | boolean + hstore | public | hstore_ge | hstore, hstore | boolean + hstore | public | hstore_gt | hstore, hstore | boolean + hstore | public | hstore_hash | hstore | integer + hstore | public | hstore_hash_extended | hstore, bigint | bigint + hstore | public | hstore_in | cstring | hstore + hstore | public | hstore_le | hstore, hstore | boolean + hstore | public | hstore_lt | hstore, hstore | boolean + hstore | public | hstore_ne | hstore, hstore | boolean + hstore | public | hstore_out | hstore | cstring + hstore | public | hstore_recv | internal | hstore + hstore | public | hstore_send | hstore | bytea + hstore | public | hstore_subscript_handler | internal | internal + hstore | public | hstore_to_array | hstore | text[] + hstore | public | hstore_to_json | hstore | json + hstore | public | hstore_to_json_loose | hstore | json + hstore | public | hstore_to_jsonb | hstore | jsonb + hstore | public | hstore_to_jsonb_loose | hstore | jsonb + hstore | public | hstore_to_matrix | hstore | text[] + hstore | public | hstore_version_diag | hstore | integer + hstore | public | isdefined | hstore, text | boolean + hstore | public | isexists | hstore, text | boolean + hstore | public | populate_record | anyelement, hstore | anyelement + hstore | public | skeys | hstore | SETOF text + hstore | public | slice | hstore, text[] | hstore + hstore | public | slice_array | hstore, text[] | text[] + hstore | public | svals | hstore | SETOF text + hstore | public | tconvert | text, text | hstore + http | public | bytea_to_text | data bytea | text + http | public | http | request http_request | http_response + http | public | http_delete | uri character varying, content character varying, content_type character varying | http_response + http | public | http_delete | uri character varying | http_response + http | public | http_get | uri character varying, data jsonb | http_response + http | public | http_get | uri character varying | http_response + http | public | http_head | uri character varying | http_response + http | public | http_header | field character varying, value character varying | http_header + http | public | http_list_curlopt | | TABLE(curlopt text, value text) + http | public | http_patch | uri character varying, content character varying, content_type character varying | http_response + http | public | http_post | uri character varying, data jsonb | http_response + http | public | http_post | uri character varying, content character varying, content_type character varying | http_response + http | public | http_put | uri character varying, content character varying, content_type character varying | http_response + http | public | http_reset_curlopt | | boolean + http | public | http_set_curlopt | curlopt character varying, value character varying | boolean + http | public | text_to_bytea | data text | bytea + http | public | urlencode | data jsonb | text + http | public | urlencode | string character varying | text + http | public | urlencode | string bytea | text + hypopg | public | hypopg | OUT indexname text, OUT indexrelid oid, OUT indrelid oid, OUT innatts integer, OUT indisunique boolean, OUT indkey int2vector, OUT indcollation oidvector, OUT indclass oidvector, OUT indoption oidvector, OUT indexprs pg_node_tree, OUT indpred pg_node_tree, OUT amid oid | SETOF record + hypopg | public | hypopg_create_index | sql_order text, OUT indexrelid oid, OUT indexname text | SETOF record + hypopg | public | hypopg_drop_index | indexid oid | boolean + hypopg | public | hypopg_get_indexdef | indexid oid | text + hypopg | public | hypopg_hidden_indexes | | TABLE(indexid oid) + hypopg | public | hypopg_hide_index | indexid oid | boolean + hypopg | public | hypopg_relation_size | indexid oid | bigint + hypopg | public | hypopg_reset | | void + hypopg | public | hypopg_reset_index | | void + hypopg | public | hypopg_unhide_all_indexes | | void + hypopg | public | hypopg_unhide_index | indexid oid | boolean + index_advisor | public | index_advisor | query text | TABLE(startup_cost_before jsonb, startup_cost_after jsonb, total_cost_before jsonb, total_cost_after jsonb, index_statements text[], errors text[]) + insert_username | public | insert_username | | trigger + intagg | public | int_agg_final_array | internal | integer[] + intagg | public | int_agg_state | internal, integer | internal + intagg | public | int_array_aggregate | integer | integer[] + intagg | public | int_array_enum | integer[] | SETOF integer + intarray | public | _int_contained | integer[], integer[] | boolean + intarray | public | _int_contained_joinsel | internal, oid, internal, smallint, internal | double precision + intarray | public | _int_contained_sel | internal, oid, internal, integer | double precision + intarray | public | _int_contains | integer[], integer[] | boolean + intarray | public | _int_contains_joinsel | internal, oid, internal, smallint, internal | double precision + intarray | public | _int_contains_sel | internal, oid, internal, integer | double precision + intarray | public | _int_different | integer[], integer[] | boolean + intarray | public | _int_inter | integer[], integer[] | integer[] + intarray | public | _int_matchsel | internal, oid, internal, integer | double precision + intarray | public | _int_overlap | integer[], integer[] | boolean + intarray | public | _int_overlap_joinsel | internal, oid, internal, smallint, internal | double precision + intarray | public | _int_overlap_sel | internal, oid, internal, integer | double precision + intarray | public | _int_same | integer[], integer[] | boolean + intarray | public | _int_union | integer[], integer[] | integer[] + intarray | public | _intbig_in | cstring | intbig_gkey + intarray | public | _intbig_out | intbig_gkey | cstring + intarray | public | boolop | integer[], query_int | boolean + intarray | public | bqarr_in | cstring | query_int + intarray | public | bqarr_out | query_int | cstring + intarray | public | g_int_compress | internal | internal + intarray | public | g_int_consistent | internal, integer[], smallint, oid, internal | boolean + intarray | public | g_int_decompress | internal | internal + intarray | public | g_int_options | internal | void + intarray | public | g_int_penalty | internal, internal, internal | internal + intarray | public | g_int_picksplit | internal, internal | internal + intarray | public | g_int_same | integer[], integer[], internal | internal + intarray | public | g_int_union | internal, internal | integer[] + intarray | public | g_intbig_compress | internal | internal + intarray | public | g_intbig_consistent | internal, integer[], smallint, oid, internal | boolean + intarray | public | g_intbig_decompress | internal | internal + intarray | public | g_intbig_options | internal | void + intarray | public | g_intbig_penalty | internal, internal, internal | internal + intarray | public | g_intbig_picksplit | internal, internal | internal + intarray | public | g_intbig_same | intbig_gkey, intbig_gkey, internal | internal + intarray | public | g_intbig_union | internal, internal | intbig_gkey + intarray | public | ginint4_consistent | internal, smallint, integer[], integer, internal, internal, internal, internal | boolean + intarray | public | ginint4_queryextract | integer[], internal, smallint, internal, internal, internal, internal | internal + intarray | public | icount | integer[] | integer + intarray | public | idx | integer[], integer | integer + intarray | public | intarray_del_elem | integer[], integer | integer[] + intarray | public | intarray_push_array | integer[], integer[] | integer[] + intarray | public | intarray_push_elem | integer[], integer | integer[] + intarray | public | intset | integer | integer[] + intarray | public | intset_subtract | integer[], integer[] | integer[] + intarray | public | intset_union_elem | integer[], integer | integer[] + intarray | public | querytree | query_int | text + intarray | public | rboolop | query_int, integer[] | boolean + intarray | public | sort | integer[] | integer[] + intarray | public | sort | integer[], text | integer[] + intarray | public | sort_asc | integer[] | integer[] + intarray | public | sort_desc | integer[] | integer[] + intarray | public | subarray | integer[], integer | integer[] + intarray | public | subarray | integer[], integer, integer | integer[] + intarray | public | uniq | integer[] | integer[] + isn | public | btean13cmp | ean13, ean13 | integer + isn | public | btean13cmp | ean13, issn | integer + isn | public | btean13cmp | ean13, upc | integer + isn | public | btean13cmp | ean13, issn13 | integer + isn | public | btean13cmp | ean13, ismn | integer + isn | public | btean13cmp | ean13, ismn13 | integer + isn | public | btean13cmp | ean13, isbn13 | integer + isn | public | btean13cmp | ean13, isbn | integer + isn | public | btisbn13cmp | isbn13, isbn13 | integer + isn | public | btisbn13cmp | isbn13, ean13 | integer + isn | public | btisbn13cmp | isbn13, isbn | integer + isn | public | btisbncmp | isbn, ean13 | integer + isn | public | btisbncmp | isbn, isbn | integer + isn | public | btisbncmp | isbn, isbn13 | integer + isn | public | btismn13cmp | ismn13, ismn13 | integer + isn | public | btismn13cmp | ismn13, ean13 | integer + isn | public | btismn13cmp | ismn13, ismn | integer + isn | public | btismncmp | ismn, ismn | integer + isn | public | btismncmp | ismn, ean13 | integer + isn | public | btismncmp | ismn, ismn13 | integer + isn | public | btissn13cmp | issn13, issn13 | integer + isn | public | btissn13cmp | issn13, ean13 | integer + isn | public | btissn13cmp | issn13, issn | integer + isn | public | btissncmp | issn, ean13 | integer + isn | public | btissncmp | issn, issn13 | integer + isn | public | btissncmp | issn, issn | integer + isn | public | btupccmp | upc, upc | integer + isn | public | btupccmp | upc, ean13 | integer + isn | public | ean13_in | cstring | ean13 + isn | public | ean13_out | isbn13 | cstring + isn | public | ean13_out | ismn13 | cstring + isn | public | ean13_out | ean13 | cstring + isn | public | ean13_out | issn13 | cstring + isn | public | hashean13 | ean13 | integer + isn | public | hashisbn | isbn | integer + isn | public | hashisbn13 | isbn13 | integer + isn | public | hashismn | ismn | integer + isn | public | hashismn13 | ismn13 | integer + isn | public | hashissn | issn | integer + isn | public | hashissn13 | issn13 | integer + isn | public | hashupc | upc | integer + isn | public | is_valid | isbn13 | boolean + isn | public | is_valid | upc | boolean + isn | public | is_valid | ismn | boolean + isn | public | is_valid | issn | boolean + isn | public | is_valid | isbn | boolean + isn | public | is_valid | ismn13 | boolean + isn | public | is_valid | ean13 | boolean + isn | public | is_valid | issn13 | boolean + isn | public | isbn | ean13 | isbn + isn | public | isbn13 | ean13 | isbn13 + isn | public | isbn13_in | cstring | isbn13 + isn | public | isbn_in | cstring | isbn + isn | public | ismn | ean13 | ismn + isn | public | ismn13 | ean13 | ismn13 + isn | public | ismn13_in | cstring | ismn13 + isn | public | ismn_in | cstring | ismn + isn | public | isn_out | upc | cstring + isn | public | isn_out | ismn | cstring + isn | public | isn_out | issn | cstring + isn | public | isn_out | isbn | cstring + isn | public | isn_weak | boolean | boolean + isn | public | isn_weak | | boolean + isn | public | isneq | ismn, ismn | boolean + isn | public | isneq | ean13, ean13 | boolean + isn | public | isneq | isbn, ean13 | boolean + isn | public | isneq | issn, ean13 | boolean + isn | public | isneq | isbn13, isbn13 | boolean + isn | public | isneq | ean13, issn | boolean + isn | public | isneq | isbn, isbn | boolean + isn | public | isneq | ean13, upc | boolean + isn | public | isneq | ean13, issn13 | boolean + isn | public | isneq | ean13, ismn | boolean + isn | public | isneq | upc, upc | boolean + isn | public | isneq | issn13, issn13 | boolean + isn | public | isneq | upc, ean13 | boolean + isn | public | isneq | ismn13, ismn13 | boolean + isn | public | isneq | issn13, ean13 | boolean + isn | public | isneq | ean13, ismn13 | boolean + isn | public | isneq | ismn13, ean13 | boolean + isn | public | isneq | issn13, issn | boolean + isn | public | isneq | ismn, ean13 | boolean + isn | public | isneq | ismn13, ismn | boolean + isn | public | isneq | ean13, isbn13 | boolean + isn | public | isneq | isbn13, ean13 | boolean + isn | public | isneq | isbn13, isbn | boolean + isn | public | isneq | isbn, isbn13 | boolean + isn | public | isneq | ismn, ismn13 | boolean + isn | public | isneq | ean13, isbn | boolean + isn | public | isneq | issn, issn13 | boolean + isn | public | isneq | issn, issn | boolean + isn | public | isnge | ismn, ismn | boolean + isn | public | isnge | ean13, ean13 | boolean + isn | public | isnge | isbn, ean13 | boolean + isn | public | isnge | issn, ean13 | boolean + isn | public | isnge | isbn13, isbn13 | boolean + isn | public | isnge | ean13, issn | boolean + isn | public | isnge | isbn, isbn | boolean + isn | public | isnge | ean13, upc | boolean + isn | public | isnge | ean13, issn13 | boolean + isn | public | isnge | ean13, ismn | boolean + isn | public | isnge | upc, upc | boolean + isn | public | isnge | issn13, issn13 | boolean + isn | public | isnge | upc, ean13 | boolean + isn | public | isnge | ismn13, ismn13 | boolean + isn | public | isnge | issn13, ean13 | boolean + isn | public | isnge | ean13, ismn13 | boolean + isn | public | isnge | ismn13, ean13 | boolean + isn | public | isnge | issn13, issn | boolean + isn | public | isnge | ismn, ean13 | boolean + isn | public | isnge | ismn13, ismn | boolean + isn | public | isnge | ean13, isbn13 | boolean + isn | public | isnge | isbn13, ean13 | boolean + isn | public | isnge | isbn13, isbn | boolean + isn | public | isnge | isbn, isbn13 | boolean + isn | public | isnge | ismn, ismn13 | boolean + isn | public | isnge | ean13, isbn | boolean + isn | public | isnge | issn, issn13 | boolean + isn | public | isnge | issn, issn | boolean + isn | public | isngt | ismn, ismn | boolean + isn | public | isngt | ean13, ean13 | boolean + isn | public | isngt | isbn, ean13 | boolean + isn | public | isngt | issn, ean13 | boolean + isn | public | isngt | isbn13, isbn13 | boolean + isn | public | isngt | ean13, issn | boolean + isn | public | isngt | isbn, isbn | boolean + isn | public | isngt | ean13, upc | boolean + isn | public | isngt | ean13, issn13 | boolean + isn | public | isngt | ean13, ismn | boolean + isn | public | isngt | upc, upc | boolean + isn | public | isngt | issn13, issn13 | boolean + isn | public | isngt | upc, ean13 | boolean + isn | public | isngt | ismn13, ismn13 | boolean + isn | public | isngt | issn13, ean13 | boolean + isn | public | isngt | ean13, ismn13 | boolean + isn | public | isngt | ismn13, ean13 | boolean + isn | public | isngt | issn13, issn | boolean + isn | public | isngt | ismn, ean13 | boolean + isn | public | isngt | ismn13, ismn | boolean + isn | public | isngt | ean13, isbn13 | boolean + isn | public | isngt | isbn13, ean13 | boolean + isn | public | isngt | isbn13, isbn | boolean + isn | public | isngt | isbn, isbn13 | boolean + isn | public | isngt | ismn, ismn13 | boolean + isn | public | isngt | ean13, isbn | boolean + isn | public | isngt | issn, issn13 | boolean + isn | public | isngt | issn, issn | boolean + isn | public | isnle | ismn, ismn | boolean + isn | public | isnle | ean13, ean13 | boolean + isn | public | isnle | isbn, ean13 | boolean + isn | public | isnle | issn, ean13 | boolean + isn | public | isnle | isbn13, isbn13 | boolean + isn | public | isnle | ean13, issn | boolean + isn | public | isnle | isbn, isbn | boolean + isn | public | isnle | ean13, upc | boolean + isn | public | isnle | ean13, issn13 | boolean + isn | public | isnle | ean13, ismn | boolean + isn | public | isnle | upc, upc | boolean + isn | public | isnle | issn13, issn13 | boolean + isn | public | isnle | upc, ean13 | boolean + isn | public | isnle | ismn13, ismn13 | boolean + isn | public | isnle | issn13, ean13 | boolean + isn | public | isnle | ean13, ismn13 | boolean + isn | public | isnle | ismn13, ean13 | boolean + isn | public | isnle | issn13, issn | boolean + isn | public | isnle | ismn, ean13 | boolean + isn | public | isnle | ismn13, ismn | boolean + isn | public | isnle | ean13, isbn13 | boolean + isn | public | isnle | isbn13, ean13 | boolean + isn | public | isnle | isbn13, isbn | boolean + isn | public | isnle | isbn, isbn13 | boolean + isn | public | isnle | ismn, ismn13 | boolean + isn | public | isnle | ean13, isbn | boolean + isn | public | isnle | issn, issn13 | boolean + isn | public | isnle | issn, issn | boolean + isn | public | isnlt | ismn, ismn | boolean + isn | public | isnlt | ean13, ean13 | boolean + isn | public | isnlt | isbn, ean13 | boolean + isn | public | isnlt | issn, ean13 | boolean + isn | public | isnlt | isbn13, isbn13 | boolean + isn | public | isnlt | ean13, issn | boolean + isn | public | isnlt | isbn, isbn | boolean + isn | public | isnlt | ean13, upc | boolean + isn | public | isnlt | ean13, issn13 | boolean + isn | public | isnlt | ean13, ismn | boolean + isn | public | isnlt | upc, upc | boolean + isn | public | isnlt | issn13, issn13 | boolean + isn | public | isnlt | upc, ean13 | boolean + isn | public | isnlt | ismn13, ismn13 | boolean + isn | public | isnlt | issn13, ean13 | boolean + isn | public | isnlt | ean13, ismn13 | boolean + isn | public | isnlt | ismn13, ean13 | boolean + isn | public | isnlt | issn13, issn | boolean + isn | public | isnlt | ismn, ean13 | boolean + isn | public | isnlt | ismn13, ismn | boolean + isn | public | isnlt | ean13, isbn13 | boolean + isn | public | isnlt | isbn13, ean13 | boolean + isn | public | isnlt | isbn13, isbn | boolean + isn | public | isnlt | isbn, isbn13 | boolean + isn | public | isnlt | ismn, ismn13 | boolean + isn | public | isnlt | ean13, isbn | boolean + isn | public | isnlt | issn, issn13 | boolean + isn | public | isnlt | issn, issn | boolean + isn | public | isnne | ismn, ismn | boolean + isn | public | isnne | ean13, ean13 | boolean + isn | public | isnne | isbn, ean13 | boolean + isn | public | isnne | issn, ean13 | boolean + isn | public | isnne | isbn13, isbn13 | boolean + isn | public | isnne | ean13, issn | boolean + isn | public | isnne | isbn, isbn | boolean + isn | public | isnne | ean13, upc | boolean + isn | public | isnne | ean13, issn13 | boolean + isn | public | isnne | ean13, ismn | boolean + isn | public | isnne | upc, upc | boolean + isn | public | isnne | issn13, issn13 | boolean + isn | public | isnne | upc, ean13 | boolean + isn | public | isnne | ismn13, ismn13 | boolean + isn | public | isnne | issn13, ean13 | boolean + isn | public | isnne | ean13, ismn13 | boolean + isn | public | isnne | ismn13, ean13 | boolean + isn | public | isnne | issn13, issn | boolean + isn | public | isnne | ismn, ean13 | boolean + isn | public | isnne | ismn13, ismn | boolean + isn | public | isnne | ean13, isbn13 | boolean + isn | public | isnne | isbn13, ean13 | boolean + isn | public | isnne | isbn13, isbn | boolean + isn | public | isnne | isbn, isbn13 | boolean + isn | public | isnne | ismn, ismn13 | boolean + isn | public | isnne | ean13, isbn | boolean + isn | public | isnne | issn, issn13 | boolean + isn | public | isnne | issn, issn | boolean + isn | public | issn | ean13 | issn + isn | public | issn13 | ean13 | issn13 + isn | public | issn13_in | cstring | issn13 + isn | public | issn_in | cstring | issn + isn | public | make_valid | isbn13 | isbn13 + isn | public | make_valid | upc | upc + isn | public | make_valid | ismn | ismn + isn | public | make_valid | issn | issn + isn | public | make_valid | isbn | isbn + isn | public | make_valid | ismn13 | ismn13 + isn | public | make_valid | ean13 | ean13 + isn | public | make_valid | issn13 | issn13 + isn | public | upc | ean13 | upc + isn | public | upc_in | cstring | upc + lo | public | lo_manage | | trigger + lo | public | lo_oid | lo | oid + ltree | public | _lt_q_regex | ltree[], lquery[] | boolean + ltree | public | _lt_q_rregex | lquery[], ltree[] | boolean + ltree | public | _ltq_extract_regex | ltree[], lquery | ltree + ltree | public | _ltq_regex | ltree[], lquery | boolean + ltree | public | _ltq_rregex | lquery, ltree[] | boolean + ltree | public | _ltree_compress | internal | internal + ltree | public | _ltree_consistent | internal, ltree[], smallint, oid, internal | boolean + ltree | public | _ltree_extract_isparent | ltree[], ltree | ltree + ltree | public | _ltree_extract_risparent | ltree[], ltree | ltree + ltree | public | _ltree_gist_options | internal | void + ltree | public | _ltree_isparent | ltree[], ltree | boolean + ltree | public | _ltree_penalty | internal, internal, internal | internal + ltree | public | _ltree_picksplit | internal, internal | internal + ltree | public | _ltree_r_isparent | ltree, ltree[] | boolean + ltree | public | _ltree_r_risparent | ltree, ltree[] | boolean + ltree | public | _ltree_risparent | ltree[], ltree | boolean + ltree | public | _ltree_same | ltree_gist, ltree_gist, internal | internal + ltree | public | _ltree_union | internal, internal | ltree_gist + ltree | public | _ltxtq_exec | ltree[], ltxtquery | boolean + ltree | public | _ltxtq_extract_exec | ltree[], ltxtquery | ltree + ltree | public | _ltxtq_rexec | ltxtquery, ltree[] | boolean + ltree | public | hash_ltree | ltree | integer + ltree | public | hash_ltree_extended | ltree, bigint | bigint + ltree | public | index | ltree, ltree | integer + ltree | public | index | ltree, ltree, integer | integer + ltree | public | lca | ltree, ltree, ltree, ltree, ltree, ltree | ltree + ltree | public | lca | ltree, ltree | ltree + ltree | public | lca | ltree, ltree, ltree | ltree + ltree | public | lca | ltree, ltree, ltree, ltree, ltree, ltree, ltree, ltree | ltree + ltree | public | lca | ltree, ltree, ltree, ltree, ltree | ltree + ltree | public | lca | ltree[] | ltree + ltree | public | lca | ltree, ltree, ltree, ltree, ltree, ltree, ltree | ltree + ltree | public | lca | ltree, ltree, ltree, ltree | ltree + ltree | public | lquery_in | cstring | lquery + ltree | public | lquery_out | lquery | cstring + ltree | public | lquery_recv | internal | lquery + ltree | public | lquery_send | lquery | bytea + ltree | public | lt_q_regex | ltree, lquery[] | boolean + ltree | public | lt_q_rregex | lquery[], ltree | boolean + ltree | public | ltq_regex | ltree, lquery | boolean + ltree | public | ltq_rregex | lquery, ltree | boolean + ltree | public | ltree2text | ltree | text + ltree | public | ltree_addltree | ltree, ltree | ltree + ltree | public | ltree_addtext | ltree, text | ltree + ltree | public | ltree_cmp | ltree, ltree | integer + ltree | public | ltree_compress | internal | internal + ltree | public | ltree_consistent | internal, ltree, smallint, oid, internal | boolean + ltree | public | ltree_decompress | internal | internal + ltree | public | ltree_eq | ltree, ltree | boolean + ltree | public | ltree_ge | ltree, ltree | boolean + ltree | public | ltree_gist_in | cstring | ltree_gist + ltree | public | ltree_gist_options | internal | void + ltree | public | ltree_gist_out | ltree_gist | cstring + ltree | public | ltree_gt | ltree, ltree | boolean + ltree | public | ltree_in | cstring | ltree + ltree | public | ltree_isparent | ltree, ltree | boolean + ltree | public | ltree_le | ltree, ltree | boolean + ltree | public | ltree_lt | ltree, ltree | boolean + ltree | public | ltree_ne | ltree, ltree | boolean + ltree | public | ltree_out | ltree | cstring + ltree | public | ltree_penalty | internal, internal, internal | internal + ltree | public | ltree_picksplit | internal, internal | internal + ltree | public | ltree_recv | internal | ltree + ltree | public | ltree_risparent | ltree, ltree | boolean + ltree | public | ltree_same | ltree_gist, ltree_gist, internal | internal + ltree | public | ltree_send | ltree | bytea + ltree | public | ltree_textadd | text, ltree | ltree + ltree | public | ltree_union | internal, internal | ltree_gist + ltree | public | ltreeparentsel | internal, oid, internal, integer | double precision + ltree | public | ltxtq_exec | ltree, ltxtquery | boolean + ltree | public | ltxtq_in | cstring | ltxtquery + ltree | public | ltxtq_out | ltxtquery | cstring + ltree | public | ltxtq_recv | internal | ltxtquery + ltree | public | ltxtq_rexec | ltxtquery, ltree | boolean + ltree | public | ltxtq_send | ltxtquery | bytea + ltree | public | nlevel | ltree | integer + ltree | public | subltree | ltree, integer, integer | ltree + ltree | public | subpath | ltree, integer | ltree + ltree | public | subpath | ltree, integer, integer | ltree + ltree | public | text2ltree | text | ltree + moddatetime | public | moddatetime | | trigger + pageinspect | public | brin_metapage_info | page bytea, OUT magic text, OUT version integer, OUT pagesperrange integer, OUT lastrevmappage bigint | record + pageinspect | public | brin_page_type | page bytea | text + pageinspect | public | brin_revmap_data | page bytea, OUT pages tid | SETOF tid + pageinspect | public | bt_metap | relname text, OUT magic integer, OUT version integer, OUT root bigint, OUT level bigint, OUT fastroot bigint, OUT fastlevel bigint, OUT last_cleanup_num_delpages bigint, OUT last_cleanup_num_tuples double precision, OUT allequalimage boolean | record + pageinspect | public | bt_page_items | page bytea, OUT itemoffset smallint, OUT ctid tid, OUT itemlen smallint, OUT nulls boolean, OUT vars boolean, OUT data text, OUT dead boolean, OUT htid tid, OUT tids tid[] | SETOF record + pageinspect | public | bt_page_items | relname text, blkno bigint, OUT itemoffset smallint, OUT ctid tid, OUT itemlen smallint, OUT nulls boolean, OUT vars boolean, OUT data text, OUT dead boolean, OUT htid tid, OUT tids tid[] | SETOF record + pageinspect | public | bt_page_stats | relname text, blkno bigint, OUT blkno bigint, OUT type "char", OUT live_items integer, OUT dead_items integer, OUT avg_item_size integer, OUT page_size integer, OUT free_size integer, OUT btpo_prev bigint, OUT btpo_next bigint, OUT btpo_level bigint, OUT btpo_flags integer | record + pageinspect | public | fsm_page_contents | page bytea | text + pageinspect | public | get_raw_page | text, bigint | bytea + pageinspect | public | get_raw_page | text, text, bigint | bytea + pageinspect | public | gin_leafpage_items | page bytea, OUT first_tid tid, OUT nbytes smallint, OUT tids tid[] | SETOF record + pageinspect | public | gin_metapage_info | page bytea, OUT pending_head bigint, OUT pending_tail bigint, OUT tail_free_size integer, OUT n_pending_pages bigint, OUT n_pending_tuples bigint, OUT n_total_pages bigint, OUT n_entry_pages bigint, OUT n_data_pages bigint, OUT n_entries bigint, OUT version integer | record + pageinspect | public | gin_page_opaque_info | page bytea, OUT rightlink bigint, OUT maxoff integer, OUT flags text[] | record + pageinspect | public | gist_page_items | page bytea, index_oid regclass, OUT itemoffset smallint, OUT ctid tid, OUT itemlen smallint, OUT dead boolean, OUT keys text | SETOF record + pageinspect | public | gist_page_items_bytea | page bytea, OUT itemoffset smallint, OUT ctid tid, OUT itemlen smallint, OUT dead boolean, OUT key_data bytea | SETOF record + pageinspect | public | gist_page_opaque_info | page bytea, OUT lsn pg_lsn, OUT nsn pg_lsn, OUT rightlink bigint, OUT flags text[] | record + pageinspect | public | hash_bitmap_info | index_oid regclass, blkno bigint, OUT bitmapblkno bigint, OUT bitmapbit integer, OUT bitstatus boolean | SETOF record + pageinspect | public | hash_metapage_info | page bytea, OUT magic bigint, OUT version bigint, OUT ntuples double precision, OUT ffactor integer, OUT bsize integer, OUT bmsize integer, OUT bmshift integer, OUT maxbucket bigint, OUT highmask bigint, OUT lowmask bigint, OUT ovflpoint bigint, OUT firstfree bigint, OUT nmaps bigint, OUT procid oid, OUT spares bigint[], OUT mapp bigint[] | record + pageinspect | public | hash_page_items | page bytea, OUT itemoffset integer, OUT ctid tid, OUT data bigint | SETOF record + pageinspect | public | hash_page_stats | page bytea, OUT live_items integer, OUT dead_items integer, OUT page_size integer, OUT free_size integer, OUT hasho_prevblkno bigint, OUT hasho_nextblkno bigint, OUT hasho_bucket bigint, OUT hasho_flag integer, OUT hasho_page_id integer | record + pageinspect | public | hash_page_type | page bytea | text + pageinspect | public | heap_page_item_attrs | page bytea, rel_oid regclass, OUT lp smallint, OUT lp_off smallint, OUT lp_flags smallint, OUT lp_len smallint, OUT t_xmin xid, OUT t_xmax xid, OUT t_field3 integer, OUT t_ctid tid, OUT t_infomask2 integer, OUT t_infomask integer, OUT t_hoff smallint, OUT t_bits text, OUT t_oid oid, OUT t_attrs bytea[] | SETOF record + pageinspect | public | heap_page_item_attrs | page bytea, rel_oid regclass, do_detoast boolean, OUT lp smallint, OUT lp_off smallint, OUT lp_flags smallint, OUT lp_len smallint, OUT t_xmin xid, OUT t_xmax xid, OUT t_field3 integer, OUT t_ctid tid, OUT t_infomask2 integer, OUT t_infomask integer, OUT t_hoff smallint, OUT t_bits text, OUT t_oid oid, OUT t_attrs bytea[] | SETOF record + pageinspect | public | heap_page_items | page bytea, OUT lp smallint, OUT lp_off smallint, OUT lp_flags smallint, OUT lp_len smallint, OUT t_xmin xid, OUT t_xmax xid, OUT t_field3 integer, OUT t_ctid tid, OUT t_infomask2 integer, OUT t_infomask integer, OUT t_hoff smallint, OUT t_bits text, OUT t_oid oid, OUT t_data bytea | SETOF record + pageinspect | public | heap_tuple_infomask_flags | t_infomask integer, t_infomask2 integer, OUT raw_flags text[], OUT combined_flags text[] | record + pageinspect | public | page_checksum | page bytea, blkno bigint | smallint + pageinspect | public | page_header | page bytea, OUT lsn pg_lsn, OUT checksum smallint, OUT flags smallint, OUT lower integer, OUT upper integer, OUT special integer, OUT pagesize integer, OUT version smallint, OUT prune_xid xid | record + pageinspect | public | tuple_data_split | rel_oid oid, t_data bytea, t_infomask integer, t_infomask2 integer, t_bits text | bytea[] + pageinspect | public | tuple_data_split | rel_oid oid, t_data bytea, t_infomask integer, t_infomask2 integer, t_bits text, do_detoast boolean | bytea[] + pg_buffercache | public | pg_buffercache_evict | integer | boolean + pg_buffercache | public | pg_buffercache_pages | | SETOF record + pg_freespacemap | public | pg_freespace | rel regclass, OUT blkno bigint, OUT avail smallint | SETOF record + pg_freespacemap | public | pg_freespace | regclass, bigint | smallint + pg_graphql | graphql | _internal_resolve | query text, variables jsonb, "operationName" text, extensions jsonb | jsonb + pg_graphql | graphql | comment_directive | comment_ text | jsonb + pg_graphql | graphql | exception | message text | text + pg_graphql | graphql | get_schema_version | | integer + pg_graphql | graphql | increment_schema_version | | event_trigger + pg_graphql | graphql | resolve | query text, variables jsonb, "operationName" text, extensions jsonb | jsonb + pg_graphql | graphql_public | graphql | "operationName" text, query text, variables jsonb, extensions jsonb | jsonb + pg_hashids | public | hash_decode | text, text, integer | integer + pg_hashids | public | hash_encode | bigint | text + pg_hashids | public | hash_encode | bigint, text | text + pg_hashids | public | hash_encode | bigint, text, integer | text + pg_hashids | public | id_decode | text | bigint[] + pg_hashids | public | id_decode | text, text | bigint[] + pg_hashids | public | id_decode | text, text, integer, text | bigint[] + pg_hashids | public | id_decode | text, text, integer | bigint[] + pg_hashids | public | id_decode_once | text | bigint + pg_hashids | public | id_decode_once | text, text | bigint + pg_hashids | public | id_decode_once | text, text, integer, text | bigint + pg_hashids | public | id_decode_once | text, text, integer | bigint + pg_hashids | public | id_encode | bigint | text + pg_hashids | public | id_encode | bigint[] | text + pg_hashids | public | id_encode | bigint[], text | text + pg_hashids | public | id_encode | bigint[], text, integer | text + pg_hashids | public | id_encode | bigint, text | text + pg_hashids | public | id_encode | bigint, text, integer | text + pg_hashids | public | id_encode | bigint, text, integer, text | text + pg_hashids | public | id_encode | bigint[], text, integer, text | text + pg_jsonschema | public | json_matches_schema | schema json, instance json | boolean + pg_jsonschema | public | jsonb_matches_schema | schema json, instance jsonb | boolean + pg_jsonschema | public | jsonschema_is_valid | schema json | boolean + pg_jsonschema | public | jsonschema_validation_errors | schema json, instance json | text[] + pg_net | net | _await_response | request_id bigint | boolean + pg_net | net | _encode_url_with_params_array | url text, params_array text[] | text + pg_net | net | _http_collect_response | request_id bigint, async boolean | net.http_response_result + pg_net | net | _urlencode_string | string character varying | text + pg_net | net | check_worker_is_up | | void + pg_net | net | http_collect_response | request_id bigint, async boolean | net.http_response_result + pg_net | net | http_delete | url text, params jsonb, headers jsonb, timeout_milliseconds integer | bigint + pg_net | net | http_get | url text, params jsonb, headers jsonb, timeout_milliseconds integer | bigint + pg_net | net | http_post | url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer | bigint + pg_net | net | worker_restart | | boolean + pg_prewarm | public | autoprewarm_dump_now | | bigint + pg_prewarm | public | autoprewarm_start_worker | | void + pg_prewarm | public | pg_prewarm | regclass, mode text, fork text, first_block bigint, last_block bigint | bigint + pg_repack | repack | conflicted_triggers | oid | SETOF name + pg_repack | repack | create_index_type | oid, oid | void + pg_repack | repack | create_log_table | oid | void + pg_repack | repack | create_table | oid, name | void + pg_repack | repack | disable_autovacuum | regclass | void + pg_repack | repack | get_alter_col_storage | oid | text + pg_repack | repack | get_assign | oid, text | text + pg_repack | repack | get_columns_for_create_as | oid | text + pg_repack | repack | get_compare_pkey | oid, text | text + pg_repack | repack | get_create_index_type | oid, name | text + pg_repack | repack | get_create_trigger | relid oid, pkid oid | text + pg_repack | repack | get_drop_columns | oid, text | text + pg_repack | repack | get_enable_trigger | relid oid | text + pg_repack | repack | get_index_columns | oid | text + pg_repack | repack | get_order_by | oid, oid | text + pg_repack | repack | get_storage_param | oid | text + pg_repack | repack | get_table_and_inheritors | regclass | regclass[] + pg_repack | repack | oid2text | oid | text + pg_repack | repack | repack_apply | sql_peek cstring, sql_insert cstring, sql_delete cstring, sql_update cstring, sql_pop cstring, count integer | integer + pg_repack | repack | repack_drop | oid, integer | void + pg_repack | repack | repack_index_swap | oid | void + pg_repack | repack | repack_indexdef | oid, oid, name, boolean | text + pg_repack | repack | repack_swap | oid | void + pg_repack | repack | repack_trigger | | trigger + pg_repack | repack | version | | text + pg_repack | repack | version_sql | | text + pg_stat_monitor | public | decode_error_level | elevel integer | text + pg_stat_monitor | public | get_cmd_type | cmd_type integer | text + pg_stat_monitor | public | get_histogram_timings | | text + pg_stat_monitor | public | histogram | _bucket integer, _quryid bigint | SETOF record + pg_stat_monitor | public | pg_stat_monitor_internal | showtext boolean, OUT bucket bigint, OUT userid oid, OUT username text, OUT dbid oid, OUT datname text, OUT client_ip bigint, OUT queryid bigint, OUT planid bigint, OUT query text, OUT query_plan text, OUT pgsm_query_id bigint, OUT top_queryid bigint, OUT top_query text, OUT application_name text, OUT relations text, OUT cmd_type integer, OUT elevel integer, OUT sqlcode text, OUT message text, OUT bucket_start_time timestamp with time zone, OUT calls bigint, OUT total_exec_time double precision, OUT min_exec_time double precision, OUT max_exec_time double precision, OUT mean_exec_time double precision, OUT stddev_exec_time double precision, OUT rows bigint, OUT plans bigint, OUT total_plan_time double precision, OUT min_plan_time double precision, OUT max_plan_time double precision, OUT mean_plan_time double precision, OUT stddev_plan_time double precision, OUT shared_blks_hit bigint, OUT shared_blks_read bigint, OUT shared_blks_dirtied bigint, OUT shared_blks_written bigint, OUT local_blks_hit bigint, OUT local_blks_read bigint, OUT local_blks_dirtied bigint, OUT local_blks_written bigint, OUT temp_blks_read bigint, OUT temp_blks_written bigint, OUT shared_blk_read_time double precision, OUT shared_blk_write_time double precision, OUT local_blk_read_time double precision, OUT local_blk_write_time double precision, OUT temp_blk_read_time double precision, OUT temp_blk_write_time double precision, OUT resp_calls text, OUT cpu_user_time double precision, OUT cpu_sys_time double precision, OUT wal_records bigint, OUT wal_fpi bigint, OUT wal_bytes numeric, OUT comments text, OUT jit_functions bigint, OUT jit_generation_time double precision, OUT jit_inlining_count bigint, OUT jit_inlining_time double precision, OUT jit_optimization_count bigint, OUT jit_optimization_time double precision, OUT jit_emission_count bigint, OUT jit_emission_time double precision, OUT jit_deform_count bigint, OUT jit_deform_time double precision, OUT stats_since timestamp with time zone, OUT minmax_stats_since timestamp with time zone, OUT toplevel boolean, OUT bucket_done boolean | SETOF record + pg_stat_monitor | public | pg_stat_monitor_reset | | void + pg_stat_monitor | public | pg_stat_monitor_version | | text + pg_stat_monitor | public | pgsm_create_11_view | | integer + pg_stat_monitor | public | pgsm_create_13_view | | integer + pg_stat_monitor | public | pgsm_create_14_view | | integer + pg_stat_monitor | public | pgsm_create_15_view | | integer + pg_stat_monitor | public | pgsm_create_17_view | | integer + pg_stat_monitor | public | pgsm_create_view | | integer + pg_stat_monitor | public | range | | text[] + pg_stat_statements | extensions | pg_stat_statements | showtext boolean, OUT userid oid, OUT dbid oid, OUT toplevel boolean, OUT queryid bigint, OUT query text, OUT plans bigint, OUT total_plan_time double precision, OUT min_plan_time double precision, OUT max_plan_time double precision, OUT mean_plan_time double precision, OUT stddev_plan_time double precision, OUT calls bigint, OUT total_exec_time double precision, OUT min_exec_time double precision, OUT max_exec_time double precision, OUT mean_exec_time double precision, OUT stddev_exec_time double precision, OUT rows bigint, OUT shared_blks_hit bigint, OUT shared_blks_read bigint, OUT shared_blks_dirtied bigint, OUT shared_blks_written bigint, OUT local_blks_hit bigint, OUT local_blks_read bigint, OUT local_blks_dirtied bigint, OUT local_blks_written bigint, OUT temp_blks_read bigint, OUT temp_blks_written bigint, OUT shared_blk_read_time double precision, OUT shared_blk_write_time double precision, OUT local_blk_read_time double precision, OUT local_blk_write_time double precision, OUT temp_blk_read_time double precision, OUT temp_blk_write_time double precision, OUT wal_records bigint, OUT wal_fpi bigint, OUT wal_bytes numeric, OUT jit_functions bigint, OUT jit_generation_time double precision, OUT jit_inlining_count bigint, OUT jit_inlining_time double precision, OUT jit_optimization_count bigint, OUT jit_optimization_time double precision, OUT jit_emission_count bigint, OUT jit_emission_time double precision, OUT jit_deform_count bigint, OUT jit_deform_time double precision, OUT stats_since timestamp with time zone, OUT minmax_stats_since timestamp with time zone | SETOF record + pg_stat_statements | extensions | pg_stat_statements_info | OUT dealloc bigint, OUT stats_reset timestamp with time zone | record + pg_stat_statements | extensions | pg_stat_statements_reset | userid oid, dbid oid, queryid bigint, minmax_only boolean | timestamp with time zone + pg_surgery | public | heap_force_freeze | reloid regclass, tids tid[] | void + pg_surgery | public | heap_force_kill | reloid regclass, tids tid[] | void + pg_tle | pgtle | available_extension_versions | OUT name name, OUT version text, OUT superuser boolean, OUT trusted boolean, OUT relocatable boolean, OUT schema name, OUT requires name[], OUT comment text | SETOF record + pg_tle | pgtle | available_extensions | OUT name name, OUT default_version text, OUT comment text | SETOF record + pg_tle | pgtle | create_base_type | typenamespace regnamespace, typename name, infunc regprocedure, outfunc regprocedure, internallength integer, alignment text, storage text | void + pg_tle | pgtle | create_base_type_if_not_exists | typenamespace regnamespace, typename name, infunc regprocedure, outfunc regprocedure, internallength integer, alignment text, storage text | boolean + pg_tle | pgtle | create_operator_func | typenamespace regnamespace, typename name, opfunc regprocedure | void + pg_tle | pgtle | create_operator_func_if_not_exists | typenamespace regnamespace, typename name, opfunc regprocedure | boolean + pg_tle | pgtle | create_shell_type | typenamespace regnamespace, typename name | void + pg_tle | pgtle | create_shell_type_if_not_exists | typenamespace regnamespace, typename name | boolean + pg_tle | pgtle | extension_update_paths | name name, OUT source text, OUT target text, OUT path text | SETOF record + pg_tle | pgtle | install_extension | name text, version text, description text, ext text, requires text[] | boolean + pg_tle | pgtle | install_extension_version_sql | name text, version text, ext text | boolean + pg_tle | pgtle | install_update_path | name text, fromvers text, tovers text, ext text | boolean + pg_tle | pgtle | pg_tle_feature_info_sql_drop | | event_trigger + pg_tle | pgtle | register_feature | proc regproc, feature pgtle.pg_tle_features | void + pg_tle | pgtle | register_feature_if_not_exists | proc regproc, feature pgtle.pg_tle_features | boolean + pg_tle | pgtle | set_default_version | name text, version text | boolean + pg_tle | pgtle | uninstall_extension | extname text | boolean + pg_tle | pgtle | uninstall_extension | extname text, version text | boolean + pg_tle | pgtle | uninstall_extension_if_exists | extname text | boolean + pg_tle | pgtle | uninstall_update_path | extname text, fromvers text, tovers text | boolean + pg_tle | pgtle | uninstall_update_path_if_exists | extname text, fromvers text, tovers text | boolean + pg_tle | pgtle | unregister_feature | proc regproc, feature pgtle.pg_tle_features | void + pg_tle | pgtle | unregister_feature_if_exists | proc regproc, feature pgtle.pg_tle_features | boolean + pg_trgm | public | gin_extract_query_trgm | text, internal, smallint, internal, internal, internal, internal | internal + pg_trgm | public | gin_extract_value_trgm | text, internal | internal + pg_trgm | public | gin_trgm_consistent | internal, smallint, text, integer, internal, internal, internal, internal | boolean + pg_trgm | public | gin_trgm_triconsistent | internal, smallint, text, integer, internal, internal, internal | "char" + pg_trgm | public | gtrgm_compress | internal | internal + pg_trgm | public | gtrgm_consistent | internal, text, smallint, oid, internal | boolean + pg_trgm | public | gtrgm_decompress | internal | internal + pg_trgm | public | gtrgm_distance | internal, text, smallint, oid, internal | double precision + pg_trgm | public | gtrgm_in | cstring | gtrgm + pg_trgm | public | gtrgm_options | internal | void + pg_trgm | public | gtrgm_out | gtrgm | cstring + pg_trgm | public | gtrgm_penalty | internal, internal, internal | internal + pg_trgm | public | gtrgm_picksplit | internal, internal | internal + pg_trgm | public | gtrgm_same | gtrgm, gtrgm, internal | internal + pg_trgm | public | gtrgm_union | internal, internal | gtrgm + pg_trgm | public | set_limit | real | real + pg_trgm | public | show_limit | | real + pg_trgm | public | show_trgm | text | text[] + pg_trgm | public | similarity | text, text | real + pg_trgm | public | similarity_dist | text, text | real + pg_trgm | public | similarity_op | text, text | boolean + pg_trgm | public | strict_word_similarity | text, text | real + pg_trgm | public | strict_word_similarity_commutator_op | text, text | boolean + pg_trgm | public | strict_word_similarity_dist_commutator_op | text, text | real + pg_trgm | public | strict_word_similarity_dist_op | text, text | real + pg_trgm | public | strict_word_similarity_op | text, text | boolean + pg_trgm | public | word_similarity | text, text | real + pg_trgm | public | word_similarity_commutator_op | text, text | boolean + pg_trgm | public | word_similarity_dist_commutator_op | text, text | real + pg_trgm | public | word_similarity_dist_op | text, text | real + pg_trgm | public | word_similarity_op | text, text | boolean + pg_visibility | public | pg_check_frozen | regclass, OUT t_ctid tid | SETOF tid + pg_visibility | public | pg_check_visible | regclass, OUT t_ctid tid | SETOF tid + pg_visibility | public | pg_truncate_visibility_map | regclass | void + pg_visibility | public | pg_visibility | regclass, OUT blkno bigint, OUT all_visible boolean, OUT all_frozen boolean, OUT pd_all_visible boolean | SETOF record + pg_visibility | public | pg_visibility | regclass, blkno bigint, OUT all_visible boolean, OUT all_frozen boolean, OUT pd_all_visible boolean | record + pg_visibility | public | pg_visibility_map | regclass, blkno bigint, OUT all_visible boolean, OUT all_frozen boolean | record + pg_visibility | public | pg_visibility_map | regclass, OUT blkno bigint, OUT all_visible boolean, OUT all_frozen boolean | SETOF record + pg_visibility | public | pg_visibility_map_summary | regclass, OUT all_visible bigint, OUT all_frozen bigint | record + pg_walinspect | public | pg_get_wal_record_info | in_lsn pg_lsn, OUT start_lsn pg_lsn, OUT end_lsn pg_lsn, OUT prev_lsn pg_lsn, OUT xid xid, OUT resource_manager text, OUT record_type text, OUT record_length integer, OUT main_data_length integer, OUT fpi_length integer, OUT description text, OUT block_ref text | record + pg_walinspect | public | pg_get_wal_records_info | start_lsn pg_lsn, end_lsn pg_lsn, OUT start_lsn pg_lsn, OUT end_lsn pg_lsn, OUT prev_lsn pg_lsn, OUT xid xid, OUT resource_manager text, OUT record_type text, OUT record_length integer, OUT main_data_length integer, OUT fpi_length integer, OUT description text, OUT block_ref text | SETOF record + pg_walinspect | public | pg_get_wal_stats | start_lsn pg_lsn, end_lsn pg_lsn, per_record boolean, OUT "resource_manager/record_type" text, OUT count bigint, OUT count_percentage double precision, OUT record_size bigint, OUT record_size_percentage double precision, OUT fpi_size bigint, OUT fpi_size_percentage double precision, OUT combined_size bigint, OUT combined_size_percentage double precision | SETOF record + pgaudit | public | pgaudit_ddl_command_end | | event_trigger + pgaudit | public | pgaudit_sql_drop | | event_trigger + pgcrypto | extensions | armor | bytea, text[], text[] | text + pgcrypto | extensions | armor | bytea | text + pgcrypto | extensions | crypt | text, text | text + pgcrypto | extensions | dearmor | text | bytea + pgcrypto | extensions | decrypt | bytea, bytea, text | bytea + pgcrypto | extensions | decrypt_iv | bytea, bytea, bytea, text | bytea + pgcrypto | extensions | digest | text, text | bytea + pgcrypto | extensions | digest | bytea, text | bytea + pgcrypto | extensions | encrypt | bytea, bytea, text | bytea + pgcrypto | extensions | encrypt_iv | bytea, bytea, bytea, text | bytea + pgcrypto | extensions | gen_random_bytes | integer | bytea + pgcrypto | extensions | gen_random_uuid | | uuid + pgcrypto | extensions | gen_salt | text | text + pgcrypto | extensions | gen_salt | text, integer | text + pgcrypto | extensions | hmac | text, text, text | bytea + pgcrypto | extensions | hmac | bytea, bytea, text | bytea + pgcrypto | extensions | pgp_armor_headers | text, OUT key text, OUT value text | SETOF record + pgcrypto | extensions | pgp_key_id | bytea | text + pgcrypto | extensions | pgp_pub_decrypt | bytea, bytea | text + pgcrypto | extensions | pgp_pub_decrypt | bytea, bytea, text, text | text + pgcrypto | extensions | pgp_pub_decrypt | bytea, bytea, text | text + pgcrypto | extensions | pgp_pub_decrypt_bytea | bytea, bytea | bytea + pgcrypto | extensions | pgp_pub_decrypt_bytea | bytea, bytea, text, text | bytea + pgcrypto | extensions | pgp_pub_decrypt_bytea | bytea, bytea, text | bytea + pgcrypto | extensions | pgp_pub_encrypt | text, bytea, text | bytea + pgcrypto | extensions | pgp_pub_encrypt | text, bytea | bytea + pgcrypto | extensions | pgp_pub_encrypt_bytea | bytea, bytea | bytea + pgcrypto | extensions | pgp_pub_encrypt_bytea | bytea, bytea, text | bytea + pgcrypto | extensions | pgp_sym_decrypt | bytea, text | text + pgcrypto | extensions | pgp_sym_decrypt | bytea, text, text | text + pgcrypto | extensions | pgp_sym_decrypt_bytea | bytea, text | bytea + pgcrypto | extensions | pgp_sym_decrypt_bytea | bytea, text, text | bytea + pgcrypto | extensions | pgp_sym_encrypt | text, text | bytea + pgcrypto | extensions | pgp_sym_encrypt | text, text, text | bytea + pgcrypto | extensions | pgp_sym_encrypt_bytea | bytea, text | bytea + pgcrypto | extensions | pgp_sym_encrypt_bytea | bytea, text, text | bytea + pgmq | pgmq | _belongs_to_pgmq | table_name text | boolean + pgmq | pgmq | _ensure_pg_partman_installed | | void + pgmq | pgmq | _get_partition_col | partition_interval text | text + pgmq | pgmq | _get_pg_partman_major_version | | integer + pgmq | pgmq | _get_pg_partman_schema | | text + pgmq | pgmq | archive | queue_name text, msg_id bigint | boolean + pgmq | pgmq | archive | queue_name text, msg_ids bigint[] | SETOF bigint + pgmq | pgmq | convert_archive_partitioned | table_name text, partition_interval text, retention_interval text, leading_partition integer | void + pgmq | pgmq | create | queue_name text | void + pgmq | pgmq | create_non_partitioned | queue_name text | void + pgmq | pgmq | create_partitioned | queue_name text, partition_interval text, retention_interval text | void + pgmq | pgmq | create_unlogged | queue_name text | void + pgmq | pgmq | delete | queue_name text, msg_id bigint | boolean + pgmq | pgmq | delete | queue_name text, msg_ids bigint[] | SETOF bigint + pgmq | pgmq | detach_archive | queue_name text | void + pgmq | pgmq | drop_queue | queue_name text | boolean + pgmq | pgmq | format_table_name | queue_name text, prefix text | text + pgmq | pgmq | list_queues | | SETOF pgmq.queue_record + pgmq | pgmq | metrics | queue_name text | pgmq.metrics_result + pgmq | pgmq | metrics_all | | SETOF pgmq.metrics_result + pgmq | pgmq | pop | queue_name text | SETOF pgmq.message_record + pgmq | pgmq | purge_queue | queue_name text | bigint + pgmq | pgmq | read | queue_name text, vt integer, qty integer | SETOF pgmq.message_record + pgmq | pgmq | read_with_poll | queue_name text, vt integer, qty integer, max_poll_seconds integer, poll_interval_ms integer | SETOF pgmq.message_record + pgmq | pgmq | send | queue_name text, msg jsonb, delay integer | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], delay integer | SETOF bigint + pgmq | pgmq | set_vt | queue_name text, msg_id bigint, vt integer | SETOF pgmq.message_record + pgmq | pgmq | validate_queue_name | queue_name text | void + pgroonga | pgroonga | command | groongacommand text | text + pgroonga | pgroonga | command | groongacommand text, arguments text[] | text + pgroonga | pgroonga | command_escape_value | value text | text + pgroonga | pgroonga | contain_varchar_array | character varying[], character varying | boolean + pgroonga | pgroonga | escape | value bigint | text + pgroonga | pgroonga | escape | value double precision | text + pgroonga | pgroonga | escape | value text, special_characters text | text + pgroonga | pgroonga | escape | value timestamp without time zone | text + pgroonga | pgroonga | escape | value smallint | text + pgroonga | pgroonga | escape | value text | text + pgroonga | pgroonga | escape | value timestamp with time zone | text + pgroonga | pgroonga | escape | value real | text + pgroonga | pgroonga | escape | value boolean | text + pgroonga | pgroonga | escape | value integer | text + pgroonga | pgroonga | flush | indexname cstring | boolean + pgroonga | pgroonga | highlight_html | target text, keywords text[] | text + pgroonga | pgroonga | match_in_text | text, text[] | boolean + pgroonga | pgroonga | match_in_text_array | text[], text[] | boolean + pgroonga | pgroonga | match_in_varchar | character varying, character varying[] | boolean + pgroonga | pgroonga | match_jsonb | jsonb, text | boolean + pgroonga | pgroonga | match_positions_byte | target text, keywords text[] | integer[] + pgroonga | pgroonga | match_positions_character | target text, keywords text[] | integer[] + pgroonga | pgroonga | match_query | text, text | boolean + pgroonga | pgroonga | match_query | character varying, character varying | boolean + pgroonga | pgroonga | match_query | text[], text | boolean + pgroonga | pgroonga | match_regexp | text, text | boolean + pgroonga | pgroonga | match_regexp | character varying, character varying | boolean + pgroonga | pgroonga | match_script_jsonb | jsonb, text | boolean + pgroonga | pgroonga | match_term | target text, term text | boolean + pgroonga | pgroonga | match_term | target text[], term text | boolean + pgroonga | pgroonga | match_term | target character varying[], term character varying | boolean + pgroonga | pgroonga | match_term | target character varying, term character varying | boolean + pgroonga | pgroonga | match_text | text, text | boolean + pgroonga | pgroonga | match_text_array | text[], text | boolean + pgroonga | pgroonga | match_varchar | character varying, character varying | boolean + pgroonga | pgroonga | prefix_in_text | text, text[] | boolean + pgroonga | pgroonga | prefix_in_text_array | text[], text[] | boolean + pgroonga | pgroonga | prefix_rk_in_text | text, text[] | boolean + pgroonga | pgroonga | prefix_rk_in_text_array | text[], text[] | boolean + pgroonga | pgroonga | prefix_rk_text | text, text | boolean + pgroonga | pgroonga | prefix_rk_text_array | text[], text | boolean + pgroonga | pgroonga | prefix_text | text, text | boolean + pgroonga | pgroonga | prefix_text_array | text[], text | boolean + pgroonga | pgroonga | query_escape | query text | text + pgroonga | pgroonga | query_expand | tablename cstring, termcolumnname text, synonymscolumnname text, query text | text + pgroonga | pgroonga | query_extract_keywords | query text | text[] + pgroonga | pgroonga | query_in_text | text, text[] | boolean + pgroonga | pgroonga | query_in_text_array | text[], text[] | boolean + pgroonga | pgroonga | query_in_varchar | character varying, character varying[] | boolean + pgroonga | pgroonga | query_jsonb | jsonb, text | boolean + pgroonga | pgroonga | query_text | text, text | boolean + pgroonga | pgroonga | query_text_array | text[], text | boolean + pgroonga | pgroonga | query_varchar | character varying, character varying | boolean + pgroonga | pgroonga | regexp_text | text, text | boolean + pgroonga | pgroonga | regexp_varchar | character varying, character varying | boolean + pgroonga | pgroonga | score | "row" record | double precision + pgroonga | pgroonga | script_jsonb | jsonb, text | boolean + pgroonga | pgroonga | script_text | text, text | boolean + pgroonga | pgroonga | script_text_array | text[], text | boolean + pgroonga | pgroonga | script_varchar | character varying, character varying | boolean + pgroonga | pgroonga | similar_text | text, text | boolean + pgroonga | pgroonga | similar_text_array | text[], text | boolean + pgroonga | pgroonga | similar_varchar | character varying, character varying | boolean + pgroonga | pgroonga | snippet_html | target text, keywords text[], width integer | text[] + pgroonga | pgroonga | table_name | indexname cstring | text + pgroonga | public | pgroonga_command | groongacommand text | text + pgroonga | public | pgroonga_command | groongacommand text, arguments text[] | text + pgroonga | public | pgroonga_command_escape_value | value text | text + pgroonga | public | pgroonga_condition | query text, weights integer[], scorers text[], schema_name text, index_name text, column_name text, fuzzy_max_distance_ratio real | pgroonga_condition + pgroonga | public | pgroonga_contain_varchar_array | character varying[], character varying | boolean + pgroonga | public | pgroonga_equal_query_text_array | targets text[], query text | boolean + pgroonga | public | pgroonga_equal_query_text_array_condition | targets text[], condition pgroonga_condition | boolean + pgroonga | public | pgroonga_equal_query_text_array_condition | targets text[], condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_equal_query_varchar_array | targets character varying[], query text | boolean + pgroonga | public | pgroonga_equal_query_varchar_array_condition | targets character varying[], condition pgroonga_condition | boolean + pgroonga | public | pgroonga_equal_query_varchar_array_condition | targets character varying[], condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_equal_text | target text, other text | boolean + pgroonga | public | pgroonga_equal_text_condition | target text, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_equal_text_condition | target text, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_equal_varchar | target character varying, other character varying | boolean + pgroonga | public | pgroonga_equal_varchar_condition | target character varying, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_equal_varchar_condition | target character varying, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_escape | value bigint | text + pgroonga | public | pgroonga_escape | value double precision | text + pgroonga | public | pgroonga_escape | value text, special_characters text | text + pgroonga | public | pgroonga_escape | value timestamp without time zone | text + pgroonga | public | pgroonga_escape | value smallint | text + pgroonga | public | pgroonga_escape | value text | text + pgroonga | public | pgroonga_escape | value timestamp with time zone | text + pgroonga | public | pgroonga_escape | value real | text + pgroonga | public | pgroonga_escape | value boolean | text + pgroonga | public | pgroonga_escape | value integer | text + pgroonga | public | pgroonga_flush | indexname cstring | boolean + pgroonga | public | pgroonga_handler | internal | index_am_handler + pgroonga | public | pgroonga_highlight_html | target text, keywords text[], indexname cstring | text + pgroonga | public | pgroonga_highlight_html | targets text[], keywords text[], indexname cstring | text[] + pgroonga | public | pgroonga_highlight_html | target text, keywords text[] | text + pgroonga | public | pgroonga_highlight_html | targets text[], keywords text[] | text[] + pgroonga | public | pgroonga_index_column_name | indexname cstring, columnindex integer | text + pgroonga | public | pgroonga_index_column_name | indexname cstring, columnname text | text + pgroonga | public | pgroonga_is_writable | | boolean + pgroonga | public | pgroonga_list_broken_indexes | | SETOF text + pgroonga | public | pgroonga_list_lagged_indexes | | SETOF text + pgroonga | public | pgroonga_match_in_text | text, text[] | boolean + pgroonga | public | pgroonga_match_in_text_array | text[], text[] | boolean + pgroonga | public | pgroonga_match_in_varchar | character varying, character varying[] | boolean + pgroonga | public | pgroonga_match_jsonb | jsonb, text | boolean + pgroonga | public | pgroonga_match_positions_byte | target text, keywords text[], indexname cstring | integer[] + pgroonga | public | pgroonga_match_positions_byte | target text, keywords text[] | integer[] + pgroonga | public | pgroonga_match_positions_character | target text, keywords text[], indexname cstring | integer[] + pgroonga | public | pgroonga_match_positions_character | target text, keywords text[] | integer[] + pgroonga | public | pgroonga_match_query | text, text | boolean + pgroonga | public | pgroonga_match_query | character varying, character varying | boolean + pgroonga | public | pgroonga_match_query | text[], text | boolean + pgroonga | public | pgroonga_match_regexp | text, text | boolean + pgroonga | public | pgroonga_match_regexp | character varying, character varying | boolean + pgroonga | public | pgroonga_match_script_jsonb | jsonb, text | boolean + pgroonga | public | pgroonga_match_term | target text, term text | boolean + pgroonga | public | pgroonga_match_term | target text[], term text | boolean + pgroonga | public | pgroonga_match_term | target character varying[], term character varying | boolean + pgroonga | public | pgroonga_match_term | target character varying, term character varying | boolean + pgroonga | public | pgroonga_match_text | text, text | boolean + pgroonga | public | pgroonga_match_text_array | text[], text | boolean + pgroonga | public | pgroonga_match_text_array_condition | target text[], condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_match_text_array_condition | target text[], condition pgroonga_condition | boolean + pgroonga | public | pgroonga_match_text_array_condition_with_scorers | target text[], condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_match_text_condition | target text, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_match_text_condition | target text, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_match_text_condition_with_scorers | target text, condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_match_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_match_varchar_condition | target character varying, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_match_varchar_condition | target character varying, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_match_varchar_condition_with_scorers | target character varying, condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_normalize | target text | text + pgroonga | public | pgroonga_normalize | target text, normalizername text | text + pgroonga | public | pgroonga_not_prefix_in_text | text, text[] | boolean + pgroonga | public | pgroonga_prefix_in_text | text, text[] | boolean + pgroonga | public | pgroonga_prefix_in_text_array | text[], text[] | boolean + pgroonga | public | pgroonga_prefix_in_varchar | character varying, character varying[] | boolean + pgroonga | public | pgroonga_prefix_in_varchar_array | character varying[], character varying[] | boolean + pgroonga | public | pgroonga_prefix_rk_in_text | text, text[] | boolean + pgroonga | public | pgroonga_prefix_rk_in_text_array | text[], text[] | boolean + pgroonga | public | pgroonga_prefix_rk_in_varchar | character varying, character varying[] | boolean + pgroonga | public | pgroonga_prefix_rk_in_varchar_array | character varying[], character varying[] | boolean + pgroonga | public | pgroonga_prefix_rk_text | text, text | boolean + pgroonga | public | pgroonga_prefix_rk_text_array | text[], text | boolean + pgroonga | public | pgroonga_prefix_rk_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_prefix_rk_varchar_array | character varying[], character varying | boolean + pgroonga | public | pgroonga_prefix_text | text, text | boolean + pgroonga | public | pgroonga_prefix_text_array | text[], text | boolean + pgroonga | public | pgroonga_prefix_text_array_condition | text[], pgroonga_condition | boolean + pgroonga | public | pgroonga_prefix_text_condition | text, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_prefix_text_condition | text, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_prefix_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_prefix_varchar_array | character varying[], character varying | boolean + pgroonga | public | pgroonga_prefix_varchar_array_condition | character varying[], pgroonga_condition | boolean + pgroonga | public | pgroonga_prefix_varchar_condition | target character varying, conditoin pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_prefix_varchar_condition | target character varying, conditoin pgroonga_condition | boolean + pgroonga | public | pgroonga_query_escape | query text | text + pgroonga | public | pgroonga_query_expand | tablename cstring, termcolumnname text, synonymscolumnname text, query text | text + pgroonga | public | pgroonga_query_extract_keywords | query text, index_name text | text[] + pgroonga | public | pgroonga_query_in_text | text, text[] | boolean + pgroonga | public | pgroonga_query_in_text_array | text[], text[] | boolean + pgroonga | public | pgroonga_query_in_varchar | character varying, character varying[] | boolean + pgroonga | public | pgroonga_query_jsonb | jsonb, text | boolean + pgroonga | public | pgroonga_query_text | text, text | boolean + pgroonga | public | pgroonga_query_text_array | text[], text | boolean + pgroonga | public | pgroonga_query_text_array_condition | targets text[], condition pgroonga_condition | boolean + pgroonga | public | pgroonga_query_text_array_condition | targets text[], condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_query_text_array_condition_with_scorers | targets text[], condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_query_text_condition | target text, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_query_text_condition | target text, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_query_text_condition_with_scorers | target text, condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_query_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_query_varchar_condition | target character varying, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_query_varchar_condition | target character varying, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_query_varchar_condition_with_scorers | target character varying, condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_regexp_in_text | text, text[] | boolean + pgroonga | public | pgroonga_regexp_in_varchar | character varying, character varying[] | boolean + pgroonga | public | pgroonga_regexp_text | text, text | boolean + pgroonga | public | pgroonga_regexp_text_array | targets text[], pattern text | boolean + pgroonga | public | pgroonga_regexp_text_array_condition | targets text[], pattern pgroonga_condition | boolean + pgroonga | public | pgroonga_regexp_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_result_to_jsonb_objects | result jsonb | jsonb + pgroonga | public | pgroonga_result_to_recordset | result jsonb | SETOF record + pgroonga | public | pgroonga_score | "row" record | double precision + pgroonga | public | pgroonga_score | tableoid oid, ctid tid | double precision + pgroonga | public | pgroonga_script_jsonb | jsonb, text | boolean + pgroonga | public | pgroonga_script_text | text, text | boolean + pgroonga | public | pgroonga_script_text_array | text[], text | boolean + pgroonga | public | pgroonga_script_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_set_writable | newwritable boolean | boolean + pgroonga | public | pgroonga_similar_text | text, text | boolean + pgroonga | public | pgroonga_similar_text_array | text[], text | boolean + pgroonga | public | pgroonga_similar_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_snippet_html | target text, keywords text[], width integer | text[] + pgroonga | public | pgroonga_table_name | indexname cstring | text + pgroonga | public | pgroonga_tokenize | target text, VARIADIC options text[] | json[] + pgroonga | public | pgroonga_vacuum | | boolean + pgroonga | public | pgroonga_wal_apply | indexname cstring | bigint + pgroonga | public | pgroonga_wal_apply | | bigint + pgroonga | public | pgroonga_wal_set_applied_position | block bigint, "offset" bigint | boolean + pgroonga | public | pgroonga_wal_set_applied_position | indexname cstring, block bigint, "offset" bigint | boolean + pgroonga | public | pgroonga_wal_set_applied_position | indexname cstring | boolean + pgroonga | public | pgroonga_wal_set_applied_position | | boolean + pgroonga | public | pgroonga_wal_status | | TABLE(name text, oid oid, current_block bigint, current_offset bigint, current_size bigint, last_block bigint, last_offset bigint, last_size bigint) + pgroonga | public | pgroonga_wal_truncate | indexname cstring | bigint + pgroonga | public | pgroonga_wal_truncate | | bigint + pgroonga_database | public | pgroonga_database_remove | | boolean + pgrouting | public | _pgr_alphashape | text, alpha double precision, OUT seq1 bigint, OUT textgeom text | SETOF record + pgrouting | public | _pgr_array_reverse | anyarray | anyarray + pgrouting | public | _pgr_articulationpoints | edges_sql text, OUT seq integer, OUT node bigint | SETOF record + pgrouting | public | _pgr_astar | edges_sql text, start_vids anyarray, end_vids anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, only_cost boolean, normal boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_astar | edges_sql text, combinations_sql text, directed boolean, heuristic integer, factor double precision, epsilon double precision, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bdastar | text, text, directed boolean, heuristic integer, factor double precision, epsilon double precision, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bdastar | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bddijkstra | text, anyarray, anyarray, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bddijkstra | text, text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bellmanford | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bellmanford | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_biconnectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record + pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, combinations_sql text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bipartite | edges_sql text, OUT node bigint, OUT color bigint | SETOF record + pgrouting | public | _pgr_boost_version | | text + pgrouting | public | _pgr_breadthfirstsearch | edges_sql text, from_vids anyarray, max_depth bigint, directed boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bridges | edges_sql text, OUT seq integer, OUT edge bigint | SETOF record + pgrouting | public | _pgr_build_type | | text + pgrouting | public | _pgr_checkcolumn | text, text, text, is_optional boolean, dryrun boolean | boolean + pgrouting | public | _pgr_checkquery | text | text + pgrouting | public | _pgr_checkverttab | vertname text, columnsarr text[], reporterrs integer, fnname text, OUT sname text, OUT vname text | record + pgrouting | public | _pgr_chinesepostman | edges_sql text, only_cost boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_compilation_date | | text + pgrouting | public | _pgr_compiler_version | | text + pgrouting | public | _pgr_connectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record + pgrouting | public | _pgr_contraction | edges_sql text, contraction_order bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | _pgr_createindex | tabname text, colname text, indext text, reporterrs integer, fnname text | void + pgrouting | public | _pgr_createindex | sname text, tname text, colname text, indext text, reporterrs integer, fnname text | void + pgrouting | public | _pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record + pgrouting | public | _pgr_dagshortestpath | text, anyarray, anyarray, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dagshortestpath | text, text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_depthfirstsearch | edges_sql text, root_vids anyarray, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstra | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, normal boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstra | edges_sql text, start_vids anyarray, end_vids anyarray, directed boolean, only_cost boolean, normal boolean, n_goals bigint, global boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstra | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, n_goals bigint, global boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstra | edges_sql text, start_vids anyarray, end_vids anyarray, directed boolean, only_cost boolean, normal boolean, n_goals bigint, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstranear | text, anyarray, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstranear | text, anyarray, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstranear | text, bigint, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstravia | edges_sql text, via_vids anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | _pgr_drivingdistance | edges_sql text, start_vids anyarray, distance double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_edgecoloring | edges_sql text, OUT edge_id bigint, OUT color_id bigint | SETOF record + pgrouting | public | _pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_edgedisjointpaths | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_edwardmoore | edges_sql text, combinations_sql text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_edwardmoore | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_endpoint | g geometry | geometry + pgrouting | public | _pgr_floydwarshall | edges_sql text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_get_statement | o_sql text | text + pgrouting | public | _pgr_getcolumnname | tab text, col text, reporterrs integer, fnname text | text + pgrouting | public | _pgr_getcolumnname | sname text, tname text, col text, reporterrs integer, fnname text | text + pgrouting | public | _pgr_getcolumntype | tab text, col text, reporterrs integer, fnname text | text + pgrouting | public | _pgr_getcolumntype | sname text, tname text, cname text, reporterrs integer, fnname text | text + pgrouting | public | _pgr_gettablename | tab text, reporterrs integer, fnname text, OUT sname text, OUT tname text | record + pgrouting | public | _pgr_git_hash | | text + pgrouting | public | _pgr_hawickcircuits | text, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_iscolumnindexed | tab text, col text, reporterrs integer, fnname text | boolean + pgrouting | public | _pgr_iscolumnindexed | sname text, tname text, cname text, reporterrs integer, fnname text | boolean + pgrouting | public | _pgr_iscolumnintable | tab text, col text | boolean + pgrouting | public | _pgr_isplanar | text | boolean + pgrouting | public | _pgr_johnson | edges_sql text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_kruskal | text, anyarray, fn_suffix text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_ksp | edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_lengauertarjandominatortree | edges_sql text, root_vid bigint, OUT seq integer, OUT vid bigint, OUT idom bigint | SETOF record + pgrouting | public | _pgr_lib_version | | text + pgrouting | public | _pgr_linegraph | text, directed boolean, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT reverse_cost double precision | SETOF record + pgrouting | public | _pgr_linegraphfull | text, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT edge bigint | SETOF record + pgrouting | public | _pgr_makeconnected | text, OUT seq bigint, OUT start_vid bigint, OUT end_vid bigint | SETOF record + pgrouting | public | _pgr_maxcardinalitymatch | edges_sql text, directed boolean, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint | SETOF record + pgrouting | public | _pgr_maxflow | edges_sql text, combinations_sql text, algorithm integer, only_flow boolean, OUT seq integer, OUT edge_id bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | _pgr_maxflow | edges_sql text, sources anyarray, targets anyarray, algorithm integer, only_flow boolean, OUT seq integer, OUT edge_id bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | _pgr_maxflowmincost | edges_sql text, sources anyarray, targets anyarray, only_cost boolean, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_maxflowmincost | edges_sql text, combinations_sql text, only_cost boolean, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_msg | msgkind integer, fnname text, msg text | void + pgrouting | public | _pgr_onerror | errcond boolean, reporterrs integer, fnname text, msgerr text, hinto text, msgok text | void + pgrouting | public | _pgr_operating_system | | text + pgrouting | public | _pgr_parameter_check | fn text, sql text, big boolean | boolean + pgrouting | public | _pgr_pgsql_version | | text + pgrouting | public | _pgr_pickdeliver | text, text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record + pgrouting | public | _pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record + pgrouting | public | _pgr_pointtoid | point geometry, tolerance double precision, vertname text, srid integer | bigint + pgrouting | public | _pgr_prim | text, anyarray, order_by text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_quote_ident | idname text | text + pgrouting | public | _pgr_sequentialvertexcoloring | edges_sql text, OUT vertex_id bigint, OUT color_id bigint | SETOF record + pgrouting | public | _pgr_startpoint | g geometry | geometry + pgrouting | public | _pgr_stoerwagner | edges_sql text, OUT seq integer, OUT edge bigint, OUT cost double precision, OUT mincut double precision | SETOF record + pgrouting | public | _pgr_strongcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record + pgrouting | public | _pgr_topologicalsort | edges_sql text, OUT seq integer, OUT sorted_v bigint | SETOF record + pgrouting | public | _pgr_transitiveclosure | edges_sql text, OUT seq integer, OUT vid bigint, OUT target_array bigint[] | SETOF record + pgrouting | public | _pgr_trsp | sql text, source_eid integer, source_pos double precision, target_eid integer, target_pos double precision, directed boolean, has_reverse_cost boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT cost double precision | SETOF record + pgrouting | public | _pgr_trsp | text, text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trsp | text, text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trsp | text, text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trsp | text, text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trsp_withpoints | text, text, text, text, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trsp_withpoints | text, text, text, anyarray, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trspvia | text, text, anyarray, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | _pgr_trspvia_withpoints | text, text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | _pgr_trspviavertices | sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT id3 integer, OUT cost double precision | SETOF record + pgrouting | public | _pgr_tsp | matrix_row_sql text, start_id bigint, end_id bigint, max_processing_time double precision, tries_per_temperature integer, max_changes_per_temperature integer, max_consecutive_non_changes integer, initial_temperature double precision, final_temperature double precision, cooling_factor double precision, randomize boolean, OUT seq integer, OUT node bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_tspeuclidean | coordinates_sql text, start_id bigint, end_id bigint, max_processing_time double precision, tries_per_temperature integer, max_changes_per_temperature integer, max_consecutive_non_changes integer, initial_temperature double precision, final_temperature double precision, cooling_factor double precision, randomize boolean, OUT seq integer, OUT node bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_turnrestrictedpath | text, text, bigint, bigint, integer, directed boolean, heap_paths boolean, stop_on_first boolean, strict boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_versionless | v1 text, v2 text | boolean + pgrouting | public | _pgr_vrponedepot | text, text, text, integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record + pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, combinations_sql text, directed boolean, driving_side character, details boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, start_pids anyarray, end_pids anyarray, directed boolean, driving_side character, details boolean, only_cost boolean, normal boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsdd | edges_sql text, points_sql text, start_pid anyarray, distance double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsksp | edges_sql text, points_sql text, start_pid bigint, end_pid bigint, k integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsvia | sql text, via_edges bigint[], fraction double precision[], directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsvia | text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | _trsp | text, text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _v4trsp | text, text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _v4trsp | text, text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_alphashape | geometry, alpha double precision | geometry + pgrouting | public | pgr_analyzegraph | text, double precision, the_geom text, id text, source text, target text, rows_where text | character varying + pgrouting | public | pgr_analyzeoneway | text, text[], text[], text[], text[], two_way_if_null boolean, oneway text, source text, target text | text + pgrouting | public | pgr_articulationpoints | text, OUT node bigint | SETOF bigint + pgrouting | public | pgr_astar | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, text, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcost | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcost | text, text, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcost | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcost | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcostmatrix | text, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, text, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcost | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcost | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcost | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcost | text, text, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcostmatrix | text, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstra | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstra | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracost | text, text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracost | text, bigint, bigint, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracost | text, anyarray, bigint, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracost | text, anyarray, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracost | text, bigint, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracostmatrix | text, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bellmanford | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bellmanford | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bellmanford | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bellmanford | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bellmanford | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_biconnectedcomponents | text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record + pgrouting | public | pgr_binarybreadthfirstsearch | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_binarybreadthfirstsearch | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_binarybreadthfirstsearch | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_binarybreadthfirstsearch | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_binarybreadthfirstsearch | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bipartite | text, OUT vertex_id bigint, OUT color_id bigint | SETOF record + pgrouting | public | pgr_boykovkolmogorov | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_boykovkolmogorov | text, text, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_boykovkolmogorov | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_boykovkolmogorov | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_boykovkolmogorov | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_breadthfirstsearch | text, anyarray, max_depth bigint, directed boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_breadthfirstsearch | text, bigint, max_depth bigint, directed boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bridges | text, OUT edge bigint | SETOF bigint + pgrouting | public | pgr_chinesepostman | text, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_chinesepostmancost | text | double precision + pgrouting | public | pgr_connectedcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record + pgrouting | public | pgr_contraction | text, bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_createtopology | text, double precision, the_geom text, id text, source text, target text, rows_where text, clean boolean | character varying + pgrouting | public | pgr_createverticestable | text, the_geom text, source text, target text, rows_where text | text + pgrouting | public | pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record + pgrouting | public | pgr_dagshortestpath | text, anyarray, anyarray, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dagshortestpath | text, bigint, bigint, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dagshortestpath | text, anyarray, bigint, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dagshortestpath | text, text, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dagshortestpath | text, bigint, anyarray, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_degree | text, text, dryrun boolean, OUT node bigint, OUT degree bigint | SETOF record + pgrouting | public | pgr_depthfirstsearch | text, bigint, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_depthfirstsearch | text, anyarray, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracost | text, text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracost | text, bigint, bigint, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracost | text, anyarray, bigint, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracost | text, anyarray, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracost | text, bigint, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracostmatrix | text, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranear | text, bigint, anyarray, directed boolean, cap bigint, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranear | text, anyarray, bigint, directed boolean, cap bigint, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranear | text, anyarray, anyarray, directed boolean, cap bigint, global boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranear | text, text, directed boolean, cap bigint, global boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranearcost | text, text, directed boolean, cap bigint, global boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranearcost | text, anyarray, anyarray, directed boolean, cap bigint, global boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranearcost | text, bigint, anyarray, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranearcost | text, anyarray, bigint, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstravia | text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, bigint, double precision, directed boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, anyarray, double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edgecoloring | text, OUT edge_id bigint, OUT color_id bigint | SETOF record + pgrouting | public | pgr_edgedisjointpaths | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edgedisjointpaths | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edgedisjointpaths | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edgedisjointpaths | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edmondskarp | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_edmondskarp | text, text, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_edmondskarp | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_edmondskarp | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_edmondskarp | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_edwardmoore | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edwardmoore | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edwardmoore | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edwardmoore | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edwardmoore | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_extractvertices | text, dryrun boolean, OUT id bigint, OUT in_edges bigint[], OUT out_edges bigint[], OUT x double precision, OUT y double precision, OUT geom geometry | SETOF record + pgrouting | public | pgr_findcloseedges | text, geometry[], double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record + pgrouting | public | pgr_findcloseedges | text, geometry, double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record + pgrouting | public | pgr_floydwarshall | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_full_version | OUT version text, OUT build_type text, OUT compile_date text, OUT library text, OUT system text, OUT postgresql text, OUT compiler text, OUT boost text, OUT hash text | record + pgrouting | public | pgr_hawickcircuits | text, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_isplanar | text | boolean + pgrouting | public | pgr_johnson | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskal | text, OUT edge bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, bigint, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_lengauertarjandominatortree | text, bigint, OUT seq integer, OUT vertex_id bigint, OUT idom bigint | SETOF record + pgrouting | public | pgr_linegraph | text, directed boolean, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT reverse_cost double precision | SETOF record + pgrouting | public | pgr_linegraphfull | text, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT edge bigint | SETOF record + pgrouting | public | pgr_makeconnected | text, OUT seq bigint, OUT start_vid bigint, OUT end_vid bigint | SETOF record + pgrouting | public | pgr_maxcardinalitymatch | text, directed boolean, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint | SETOF record + pgrouting | public | pgr_maxcardinalitymatch | text, OUT edge bigint | SETOF bigint + pgrouting | public | pgr_maxflow | text, anyarray, anyarray | bigint + pgrouting | public | pgr_maxflow | text, text | bigint + pgrouting | public | pgr_maxflow | text, bigint, anyarray | bigint + pgrouting | public | pgr_maxflow | text, anyarray, bigint | bigint + pgrouting | public | pgr_maxflow | text, bigint, bigint | bigint + pgrouting | public | pgr_maxflowmincost | text, text, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_maxflowmincost | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_maxflowmincost | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_maxflowmincost | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_maxflowmincost | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_maxflowmincost_cost | text, anyarray, anyarray | double precision + pgrouting | public | pgr_maxflowmincost_cost | text, text | double precision + pgrouting | public | pgr_maxflowmincost_cost | text, bigint, anyarray | double precision + pgrouting | public | pgr_maxflowmincost_cost | text, anyarray, bigint | double precision + pgrouting | public | pgr_maxflowmincost_cost | text, bigint, bigint | double precision + pgrouting | public | pgr_nodenetwork | text, double precision, id text, the_geom text, table_ending text, rows_where text, outall boolean | text + pgrouting | public | pgr_pickdeliver | text, text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record + pgrouting | public | pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record + pgrouting | public | pgr_prim | text, OUT edge bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_pushrelabel | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_pushrelabel | text, text, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_pushrelabel | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_pushrelabel | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_pushrelabel | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_sequentialvertexcoloring | text, OUT vertex_id bigint, OUT color_id bigint | SETOF record + pgrouting | public | pgr_stoerwagner | text, OUT seq integer, OUT edge bigint, OUT cost double precision, OUT mincut double precision | SETOF record + pgrouting | public | pgr_strongcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record + pgrouting | public | pgr_topologicalsort | text, OUT seq integer, OUT sorted_v bigint | SETOF record + pgrouting | public | pgr_transitiveclosure | text, OUT seq integer, OUT vid bigint, OUT target_array bigint[] | SETOF record + pgrouting | public | pgr_trsp | text, text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, integer, double precision, integer, double precision, boolean, boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, integer, integer, boolean, boolean, restrictions_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp_withpoints | text, text, text, anyarray, bigint, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp_withpoints | text, text, text, bigint, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp_withpoints | text, text, text, anyarray, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp_withpoints | text, text, text, bigint, bigint, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp_withpoints | text, text, text, text, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trspvia | text, text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | pgr_trspvia_withpoints | text, text, text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | pgr_trspviaedges | text, integer[], double precision[], boolean, boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT id3 integer, OUT cost double precision | SETOF record + pgrouting | public | pgr_trspviavertices | text, anyarray, boolean, boolean, restrictions_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT id3 integer, OUT cost double precision | SETOF record + pgrouting | public | pgr_tsp | text, start_id bigint, end_id bigint, max_processing_time double precision, tries_per_temperature integer, max_changes_per_temperature integer, max_consecutive_non_changes integer, initial_temperature double precision, final_temperature double precision, cooling_factor double precision, randomize boolean, OUT seq integer, OUT node bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_tspeuclidean | text, start_id bigint, end_id bigint, max_processing_time double precision, tries_per_temperature integer, max_changes_per_temperature integer, max_consecutive_non_changes integer, initial_temperature double precision, final_temperature double precision, cooling_factor double precision, randomize boolean, OUT seq integer, OUT node bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_turnrestrictedpath | text, text, bigint, bigint, integer, directed boolean, heap_paths boolean, stop_on_first boolean, strict boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_version | | text + pgrouting | public | pgr_vrponedepot | text, text, text, integer, OUT oid integer, OUT opos integer, OUT vid integer, OUT tarrival integer, OUT tdepart integer | SETOF record + pgrouting | public | pgr_withpoints | text, text, anyarray, bigint, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpoints | text, text, bigint, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpoints | text, text, text, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpoints | text, text, bigint, bigint, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpoints | text, text, anyarray, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscost | text, text, text, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscost | text, text, bigint, bigint, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscost | text, text, anyarray, anyarray, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscost | text, text, anyarray, bigint, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscost | text, text, bigint, anyarray, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscostmatrix | text, text, anyarray, directed boolean, driving_side character, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsdd | text, text, bigint, double precision, directed boolean, driving_side character, details boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsdd | text, text, anyarray, double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, bigint, bigint, integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsvia | text, text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrowlocks | public | pgrowlocks | relname text, OUT locked_row tid, OUT locker xid, OUT multi boolean, OUT xids xid[], OUT modes text[], OUT pids integer[] | SETOF record + pgsodium | pgsodium | create_key | key_type pgsodium.key_type, name text, raw_key bytea, raw_key_nonce bytea, parent_key uuid, key_context bytea, expires timestamp with time zone, associated_data text | pgsodium.valid_key + pgsodium | pgsodium | create_mask_view | relid oid, debug boolean | void + pgsodium | pgsodium | create_mask_view | relid oid, subid integer, debug boolean | void + pgsodium | pgsodium | crypto_aead_det_decrypt | message bytea, additional bytea, key_uuid uuid, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_decrypt | message bytea, additional bytea, key_id bigint, context bytea, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_decrypt | message bytea, additional bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_aead_det_decrypt | ciphertext bytea, additional bytea, key bytea, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_encrypt | message bytea, additional bytea, key_uuid uuid, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_encrypt | message bytea, additional bytea, key_id bigint, context bytea, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_encrypt | message bytea, additional bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_aead_det_encrypt | message bytea, additional bytea, key bytea, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_keygen | | bytea + pgsodium | pgsodium | crypto_aead_det_noncegen | | bytea + pgsodium | pgsodium | crypto_aead_ietf_decrypt | message bytea, additional bytea, nonce bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_aead_ietf_decrypt | message bytea, additional bytea, nonce bytea, key bytea | bytea + pgsodium | pgsodium | crypto_aead_ietf_decrypt | message bytea, additional bytea, nonce bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_aead_ietf_encrypt | message bytea, additional bytea, nonce bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_aead_ietf_encrypt | message bytea, additional bytea, nonce bytea, key bytea | bytea + pgsodium | pgsodium | crypto_aead_ietf_encrypt | message bytea, additional bytea, nonce bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_aead_ietf_keygen | | bytea + pgsodium | pgsodium | crypto_aead_ietf_noncegen | | bytea + pgsodium | pgsodium | crypto_auth | message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_auth | message bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_auth | message bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_auth_hmacsha256 | message bytea, secret bytea | bytea + pgsodium | pgsodium | crypto_auth_hmacsha256 | message bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_auth_hmacsha256 | message bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_auth_hmacsha256_keygen | | bytea + pgsodium | pgsodium | crypto_auth_hmacsha256_verify | hash bytea, message bytea, key_id bigint, context bytea | boolean + pgsodium | pgsodium | crypto_auth_hmacsha256_verify | signature bytea, message bytea, key_uuid uuid | boolean + pgsodium | pgsodium | crypto_auth_hmacsha256_verify | hash bytea, message bytea, secret bytea | boolean + pgsodium | pgsodium | crypto_auth_hmacsha512 | message bytea, secret bytea | bytea + pgsodium | pgsodium | crypto_auth_hmacsha512 | message bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_auth_hmacsha512 | message bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_auth_hmacsha512_keygen | | bytea + pgsodium | pgsodium | crypto_auth_hmacsha512_verify | hash bytea, message bytea, key_id bigint, context bytea | boolean + pgsodium | pgsodium | crypto_auth_hmacsha512_verify | signature bytea, message bytea, key_uuid uuid | boolean + pgsodium | pgsodium | crypto_auth_hmacsha512_verify | hash bytea, message bytea, secret bytea | boolean + pgsodium | pgsodium | crypto_auth_keygen | | bytea + pgsodium | pgsodium | crypto_auth_verify | mac bytea, message bytea, key_uuid uuid | boolean + pgsodium | pgsodium | crypto_auth_verify | mac bytea, message bytea, key bytea | boolean + pgsodium | pgsodium | crypto_auth_verify | mac bytea, message bytea, key_id bigint, context bytea | boolean + pgsodium | pgsodium | crypto_box | message bytea, nonce bytea, public bytea, secret bytea | bytea + pgsodium | pgsodium | crypto_box_new_keypair | | pgsodium.crypto_box_keypair + pgsodium | pgsodium | crypto_box_new_seed | | bytea + pgsodium | pgsodium | crypto_box_noncegen | | bytea + pgsodium | pgsodium | crypto_box_open | ciphertext bytea, nonce bytea, public bytea, secret bytea | bytea + pgsodium | pgsodium | crypto_box_seal | message bytea, public_key bytea | bytea + pgsodium | pgsodium | crypto_box_seal_open | ciphertext bytea, public_key bytea, secret_key bytea | bytea + pgsodium | pgsodium | crypto_box_seed_new_keypair | seed bytea | pgsodium.crypto_box_keypair + pgsodium | pgsodium | crypto_cmp | text, text | boolean + pgsodium | pgsodium | crypto_generichash | message bytea, key bigint, context bytea | bytea + pgsodium | pgsodium | crypto_generichash | message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_generichash | message bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_generichash_keygen | | bytea + pgsodium | pgsodium | crypto_hash_sha256 | message bytea | bytea + pgsodium | pgsodium | crypto_hash_sha512 | message bytea | bytea + pgsodium | pgsodium | crypto_kdf_derive_from_key | subkey_size integer, subkey_id bigint, context bytea, primary_key uuid | bytea + pgsodium | pgsodium | crypto_kdf_derive_from_key | subkey_size bigint, subkey_id bigint, context bytea, primary_key bytea | bytea + pgsodium | pgsodium | crypto_kdf_keygen | | bytea + pgsodium | pgsodium | crypto_kx_client_session_keys | client_pk bytea, client_sk bytea, server_pk bytea | pgsodium.crypto_kx_session + pgsodium | pgsodium | crypto_kx_new_keypair | | pgsodium.crypto_kx_keypair + pgsodium | pgsodium | crypto_kx_new_seed | | bytea + pgsodium | pgsodium | crypto_kx_seed_new_keypair | seed bytea | pgsodium.crypto_kx_keypair + pgsodium | pgsodium | crypto_kx_server_session_keys | server_pk bytea, server_sk bytea, client_pk bytea | pgsodium.crypto_kx_session + pgsodium | pgsodium | crypto_pwhash | password bytea, salt bytea | bytea + pgsodium | pgsodium | crypto_pwhash_saltgen | | bytea + pgsodium | pgsodium | crypto_pwhash_str | password bytea | bytea + pgsodium | pgsodium | crypto_pwhash_str_verify | hashed_password bytea, password bytea | boolean + pgsodium | pgsodium | crypto_secretbox | message bytea, nonce bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_secretbox | message bytea, nonce bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_secretbox | message bytea, nonce bytea, key bytea | bytea + pgsodium | pgsodium | crypto_secretbox_keygen | | bytea + pgsodium | pgsodium | crypto_secretbox_noncegen | | bytea + pgsodium | pgsodium | crypto_secretbox_open | ciphertext bytea, nonce bytea, key bytea | bytea + pgsodium | pgsodium | crypto_secretbox_open | message bytea, nonce bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_secretbox_open | message bytea, nonce bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_secretstream_keygen | | bytea + pgsodium | pgsodium | crypto_shorthash | message bytea, key bigint, context bytea | bytea + pgsodium | pgsodium | crypto_shorthash | message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_shorthash | message bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_shorthash_keygen | | bytea + pgsodium | pgsodium | crypto_sign | message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_sign_detached | message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_sign_final_create | state bytea, key bytea | bytea + pgsodium | pgsodium | crypto_sign_final_verify | state bytea, signature bytea, key bytea | boolean + pgsodium | pgsodium | crypto_sign_init | | bytea + pgsodium | pgsodium | crypto_sign_new_keypair | | pgsodium.crypto_sign_keypair + pgsodium | pgsodium | crypto_sign_new_seed | | bytea + pgsodium | pgsodium | crypto_sign_open | signed_message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_sign_seed_new_keypair | seed bytea | pgsodium.crypto_sign_keypair + pgsodium | pgsodium | crypto_sign_update | state bytea, message bytea | bytea + pgsodium | pgsodium | crypto_sign_update_agg | message bytea | bytea + pgsodium | pgsodium | crypto_sign_update_agg | state bytea, message bytea | bytea + pgsodium | pgsodium | crypto_sign_update_agg1 | state bytea, message bytea | bytea + pgsodium | pgsodium | crypto_sign_update_agg2 | cur_state bytea, initial_state bytea, message bytea | bytea + pgsodium | pgsodium | crypto_sign_verify_detached | sig bytea, message bytea, key bytea | boolean + pgsodium | pgsodium | crypto_signcrypt_new_keypair | | pgsodium.crypto_signcrypt_keypair + pgsodium | pgsodium | crypto_signcrypt_sign_after | state bytea, sender_sk bytea, ciphertext bytea | bytea + pgsodium | pgsodium | crypto_signcrypt_sign_before | sender bytea, recipient bytea, sender_sk bytea, recipient_pk bytea, additional bytea | pgsodium.crypto_signcrypt_state_key + pgsodium | pgsodium | crypto_signcrypt_verify_after | state bytea, signature bytea, sender_pk bytea, ciphertext bytea | boolean + pgsodium | pgsodium | crypto_signcrypt_verify_before | signature bytea, sender bytea, recipient bytea, additional bytea, sender_pk bytea, recipient_sk bytea | pgsodium.crypto_signcrypt_state_key + pgsodium | pgsodium | crypto_signcrypt_verify_public | signature bytea, sender bytea, recipient bytea, additional bytea, sender_pk bytea, ciphertext bytea | boolean + pgsodium | pgsodium | crypto_stream_xchacha20 | bigint, bytea, bytea | bytea + pgsodium | pgsodium | crypto_stream_xchacha20 | bigint, bytea, bigint, context bytea | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_keygen | | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_noncegen | | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_xor | bytea, bytea, bigint, context bytea | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_xor | bytea, bytea, bytea | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_xor_ic | bytea, bytea, bigint, bigint, context bytea | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_xor_ic | bytea, bytea, bigint, bytea | bytea + pgsodium | pgsodium | decrypted_columns | relid oid | text + pgsodium | pgsodium | derive_key | key_id bigint, key_len integer, context bytea | bytea + pgsodium | pgsodium | disable_security_label_trigger | | void + pgsodium | pgsodium | enable_security_label_trigger | | void + pgsodium | pgsodium | encrypted_column | relid oid, m record | text + pgsodium | pgsodium | encrypted_columns | relid oid | text + pgsodium | pgsodium | get_key_by_id | uuid | pgsodium.valid_key + pgsodium | pgsodium | get_key_by_name | text | pgsodium.valid_key + pgsodium | pgsodium | get_named_keys | filter text | SETOF pgsodium.valid_key + pgsodium | pgsodium | has_mask | role regrole, source_name text | boolean + pgsodium | pgsodium | key_encrypt_secret_raw_key | | trigger + pgsodium | pgsodium | mask_columns | source_relid oid | TABLE(attname name, key_id text, key_id_column text, associated_column text, nonce_column text, format_type text) + pgsodium | pgsodium | mask_role | masked_role regrole, source_name text, view_name text | void + pgsodium | pgsodium | pgsodium_derive | key_id bigint, key_len integer, context bytea | bytea + pgsodium | pgsodium | quote_assoc | text, boolean | text + pgsodium | pgsodium | randombytes_buf | size integer | bytea + pgsodium | pgsodium | randombytes_buf_deterministic | size integer, seed bytea | bytea + pgsodium | pgsodium | randombytes_new_seed | | bytea + pgsodium | pgsodium | randombytes_random | | integer + pgsodium | pgsodium | randombytes_uniform | upper_bound integer | integer + pgsodium | pgsodium | sodium_base642bin | base64 text | bytea + pgsodium | pgsodium | sodium_bin2base64 | bin bytea | text + pgsodium | pgsodium | trg_mask_update | | event_trigger + pgsodium | pgsodium | update_mask | target oid, debug boolean | void + pgsodium | pgsodium | update_masks | debug boolean | void + pgsodium | pgsodium | version | | text + pgstattuple | public | pg_relpages | relname text | bigint + pgstattuple | public | pg_relpages | relname regclass | bigint + pgstattuple | public | pgstatginindex | relname regclass, OUT version integer, OUT pending_pages integer, OUT pending_tuples bigint | record + pgstattuple | public | pgstathashindex | relname regclass, OUT version integer, OUT bucket_pages bigint, OUT overflow_pages bigint, OUT bitmap_pages bigint, OUT unused_pages bigint, OUT live_items bigint, OUT dead_items bigint, OUT free_percent double precision | record + pgstattuple | public | pgstatindex | relname regclass, OUT version integer, OUT tree_level integer, OUT index_size bigint, OUT root_block_no bigint, OUT internal_pages bigint, OUT leaf_pages bigint, OUT empty_pages bigint, OUT deleted_pages bigint, OUT avg_leaf_density double precision, OUT leaf_fragmentation double precision | record + pgstattuple | public | pgstatindex | relname text, OUT version integer, OUT tree_level integer, OUT index_size bigint, OUT root_block_no bigint, OUT internal_pages bigint, OUT leaf_pages bigint, OUT empty_pages bigint, OUT deleted_pages bigint, OUT avg_leaf_density double precision, OUT leaf_fragmentation double precision | record + pgstattuple | public | pgstattuple | reloid regclass, OUT table_len bigint, OUT tuple_count bigint, OUT tuple_len bigint, OUT tuple_percent double precision, OUT dead_tuple_count bigint, OUT dead_tuple_len bigint, OUT dead_tuple_percent double precision, OUT free_space bigint, OUT free_percent double precision | record + pgstattuple | public | pgstattuple | relname text, OUT table_len bigint, OUT tuple_count bigint, OUT tuple_len bigint, OUT tuple_percent double precision, OUT dead_tuple_count bigint, OUT dead_tuple_len bigint, OUT dead_tuple_percent double precision, OUT free_space bigint, OUT free_percent double precision | record + pgstattuple | public | pgstattuple_approx | reloid regclass, OUT table_len bigint, OUT scanned_percent double precision, OUT approx_tuple_count bigint, OUT approx_tuple_len bigint, OUT approx_tuple_percent double precision, OUT dead_tuple_count bigint, OUT dead_tuple_len bigint, OUT dead_tuple_percent double precision, OUT approx_free_space bigint, OUT approx_free_percent double precision | record + pgtap | public | _add | text, integer | integer + pgtap | public | _add | text, integer, text | integer + pgtap | public | _alike | boolean, anyelement, text, text | text + pgtap | public | _ancestor_of | name, name, integer | boolean + pgtap | public | _ancestor_of | name, name, name, name, integer | boolean + pgtap | public | _are | text, name[], name[], text | text + pgtap | public | _areni | text, text[], text[], text | text + pgtap | public | _array_to_sorted_string | name[], text | text + pgtap | public | _assets_are | text, text[], text[], text | text + pgtap | public | _cast_exists | name, name, name, name | boolean + pgtap | public | _cast_exists | name, name | boolean + pgtap | public | _cast_exists | name, name, name | boolean + pgtap | public | _cdi | name, name, anyelement | text + pgtap | public | _cdi | name, name, anyelement, text | text + pgtap | public | _cdi | name, name, name, anyelement, text | text + pgtap | public | _cexists | name, name | boolean + pgtap | public | _cexists | name, name, name | boolean + pgtap | public | _ckeys | name, character | name[] + pgtap | public | _ckeys | name, name, character | name[] + pgtap | public | _cleanup | | boolean + pgtap | public | _cmp_types | oid, name | boolean + pgtap | public | _col_is_null | name, name, name, text, boolean | text + pgtap | public | _col_is_null | name, name, text, boolean | text + pgtap | public | _constraint | name, character, name[], text, text | text + pgtap | public | _constraint | name, name, character, name[], text, text | text + pgtap | public | _contract_on | text | "char" + pgtap | public | _currtest | | integer + pgtap | public | _db_privs | | name[] + pgtap | public | _def_is | text, text, anyelement, text | text + pgtap | public | _definer | name, name, name[] | boolean + pgtap | public | _definer | name, name[] | boolean + pgtap | public | _definer | name | boolean + pgtap | public | _definer | name, name | boolean + pgtap | public | _dexists | name | boolean + pgtap | public | _dexists | name, name | boolean + pgtap | public | _do_ne | text, text, text, text | text + pgtap | public | _docomp | text, text, text, text | text + pgtap | public | _error_diag | text, text, text, text, text, text, text, text, text, text | text + pgtap | public | _expand_context | character | text + pgtap | public | _expand_on | character | text + pgtap | public | _expand_vol | character | text + pgtap | public | _ext_exists | name | boolean + pgtap | public | _ext_exists | name, name | boolean + pgtap | public | _extensions | name | SETOF name + pgtap | public | _extensions | | SETOF name + pgtap | public | _extras | character, name, name[] | name[] + pgtap | public | _extras | character[], name[] | name[] + pgtap | public | _extras | character, name[] | name[] + pgtap | public | _extras | character[], name, name[] | name[] + pgtap | public | _finish | integer, integer, integer, boolean | SETOF text + pgtap | public | _fkexists | name, name, name[] | boolean + pgtap | public | _fkexists | name, name[] | boolean + pgtap | public | _fprivs_are | text, name, name[], text | text + pgtap | public | _func_compare | name, name, boolean, text | text + pgtap | public | _func_compare | name, name, name[], anyelement, anyelement, text | text + pgtap | public | _func_compare | name, name, name[], boolean, text | text + pgtap | public | _func_compare | name, name, anyelement, anyelement, text | text + pgtap | public | _funkargs | name[] | text + pgtap | public | _get | text | integer + pgtap | public | _get_ac_privs | name, text | text[] + pgtap | public | _get_col_ns_type | name, name, name | text + pgtap | public | _get_col_privs | name, text, name | text[] + pgtap | public | _get_col_type | name, name | text + pgtap | public | _get_col_type | name, name, name | text + pgtap | public | _get_context | name, name | "char" + pgtap | public | _get_db_owner | name | name + pgtap | public | _get_db_privs | name, text | text[] + pgtap | public | _get_dtype | name, text, boolean | text + pgtap | public | _get_dtype | name | text + pgtap | public | _get_fdw_privs | name, text | text[] + pgtap | public | _get_func_owner | name, name, name[] | name + pgtap | public | _get_func_owner | name, name[] | name + pgtap | public | _get_func_privs | text, text | text[] + pgtap | public | _get_index_owner | name, name | name + pgtap | public | _get_index_owner | name, name, name | name + pgtap | public | _get_lang_privs | name, text | text[] + pgtap | public | _get_language_owner | name | name + pgtap | public | _get_latest | text | integer[] + pgtap | public | _get_latest | text, integer | integer + pgtap | public | _get_note | integer | text + pgtap | public | _get_note | text | text + pgtap | public | _get_opclass_owner | name | name + pgtap | public | _get_opclass_owner | name, name | name + pgtap | public | _get_rel_owner | character[], name, name | name + pgtap | public | _get_rel_owner | character, name | name + pgtap | public | _get_rel_owner | name | name + pgtap | public | _get_rel_owner | name, name | name + pgtap | public | _get_rel_owner | character[], name | name + pgtap | public | _get_rel_owner | character, name, name | name + pgtap | public | _get_schema_owner | name | name + pgtap | public | _get_schema_privs | name, text | text[] + pgtap | public | _get_sequence_privs | name, text | text[] + pgtap | public | _get_server_privs | name, text | text[] + pgtap | public | _get_table_privs | name, text | text[] + pgtap | public | _get_tablespace_owner | name | name + pgtap | public | _get_tablespaceprivs | name, text | text[] + pgtap | public | _get_type_owner | name | name + pgtap | public | _get_type_owner | name, name | name + pgtap | public | _got_func | name, name, name[] | boolean + pgtap | public | _got_func | name, name[] | boolean + pgtap | public | _got_func | name | boolean + pgtap | public | _got_func | name, name | boolean + pgtap | public | _grolist | name | oid[] + pgtap | public | _has_def | name, name | boolean + pgtap | public | _has_def | name, name, name | boolean + pgtap | public | _has_group | name | boolean + pgtap | public | _has_role | name | boolean + pgtap | public | _has_type | name, name, character[] | boolean + pgtap | public | _has_type | name, character[] | boolean + pgtap | public | _has_user | name | boolean + pgtap | public | _hasc | name, character | boolean + pgtap | public | _hasc | name, name, character | boolean + pgtap | public | _have_index | name, name | boolean + pgtap | public | _have_index | name, name, name | boolean + pgtap | public | _ident_array_to_sorted_string | name[], text | text + pgtap | public | _ident_array_to_string | name[], text | text + pgtap | public | _ikeys | name, name | text[] + pgtap | public | _ikeys | name, name, name | text[] + pgtap | public | _inherited | name | boolean + pgtap | public | _inherited | name, name | boolean + pgtap | public | _is_indexed | name, name, text[] | boolean + pgtap | public | _is_instead | name, name | boolean + pgtap | public | _is_instead | name, name, name | boolean + pgtap | public | _is_schema | name | boolean + pgtap | public | _is_super | name | boolean + pgtap | public | _is_trusted | name | boolean + pgtap | public | _is_verbose | | boolean + pgtap | public | _keys | name, character | SETOF name[] + pgtap | public | _keys | name, name, character | SETOF name[] + pgtap | public | _lang | name, name, name[] | name + pgtap | public | _lang | name, name[] | name + pgtap | public | _lang | name | name + pgtap | public | _lang | name, name | name + pgtap | public | _missing | character, name, name[] | name[] + pgtap | public | _missing | character[], name[] | name[] + pgtap | public | _missing | character, name[] | name[] + pgtap | public | _missing | character[], name, name[] | name[] + pgtap | public | _nosuch | name, name, name[] | text + pgtap | public | _op_exists | name, name, name, name | boolean + pgtap | public | _op_exists | name, name, name, name, name | boolean + pgtap | public | _op_exists | name, name, name | boolean + pgtap | public | _opc_exists | name | boolean + pgtap | public | _opc_exists | name, name | boolean + pgtap | public | _partof | name, name, name, name | boolean + pgtap | public | _partof | name, name | boolean + pgtap | public | _parts | name | SETOF name + pgtap | public | _parts | name, name | SETOF name + pgtap | public | _pg_sv_column_array | oid, smallint[] | name[] + pgtap | public | _pg_sv_table_accessible | oid, oid | boolean + pgtap | public | _pg_sv_type_array | oid[] | name[] + pgtap | public | _prokind | p_oid oid | "char" + pgtap | public | _query | text | text + pgtap | public | _quote_ident_like | text, text | text + pgtap | public | _refine_vol | text | text + pgtap | public | _relcomp | text, text, text, text, text | text + pgtap | public | _relcomp | text, text, text, text | text + pgtap | public | _relcomp | text, anyarray, text, text | text + pgtap | public | _relexists | name | boolean + pgtap | public | _relexists | name, name | boolean + pgtap | public | _relne | text, text, text, text | text + pgtap | public | _relne | text, anyarray, text, text | text + pgtap | public | _returns | name, name, name[] | text + pgtap | public | _returns | name, name[] | text + pgtap | public | _returns | name | text + pgtap | public | _returns | name, name | text + pgtap | public | _rexists | character[], name, name | boolean + pgtap | public | _rexists | character, name | boolean + pgtap | public | _rexists | character[], name | boolean + pgtap | public | _rexists | character, name, name | boolean + pgtap | public | _rule_on | name, name | "char" + pgtap | public | _rule_on | name, name, name | "char" + pgtap | public | _runem | text[], boolean | SETOF text + pgtap | public | _runner | text[], text[], text[], text[], text[] | SETOF text + pgtap | public | _set | text, integer | integer + pgtap | public | _set | integer, integer | integer + pgtap | public | _set | text, integer, text | integer + pgtap | public | _strict | name, name, name[] | boolean + pgtap | public | _strict | name, name[] | boolean + pgtap | public | _strict | name | boolean + pgtap | public | _strict | name, name | boolean + pgtap | public | _table_privs | | name[] + pgtap | public | _temptable | text, text | text + pgtap | public | _temptable | anyarray, text | text + pgtap | public | _temptypes | text | text + pgtap | public | _time_trials | text, integer, numeric | SETOF _time_trial_type + pgtap | public | _tlike | boolean, text, text, text | text + pgtap | public | _todo | | text + pgtap | public | _trig | name, name | boolean + pgtap | public | _trig | name, name, name | boolean + pgtap | public | _type_func | "char", name | boolean + pgtap | public | _type_func | "char", name, name, name[] | boolean + pgtap | public | _type_func | "char", name, name[] | boolean + pgtap | public | _type_func | "char", name, name | boolean + pgtap | public | _types_are | name, name[], text, character[] | text + pgtap | public | _types_are | name[], text, character[] | text + pgtap | public | _unalike | boolean, anyelement, text, text | text + pgtap | public | _vol | name, name, name[] | text + pgtap | public | _vol | name, name[] | text + pgtap | public | _vol | name | text + pgtap | public | _vol | name, name | text + pgtap | public | add_result | boolean, boolean, text, text, text | integer + pgtap | public | alike | anyelement, text | text + pgtap | public | alike | anyelement, text, text | text + pgtap | public | any_column_privs_are | name, name, name, name[], text | text + pgtap | public | any_column_privs_are | name, name, name[] | text + pgtap | public | any_column_privs_are | name, name, name, name[] | text + pgtap | public | any_column_privs_are | name, name, name[], text | text + pgtap | public | bag_eq | text, anyarray, text | text + pgtap | public | bag_eq | text, text | text + pgtap | public | bag_eq | text, text, text | text + pgtap | public | bag_eq | text, anyarray | text + pgtap | public | bag_has | text, text | text + pgtap | public | bag_has | text, text, text | text + pgtap | public | bag_hasnt | text, text | text + pgtap | public | bag_hasnt | text, text, text | text + pgtap | public | bag_ne | text, anyarray, text | text + pgtap | public | bag_ne | text, text | text + pgtap | public | bag_ne | text, text, text | text + pgtap | public | bag_ne | text, anyarray | text + pgtap | public | can | name[] | text + pgtap | public | can | name[], text | text + pgtap | public | can | name, name[], text | text + pgtap | public | can | name, name[] | text + pgtap | public | cast_context_is | name, name, text, text | text + pgtap | public | cast_context_is | name, name, text | text + pgtap | public | casts_are | text[] | text + pgtap | public | casts_are | text[], text | text + pgtap | public | check_test | text, boolean | SETOF text + pgtap | public | check_test | text, boolean, text, text, text, boolean | SETOF text + pgtap | public | check_test | text, boolean, text, text | SETOF text + pgtap | public | check_test | text, boolean, text | SETOF text + pgtap | public | check_test | text, boolean, text, text, text | SETOF text + pgtap | public | cmp_ok | anyelement, text, anyelement | text + pgtap | public | cmp_ok | anyelement, text, anyelement, text | text + pgtap | public | col_default_is | name, name, anyelement | text + pgtap | public | col_default_is | name, name, text, text | text + pgtap | public | col_default_is | name, name, name, text, text | text + pgtap | public | col_default_is | name, name, text | text + pgtap | public | col_default_is | name, name, anyelement, text | text + pgtap | public | col_default_is | name, name, name, anyelement, text | text + pgtap | public | col_has_check | name, name, name, text | text + pgtap | public | col_has_check | name, name[], text | text + pgtap | public | col_has_check | name, name[] | text + pgtap | public | col_has_check | name, name, text | text + pgtap | public | col_has_check | name, name, name[], text | text + pgtap | public | col_has_check | name, name | text + pgtap | public | col_has_default | name, name, name, text | text + pgtap | public | col_has_default | name, name, text | text + pgtap | public | col_has_default | name, name | text + pgtap | public | col_hasnt_default | name, name, name, text | text + pgtap | public | col_hasnt_default | name, name, text | text + pgtap | public | col_hasnt_default | name, name | text + pgtap | public | col_is_fk | name, name, name, text | text + pgtap | public | col_is_fk | name, name[], text | text + pgtap | public | col_is_fk | name, name[] | text + pgtap | public | col_is_fk | name, name, text | text + pgtap | public | col_is_fk | name, name, name[], text | text + pgtap | public | col_is_fk | name, name | text + pgtap | public | col_is_null | table_name name, column_name name, description text | text + pgtap | public | col_is_null | schema_name name, table_name name, column_name name, description text | text + pgtap | public | col_is_pk | name, name, name, text | text + pgtap | public | col_is_pk | name, name[], text | text + pgtap | public | col_is_pk | name, name[] | text + pgtap | public | col_is_pk | name, name, text | text + pgtap | public | col_is_pk | name, name, name[], text | text + pgtap | public | col_is_pk | name, name | text + pgtap | public | col_is_unique | name, name, name, text | text + pgtap | public | col_is_unique | name, name[], text | text + pgtap | public | col_is_unique | name, name, name[] | text + pgtap | public | col_is_unique | name, name[] | text + pgtap | public | col_is_unique | name, name, text | text + pgtap | public | col_is_unique | name, name, name[], text | text + pgtap | public | col_is_unique | name, name | text + pgtap | public | col_is_unique | name, name, name | text + pgtap | public | col_isnt_fk | name, name, name, text | text + pgtap | public | col_isnt_fk | name, name[], text | text + pgtap | public | col_isnt_fk | name, name[] | text + pgtap | public | col_isnt_fk | name, name, text | text + pgtap | public | col_isnt_fk | name, name, name[], text | text + pgtap | public | col_isnt_fk | name, name | text + pgtap | public | col_isnt_pk | name, name, name, text | text + pgtap | public | col_isnt_pk | name, name[], text | text + pgtap | public | col_isnt_pk | name, name[] | text + pgtap | public | col_isnt_pk | name, name, text | text + pgtap | public | col_isnt_pk | name, name, name[], text | text + pgtap | public | col_isnt_pk | name, name | text + pgtap | public | col_not_null | table_name name, column_name name, description text | text + pgtap | public | col_not_null | schema_name name, table_name name, column_name name, description text | text + pgtap | public | col_type_is | name, name, name, text | text + pgtap | public | col_type_is | name, name, text, text | text + pgtap | public | col_type_is | name, name, name, text, text | text + pgtap | public | col_type_is | name, name, name, name, text, text | text + pgtap | public | col_type_is | name, name, text | text + pgtap | public | col_type_is | name, name, name, name, text | text + pgtap | public | collect_tap | VARIADIC text[] | text + pgtap | public | collect_tap | character varying[] | text + pgtap | public | column_privs_are | name, name, name, name[], text | text + pgtap | public | column_privs_are | name, name, name, name, name[] | text + pgtap | public | column_privs_are | name, name, name, name[] | text + pgtap | public | column_privs_are | name, name, name, name, name[], text | text + pgtap | public | columns_are | name, name[], text | text + pgtap | public | columns_are | name, name, name[] | text + pgtap | public | columns_are | name, name[] | text + pgtap | public | columns_are | name, name, name[], text | text + pgtap | public | composite_owner_is | name, name, name, text | text + pgtap | public | composite_owner_is | name, name, text | text + pgtap | public | composite_owner_is | name, name | text + pgtap | public | composite_owner_is | name, name, name | text + pgtap | public | database_privs_are | name, name, name[] | text + pgtap | public | database_privs_are | name, name, name[], text | text + pgtap | public | db_owner_is | name, name, text | text + pgtap | public | db_owner_is | name, name | text + pgtap | public | diag | msg text | text + pgtap | public | diag | VARIADIC text[] | text + pgtap | public | diag | VARIADIC anyarray | text + pgtap | public | diag | msg anyelement | text + pgtap | public | diag_test_name | text | text + pgtap | public | display_oper | name, oid | text + pgtap | public | do_tap | text | SETOF text + pgtap | public | do_tap | name, text | SETOF text + pgtap | public | do_tap | name | SETOF text + pgtap | public | do_tap | | SETOF text + pgtap | public | doesnt_imatch | anyelement, text | text + pgtap | public | doesnt_imatch | anyelement, text, text | text + pgtap | public | doesnt_match | anyelement, text | text + pgtap | public | doesnt_match | anyelement, text, text | text + pgtap | public | domain_type_is | name, text, name, text, text | text + pgtap | public | domain_type_is | text, text | text + pgtap | public | domain_type_is | name, text, text, text | text + pgtap | public | domain_type_is | name, text, text | text + pgtap | public | domain_type_is | text, text, text | text + pgtap | public | domain_type_is | name, text, name, text | text + pgtap | public | domain_type_isnt | name, text, name, text, text | text + pgtap | public | domain_type_isnt | text, text | text + pgtap | public | domain_type_isnt | name, text, text, text | text + pgtap | public | domain_type_isnt | name, text, text | text + pgtap | public | domain_type_isnt | text, text, text | text + pgtap | public | domain_type_isnt | name, text, name, text | text + pgtap | public | domains_are | name[] | text + pgtap | public | domains_are | name[], text | text + pgtap | public | domains_are | name, name[], text | text + pgtap | public | domains_are | name, name[] | text + pgtap | public | enum_has_labels | name, name[], text | text + pgtap | public | enum_has_labels | name, name, name[] | text + pgtap | public | enum_has_labels | name, name[] | text + pgtap | public | enum_has_labels | name, name, name[], text | text + pgtap | public | enums_are | name[] | text + pgtap | public | enums_are | name[], text | text + pgtap | public | enums_are | name, name[], text | text + pgtap | public | enums_are | name, name[] | text + pgtap | public | extensions_are | name[] | text + pgtap | public | extensions_are | name[], text | text + pgtap | public | extensions_are | name, name[], text | text + pgtap | public | extensions_are | name, name[] | text + pgtap | public | fail | text | text + pgtap | public | fail | | text + pgtap | public | fdw_privs_are | name, name, name[] | text + pgtap | public | fdw_privs_are | name, name, name[], text | text + pgtap | public | findfuncs | text | text[] + pgtap | public | findfuncs | text, text | text[] + pgtap | public | findfuncs | name, text, text | text[] + pgtap | public | findfuncs | name, text | text[] + pgtap | public | finish | exception_on_failure boolean | SETOF text + pgtap | public | fk_ok | name, name, name, name, name, text | text + pgtap | public | fk_ok | name, name, name, name, name, name, text | text + pgtap | public | fk_ok | name, name, name, name | text + pgtap | public | fk_ok | name, name, name, name, text | text + pgtap | public | fk_ok | name, name, name[], name, name, name[], text | text + pgtap | public | fk_ok | name, name, name[], name, name, name[] | text + pgtap | public | fk_ok | name, name[], name, name[] | text + pgtap | public | fk_ok | name, name[], name, name[], text | text + pgtap | public | foreign_table_owner_is | name, name, name, text | text + pgtap | public | foreign_table_owner_is | name, name, text | text + pgtap | public | foreign_table_owner_is | name, name | text + pgtap | public | foreign_table_owner_is | name, name, name | text + pgtap | public | foreign_tables_are | name[] | text + pgtap | public | foreign_tables_are | name[], text | text + pgtap | public | foreign_tables_are | name, name[], text | text + pgtap | public | foreign_tables_are | name, name[] | text + pgtap | public | function_lang_is | name, name, name, text | text + pgtap | public | function_lang_is | name, name, text | text + pgtap | public | function_lang_is | name, name[], name, text | text + pgtap | public | function_lang_is | name, name, name[], name | text + pgtap | public | function_lang_is | name, name | text + pgtap | public | function_lang_is | name, name, name | text + pgtap | public | function_lang_is | name, name[], name | text + pgtap | public | function_lang_is | name, name, name[], name, text | text + pgtap | public | function_owner_is | name, name[], name, text | text + pgtap | public | function_owner_is | name, name, name[], name | text + pgtap | public | function_owner_is | name, name[], name | text + pgtap | public | function_owner_is | name, name, name[], name, text | text + pgtap | public | function_privs_are | name, name, name[], name, name[], text | text + pgtap | public | function_privs_are | name, name[], name, name[] | text + pgtap | public | function_privs_are | name, name[], name, name[], text | text + pgtap | public | function_privs_are | name, name, name[], name, name[] | text + pgtap | public | function_returns | name, name, name[], text, text | text + pgtap | public | function_returns | name, name[], text | text + pgtap | public | function_returns | name, name, text, text | text + pgtap | public | function_returns | name, name, text | text + pgtap | public | function_returns | name, text, text | text + pgtap | public | function_returns | name, text | text + pgtap | public | function_returns | name, name, name[], text | text + pgtap | public | function_returns | name, name[], text, text | text + pgtap | public | functions_are | name[] | text + pgtap | public | functions_are | name[], text | text + pgtap | public | functions_are | name, name[], text | text + pgtap | public | functions_are | name, name[] | text + pgtap | public | groups_are | name[] | text + pgtap | public | groups_are | name[], text | text + pgtap | public | has_cast | name, name, name, text | text + pgtap | public | has_cast | name, name, name, name | text + pgtap | public | has_cast | name, name, text | text + pgtap | public | has_cast | name, name, name, name, text | text + pgtap | public | has_cast | name, name | text + pgtap | public | has_cast | name, name, name | text + pgtap | public | has_check | name, name, text | text + pgtap | public | has_check | name, text | text + pgtap | public | has_check | name | text + pgtap | public | has_column | name, name, name, text | text + pgtap | public | has_column | name, name, text | text + pgtap | public | has_column | name, name | text + pgtap | public | has_composite | name, name, text | text + pgtap | public | has_composite | name, text | text + pgtap | public | has_composite | name | text + pgtap | public | has_domain | name, name, text | text + pgtap | public | has_domain | name, text | text + pgtap | public | has_domain | name | text + pgtap | public | has_domain | name, name | text + pgtap | public | has_enum | name, name, text | text + pgtap | public | has_enum | name, text | text + pgtap | public | has_enum | name | text + pgtap | public | has_enum | name, name | text + pgtap | public | has_extension | name, name, text | text + pgtap | public | has_extension | name, text | text + pgtap | public | has_extension | name | text + pgtap | public | has_extension | name, name | text + pgtap | public | has_fk | name, name, text | text + pgtap | public | has_fk | name, text | text + pgtap | public | has_fk | name | text + pgtap | public | has_foreign_table | name, name, text | text + pgtap | public | has_foreign_table | name, text | text + pgtap | public | has_foreign_table | name | text + pgtap | public | has_foreign_table | name, name | text + pgtap | public | has_function | name, name[], text | text + pgtap | public | has_function | name, name, name[] | text + pgtap | public | has_function | name, name[] | text + pgtap | public | has_function | name, name, text | text + pgtap | public | has_function | name, text | text + pgtap | public | has_function | name | text + pgtap | public | has_function | name, name, name[], text | text + pgtap | public | has_function | name, name | text + pgtap | public | has_group | name, text | text + pgtap | public | has_group | name | text + pgtap | public | has_index | name, name, name, text | text + pgtap | public | has_index | name, name, name, name[], text | text + pgtap | public | has_index | name, name, name[] | text + pgtap | public | has_index | name, name, name, name | text + pgtap | public | has_index | name, name, text | text + pgtap | public | has_index | name, name, name, name[] | text + pgtap | public | has_index | name, name, name, name, text | text + pgtap | public | has_index | name, name, name[], text | text + pgtap | public | has_index | name, name | text + pgtap | public | has_index | name, name, name | text + pgtap | public | has_inherited_tables | name, name, text | text + pgtap | public | has_inherited_tables | name, text | text + pgtap | public | has_inherited_tables | name | text + pgtap | public | has_inherited_tables | name, name | text + pgtap | public | has_language | name, text | text + pgtap | public | has_language | name | text + pgtap | public | has_leftop | name, name, name, text | text + pgtap | public | has_leftop | name, name, name, name | text + pgtap | public | has_leftop | name, name, text | text + pgtap | public | has_leftop | name, name, name, name, text | text + pgtap | public | has_leftop | name, name | text + pgtap | public | has_leftop | name, name, name | text + pgtap | public | has_materialized_view | name, name, text | text + pgtap | public | has_materialized_view | name, text | text + pgtap | public | has_materialized_view | name | text + pgtap | public | has_opclass | name, name, text | text + pgtap | public | has_opclass | name, text | text + pgtap | public | has_opclass | name | text + pgtap | public | has_opclass | name, name | text + pgtap | public | has_operator | name, name, name, text | text + pgtap | public | has_operator | name, name, name, name, name, text | text + pgtap | public | has_operator | name, name, name, name | text + pgtap | public | has_operator | name, name, name, name, text | text + pgtap | public | has_operator | name, name, name, name, name | text + pgtap | public | has_operator | name, name, name | text + pgtap | public | has_pk | name, name, text | text + pgtap | public | has_pk | name, text | text + pgtap | public | has_pk | name | text + pgtap | public | has_relation | name, name, text | text + pgtap | public | has_relation | name, text | text + pgtap | public | has_relation | name | text + pgtap | public | has_rightop | name, name, name, text | text + pgtap | public | has_rightop | name, name, name, name | text + pgtap | public | has_rightop | name, name, text | text + pgtap | public | has_rightop | name, name, name, name, text | text + pgtap | public | has_rightop | name, name | text + pgtap | public | has_rightop | name, name, name | text + pgtap | public | has_role | name, text | text + pgtap | public | has_role | name | text + pgtap | public | has_rule | name, name, name, text | text + pgtap | public | has_rule | name, name, text | text + pgtap | public | has_rule | name, name | text + pgtap | public | has_rule | name, name, name | text + pgtap | public | has_schema | name, text | text + pgtap | public | has_schema | name | text + pgtap | public | has_sequence | name, name, text | text + pgtap | public | has_sequence | name, text | text + pgtap | public | has_sequence | name | text + pgtap | public | has_sequence | name, name | text + pgtap | public | has_table | name, name, text | text + pgtap | public | has_table | name, text | text + pgtap | public | has_table | name | text + pgtap | public | has_table | name, name | text + pgtap | public | has_tablespace | name, text, text | text + pgtap | public | has_tablespace | name, text | text + pgtap | public | has_tablespace | name | text + pgtap | public | has_trigger | name, name, name, text | text + pgtap | public | has_trigger | name, name, text | text + pgtap | public | has_trigger | name, name | text + pgtap | public | has_trigger | name, name, name | text + pgtap | public | has_type | name, name, text | text + pgtap | public | has_type | name, text | text + pgtap | public | has_type | name | text + pgtap | public | has_type | name, name | text + pgtap | public | has_unique | text | text + pgtap | public | has_unique | text, text | text + pgtap | public | has_unique | text, text, text | text + pgtap | public | has_user | name, text | text + pgtap | public | has_user | name | text + pgtap | public | has_view | name, name, text | text + pgtap | public | has_view | name, text | text + pgtap | public | has_view | name | text + pgtap | public | has_view | name, name | text + pgtap | public | hasnt_cast | name, name, name, text | text + pgtap | public | hasnt_cast | name, name, name, name | text + pgtap | public | hasnt_cast | name, name, text | text + pgtap | public | hasnt_cast | name, name, name, name, text | text + pgtap | public | hasnt_cast | name, name | text + pgtap | public | hasnt_cast | name, name, name | text + pgtap | public | hasnt_column | name, name, name, text | text + pgtap | public | hasnt_column | name, name, text | text + pgtap | public | hasnt_column | name, name | text + pgtap | public | hasnt_composite | name, name, text | text + pgtap | public | hasnt_composite | name, text | text + pgtap | public | hasnt_composite | name | text + pgtap | public | hasnt_domain | name, name, text | text + pgtap | public | hasnt_domain | name, text | text + pgtap | public | hasnt_domain | name | text + pgtap | public | hasnt_domain | name, name | text + pgtap | public | hasnt_enum | name, name, text | text + pgtap | public | hasnt_enum | name, text | text + pgtap | public | hasnt_enum | name | text + pgtap | public | hasnt_enum | name, name | text + pgtap | public | hasnt_extension | name, name, text | text + pgtap | public | hasnt_extension | name, text | text + pgtap | public | hasnt_extension | name | text + pgtap | public | hasnt_extension | name, name | text + pgtap | public | hasnt_fk | name, name, text | text + pgtap | public | hasnt_fk | name, text | text + pgtap | public | hasnt_fk | name | text + pgtap | public | hasnt_foreign_table | name, name, text | text + pgtap | public | hasnt_foreign_table | name, text | text + pgtap | public | hasnt_foreign_table | name | text + pgtap | public | hasnt_foreign_table | name, name | text + pgtap | public | hasnt_function | name, name[], text | text + pgtap | public | hasnt_function | name, name, name[] | text + pgtap | public | hasnt_function | name, name[] | text + pgtap | public | hasnt_function | name, name, text | text + pgtap | public | hasnt_function | name, text | text + pgtap | public | hasnt_function | name | text + pgtap | public | hasnt_function | name, name, name[], text | text + pgtap | public | hasnt_function | name, name | text + pgtap | public | hasnt_group | name, text | text + pgtap | public | hasnt_group | name | text + pgtap | public | hasnt_index | name, name, name, text | text + pgtap | public | hasnt_index | name, name, text | text + pgtap | public | hasnt_index | name, name | text + pgtap | public | hasnt_index | name, name, name | text + pgtap | public | hasnt_inherited_tables | name, name, text | text + pgtap | public | hasnt_inherited_tables | name, text | text + pgtap | public | hasnt_inherited_tables | name | text + pgtap | public | hasnt_inherited_tables | name, name | text + pgtap | public | hasnt_language | name, text | text + pgtap | public | hasnt_language | name | text + pgtap | public | hasnt_leftop | name, name, name, text | text + pgtap | public | hasnt_leftop | name, name, name, name | text + pgtap | public | hasnt_leftop | name, name, text | text + pgtap | public | hasnt_leftop | name, name, name, name, text | text + pgtap | public | hasnt_leftop | name, name | text + pgtap | public | hasnt_leftop | name, name, name | text + pgtap | public | hasnt_materialized_view | name, name, text | text + pgtap | public | hasnt_materialized_view | name, text | text + pgtap | public | hasnt_materialized_view | name | text + pgtap | public | hasnt_opclass | name, name, text | text + pgtap | public | hasnt_opclass | name, text | text + pgtap | public | hasnt_opclass | name | text + pgtap | public | hasnt_opclass | name, name | text + pgtap | public | hasnt_operator | name, name, name, text | text + pgtap | public | hasnt_operator | name, name, name, name, name, text | text + pgtap | public | hasnt_operator | name, name, name, name | text + pgtap | public | hasnt_operator | name, name, name, name, text | text + pgtap | public | hasnt_operator | name, name, name, name, name | text + pgtap | public | hasnt_operator | name, name, name | text + pgtap | public | hasnt_pk | name, name, text | text + pgtap | public | hasnt_pk | name, text | text + pgtap | public | hasnt_pk | name | text + pgtap | public | hasnt_relation | name, name, text | text + pgtap | public | hasnt_relation | name, text | text + pgtap | public | hasnt_relation | name | text + pgtap | public | hasnt_rightop | name, name, name, text | text + pgtap | public | hasnt_rightop | name, name, name, name | text + pgtap | public | hasnt_rightop | name, name, text | text + pgtap | public | hasnt_rightop | name, name, name, name, text | text + pgtap | public | hasnt_rightop | name, name | text + pgtap | public | hasnt_rightop | name, name, name | text + pgtap | public | hasnt_role | name, text | text + pgtap | public | hasnt_role | name | text + pgtap | public | hasnt_rule | name, name, name, text | text + pgtap | public | hasnt_rule | name, name, text | text + pgtap | public | hasnt_rule | name, name | text + pgtap | public | hasnt_rule | name, name, name | text + pgtap | public | hasnt_schema | name, text | text + pgtap | public | hasnt_schema | name | text + pgtap | public | hasnt_sequence | name, name, text | text + pgtap | public | hasnt_sequence | name, text | text + pgtap | public | hasnt_sequence | name | text + pgtap | public | hasnt_table | name, name, text | text + pgtap | public | hasnt_table | name, text | text + pgtap | public | hasnt_table | name | text + pgtap | public | hasnt_table | name, name | text + pgtap | public | hasnt_tablespace | name, text | text + pgtap | public | hasnt_tablespace | name | text + pgtap | public | hasnt_trigger | name, name, name, text | text + pgtap | public | hasnt_trigger | name, name, text | text + pgtap | public | hasnt_trigger | name, name | text + pgtap | public | hasnt_trigger | name, name, name | text + pgtap | public | hasnt_type | name, name, text | text + pgtap | public | hasnt_type | name, text | text + pgtap | public | hasnt_type | name | text + pgtap | public | hasnt_type | name, name | text + pgtap | public | hasnt_user | name, text | text + pgtap | public | hasnt_user | name | text + pgtap | public | hasnt_view | name, name, text | text + pgtap | public | hasnt_view | name, text | text + pgtap | public | hasnt_view | name | text + pgtap | public | hasnt_view | name, name | text + pgtap | public | ialike | anyelement, text | text + pgtap | public | ialike | anyelement, text, text | text + pgtap | public | imatches | anyelement, text | text + pgtap | public | imatches | anyelement, text, text | text + pgtap | public | in_todo | | boolean + pgtap | public | index_is_primary | name, name, name, text | text + pgtap | public | index_is_primary | name | text + pgtap | public | index_is_primary | name, name | text + pgtap | public | index_is_primary | name, name, name | text + pgtap | public | index_is_type | name, name, name, name | text + pgtap | public | index_is_type | name, name, name, name, text | text + pgtap | public | index_is_type | name, name | text + pgtap | public | index_is_type | name, name, name | text + pgtap | public | index_is_unique | name, name, name, text | text + pgtap | public | index_is_unique | name | text + pgtap | public | index_is_unique | name, name | text + pgtap | public | index_is_unique | name, name, name | text + pgtap | public | index_owner_is | name, name, name, text | text + pgtap | public | index_owner_is | name, name, name, name | text + pgtap | public | index_owner_is | name, name, name, name, text | text + pgtap | public | index_owner_is | name, name, name | text + pgtap | public | indexes_are | name, name[], text | text + pgtap | public | indexes_are | name, name, name[] | text + pgtap | public | indexes_are | name, name[] | text + pgtap | public | indexes_are | name, name, name[], text | text + pgtap | public | is | anyelement, anyelement, text | text + pgtap | public | is | anyelement, anyelement | text + pgtap | public | is_aggregate | name, name[], text | text + pgtap | public | is_aggregate | name, name, name[] | text + pgtap | public | is_aggregate | name, name[] | text + pgtap | public | is_aggregate | name, name, text | text + pgtap | public | is_aggregate | name, text | text + pgtap | public | is_aggregate | name | text + pgtap | public | is_aggregate | name, name, name[], text | text + pgtap | public | is_aggregate | name, name | text + pgtap | public | is_ancestor_of | name, name, name, name, integer, text | text + pgtap | public | is_ancestor_of | name, name, integer | text + pgtap | public | is_ancestor_of | name, name, name, name | text + pgtap | public | is_ancestor_of | name, name, text | text + pgtap | public | is_ancestor_of | name, name, name, name, text | text + pgtap | public | is_ancestor_of | name, name, name, name, integer | text + pgtap | public | is_ancestor_of | name, name | text + pgtap | public | is_ancestor_of | name, name, integer, text | text + pgtap | public | is_clustered | name, name, name, text | text + pgtap | public | is_clustered | name | text + pgtap | public | is_clustered | name, name | text + pgtap | public | is_clustered | name, name, name | text + pgtap | public | is_definer | name, name[], text | text + pgtap | public | is_definer | name, name, name[] | text + pgtap | public | is_definer | name, name[] | text + pgtap | public | is_definer | name, name, text | text + pgtap | public | is_definer | name, text | text + pgtap | public | is_definer | name | text + pgtap | public | is_definer | name, name, name[], text | text + pgtap | public | is_definer | name, name | text + pgtap | public | is_descendent_of | name, name, name, name, integer, text | text + pgtap | public | is_descendent_of | name, name, integer | text + pgtap | public | is_descendent_of | name, name, name, name | text + pgtap | public | is_descendent_of | name, name, text | text + pgtap | public | is_descendent_of | name, name, name, name, text | text + pgtap | public | is_descendent_of | name, name, name, name, integer | text + pgtap | public | is_descendent_of | name, name | text + pgtap | public | is_descendent_of | name, name, integer, text | text + pgtap | public | is_empty | text | text + pgtap | public | is_empty | text, text | text + pgtap | public | is_indexed | name, name, name, text | text + pgtap | public | is_indexed | name, name[], text | text + pgtap | public | is_indexed | name, name, name[] | text + pgtap | public | is_indexed | name, name[] | text + pgtap | public | is_indexed | name, name, name[], text | text + pgtap | public | is_indexed | name, name | text + pgtap | public | is_indexed | name, name, name | text + pgtap | public | is_member_of | name, name[], text | text + pgtap | public | is_member_of | name, name[] | text + pgtap | public | is_member_of | name, name, text | text + pgtap | public | is_member_of | name, name | text + pgtap | public | is_normal_function | name, name[], text | text + pgtap | public | is_normal_function | name, name, name[] | text + pgtap | public | is_normal_function | name, name[] | text + pgtap | public | is_normal_function | name, name, text | text + pgtap | public | is_normal_function | name, text | text + pgtap | public | is_normal_function | name | text + pgtap | public | is_normal_function | name, name, name[], text | text + pgtap | public | is_normal_function | name, name | text + pgtap | public | is_partition_of | name, name, name, name | text + pgtap | public | is_partition_of | name, name, text | text + pgtap | public | is_partition_of | name, name, name, name, text | text + pgtap | public | is_partition_of | name, name | text + pgtap | public | is_partitioned | name, name, text | text + pgtap | public | is_partitioned | name, text | text + pgtap | public | is_partitioned | name | text + pgtap | public | is_partitioned | name, name | text + pgtap | public | is_procedure | name, name[], text | text + pgtap | public | is_procedure | name, name, name[] | text + pgtap | public | is_procedure | name, name[] | text + pgtap | public | is_procedure | name, name, text | text + pgtap | public | is_procedure | name, text | text + pgtap | public | is_procedure | name | text + pgtap | public | is_procedure | name, name, name[], text | text + pgtap | public | is_procedure | name, name | text + pgtap | public | is_strict | name, name[], text | text + pgtap | public | is_strict | name, name, name[] | text + pgtap | public | is_strict | name, name[] | text + pgtap | public | is_strict | name, name, text | text + pgtap | public | is_strict | name, text | text + pgtap | public | is_strict | name | text + pgtap | public | is_strict | name, name, name[], text | text + pgtap | public | is_strict | name, name | text + pgtap | public | is_superuser | name, text | text + pgtap | public | is_superuser | name | text + pgtap | public | is_window | name, name[], text | text + pgtap | public | is_window | name, name, name[] | text + pgtap | public | is_window | name, name[] | text + pgtap | public | is_window | name, name, text | text + pgtap | public | is_window | name, text | text + pgtap | public | is_window | name | text + pgtap | public | is_window | name, name, name[], text | text + pgtap | public | is_window | name, name | text + pgtap | public | isa_ok | anyelement, regtype | text + pgtap | public | isa_ok | anyelement, regtype, text | text + pgtap | public | isnt | anyelement, anyelement, text | text + pgtap | public | isnt | anyelement, anyelement | text + pgtap | public | isnt_aggregate | name, name[], text | text + pgtap | public | isnt_aggregate | name, name, name[] | text + pgtap | public | isnt_aggregate | name, name[] | text + pgtap | public | isnt_aggregate | name, name, text | text + pgtap | public | isnt_aggregate | name, text | text + pgtap | public | isnt_aggregate | name | text + pgtap | public | isnt_aggregate | name, name, name[], text | text + pgtap | public | isnt_aggregate | name, name | text + pgtap | public | isnt_ancestor_of | name, name, name, name, integer, text | text + pgtap | public | isnt_ancestor_of | name, name, integer | text + pgtap | public | isnt_ancestor_of | name, name, name, name | text + pgtap | public | isnt_ancestor_of | name, name, text | text + pgtap | public | isnt_ancestor_of | name, name, name, name, text | text + pgtap | public | isnt_ancestor_of | name, name, name, name, integer | text + pgtap | public | isnt_ancestor_of | name, name | text + pgtap | public | isnt_ancestor_of | name, name, integer, text | text + pgtap | public | isnt_definer | name, name[], text | text + pgtap | public | isnt_definer | name, name, name[] | text + pgtap | public | isnt_definer | name, name[] | text + pgtap | public | isnt_definer | name, name, text | text + pgtap | public | isnt_definer | name, text | text + pgtap | public | isnt_definer | name | text + pgtap | public | isnt_definer | name, name, name[], text | text + pgtap | public | isnt_definer | name, name | text + pgtap | public | isnt_descendent_of | name, name, name, name, integer, text | text + pgtap | public | isnt_descendent_of | name, name, integer | text + pgtap | public | isnt_descendent_of | name, name, name, name | text + pgtap | public | isnt_descendent_of | name, name, text | text + pgtap | public | isnt_descendent_of | name, name, name, name, text | text + pgtap | public | isnt_descendent_of | name, name, name, name, integer | text + pgtap | public | isnt_descendent_of | name, name | text + pgtap | public | isnt_descendent_of | name, name, integer, text | text + pgtap | public | isnt_empty | text | text + pgtap | public | isnt_empty | text, text | text + pgtap | public | isnt_member_of | name, name[], text | text + pgtap | public | isnt_member_of | name, name[] | text + pgtap | public | isnt_member_of | name, name, text | text + pgtap | public | isnt_member_of | name, name | text + pgtap | public | isnt_normal_function | name, name[], text | text + pgtap | public | isnt_normal_function | name, name, name[] | text + pgtap | public | isnt_normal_function | name, name[] | text + pgtap | public | isnt_normal_function | name, name, text | text + pgtap | public | isnt_normal_function | name, text | text + pgtap | public | isnt_normal_function | name | text + pgtap | public | isnt_normal_function | name, name, name[], text | text + pgtap | public | isnt_normal_function | name, name | text + pgtap | public | isnt_partitioned | name, name, text | text + pgtap | public | isnt_partitioned | name, text | text + pgtap | public | isnt_partitioned | name | text + pgtap | public | isnt_partitioned | name, name | text + pgtap | public | isnt_procedure | name, name[], text | text + pgtap | public | isnt_procedure | name, name, name[] | text + pgtap | public | isnt_procedure | name, name[] | text + pgtap | public | isnt_procedure | name, name, text | text + pgtap | public | isnt_procedure | name, text | text + pgtap | public | isnt_procedure | name | text + pgtap | public | isnt_procedure | name, name, name[], text | text + pgtap | public | isnt_procedure | name, name | text + pgtap | public | isnt_strict | name, name[], text | text + pgtap | public | isnt_strict | name, name, name[] | text + pgtap | public | isnt_strict | name, name[] | text + pgtap | public | isnt_strict | name, name, text | text + pgtap | public | isnt_strict | name, text | text + pgtap | public | isnt_strict | name | text + pgtap | public | isnt_strict | name, name, name[], text | text + pgtap | public | isnt_strict | name, name | text + pgtap | public | isnt_superuser | name, text | text + pgtap | public | isnt_superuser | name | text + pgtap | public | isnt_window | name, name[], text | text + pgtap | public | isnt_window | name, name, name[] | text + pgtap | public | isnt_window | name, name[] | text + pgtap | public | isnt_window | name, name, text | text + pgtap | public | isnt_window | name, text | text + pgtap | public | isnt_window | name | text + pgtap | public | isnt_window | name, name, name[], text | text + pgtap | public | isnt_window | name, name | text + pgtap | public | language_is_trusted | name, text | text + pgtap | public | language_is_trusted | name | text + pgtap | public | language_owner_is | name, name, text | text + pgtap | public | language_owner_is | name, name | text + pgtap | public | language_privs_are | name, name, name[] | text + pgtap | public | language_privs_are | name, name, name[], text | text + pgtap | public | languages_are | name[] | text + pgtap | public | languages_are | name[], text | text + pgtap | public | lives_ok | text | text + pgtap | public | lives_ok | text, text | text + pgtap | public | matches | anyelement, text | text + pgtap | public | matches | anyelement, text, text | text + pgtap | public | materialized_view_owner_is | name, name, name, text | text + pgtap | public | materialized_view_owner_is | name, name, text | text + pgtap | public | materialized_view_owner_is | name, name | text + pgtap | public | materialized_view_owner_is | name, name, name | text + pgtap | public | materialized_views_are | name[] | text + pgtap | public | materialized_views_are | name[], text | text + pgtap | public | materialized_views_are | name, name[], text | text + pgtap | public | materialized_views_are | name, name[] | text + pgtap | public | no_plan | | SETOF boolean + pgtap | public | num_failed | | integer + pgtap | public | ok | boolean | text + pgtap | public | ok | boolean, text | text + pgtap | public | opclass_owner_is | name, name, name, text | text + pgtap | public | opclass_owner_is | name, name, text | text + pgtap | public | opclass_owner_is | name, name | text + pgtap | public | opclass_owner_is | name, name, name | text + pgtap | public | opclasses_are | name[] | text + pgtap | public | opclasses_are | name[], text | text + pgtap | public | opclasses_are | name, name[], text | text + pgtap | public | opclasses_are | name, name[] | text + pgtap | public | operators_are | name, text[] | text + pgtap | public | operators_are | text[] | text + pgtap | public | operators_are | text[], text | text + pgtap | public | operators_are | name, text[], text | text + pgtap | public | os_name | | text + pgtap | public | partitions_are | name, name[], text | text + pgtap | public | partitions_are | name, name, name[] | text + pgtap | public | partitions_are | name, name[] | text + pgtap | public | partitions_are | name, name, name[], text | text + pgtap | public | pass | text | text + pgtap | public | pass | | text + pgtap | public | performs_ok | text, numeric, text | text + pgtap | public | performs_ok | text, numeric | text + pgtap | public | performs_within | text, numeric, numeric, integer | text + pgtap | public | performs_within | text, numeric, numeric | text + pgtap | public | performs_within | text, numeric, numeric, integer, text | text + pgtap | public | performs_within | text, numeric, numeric, text | text + pgtap | public | pg_version | | text + pgtap | public | pg_version_num | | integer + pgtap | public | pgtap_version | | numeric + pgtap | public | plan | integer | text + pgtap | public | policies_are | name, name[], text | text + pgtap | public | policies_are | name, name, name[] | text + pgtap | public | policies_are | name, name[] | text + pgtap | public | policies_are | name, name, name[], text | text + pgtap | public | policy_cmd_is | name, name, name, text | text + pgtap | public | policy_cmd_is | name, name, text, text | text + pgtap | public | policy_cmd_is | name, name, name, text, text | text + pgtap | public | policy_cmd_is | name, name, text | text + pgtap | public | policy_roles_are | name, name, name, name[], text | text + pgtap | public | policy_roles_are | name, name, name[] | text + pgtap | public | policy_roles_are | name, name, name, name[] | text + pgtap | public | policy_roles_are | name, name, name[], text | text + pgtap | public | relation_owner_is | name, name, name, text | text + pgtap | public | relation_owner_is | name, name, text | text + pgtap | public | relation_owner_is | name, name | text + pgtap | public | relation_owner_is | name, name, name | text + pgtap | public | results_eq | text, refcursor | text + pgtap | public | results_eq | text, anyarray, text | text + pgtap | public | results_eq | text, text | text + pgtap | public | results_eq | text, refcursor, text | text + pgtap | public | results_eq | refcursor, anyarray | text + pgtap | public | results_eq | refcursor, anyarray, text | text + pgtap | public | results_eq | text, text, text | text + pgtap | public | results_eq | text, anyarray | text + pgtap | public | results_eq | refcursor, refcursor, text | text + pgtap | public | results_eq | refcursor, text, text | text + pgtap | public | results_eq | refcursor, text | text + pgtap | public | results_eq | refcursor, refcursor | text + pgtap | public | results_ne | text, refcursor | text + pgtap | public | results_ne | text, anyarray, text | text + pgtap | public | results_ne | text, text | text + pgtap | public | results_ne | text, refcursor, text | text + pgtap | public | results_ne | refcursor, anyarray | text + pgtap | public | results_ne | refcursor, anyarray, text | text + pgtap | public | results_ne | text, text, text | text + pgtap | public | results_ne | text, anyarray | text + pgtap | public | results_ne | refcursor, refcursor, text | text + pgtap | public | results_ne | refcursor, text, text | text + pgtap | public | results_ne | refcursor, text | text + pgtap | public | results_ne | refcursor, refcursor | text + pgtap | public | roles_are | name[] | text + pgtap | public | roles_are | name[], text | text + pgtap | public | row_eq | text, anyelement | text + pgtap | public | row_eq | text, anyelement, text | text + pgtap | public | rule_is_instead | name, name, name, text | text + pgtap | public | rule_is_instead | name, name, text | text + pgtap | public | rule_is_instead | name, name | text + pgtap | public | rule_is_instead | name, name, name | text + pgtap | public | rule_is_on | name, name, name, text | text + pgtap | public | rule_is_on | name, name, text, text | text + pgtap | public | rule_is_on | name, name, name, text, text | text + pgtap | public | rule_is_on | name, name, text | text + pgtap | public | rules_are | name, name[], text | text + pgtap | public | rules_are | name, name, name[] | text + pgtap | public | rules_are | name, name[] | text + pgtap | public | rules_are | name, name, name[], text | text + pgtap | public | runtests | text | SETOF text + pgtap | public | runtests | name, text | SETOF text + pgtap | public | runtests | name | SETOF text + pgtap | public | runtests | | SETOF text + pgtap | public | schema_owner_is | name, name, text | text + pgtap | public | schema_owner_is | name, name | text + pgtap | public | schema_privs_are | name, name, name[] | text + pgtap | public | schema_privs_are | name, name, name[], text | text + pgtap | public | schemas_are | name[] | text + pgtap | public | schemas_are | name[], text | text + pgtap | public | sequence_owner_is | name, name, name, text | text + pgtap | public | sequence_owner_is | name, name, text | text + pgtap | public | sequence_owner_is | name, name | text + pgtap | public | sequence_owner_is | name, name, name | text + pgtap | public | sequence_privs_are | name, name, name, name[], text | text + pgtap | public | sequence_privs_are | name, name, name[] | text + pgtap | public | sequence_privs_are | name, name, name, name[] | text + pgtap | public | sequence_privs_are | name, name, name[], text | text + pgtap | public | sequences_are | name[] | text + pgtap | public | sequences_are | name[], text | text + pgtap | public | sequences_are | name, name[], text | text + pgtap | public | sequences_are | name, name[] | text + pgtap | public | server_privs_are | name, name, name[] | text + pgtap | public | server_privs_are | name, name, name[], text | text + pgtap | public | set_eq | text, anyarray, text | text + pgtap | public | set_eq | text, text | text + pgtap | public | set_eq | text, text, text | text + pgtap | public | set_eq | text, anyarray | text + pgtap | public | set_has | text, text | text + pgtap | public | set_has | text, text, text | text + pgtap | public | set_hasnt | text, text | text + pgtap | public | set_hasnt | text, text, text | text + pgtap | public | set_ne | text, anyarray, text | text + pgtap | public | set_ne | text, text | text + pgtap | public | set_ne | text, text, text | text + pgtap | public | set_ne | text, anyarray | text + pgtap | public | skip | integer | text + pgtap | public | skip | text | text + pgtap | public | skip | why text, how_many integer | text + pgtap | public | skip | integer, text | text + pgtap | public | table_owner_is | name, name, name, text | text + pgtap | public | table_owner_is | name, name, text | text + pgtap | public | table_owner_is | name, name | text + pgtap | public | table_owner_is | name, name, name | text + pgtap | public | table_privs_are | name, name, name, name[], text | text + pgtap | public | table_privs_are | name, name, name[] | text + pgtap | public | table_privs_are | name, name, name, name[] | text + pgtap | public | table_privs_are | name, name, name[], text | text + pgtap | public | tables_are | name[] | text + pgtap | public | tables_are | name[], text | text + pgtap | public | tables_are | name, name[], text | text + pgtap | public | tables_are | name, name[] | text + pgtap | public | tablespace_owner_is | name, name, text | text + pgtap | public | tablespace_owner_is | name, name | text + pgtap | public | tablespace_privs_are | name, name, name[] | text + pgtap | public | tablespace_privs_are | name, name, name[], text | text + pgtap | public | tablespaces_are | name[] | text + pgtap | public | tablespaces_are | name[], text | text + pgtap | public | throws_ilike | text, text | text + pgtap | public | throws_ilike | text, text, text | text + pgtap | public | throws_imatching | text, text | text + pgtap | public | throws_imatching | text, text, text | text + pgtap | public | throws_like | text, text | text + pgtap | public | throws_like | text, text, text | text + pgtap | public | throws_matching | text, text | text + pgtap | public | throws_matching | text, text, text | text + pgtap | public | throws_ok | text | text + pgtap | public | throws_ok | text, integer | text + pgtap | public | throws_ok | text, text | text + pgtap | public | throws_ok | text, character, text, text | text + pgtap | public | throws_ok | text, text, text | text + pgtap | public | throws_ok | text, integer, text, text | text + pgtap | public | throws_ok | text, integer, text | text + pgtap | public | todo | how_many integer, why text | SETOF boolean + pgtap | public | todo | why text, how_many integer | SETOF boolean + pgtap | public | todo | why text | SETOF boolean + pgtap | public | todo | how_many integer | SETOF boolean + pgtap | public | todo_end | | SETOF boolean + pgtap | public | todo_start | text | SETOF boolean + pgtap | public | todo_start | | SETOF boolean + pgtap | public | trigger_is | name, name, name, text | text + pgtap | public | trigger_is | name, name, name, name, name, text | text + pgtap | public | trigger_is | name, name, name, name, name | text + pgtap | public | trigger_is | name, name, name | text + pgtap | public | triggers_are | name, name[], text | text + pgtap | public | triggers_are | name, name, name[] | text + pgtap | public | triggers_are | name, name[] | text + pgtap | public | triggers_are | name, name, name[], text | text + pgtap | public | type_owner_is | name, name, name, text | text + pgtap | public | type_owner_is | name, name, text | text + pgtap | public | type_owner_is | name, name | text + pgtap | public | type_owner_is | name, name, name | text + pgtap | public | types_are | name[] | text + pgtap | public | types_are | name[], text | text + pgtap | public | types_are | name, name[], text | text + pgtap | public | types_are | name, name[] | text + pgtap | public | unalike | anyelement, text | text + pgtap | public | unalike | anyelement, text, text | text + pgtap | public | unialike | anyelement, text | text + pgtap | public | unialike | anyelement, text, text | text + pgtap | public | users_are | name[] | text + pgtap | public | users_are | name[], text | text + pgtap | public | view_owner_is | name, name, name, text | text + pgtap | public | view_owner_is | name, name, text | text + pgtap | public | view_owner_is | name, name | text + pgtap | public | view_owner_is | name, name, name | text + pgtap | public | views_are | name[] | text + pgtap | public | views_are | name[], text | text + pgtap | public | views_are | name, name[], text | text + pgtap | public | views_are | name, name[] | text + pgtap | public | volatility_is | name, name, name[], text, text | text + pgtap | public | volatility_is | name, name[], text | text + pgtap | public | volatility_is | name, name, text, text | text + pgtap | public | volatility_is | name, name, text | text + pgtap | public | volatility_is | name, text, text | text + pgtap | public | volatility_is | name, text | text + pgtap | public | volatility_is | name, name, name[], text | text + pgtap | public | volatility_is | name, name[], text, text | text + plpgsql | pg_catalog | plpgsql_call_handler | | language_handler + plpgsql | pg_catalog | plpgsql_inline_handler | internal | void + plpgsql | pg_catalog | plpgsql_validator | oid | void + plpgsql_check | public | __plpgsql_show_dependency_tb | funcoid regprocedure, relid regclass, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype | TABLE(type text, oid oid, schema text, name text, params text) + plpgsql_check | public | __plpgsql_show_dependency_tb | name text, relid regclass, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype | TABLE(type text, oid oid, schema text, name text, params text) + plpgsql_check | public | plpgsql_check_function | funcoid regprocedure, relid regclass, format text, fatal_errors boolean, other_warnings boolean, performance_warnings boolean, extra_warnings boolean, security_warnings boolean, compatibility_warnings boolean, oldtable name, newtable name, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype, without_warnings boolean, all_warnings boolean, use_incomment_options boolean, incomment_options_usage_warning boolean, constant_tracing boolean | SETOF text + plpgsql_check | public | plpgsql_check_function | name text, relid regclass, format text, fatal_errors boolean, other_warnings boolean, performance_warnings boolean, extra_warnings boolean, security_warnings boolean, compatibility_warnings boolean, oldtable name, newtable name, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype, without_warnings boolean, all_warnings boolean, use_incomment_options boolean, incomment_options_usage_warning boolean, constant_tracing boolean | SETOF text + plpgsql_check | public | plpgsql_check_function_tb | funcoid regprocedure, relid regclass, fatal_errors boolean, other_warnings boolean, performance_warnings boolean, extra_warnings boolean, security_warnings boolean, compatibility_warnings boolean, oldtable name, newtable name, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype, without_warnings boolean, all_warnings boolean, use_incomment_options boolean, incomment_options_usage_warning boolean, constant_tracing boolean | TABLE(functionid regproc, lineno integer, statement text, sqlstate text, message text, detail text, hint text, level text, "position" integer, query text, context text) + plpgsql_check | public | plpgsql_check_function_tb | name text, relid regclass, fatal_errors boolean, other_warnings boolean, performance_warnings boolean, extra_warnings boolean, security_warnings boolean, compatibility_warnings boolean, oldtable name, newtable name, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype, without_warnings boolean, all_warnings boolean, use_incomment_options boolean, incomment_options_usage_warning boolean, constant_tracing boolean | TABLE(functionid regproc, lineno integer, statement text, sqlstate text, message text, detail text, hint text, level text, "position" integer, query text, context text) + plpgsql_check | public | plpgsql_check_pragma | VARIADIC name text[] | integer + plpgsql_check | public | plpgsql_check_profiler | enable boolean | boolean + plpgsql_check | public | plpgsql_check_tracer | enable boolean, verbosity text | boolean + plpgsql_check | public | plpgsql_coverage_branches | funcoid regprocedure | double precision + plpgsql_check | public | plpgsql_coverage_branches | name text | double precision + plpgsql_check | public | plpgsql_coverage_statements | funcoid regprocedure | double precision + plpgsql_check | public | plpgsql_coverage_statements | name text | double precision + plpgsql_check | public | plpgsql_profiler_function_statements_tb | funcoid regprocedure | TABLE(stmtid integer, parent_stmtid integer, parent_note text, block_num integer, lineno integer, queryid bigint, exec_stmts bigint, exec_stmts_err bigint, total_time double precision, avg_time double precision, max_time double precision, processed_rows bigint, stmtname text) + plpgsql_check | public | plpgsql_profiler_function_statements_tb | name text | TABLE(stmtid integer, parent_stmtid integer, parent_note text, block_num integer, lineno integer, queryid bigint, exec_stmts bigint, exec_stmts_err bigint, total_time double precision, avg_time double precision, max_time double precision, processed_rows bigint, stmtname text) + plpgsql_check | public | plpgsql_profiler_function_tb | funcoid regprocedure | TABLE(lineno integer, stmt_lineno integer, queryids bigint[], cmds_on_row integer, exec_stmts bigint, exec_stmts_err bigint, total_time double precision, avg_time double precision, max_time double precision[], processed_rows bigint[], source text) + plpgsql_check | public | plpgsql_profiler_function_tb | name text | TABLE(lineno integer, stmt_lineno integer, queryids bigint[], cmds_on_row integer, exec_stmts bigint, exec_stmts_err bigint, total_time double precision, avg_time double precision, max_time double precision[], processed_rows bigint[], source text) + plpgsql_check | public | plpgsql_profiler_functions_all | | TABLE(funcoid regprocedure, exec_count bigint, exec_stmts_err bigint, total_time double precision, avg_time double precision, stddev_time double precision, min_time double precision, max_time double precision) + plpgsql_check | public | plpgsql_profiler_install_fake_queryid_hook | | void + plpgsql_check | public | plpgsql_profiler_remove_fake_queryid_hook | | void + plpgsql_check | public | plpgsql_profiler_reset | funcoid regprocedure | void + plpgsql_check | public | plpgsql_profiler_reset_all | | void + plpgsql_check | public | plpgsql_show_dependency_tb | funcoid regprocedure, relid regclass, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype | TABLE(type text, oid oid, schema text, name text, params text) + plpgsql_check | public | plpgsql_show_dependency_tb | fnname text, relid regclass, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype | TABLE(type text, oid oid, schema text, name text, params text) + postgis | public | _postgis_deprecate | oldname text, newname text, version text | void + postgis | public | _postgis_index_extent | tbl regclass, col text | box2d + postgis | public | _postgis_join_selectivity | regclass, text, regclass, text, text | double precision + postgis | public | _postgis_pgsql_version | | text + postgis | public | _postgis_scripts_pgsql_version | | text + postgis | public | _postgis_selectivity | tbl regclass, att_name text, geom geometry, mode text | double precision + postgis | public | _postgis_stats | tbl regclass, att_name text, text | text + postgis | public | _st_3ddfullywithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | _st_3ddwithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | _st_3dintersects | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_asgml | integer, geometry, integer, integer, text, text | text + postgis | public | _st_asx3d | integer, geometry, integer, integer, text | text + postgis | public | _st_bestsrid | geography | integer + postgis | public | _st_bestsrid | geography, geography | integer + postgis | public | _st_contains | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_containsproperly | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_coveredby | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_coveredby | geog1 geography, geog2 geography | boolean + postgis | public | _st_covers | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_covers | geog1 geography, geog2 geography | boolean + postgis | public | _st_crosses | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_dfullywithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | _st_distancetree | geography, geography, double precision, boolean | double precision + postgis | public | _st_distancetree | geography, geography | double precision + postgis | public | _st_distanceuncached | geography, geography, double precision, boolean | double precision + postgis | public | _st_distanceuncached | geography, geography, boolean | double precision + postgis | public | _st_distanceuncached | geography, geography | double precision + postgis | public | _st_dwithin | geog1 geography, geog2 geography, tolerance double precision, use_spheroid boolean | boolean + postgis | public | _st_dwithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | _st_dwithinuncached | geography, geography, double precision, boolean | boolean + postgis | public | _st_dwithinuncached | geography, geography, double precision | boolean + postgis | public | _st_equals | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_expand | geography, double precision | geography + postgis | public | _st_geomfromgml | text, integer | geometry + postgis | public | _st_intersects | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_linecrossingdirection | line1 geometry, line2 geometry | integer + postgis | public | _st_longestline | geom1 geometry, geom2 geometry | geometry + postgis | public | _st_maxdistance | geom1 geometry, geom2 geometry | double precision + postgis | public | _st_orderingequals | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_overlaps | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_pointoutside | geography | geography + postgis | public | _st_sortablehash | geom geometry | bigint + postgis | public | _st_touches | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_voronoi | g1 geometry, clip geometry, tolerance double precision, return_polygons boolean | geometry + postgis | public | _st_within | geom1 geometry, geom2 geometry | boolean + postgis | public | addauth | text | boolean + postgis | public | addgeometrycolumn | schema_name character varying, table_name character varying, column_name character varying, new_srid integer, new_type character varying, new_dim integer, use_typmod boolean | text + postgis | public | addgeometrycolumn | catalog_name character varying, schema_name character varying, table_name character varying, column_name character varying, new_srid_in integer, new_type character varying, new_dim integer, use_typmod boolean | text + postgis | public | addgeometrycolumn | table_name character varying, column_name character varying, new_srid integer, new_type character varying, new_dim integer, use_typmod boolean | text + postgis | public | box | box3d | box + postgis | public | box | geometry | box + postgis | public | box2d | box3d | box2d + postgis | public | box2d | geometry | box2d + postgis | public | box2d_in | cstring | box2d + postgis | public | box2d_out | box2d | cstring + postgis | public | box2df_in | cstring | box2df + postgis | public | box2df_out | box2df | cstring + postgis | public | box3d | geometry | box3d + postgis | public | box3d | box2d | box3d + postgis | public | box3d_in | cstring | box3d + postgis | public | box3d_out | box3d | cstring + postgis | public | box3dtobox | box3d | box + postgis | public | bytea | geography | bytea + postgis | public | bytea | geometry | bytea + postgis | public | checkauth | text, text | integer + postgis | public | checkauth | text, text, text | integer + postgis | public | checkauthtrigger | | trigger + postgis | public | contains_2d | geometry, box2df | boolean + postgis | public | contains_2d | box2df, geometry | boolean + postgis | public | contains_2d | box2df, box2df | boolean + postgis | public | disablelongtransactions | | text + postgis | public | dropgeometrycolumn | schema_name character varying, table_name character varying, column_name character varying | text + postgis | public | dropgeometrycolumn | table_name character varying, column_name character varying | text + postgis | public | dropgeometrycolumn | catalog_name character varying, schema_name character varying, table_name character varying, column_name character varying | text + postgis | public | dropgeometrytable | table_name character varying | text + postgis | public | dropgeometrytable | schema_name character varying, table_name character varying | text + postgis | public | dropgeometrytable | catalog_name character varying, schema_name character varying, table_name character varying | text + postgis | public | enablelongtransactions | | text + postgis | public | equals | geom1 geometry, geom2 geometry | boolean + postgis | public | find_srid | character varying, character varying, character varying | integer + postgis | public | geog_brin_inclusion_add_value | internal, internal, internal, internal | boolean + postgis | public | geography | bytea | geography + postgis | public | geography | geometry | geography + postgis | public | geography | geography, integer, boolean | geography + postgis | public | geography_analyze | internal | boolean + postgis | public | geography_cmp | geography, geography | integer + postgis | public | geography_distance_knn | geography, geography | double precision + postgis | public | geography_eq | geography, geography | boolean + postgis | public | geography_ge | geography, geography | boolean + postgis | public | geography_gist_compress | internal | internal + postgis | public | geography_gist_consistent | internal, geography, integer | boolean + postgis | public | geography_gist_decompress | internal | internal + postgis | public | geography_gist_distance | internal, geography, integer | double precision + postgis | public | geography_gist_penalty | internal, internal, internal | internal + postgis | public | geography_gist_picksplit | internal, internal | internal + postgis | public | geography_gist_same | box2d, box2d, internal | internal + postgis | public | geography_gist_union | bytea, internal | internal + postgis | public | geography_gt | geography, geography | boolean + postgis | public | geography_in | cstring, oid, integer | geography + postgis | public | geography_le | geography, geography | boolean + postgis | public | geography_lt | geography, geography | boolean + postgis | public | geography_out | geography | cstring + postgis | public | geography_overlaps | geography, geography | boolean + postgis | public | geography_recv | internal, oid, integer | geography + postgis | public | geography_send | geography | bytea + postgis | public | geography_spgist_choose_nd | internal, internal | void + postgis | public | geography_spgist_compress_nd | internal | internal + postgis | public | geography_spgist_config_nd | internal, internal | void + postgis | public | geography_spgist_inner_consistent_nd | internal, internal | void + postgis | public | geography_spgist_leaf_consistent_nd | internal, internal | boolean + postgis | public | geography_spgist_picksplit_nd | internal, internal | void + postgis | public | geography_typmod_in | cstring[] | integer + postgis | public | geography_typmod_out | integer | cstring + postgis | public | geom2d_brin_inclusion_add_value | internal, internal, internal, internal | boolean + postgis | public | geom3d_brin_inclusion_add_value | internal, internal, internal, internal | boolean + postgis | public | geom4d_brin_inclusion_add_value | internal, internal, internal, internal | boolean + postgis | public | geometry | geometry, integer, boolean | geometry + postgis | public | geometry | box3d | geometry + postgis | public | geometry | text | geometry + postgis | public | geometry | point | geometry + postgis | public | geometry | bytea | geometry + postgis | public | geometry | geography | geometry + postgis | public | geometry | path | geometry + postgis | public | geometry | polygon | geometry + postgis | public | geometry | box2d | geometry + postgis | public | geometry_above | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_analyze | internal | boolean + postgis | public | geometry_below | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_cmp | geom1 geometry, geom2 geometry | integer + postgis | public | geometry_contained_3d | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_contains | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_contains_3d | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_contains_nd | geometry, geometry | boolean + postgis | public | geometry_distance_box | geom1 geometry, geom2 geometry | double precision + postgis | public | geometry_distance_centroid | geom1 geometry, geom2 geometry | double precision + postgis | public | geometry_distance_centroid_nd | geometry, geometry | double precision + postgis | public | geometry_distance_cpa | geometry, geometry | double precision + postgis | public | geometry_eq | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_ge | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_gist_compress_2d | internal | internal + postgis | public | geometry_gist_compress_nd | internal | internal + postgis | public | geometry_gist_consistent_2d | internal, geometry, integer | boolean + postgis | public | geometry_gist_consistent_nd | internal, geometry, integer | boolean + postgis | public | geometry_gist_decompress_2d | internal | internal + postgis | public | geometry_gist_decompress_nd | internal | internal + postgis | public | geometry_gist_distance_2d | internal, geometry, integer | double precision + postgis | public | geometry_gist_distance_nd | internal, geometry, integer | double precision + postgis | public | geometry_gist_penalty_2d | internal, internal, internal | internal + postgis | public | geometry_gist_penalty_nd | internal, internal, internal | internal + postgis | public | geometry_gist_picksplit_2d | internal, internal | internal + postgis | public | geometry_gist_picksplit_nd | internal, internal | internal + postgis | public | geometry_gist_same_2d | geom1 geometry, geom2 geometry, internal | internal + postgis | public | geometry_gist_same_nd | geometry, geometry, internal | internal + postgis | public | geometry_gist_sortsupport_2d | internal | void + postgis | public | geometry_gist_union_2d | bytea, internal | internal + postgis | public | geometry_gist_union_nd | bytea, internal | internal + postgis | public | geometry_gt | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_hash | geometry | integer + postgis | public | geometry_in | cstring | geometry + postgis | public | geometry_le | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_left | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_lt | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_out | geometry | cstring + postgis | public | geometry_overabove | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_overbelow | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_overlaps | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_overlaps_3d | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_overlaps_nd | geometry, geometry | boolean + postgis | public | geometry_overleft | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_overright | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_recv | internal | geometry + postgis | public | geometry_right | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_same | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_same_3d | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_same_nd | geometry, geometry | boolean + postgis | public | geometry_send | geometry | bytea + postgis | public | geometry_sortsupport | internal | void + postgis | public | geometry_spgist_choose_2d | internal, internal | void + postgis | public | geometry_spgist_choose_3d | internal, internal | void + postgis | public | geometry_spgist_choose_nd | internal, internal | void + postgis | public | geometry_spgist_compress_2d | internal | internal + postgis | public | geometry_spgist_compress_3d | internal | internal + postgis | public | geometry_spgist_compress_nd | internal | internal + postgis | public | geometry_spgist_config_2d | internal, internal | void + postgis | public | geometry_spgist_config_3d | internal, internal | void + postgis | public | geometry_spgist_config_nd | internal, internal | void + postgis | public | geometry_spgist_inner_consistent_2d | internal, internal | void + postgis | public | geometry_spgist_inner_consistent_3d | internal, internal | void + postgis | public | geometry_spgist_inner_consistent_nd | internal, internal | void + postgis | public | geometry_spgist_leaf_consistent_2d | internal, internal | boolean + postgis | public | geometry_spgist_leaf_consistent_3d | internal, internal | boolean + postgis | public | geometry_spgist_leaf_consistent_nd | internal, internal | boolean + postgis | public | geometry_spgist_picksplit_2d | internal, internal | void + postgis | public | geometry_spgist_picksplit_3d | internal, internal | void + postgis | public | geometry_spgist_picksplit_nd | internal, internal | void + postgis | public | geometry_typmod_in | cstring[] | integer + postgis | public | geometry_typmod_out | integer | cstring + postgis | public | geometry_within | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_within_nd | geometry, geometry | boolean + postgis | public | geometrytype | geography | text + postgis | public | geometrytype | geometry | text + postgis | public | geomfromewkb | bytea | geometry + postgis | public | geomfromewkt | text | geometry + postgis | public | get_proj4_from_srid | integer | text + postgis | public | gettransactionid | | xid + postgis | public | gidx_in | cstring | gidx + postgis | public | gidx_out | gidx | cstring + postgis | public | gserialized_gist_joinsel_2d | internal, oid, internal, smallint | double precision + postgis | public | gserialized_gist_joinsel_nd | internal, oid, internal, smallint | double precision + postgis | public | gserialized_gist_sel_2d | internal, oid, internal, integer | double precision + postgis | public | gserialized_gist_sel_nd | internal, oid, internal, integer | double precision + postgis | public | is_contained_2d | geometry, box2df | boolean + postgis | public | is_contained_2d | box2df, geometry | boolean + postgis | public | is_contained_2d | box2df, box2df | boolean + postgis | public | json | geometry | json + postgis | public | jsonb | geometry | jsonb + postgis | public | lockrow | text, text, text, timestamp without time zone | integer + postgis | public | lockrow | text, text, text, text | integer + postgis | public | lockrow | text, text, text | integer + postgis | public | lockrow | text, text, text, text, timestamp without time zone | integer + postgis | public | longtransactionsenabled | | boolean + postgis | public | overlaps_2d | geometry, box2df | boolean + postgis | public | overlaps_2d | box2df, geometry | boolean + postgis | public | overlaps_2d | box2df, box2df | boolean + postgis | public | overlaps_geog | gidx, gidx | boolean + postgis | public | overlaps_geog | geography, gidx | boolean + postgis | public | overlaps_geog | gidx, geography | boolean + postgis | public | overlaps_nd | gidx, gidx | boolean + postgis | public | overlaps_nd | geometry, gidx | boolean + postgis | public | overlaps_nd | gidx, geometry | boolean + postgis | public | path | geometry | path + postgis | public | pgis_asflatgeobuf_finalfn | internal | bytea + postgis | public | pgis_asflatgeobuf_transfn | internal, anyelement, boolean | internal + postgis | public | pgis_asflatgeobuf_transfn | internal, anyelement | internal + postgis | public | pgis_asflatgeobuf_transfn | internal, anyelement, boolean, text | internal + postgis | public | pgis_asgeobuf_finalfn | internal | bytea + postgis | public | pgis_asgeobuf_transfn | internal, anyelement | internal + postgis | public | pgis_asgeobuf_transfn | internal, anyelement, text | internal + postgis | public | pgis_asmvt_combinefn | internal, internal | internal + postgis | public | pgis_asmvt_deserialfn | bytea, internal | internal + postgis | public | pgis_asmvt_finalfn | internal | bytea + postgis | public | pgis_asmvt_serialfn | internal | bytea + postgis | public | pgis_asmvt_transfn | internal, anyelement, text, integer, text | internal + postgis | public | pgis_asmvt_transfn | internal, anyelement | internal + postgis | public | pgis_asmvt_transfn | internal, anyelement, text, integer | internal + postgis | public | pgis_asmvt_transfn | internal, anyelement, text | internal + postgis | public | pgis_asmvt_transfn | internal, anyelement, text, integer, text, text | internal + postgis | public | pgis_geometry_accum_transfn | internal, geometry, double precision | internal + postgis | public | pgis_geometry_accum_transfn | internal, geometry | internal + postgis | public | pgis_geometry_accum_transfn | internal, geometry, double precision, integer | internal + postgis | public | pgis_geometry_clusterintersecting_finalfn | internal | geometry[] + postgis | public | pgis_geometry_clusterwithin_finalfn | internal | geometry[] + postgis | public | pgis_geometry_collect_finalfn | internal | geometry + postgis | public | pgis_geometry_makeline_finalfn | internal | geometry + postgis | public | pgis_geometry_polygonize_finalfn | internal | geometry + postgis | public | pgis_geometry_union_parallel_combinefn | internal, internal | internal + postgis | public | pgis_geometry_union_parallel_deserialfn | bytea, internal | internal + postgis | public | pgis_geometry_union_parallel_finalfn | internal | geometry + postgis | public | pgis_geometry_union_parallel_serialfn | internal | bytea + postgis | public | pgis_geometry_union_parallel_transfn | internal, geometry, double precision | internal + postgis | public | pgis_geometry_union_parallel_transfn | internal, geometry | internal + postgis | public | point | geometry | point + postgis | public | polygon | geometry | polygon + postgis | public | populate_geometry_columns | tbl_oid oid, use_typmod boolean | integer + postgis | public | populate_geometry_columns | use_typmod boolean | text + postgis | public | postgis_addbbox | geometry | geometry + postgis | public | postgis_cache_bbox | | trigger + postgis | public | postgis_constraint_dims | geomschema text, geomtable text, geomcolumn text | integer + postgis | public | postgis_constraint_srid | geomschema text, geomtable text, geomcolumn text | integer + postgis | public | postgis_constraint_type | geomschema text, geomtable text, geomcolumn text | character varying + postgis | public | postgis_dropbbox | geometry | geometry + postgis | public | postgis_extensions_upgrade | | text + postgis | public | postgis_full_version | | text + postgis | public | postgis_geos_noop | geometry | geometry + postgis | public | postgis_geos_version | | text + postgis | public | postgis_getbbox | geometry | box2d + postgis | public | postgis_hasbbox | geometry | boolean + postgis | public | postgis_index_supportfn | internal | internal + postgis | public | postgis_lib_build_date | | text + postgis | public | postgis_lib_revision | | text + postgis | public | postgis_lib_version | | text + postgis | public | postgis_libjson_version | | text + postgis | public | postgis_liblwgeom_version | | text + postgis | public | postgis_libprotobuf_version | | text + postgis | public | postgis_libxml_version | | text + postgis | public | postgis_noop | geometry | geometry + postgis | public | postgis_proj_version | | text + postgis | public | postgis_scripts_build_date | | text + postgis | public | postgis_scripts_installed | | text + postgis | public | postgis_scripts_released | | text + postgis | public | postgis_svn_version | | text + postgis | public | postgis_transform_geometry | geom geometry, text, text, integer | geometry + postgis | public | postgis_type_name | geomname character varying, coord_dimension integer, use_new_name boolean | character varying + postgis | public | postgis_typmod_dims | integer | integer + postgis | public | postgis_typmod_srid | integer | integer + postgis | public | postgis_typmod_type | integer | text + postgis | public | postgis_version | | text + postgis | public | postgis_wagyu_version | | text + postgis | public | spheroid_in | cstring | spheroid + postgis | public | spheroid_out | spheroid | cstring + postgis | public | st_3dclosestpoint | geom1 geometry, geom2 geometry | geometry + postgis | public | st_3ddfullywithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | st_3ddistance | geom1 geometry, geom2 geometry | double precision + postgis | public | st_3ddwithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | st_3dextent | geometry | box3d + postgis | public | st_3dintersects | geom1 geometry, geom2 geometry | boolean + postgis | public | st_3dlength | geometry | double precision + postgis | public | st_3dlineinterpolatepoint | geometry, double precision | geometry + postgis | public | st_3dlongestline | geom1 geometry, geom2 geometry | geometry + postgis | public | st_3dmakebox | geom1 geometry, geom2 geometry | box3d + postgis | public | st_3dmaxdistance | geom1 geometry, geom2 geometry | double precision + postgis | public | st_3dperimeter | geometry | double precision + postgis | public | st_3dshortestline | geom1 geometry, geom2 geometry | geometry + postgis | public | st_addmeasure | geometry, double precision, double precision | geometry + postgis | public | st_addpoint | geom1 geometry, geom2 geometry, integer | geometry + postgis | public | st_addpoint | geom1 geometry, geom2 geometry | geometry + postgis | public | st_affine | geometry, double precision, double precision, double precision, double precision, double precision, double precision | geometry + postgis | public | st_affine | geometry, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision | geometry + postgis | public | st_angle | pt1 geometry, pt2 geometry, pt3 geometry, pt4 geometry | double precision + postgis | public | st_angle | line1 geometry, line2 geometry | double precision + postgis | public | st_area | geog geography, use_spheroid boolean | double precision + postgis | public | st_area | text | double precision + postgis | public | st_area | geometry | double precision + postgis | public | st_area2d | geometry | double precision + postgis | public | st_asbinary | geography | bytea + postgis | public | st_asbinary | geometry, text | bytea + postgis | public | st_asbinary | geometry | bytea + postgis | public | st_asbinary | geography, text | bytea + postgis | public | st_asencodedpolyline | geom geometry, nprecision integer | text + postgis | public | st_asewkb | geometry, text | bytea + postgis | public | st_asewkb | geometry | bytea + postgis | public | st_asewkt | text | text + postgis | public | st_asewkt | geography, integer | text + postgis | public | st_asewkt | geography | text + postgis | public | st_asewkt | geometry, integer | text + postgis | public | st_asewkt | geometry | text + postgis | public | st_asflatgeobuf | anyelement | bytea + postgis | public | st_asflatgeobuf | anyelement, boolean | bytea + postgis | public | st_asflatgeobuf | anyelement, boolean, text | bytea + postgis | public | st_asgeobuf | anyelement | bytea + postgis | public | st_asgeobuf | anyelement, text | bytea + postgis | public | st_asgeojson | text | text + postgis | public | st_asgeojson | geom geometry, maxdecimaldigits integer, options integer | text + postgis | public | st_asgeojson | geog geography, maxdecimaldigits integer, options integer | text + postgis | public | st_asgeojson | r record, geom_column text, maxdecimaldigits integer, pretty_bool boolean | text + postgis | public | st_asgml | text | text + postgis | public | st_asgml | version integer, geog geography, maxdecimaldigits integer, options integer, nprefix text, id text | text + postgis | public | st_asgml | geog geography, maxdecimaldigits integer, options integer, nprefix text, id text | text + postgis | public | st_asgml | geom geometry, maxdecimaldigits integer, options integer | text + postgis | public | st_asgml | version integer, geom geometry, maxdecimaldigits integer, options integer, nprefix text, id text | text + postgis | public | st_ashexewkb | geometry, text | text + postgis | public | st_ashexewkb | geometry | text + postgis | public | st_askml | text | text + postgis | public | st_askml | geom geometry, maxdecimaldigits integer, nprefix text | text + postgis | public | st_askml | geog geography, maxdecimaldigits integer, nprefix text | text + postgis | public | st_aslatlontext | geom geometry, tmpl text | text + postgis | public | st_asmarc21 | geom geometry, format text | text + postgis | public | st_asmvt | anyelement | bytea + postgis | public | st_asmvt | anyelement, text, integer, text, text | bytea + postgis | public | st_asmvt | anyelement, text, integer | bytea + postgis | public | st_asmvt | anyelement, text | bytea + postgis | public | st_asmvt | anyelement, text, integer, text | bytea + postgis | public | st_asmvtgeom | geom geometry, bounds box2d, extent integer, buffer integer, clip_geom boolean | geometry + postgis | public | st_assvg | geog geography, rel integer, maxdecimaldigits integer | text + postgis | public | st_assvg | geom geometry, rel integer, maxdecimaldigits integer | text + postgis | public | st_assvg | text | text + postgis | public | st_astext | text | text + postgis | public | st_astext | geography, integer | text + postgis | public | st_astext | geography | text + postgis | public | st_astext | geometry, integer | text + postgis | public | st_astext | geometry | text + postgis | public | st_astwkb | geom geometry[], ids bigint[], prec integer, prec_z integer, prec_m integer, with_sizes boolean, with_boxes boolean | bytea + postgis | public | st_astwkb | geom geometry, prec integer, prec_z integer, prec_m integer, with_sizes boolean, with_boxes boolean | bytea + postgis | public | st_asx3d | geom geometry, maxdecimaldigits integer, options integer | text + postgis | public | st_azimuth | geom1 geometry, geom2 geometry | double precision + postgis | public | st_azimuth | geog1 geography, geog2 geography | double precision + postgis | public | st_bdmpolyfromtext | text, integer | geometry + postgis | public | st_bdpolyfromtext | text, integer | geometry + postgis | public | st_boundary | geometry | geometry + postgis | public | st_boundingdiagonal | geom geometry, fits boolean | geometry + postgis | public | st_box2dfromgeohash | text, integer | box2d + postgis | public | st_buffer | geom geometry, radius double precision, options text | geometry + postgis | public | st_buffer | geography, double precision, text | geography + postgis | public | st_buffer | geography, double precision, integer | geography + postgis | public | st_buffer | geom geometry, radius double precision, quadsegs integer | geometry + postgis | public | st_buffer | text, double precision, text | geometry + postgis | public | st_buffer | geography, double precision | geography + postgis | public | st_buffer | text, double precision, integer | geometry + postgis | public | st_buffer | text, double precision | geometry + postgis | public | st_buildarea | geometry | geometry + postgis | public | st_centroid | text | geometry + postgis | public | st_centroid | geography, use_spheroid boolean | geography + postgis | public | st_centroid | geometry | geometry + postgis | public | st_chaikinsmoothing | geometry, integer, boolean | geometry + postgis | public | st_cleangeometry | geometry | geometry + postgis | public | st_clipbybox2d | geom geometry, box box2d | geometry + postgis | public | st_closestpoint | geom1 geometry, geom2 geometry | geometry + postgis | public | st_closestpointofapproach | geometry, geometry | double precision + postgis | public | st_clusterdbscan | geometry, eps double precision, minpoints integer | integer + postgis | public | st_clusterintersecting | geometry[] | geometry[] + postgis | public | st_clusterintersecting | geometry | geometry[] + postgis | public | st_clusterkmeans | geom geometry, k integer, max_radius double precision | integer + postgis | public | st_clusterwithin | geometry[], double precision | geometry[] + postgis | public | st_clusterwithin | geometry, double precision | geometry[] + postgis | public | st_collect | geom1 geometry, geom2 geometry | geometry + postgis | public | st_collect | geometry[] | geometry + postgis | public | st_collect | geometry | geometry + postgis | public | st_collectionextract | geometry, integer | geometry + postgis | public | st_collectionextract | geometry | geometry + postgis | public | st_collectionhomogenize | geometry | geometry + postgis | public | st_combinebbox | box2d, geometry | box2d + postgis | public | st_combinebbox | box3d, geometry | box3d + postgis | public | st_combinebbox | box3d, box3d | box3d + postgis | public | st_concavehull | param_geom geometry, param_pctconvex double precision, param_allow_holes boolean | geometry + postgis | public | st_contains | geom1 geometry, geom2 geometry | boolean + postgis | public | st_containsproperly | geom1 geometry, geom2 geometry | boolean + postgis | public | st_convexhull | geometry | geometry + postgis | public | st_coorddim | geometry geometry | smallint + postgis | public | st_coveredby | geom1 geometry, geom2 geometry | boolean + postgis | public | st_coveredby | text, text | boolean + postgis | public | st_coveredby | geog1 geography, geog2 geography | boolean + postgis | public | st_covers | geom1 geometry, geom2 geometry | boolean + postgis | public | st_covers | text, text | boolean + postgis | public | st_covers | geog1 geography, geog2 geography | boolean + postgis | public | st_cpawithin | geometry, geometry, double precision | boolean + postgis | public | st_crosses | geom1 geometry, geom2 geometry | boolean + postgis | public | st_curvetoline | geom geometry, tol double precision, toltype integer, flags integer | geometry + postgis | public | st_delaunaytriangles | g1 geometry, tolerance double precision, flags integer | geometry + postgis | public | st_dfullywithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | st_difference | geom1 geometry, geom2 geometry, gridsize double precision | geometry + postgis | public | st_dimension | geometry | integer + postgis | public | st_disjoint | geom1 geometry, geom2 geometry | boolean + postgis | public | st_distance | geom1 geometry, geom2 geometry | double precision + postgis | public | st_distance | text, text | double precision + postgis | public | st_distance | geog1 geography, geog2 geography, use_spheroid boolean | double precision + postgis | public | st_distancecpa | geometry, geometry | double precision + postgis | public | st_distancesphere | geom1 geometry, geom2 geometry | double precision + postgis | public | st_distancesphere | geom1 geometry, geom2 geometry, radius double precision | double precision + postgis | public | st_distancespheroid | geom1 geometry, geom2 geometry, spheroid | double precision + postgis | public | st_distancespheroid | geom1 geometry, geom2 geometry | double precision + postgis | public | st_dump | geometry | SETOF geometry_dump + postgis | public | st_dumppoints | geometry | SETOF geometry_dump + postgis | public | st_dumprings | geometry | SETOF geometry_dump + postgis | public | st_dumpsegments | geometry | SETOF geometry_dump + postgis | public | st_dwithin | text, text, double precision | boolean + postgis | public | st_dwithin | geog1 geography, geog2 geography, tolerance double precision, use_spheroid boolean | boolean + postgis | public | st_dwithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | st_endpoint | geometry | geometry + postgis | public | st_envelope | geometry | geometry + postgis | public | st_equals | geom1 geometry, geom2 geometry | boolean + postgis | public | st_estimatedextent | text, text, text, boolean | box2d + postgis | public | st_estimatedextent | text, text | box2d + postgis | public | st_estimatedextent | text, text, text | box2d + postgis | public | st_expand | box3d, double precision | box3d + postgis | public | st_expand | box box3d, dx double precision, dy double precision, dz double precision | box3d + postgis | public | st_expand | box2d, double precision | box2d + postgis | public | st_expand | box box2d, dx double precision, dy double precision | box2d + postgis | public | st_expand | geometry, double precision | geometry + postgis | public | st_expand | geom geometry, dx double precision, dy double precision, dz double precision, dm double precision | geometry + postgis | public | st_extent | geometry | box2d + postgis | public | st_exteriorring | geometry | geometry + postgis | public | st_filterbym | geometry, double precision, double precision, boolean | geometry + postgis | public | st_findextent | text, text | box2d + postgis | public | st_findextent | text, text, text | box2d + postgis | public | st_flipcoordinates | geometry | geometry + postgis | public | st_force2d | geometry | geometry + postgis | public | st_force3d | geom geometry, zvalue double precision | geometry + postgis | public | st_force3dm | geom geometry, mvalue double precision | geometry + postgis | public | st_force3dz | geom geometry, zvalue double precision | geometry + postgis | public | st_force4d | geom geometry, zvalue double precision, mvalue double precision | geometry + postgis | public | st_forcecollection | geometry | geometry + postgis | public | st_forcecurve | geometry | geometry + postgis | public | st_forcepolygonccw | geometry | geometry + postgis | public | st_forcepolygoncw | geometry | geometry + postgis | public | st_forcerhr | geometry | geometry + postgis | public | st_forcesfs | geometry, version text | geometry + postgis | public | st_forcesfs | geometry | geometry + postgis | public | st_frechetdistance | geom1 geometry, geom2 geometry, double precision | double precision + postgis | public | st_fromflatgeobuf | anyelement, bytea | SETOF anyelement + postgis | public | st_fromflatgeobuftotable | text, text, bytea | void + postgis | public | st_generatepoints | area geometry, npoints integer, seed integer | geometry + postgis | public | st_generatepoints | area geometry, npoints integer | geometry + postgis | public | st_geogfromtext | text | geography + postgis | public | st_geogfromwkb | bytea | geography + postgis | public | st_geographyfromtext | text | geography + postgis | public | st_geohash | geog geography, maxchars integer | text + postgis | public | st_geohash | geom geometry, maxchars integer | text + postgis | public | st_geomcollfromtext | text | geometry + postgis | public | st_geomcollfromtext | text, integer | geometry + postgis | public | st_geomcollfromwkb | bytea, integer | geometry + postgis | public | st_geomcollfromwkb | bytea | geometry + postgis | public | st_geometricmedian | g geometry, tolerance double precision, max_iter integer, fail_if_not_converged boolean | geometry + postgis | public | st_geometryfromtext | text | geometry + postgis | public | st_geometryfromtext | text, integer | geometry + postgis | public | st_geometryn | geometry, integer | geometry + postgis | public | st_geometrytype | geometry | text + postgis | public | st_geomfromewkb | bytea | geometry + postgis | public | st_geomfromewkt | text | geometry + postgis | public | st_geomfromgeohash | text, integer | geometry + postgis | public | st_geomfromgeojson | text | geometry + postgis | public | st_geomfromgeojson | json | geometry + postgis | public | st_geomfromgeojson | jsonb | geometry + postgis | public | st_geomfromgml | text | geometry + postgis | public | st_geomfromgml | text, integer | geometry + postgis | public | st_geomfromkml | text | geometry + postgis | public | st_geomfrommarc21 | marc21xml text | geometry + postgis | public | st_geomfromtext | text | geometry + postgis | public | st_geomfromtext | text, integer | geometry + postgis | public | st_geomfromtwkb | bytea | geometry + postgis | public | st_geomfromwkb | bytea, integer | geometry + postgis | public | st_geomfromwkb | bytea | geometry + postgis | public | st_gmltosql | text | geometry + postgis | public | st_gmltosql | text, integer | geometry + postgis | public | st_hasarc | geometry geometry | boolean + postgis | public | st_hausdorffdistance | geom1 geometry, geom2 geometry | double precision + postgis | public | st_hausdorffdistance | geom1 geometry, geom2 geometry, double precision | double precision + postgis | public | st_hexagon | size double precision, cell_i integer, cell_j integer, origin geometry | geometry + postgis | public | st_hexagongrid | size double precision, bounds geometry, OUT geom geometry, OUT i integer, OUT j integer | SETOF record + postgis | public | st_interiorringn | geometry, integer | geometry + postgis | public | st_interpolatepoint | line geometry, point geometry | double precision + postgis | public | st_intersection | geom1 geometry, geom2 geometry, gridsize double precision | geometry + postgis | public | st_intersection | text, text | geometry + postgis | public | st_intersection | geography, geography | geography + postgis | public | st_intersects | geom1 geometry, geom2 geometry | boolean + postgis | public | st_intersects | text, text | boolean + postgis | public | st_intersects | geog1 geography, geog2 geography | boolean + postgis | public | st_isclosed | geometry | boolean + postgis | public | st_iscollection | geometry | boolean + postgis | public | st_isempty | geometry | boolean + postgis | public | st_ispolygonccw | geometry | boolean + postgis | public | st_ispolygoncw | geometry | boolean + postgis | public | st_isring | geometry | boolean + postgis | public | st_issimple | geometry | boolean + postgis | public | st_isvalid | geometry, integer | boolean + postgis | public | st_isvalid | geometry | boolean + postgis | public | st_isvaliddetail | geom geometry, flags integer | valid_detail + postgis | public | st_isvalidreason | geometry, integer | text + postgis | public | st_isvalidreason | geometry | text + postgis | public | st_isvalidtrajectory | geometry | boolean + postgis | public | st_length | geog geography, use_spheroid boolean | double precision + postgis | public | st_length | text | double precision + postgis | public | st_length | geometry | double precision + postgis | public | st_length2d | geometry | double precision + postgis | public | st_length2dspheroid | geometry, spheroid | double precision + postgis | public | st_lengthspheroid | geometry, spheroid | double precision + postgis | public | st_letters | letters text, font json | geometry + postgis | public | st_linecrossingdirection | line1 geometry, line2 geometry | integer + postgis | public | st_linefromencodedpolyline | txtin text, nprecision integer | geometry + postgis | public | st_linefrommultipoint | geometry | geometry + postgis | public | st_linefromtext | text | geometry + postgis | public | st_linefromtext | text, integer | geometry + postgis | public | st_linefromwkb | bytea, integer | geometry + postgis | public | st_linefromwkb | bytea | geometry + postgis | public | st_lineinterpolatepoint | geometry, double precision | geometry + postgis | public | st_lineinterpolatepoints | geometry, double precision, repeat boolean | geometry + postgis | public | st_linelocatepoint | geom1 geometry, geom2 geometry | double precision + postgis | public | st_linemerge | geometry, boolean | geometry + postgis | public | st_linemerge | geometry | geometry + postgis | public | st_linestringfromwkb | bytea, integer | geometry + postgis | public | st_linestringfromwkb | bytea | geometry + postgis | public | st_linesubstring | geometry, double precision, double precision | geometry + postgis | public | st_linetocurve | geometry geometry | geometry + postgis | public | st_locatealong | geometry geometry, measure double precision, leftrightoffset double precision | geometry + postgis | public | st_locatebetween | geometry geometry, frommeasure double precision, tomeasure double precision, leftrightoffset double precision | geometry + postgis | public | st_locatebetweenelevations | geometry geometry, fromelevation double precision, toelevation double precision | geometry + postgis | public | st_longestline | geom1 geometry, geom2 geometry | geometry + postgis | public | st_m | geometry | double precision + postgis | public | st_makebox2d | geom1 geometry, geom2 geometry | box2d + postgis | public | st_makeenvelope | double precision, double precision, double precision, double precision, integer | geometry + postgis | public | st_makeline | geom1 geometry, geom2 geometry | geometry + postgis | public | st_makeline | geometry[] | geometry + postgis | public | st_makeline | geometry | geometry + postgis | public | st_makepoint | double precision, double precision, double precision, double precision | geometry + postgis | public | st_makepoint | double precision, double precision | geometry + postgis | public | st_makepoint | double precision, double precision, double precision | geometry + postgis | public | st_makepointm | double precision, double precision, double precision | geometry + postgis | public | st_makepolygon | geometry, geometry[] | geometry + postgis | public | st_makepolygon | geometry | geometry + postgis | public | st_makevalid | geom geometry, params text | geometry + postgis | public | st_makevalid | geometry | geometry + postgis | public | st_maxdistance | geom1 geometry, geom2 geometry | double precision + postgis | public | st_maximuminscribedcircle | geometry, OUT center geometry, OUT nearest geometry, OUT radius double precision | record + postgis | public | st_memcollect | geometry | geometry + postgis | public | st_memsize | geometry | integer + postgis | public | st_memunion | geometry | geometry + postgis | public | st_minimumboundingcircle | inputgeom geometry, segs_per_quarter integer | geometry + postgis | public | st_minimumboundingradius | geometry, OUT center geometry, OUT radius double precision | record + postgis | public | st_minimumclearance | geometry | double precision + postgis | public | st_minimumclearanceline | geometry | geometry + postgis | public | st_mlinefromtext | text | geometry + postgis | public | st_mlinefromtext | text, integer | geometry + postgis | public | st_mlinefromwkb | bytea, integer | geometry + postgis | public | st_mlinefromwkb | bytea | geometry + postgis | public | st_mpointfromtext | text | geometry + postgis | public | st_mpointfromtext | text, integer | geometry + postgis | public | st_mpointfromwkb | bytea, integer | geometry + postgis | public | st_mpointfromwkb | bytea | geometry + postgis | public | st_mpolyfromtext | text | geometry + postgis | public | st_mpolyfromtext | text, integer | geometry + postgis | public | st_mpolyfromwkb | bytea, integer | geometry + postgis | public | st_mpolyfromwkb | bytea | geometry + postgis | public | st_multi | geometry | geometry + postgis | public | st_multilinefromwkb | bytea | geometry + postgis | public | st_multilinestringfromtext | text | geometry + postgis | public | st_multilinestringfromtext | text, integer | geometry + postgis | public | st_multipointfromtext | text | geometry + postgis | public | st_multipointfromwkb | bytea, integer | geometry + postgis | public | st_multipointfromwkb | bytea | geometry + postgis | public | st_multipolyfromwkb | bytea, integer | geometry + postgis | public | st_multipolyfromwkb | bytea | geometry + postgis | public | st_multipolygonfromtext | text | geometry + postgis | public | st_multipolygonfromtext | text, integer | geometry + postgis | public | st_ndims | geometry | smallint + postgis | public | st_node | g geometry | geometry + postgis | public | st_normalize | geom geometry | geometry + postgis | public | st_npoints | geometry | integer + postgis | public | st_nrings | geometry | integer + postgis | public | st_numgeometries | geometry | integer + postgis | public | st_numinteriorring | geometry | integer + postgis | public | st_numinteriorrings | geometry | integer + postgis | public | st_numpatches | geometry | integer + postgis | public | st_numpoints | geometry | integer + postgis | public | st_offsetcurve | line geometry, distance double precision, params text | geometry + postgis | public | st_orderingequals | geom1 geometry, geom2 geometry | boolean + postgis | public | st_orientedenvelope | geometry | geometry + postgis | public | st_overlaps | geom1 geometry, geom2 geometry | boolean + postgis | public | st_patchn | geometry, integer | geometry + postgis | public | st_perimeter | geog geography, use_spheroid boolean | double precision + postgis | public | st_perimeter | geometry | double precision + postgis | public | st_perimeter2d | geometry | double precision + postgis | public | st_point | double precision, double precision, srid integer | geometry + postgis | public | st_point | double precision, double precision | geometry + postgis | public | st_pointfromgeohash | text, integer | geometry + postgis | public | st_pointfromtext | text | geometry + postgis | public | st_pointfromtext | text, integer | geometry + postgis | public | st_pointfromwkb | bytea, integer | geometry + postgis | public | st_pointfromwkb | bytea | geometry + postgis | public | st_pointinsidecircle | geometry, double precision, double precision, double precision | boolean + postgis | public | st_pointm | xcoordinate double precision, ycoordinate double precision, mcoordinate double precision, srid integer | geometry + postgis | public | st_pointn | geometry, integer | geometry + postgis | public | st_pointonsurface | geometry | geometry + postgis | public | st_points | geometry | geometry + postgis | public | st_pointz | xcoordinate double precision, ycoordinate double precision, zcoordinate double precision, srid integer | geometry + postgis | public | st_pointzm | xcoordinate double precision, ycoordinate double precision, zcoordinate double precision, mcoordinate double precision, srid integer | geometry + postgis | public | st_polyfromtext | text | geometry + postgis | public | st_polyfromtext | text, integer | geometry + postgis | public | st_polyfromwkb | bytea, integer | geometry + postgis | public | st_polyfromwkb | bytea | geometry + postgis | public | st_polygon | geometry, integer | geometry + postgis | public | st_polygonfromtext | text | geometry + postgis | public | st_polygonfromtext | text, integer | geometry + postgis | public | st_polygonfromwkb | bytea, integer | geometry + postgis | public | st_polygonfromwkb | bytea | geometry + postgis | public | st_polygonize | geometry[] | geometry + postgis | public | st_polygonize | geometry | geometry + postgis | public | st_project | geog geography, distance double precision, azimuth double precision | geography + postgis | public | st_quantizecoordinates | g geometry, prec_x integer, prec_y integer, prec_z integer, prec_m integer | geometry + postgis | public | st_reduceprecision | geom geometry, gridsize double precision | geometry + postgis | public | st_relate | geom1 geometry, geom2 geometry, integer | text + postgis | public | st_relate | geom1 geometry, geom2 geometry | text + postgis | public | st_relate | geom1 geometry, geom2 geometry, text | boolean + postgis | public | st_relatematch | text, text | boolean + postgis | public | st_removepoint | geometry, integer | geometry + postgis | public | st_removerepeatedpoints | geom geometry, tolerance double precision | geometry + postgis | public | st_reverse | geometry | geometry + postgis | public | st_rotate | geometry, double precision, geometry | geometry + postgis | public | st_rotate | geometry, double precision, double precision, double precision | geometry + postgis | public | st_rotate | geometry, double precision | geometry + postgis | public | st_rotatex | geometry, double precision | geometry + postgis | public | st_rotatey | geometry, double precision | geometry + postgis | public | st_rotatez | geometry, double precision | geometry + postgis | public | st_scale | geometry, double precision, double precision | geometry + postgis | public | st_scale | geometry, double precision, double precision, double precision | geometry + postgis | public | st_scale | geometry, geometry, origin geometry | geometry + postgis | public | st_scale | geometry, geometry | geometry + postgis | public | st_scroll | geometry, geometry | geometry + postgis | public | st_segmentize | geog geography, max_segment_length double precision | geography + postgis | public | st_segmentize | geometry, double precision | geometry + postgis | public | st_seteffectivearea | geometry, double precision, integer | geometry + postgis | public | st_setpoint | geometry, integer, geometry | geometry + postgis | public | st_setsrid | geog geography, srid integer | geography + postgis | public | st_setsrid | geom geometry, srid integer | geometry + postgis | public | st_sharedpaths | geom1 geometry, geom2 geometry | geometry + postgis | public | st_shiftlongitude | geometry | geometry + postgis | public | st_shortestline | geom1 geometry, geom2 geometry | geometry + postgis | public | st_simplify | geometry, double precision, boolean | geometry + postgis | public | st_simplify | geometry, double precision | geometry + postgis | public | st_simplifypolygonhull | geom geometry, vertex_fraction double precision, is_outer boolean | geometry + postgis | public | st_simplifypreservetopology | geometry, double precision | geometry + postgis | public | st_simplifyvw | geometry, double precision | geometry + postgis | public | st_snap | geom1 geometry, geom2 geometry, double precision | geometry + postgis | public | st_snaptogrid | geometry, double precision, double precision | geometry + postgis | public | st_snaptogrid | geom1 geometry, geom2 geometry, double precision, double precision, double precision, double precision | geometry + postgis | public | st_snaptogrid | geometry, double precision, double precision, double precision, double precision | geometry + postgis | public | st_snaptogrid | geometry, double precision | geometry + postgis | public | st_split | geom1 geometry, geom2 geometry | geometry + postgis | public | st_square | size double precision, cell_i integer, cell_j integer, origin geometry | geometry + postgis | public | st_squaregrid | size double precision, bounds geometry, OUT geom geometry, OUT i integer, OUT j integer | SETOF record + postgis | public | st_srid | geog geography | integer + postgis | public | st_srid | geom geometry | integer + postgis | public | st_startpoint | geometry | geometry + postgis | public | st_subdivide | geom geometry, maxvertices integer, gridsize double precision | SETOF geometry + postgis | public | st_summary | geography | text + postgis | public | st_summary | geometry | text + postgis | public | st_swapordinates | geom geometry, ords cstring | geometry + postgis | public | st_symdifference | geom1 geometry, geom2 geometry, gridsize double precision | geometry + postgis | public | st_symmetricdifference | geom1 geometry, geom2 geometry | geometry + postgis | public | st_tileenvelope | zoom integer, x integer, y integer, bounds geometry, margin double precision | geometry + postgis | public | st_touches | geom1 geometry, geom2 geometry | boolean + postgis | public | st_transform | geom geometry, to_proj text | geometry + postgis | public | st_transform | geom geometry, from_proj text, to_srid integer | geometry + postgis | public | st_transform | geometry, integer | geometry + postgis | public | st_transform | geom geometry, from_proj text, to_proj text | geometry + postgis | public | st_translate | geometry, double precision, double precision | geometry + postgis | public | st_translate | geometry, double precision, double precision, double precision | geometry + postgis | public | st_transscale | geometry, double precision, double precision, double precision, double precision | geometry + postgis | public | st_triangulatepolygon | g1 geometry | geometry + postgis | public | st_unaryunion | geometry, gridsize double precision | geometry + postgis | public | st_union | geom1 geometry, geom2 geometry, gridsize double precision | geometry + postgis | public | st_union | geom1 geometry, geom2 geometry | geometry + postgis | public | st_union | geometry[] | geometry + postgis | public | st_union | geometry, gridsize double precision | geometry + postgis | public | st_union | geometry | geometry + postgis | public | st_voronoilines | g1 geometry, tolerance double precision, extend_to geometry | geometry + postgis | public | st_voronoipolygons | g1 geometry, tolerance double precision, extend_to geometry | geometry + postgis | public | st_within | geom1 geometry, geom2 geometry | boolean + postgis | public | st_wkbtosql | wkb bytea | geometry + postgis | public | st_wkttosql | text | geometry + postgis | public | st_wrapx | geom geometry, wrap double precision, move double precision | geometry + postgis | public | st_x | geometry | double precision + postgis | public | st_xmax | box3d | double precision + postgis | public | st_xmin | box3d | double precision + postgis | public | st_y | geometry | double precision + postgis | public | st_ymax | box3d | double precision + postgis | public | st_ymin | box3d | double precision + postgis | public | st_z | geometry | double precision + postgis | public | st_zmax | box3d | double precision + postgis | public | st_zmflag | geometry | smallint + postgis | public | st_zmin | box3d | double precision + postgis | public | text | geometry | text + postgis | public | unlockrows | text | integer + postgis | public | updategeometrysrid | catalogn_name character varying, schema_name character varying, table_name character varying, column_name character varying, new_srid_in integer | text + postgis | public | updategeometrysrid | character varying, character varying, character varying, integer | text + postgis | public | updategeometrysrid | character varying, character varying, integer | text + postgis_raster | public | __st_countagg_transfn | agg agg_count, rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | agg_count + postgis_raster | public | _add_overview_constraint | ovschema name, ovtable name, ovcolumn name, refschema name, reftable name, refcolumn name, factor integer | boolean + postgis_raster | public | _add_raster_constraint | cn name, sql text | boolean + postgis_raster | public | _add_raster_constraint_alignment | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_blocksize | rastschema name, rasttable name, rastcolumn name, axis text | boolean + postgis_raster | public | _add_raster_constraint_coverage_tile | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_extent | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_nodata_values | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_num_bands | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_out_db | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_pixel_types | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_scale | rastschema name, rasttable name, rastcolumn name, axis character | boolean + postgis_raster | public | _add_raster_constraint_spatially_unique | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_srid | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_overview_constraint | ovschema name, ovtable name, ovcolumn name | boolean + postgis_raster | public | _drop_raster_constraint | rastschema name, rasttable name, cn name | boolean + postgis_raster | public | _drop_raster_constraint_alignment | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_blocksize | rastschema name, rasttable name, rastcolumn name, axis text | boolean + postgis_raster | public | _drop_raster_constraint_coverage_tile | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_extent | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_nodata_values | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_num_bands | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_out_db | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_pixel_types | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_regular_blocking | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_scale | rastschema name, rasttable name, rastcolumn name, axis character | boolean + postgis_raster | public | _drop_raster_constraint_spatially_unique | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_srid | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _overview_constraint | ov raster, factor integer, refschema name, reftable name, refcolumn name | boolean + postgis_raster | public | _overview_constraint_info | ovschema name, ovtable name, ovcolumn name, OUT refschema name, OUT reftable name, OUT refcolumn name, OUT factor integer | record + postgis_raster | public | _raster_constraint_info_alignment | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _raster_constraint_info_blocksize | rastschema name, rasttable name, rastcolumn name, axis text | integer + postgis_raster | public | _raster_constraint_info_coverage_tile | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _raster_constraint_info_extent | rastschema name, rasttable name, rastcolumn name | geometry + postgis_raster | public | _raster_constraint_info_index | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _raster_constraint_info_nodata_values | rastschema name, rasttable name, rastcolumn name | double precision[] + postgis_raster | public | _raster_constraint_info_num_bands | rastschema name, rasttable name, rastcolumn name | integer + postgis_raster | public | _raster_constraint_info_out_db | rastschema name, rasttable name, rastcolumn name | boolean[] + postgis_raster | public | _raster_constraint_info_pixel_types | rastschema name, rasttable name, rastcolumn name | text[] + postgis_raster | public | _raster_constraint_info_regular_blocking | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _raster_constraint_info_scale | rastschema name, rasttable name, rastcolumn name, axis character | double precision + postgis_raster | public | _raster_constraint_info_spatially_unique | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _raster_constraint_info_srid | rastschema name, rasttable name, rastcolumn name | integer + postgis_raster | public | _raster_constraint_nodata_values | rast raster | numeric[] + postgis_raster | public | _raster_constraint_out_db | rast raster | boolean[] + postgis_raster | public | _raster_constraint_pixel_types | rast raster | text[] + postgis_raster | public | _st_aspect4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_asraster | geom geometry, scalex double precision, scaley double precision, width integer, height integer, pixeltype text[], value double precision[], nodataval double precision[], upperleftx double precision, upperlefty double precision, gridx double precision, gridy double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | _st_clip | rast raster, nband integer[], geom geometry, nodataval double precision[], crop boolean | raster + postgis_raster | public | _st_colormap | rast raster, nband integer, colormap text, method text | raster + postgis_raster | public | _st_contains | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_containsproperly | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_convertarray4ma | value double precision[] | double precision[] + postgis_raster | public | _st_count | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | bigint + postgis_raster | public | _st_countagg_finalfn | agg agg_count | bigint + postgis_raster | public | _st_countagg_transfn | agg agg_count, rast raster, nband integer, exclude_nodata_value boolean | agg_count + postgis_raster | public | _st_countagg_transfn | agg agg_count, rast raster, exclude_nodata_value boolean | agg_count + postgis_raster | public | _st_countagg_transfn | agg agg_count, rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | agg_count + postgis_raster | public | _st_coveredby | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_covers | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_dfullywithin | rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision | boolean + postgis_raster | public | _st_dwithin | rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision | boolean + postgis_raster | public | _st_gdalwarp | rast raster, algorithm text, maxerr double precision, srid integer, scalex double precision, scaley double precision, gridx double precision, gridy double precision, skewx double precision, skewy double precision, width integer, height integer | raster + postgis_raster | public | _st_grayscale4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_hillshade4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_histogram | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, bins integer, width double precision[], "right" boolean, min double precision, max double precision, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | _st_intersects | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_intersects | geom geometry, rast raster, nband integer | boolean + postgis_raster | public | _st_mapalgebra | rastbandargset rastbandarg[], expression text, pixeltype text, extenttype text, nodata1expr text, nodata2expr text, nodatanodataval double precision | raster + postgis_raster | public | _st_mapalgebra | rastbandargset rastbandarg[], callbackfunc regprocedure, pixeltype text, distancex integer, distancey integer, extenttype text, customextent raster, mask double precision[], weighted boolean, VARIADIC userargs text[] | raster + postgis_raster | public | _st_neighborhood | rast raster, band integer, columnx integer, rowy integer, distancex integer, distancey integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | _st_overlaps | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_pixelascentroids | rast raster, band integer, columnx integer, rowy integer, exclude_nodata_value boolean | TABLE(geom geometry, val double precision, x integer, y integer) + postgis_raster | public | _st_pixelaspolygons | rast raster, band integer, columnx integer, rowy integer, exclude_nodata_value boolean | TABLE(geom geometry, val double precision, x integer, y integer) + postgis_raster | public | _st_quantile | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | _st_rastertoworldcoord | rast raster, columnx integer, rowy integer, OUT longitude double precision, OUT latitude double precision | record + postgis_raster | public | _st_reclass | rast raster, VARIADIC reclassargset reclassarg[] | raster + postgis_raster | public | _st_roughness4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_samealignment_finalfn | agg agg_samealignment | boolean + postgis_raster | public | _st_samealignment_transfn | agg agg_samealignment, rast raster | agg_samealignment + postgis_raster | public | _st_setvalues | rast raster, nband integer, x integer, y integer, newvalueset double precision[], noset boolean[], hasnosetvalue boolean, nosetvalue double precision, keepnodata boolean | raster + postgis_raster | public | _st_slope4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_summarystats | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | summarystats + postgis_raster | public | _st_summarystats_finalfn | internal | summarystats + postgis_raster | public | _st_summarystats_transfn | internal, raster, integer, boolean, double precision | internal + postgis_raster | public | _st_summarystats_transfn | internal, raster, boolean, double precision | internal + postgis_raster | public | _st_summarystats_transfn | internal, raster, integer, boolean | internal + postgis_raster | public | _st_tile | rast raster, width integer, height integer, nband integer[], padwithnodata boolean, nodataval double precision | SETOF raster + postgis_raster | public | _st_touches | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_tpi4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_tri4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_union_finalfn | internal | raster + postgis_raster | public | _st_union_transfn | internal, raster, integer, text | internal + postgis_raster | public | _st_union_transfn | internal, raster | internal + postgis_raster | public | _st_union_transfn | internal, raster, text | internal + postgis_raster | public | _st_union_transfn | internal, raster, integer | internal + postgis_raster | public | _st_union_transfn | internal, raster, unionarg[] | internal + postgis_raster | public | _st_valuecount | rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer, OUT percent double precision | SETOF record + postgis_raster | public | _st_valuecount | rast raster, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer, OUT percent double precision | SETOF record + postgis_raster | public | _st_within | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_worldtorastercoord | rast raster, longitude double precision, latitude double precision, OUT columnx integer, OUT rowy integer | record + postgis_raster | public | _updaterastersrid | schema_name name, table_name name, column_name name, new_srid integer | boolean + postgis_raster | public | addoverviewconstraints | ovschema name, ovtable name, ovcolumn name, refschema name, reftable name, refcolumn name, ovfactor integer | boolean + postgis_raster | public | addoverviewconstraints | ovtable name, ovcolumn name, reftable name, refcolumn name, ovfactor integer | boolean + postgis_raster | public | addrasterconstraints | rastschema name, rasttable name, rastcolumn name, srid boolean, scale_x boolean, scale_y boolean, blocksize_x boolean, blocksize_y boolean, same_alignment boolean, regular_blocking boolean, num_bands boolean, pixel_types boolean, nodata_values boolean, out_db boolean, extent boolean | boolean + postgis_raster | public | addrasterconstraints | rasttable name, rastcolumn name, VARIADIC constraints text[] | boolean + postgis_raster | public | addrasterconstraints | rastschema name, rasttable name, rastcolumn name, VARIADIC constraints text[] | boolean + postgis_raster | public | addrasterconstraints | rasttable name, rastcolumn name, srid boolean, scale_x boolean, scale_y boolean, blocksize_x boolean, blocksize_y boolean, same_alignment boolean, regular_blocking boolean, num_bands boolean, pixel_types boolean, nodata_values boolean, out_db boolean, extent boolean | boolean + postgis_raster | public | box3d | raster | box3d + postgis_raster | public | bytea | raster | bytea + postgis_raster | public | dropoverviewconstraints | ovtable name, ovcolumn name | boolean + postgis_raster | public | dropoverviewconstraints | ovschema name, ovtable name, ovcolumn name | boolean + postgis_raster | public | droprasterconstraints | rastschema name, rasttable name, rastcolumn name, srid boolean, scale_x boolean, scale_y boolean, blocksize_x boolean, blocksize_y boolean, same_alignment boolean, regular_blocking boolean, num_bands boolean, pixel_types boolean, nodata_values boolean, out_db boolean, extent boolean | boolean + postgis_raster | public | droprasterconstraints | rasttable name, rastcolumn name, VARIADIC constraints text[] | boolean + postgis_raster | public | droprasterconstraints | rastschema name, rasttable name, rastcolumn name, VARIADIC constraints text[] | boolean + postgis_raster | public | droprasterconstraints | rasttable name, rastcolumn name, srid boolean, scale_x boolean, scale_y boolean, blocksize_x boolean, blocksize_y boolean, same_alignment boolean, regular_blocking boolean, num_bands boolean, pixel_types boolean, nodata_values boolean, out_db boolean, extent boolean | boolean + postgis_raster | public | geometry_contained_by_raster | geometry, raster | boolean + postgis_raster | public | geometry_raster_contain | geometry, raster | boolean + postgis_raster | public | geometry_raster_overlap | geometry, raster | boolean + postgis_raster | public | postgis_gdal_version | | text + postgis_raster | public | postgis_noop | raster | geometry + postgis_raster | public | postgis_raster_lib_build_date | | text + postgis_raster | public | postgis_raster_lib_version | | text + postgis_raster | public | postgis_raster_scripts_installed | | text + postgis_raster | public | raster_above | raster, raster | boolean + postgis_raster | public | raster_below | raster, raster | boolean + postgis_raster | public | raster_contain | raster, raster | boolean + postgis_raster | public | raster_contained | raster, raster | boolean + postgis_raster | public | raster_contained_by_geometry | raster, geometry | boolean + postgis_raster | public | raster_eq | raster, raster | boolean + postgis_raster | public | raster_geometry_contain | raster, geometry | boolean + postgis_raster | public | raster_geometry_overlap | raster, geometry | boolean + postgis_raster | public | raster_hash | raster | integer + postgis_raster | public | raster_in | cstring | raster + postgis_raster | public | raster_left | raster, raster | boolean + postgis_raster | public | raster_out | raster | cstring + postgis_raster | public | raster_overabove | raster, raster | boolean + postgis_raster | public | raster_overbelow | raster, raster | boolean + postgis_raster | public | raster_overlap | raster, raster | boolean + postgis_raster | public | raster_overleft | raster, raster | boolean + postgis_raster | public | raster_overright | raster, raster | boolean + postgis_raster | public | raster_right | raster, raster | boolean + postgis_raster | public | raster_same | raster, raster | boolean + postgis_raster | public | st_addband | rast raster, index integer, outdbfile text, outdbindex integer[], nodataval double precision | raster + postgis_raster | public | st_addband | rast raster, outdbfile text, outdbindex integer[], index integer, nodataval double precision | raster + postgis_raster | public | st_addband | rast raster, addbandargset addbandarg[] | raster + postgis_raster | public | st_addband | rast raster, pixeltype text, initialvalue double precision, nodataval double precision | raster + postgis_raster | public | st_addband | rast raster, index integer, pixeltype text, initialvalue double precision, nodataval double precision | raster + postgis_raster | public | st_addband | torast raster, fromrast raster, fromband integer, torastindex integer | raster + postgis_raster | public | st_addband | torast raster, fromrasts raster[], fromband integer, torastindex integer | raster + postgis_raster | public | st_approxcount | rast raster, exclude_nodata_value boolean, sample_percent double precision | bigint + postgis_raster | public | st_approxcount | rast raster, sample_percent double precision | bigint + postgis_raster | public | st_approxcount | rast raster, nband integer, sample_percent double precision | bigint + postgis_raster | public | st_approxcount | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | bigint + postgis_raster | public | st_approxhistogram | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, bins integer, "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxhistogram | rast raster, sample_percent double precision, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxhistogram | rast raster, nband integer, sample_percent double precision, bins integer, width double precision[], "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxhistogram | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, bins integer, width double precision[], "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxhistogram | rast raster, nband integer, sample_percent double precision, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxhistogram | rast raster, nband integer, sample_percent double precision, bins integer, "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxquantile | rast raster, exclude_nodata_value boolean, quantile double precision | double precision + postgis_raster | public | st_approxquantile | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, quantile double precision | double precision + postgis_raster | public | st_approxquantile | rast raster, nband integer, sample_percent double precision, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_approxquantile | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_approxquantile | rast raster, quantile double precision | double precision + postgis_raster | public | st_approxquantile | rast raster, sample_percent double precision, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_approxquantile | rast raster, nband integer, sample_percent double precision, quantile double precision | double precision + postgis_raster | public | st_approxquantile | rast raster, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_approxquantile | rast raster, sample_percent double precision, quantile double precision | double precision + postgis_raster | public | st_approxsummarystats | rast raster, exclude_nodata_value boolean, sample_percent double precision | summarystats + postgis_raster | public | st_approxsummarystats | rast raster, sample_percent double precision | summarystats + postgis_raster | public | st_approxsummarystats | rast raster, nband integer, sample_percent double precision | summarystats + postgis_raster | public | st_approxsummarystats | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | summarystats + postgis_raster | public | st_asbinary | raster, outasin boolean | bytea + postgis_raster | public | st_asgdalraster | rast raster, format text, options text[], srid integer | bytea + postgis_raster | public | st_ashexwkb | raster, outasin boolean | text + postgis_raster | public | st_asjpeg | rast raster, options text[] | bytea + postgis_raster | public | st_asjpeg | rast raster, nbands integer[], options text[] | bytea + postgis_raster | public | st_asjpeg | rast raster, nband integer, options text[] | bytea + postgis_raster | public | st_asjpeg | rast raster, nbands integer[], quality integer | bytea + postgis_raster | public | st_asjpeg | rast raster, nband integer, quality integer | bytea + postgis_raster | public | st_aspect | rast raster, nband integer, customextent raster, pixeltype text, units text, interpolate_nodata boolean | raster + postgis_raster | public | st_aspect | rast raster, nband integer, pixeltype text, units text, interpolate_nodata boolean | raster + postgis_raster | public | st_aspng | rast raster, options text[] | bytea + postgis_raster | public | st_aspng | rast raster, nbands integer[], options text[] | bytea + postgis_raster | public | st_aspng | rast raster, nband integer, compression integer | bytea + postgis_raster | public | st_aspng | rast raster, nband integer, options text[] | bytea + postgis_raster | public | st_aspng | rast raster, nbands integer[], compression integer | bytea + postgis_raster | public | st_asraster | geom geometry, ref raster, pixeltype text[], value double precision[], nodataval double precision[], touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, scalex double precision, scaley double precision, pixeltype text, value double precision, nodataval double precision, upperleftx double precision, upperlefty double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, width integer, height integer, pixeltype text[], value double precision[], nodataval double precision[], upperleftx double precision, upperlefty double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, scalex double precision, scaley double precision, gridx double precision, gridy double precision, pixeltype text[], value double precision[], nodataval double precision[], skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, width integer, height integer, gridx double precision, gridy double precision, pixeltype text, value double precision, nodataval double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, ref raster, pixeltype text, value double precision, nodataval double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, scalex double precision, scaley double precision, gridx double precision, gridy double precision, pixeltype text, value double precision, nodataval double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, width integer, height integer, gridx double precision, gridy double precision, pixeltype text[], value double precision[], nodataval double precision[], skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, width integer, height integer, pixeltype text, value double precision, nodataval double precision, upperleftx double precision, upperlefty double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, scalex double precision, scaley double precision, pixeltype text[], value double precision[], nodataval double precision[], upperleftx double precision, upperlefty double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_astiff | rast raster, options text[], srid integer | bytea + postgis_raster | public | st_astiff | rast raster, compression text, srid integer | bytea + postgis_raster | public | st_astiff | rast raster, nbands integer[], compression text, srid integer | bytea + postgis_raster | public | st_astiff | rast raster, nbands integer[], options text[], srid integer | bytea + postgis_raster | public | st_aswkb | raster, outasin boolean | bytea + postgis_raster | public | st_band | rast raster, nbands text, delimiter character | raster + postgis_raster | public | st_band | rast raster, nbands integer[] | raster + postgis_raster | public | st_band | rast raster, nband integer | raster + postgis_raster | public | st_bandfilesize | rast raster, band integer | bigint + postgis_raster | public | st_bandfiletimestamp | rast raster, band integer | bigint + postgis_raster | public | st_bandisnodata | rast raster, forcechecking boolean | boolean + postgis_raster | public | st_bandisnodata | rast raster, band integer, forcechecking boolean | boolean + postgis_raster | public | st_bandmetadata | rast raster, band integer | TABLE(pixeltype text, nodatavalue double precision, isoutdb boolean, path text, outdbbandnum integer, filesize bigint, filetimestamp bigint) + postgis_raster | public | st_bandmetadata | rast raster, band integer[] | TABLE(bandnum integer, pixeltype text, nodatavalue double precision, isoutdb boolean, path text, outdbbandnum integer, filesize bigint, filetimestamp bigint) + postgis_raster | public | st_bandnodatavalue | rast raster, band integer | double precision + postgis_raster | public | st_bandpath | rast raster, band integer | text + postgis_raster | public | st_bandpixeltype | rast raster, band integer | text + postgis_raster | public | st_clip | rast raster, geom geometry, nodataval double precision[], crop boolean | raster + postgis_raster | public | st_clip | rast raster, geom geometry, nodataval double precision, crop boolean | raster + postgis_raster | public | st_clip | rast raster, nband integer, geom geometry, nodataval double precision, crop boolean | raster + postgis_raster | public | st_clip | rast raster, nband integer[], geom geometry, nodataval double precision[], crop boolean | raster + postgis_raster | public | st_clip | rast raster, geom geometry, crop boolean | raster + postgis_raster | public | st_clip | rast raster, nband integer, geom geometry, crop boolean | raster + postgis_raster | public | st_colormap | rast raster, colormap text, method text | raster + postgis_raster | public | st_colormap | rast raster, nband integer, colormap text, method text | raster + postgis_raster | public | st_contains | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_contains | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_containsproperly | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_containsproperly | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_contour | rast raster, bandnumber integer, level_interval double precision, level_base double precision, fixed_levels double precision[], polygonize boolean | TABLE(geom geometry, id integer, value double precision) + postgis_raster | public | st_convexhull | raster | geometry + postgis_raster | public | st_count | rast raster, nband integer, exclude_nodata_value boolean | bigint + postgis_raster | public | st_count | rast raster, exclude_nodata_value boolean | bigint + postgis_raster | public | st_countagg | raster, integer, boolean, double precision | bigint + postgis_raster | public | st_countagg | raster, integer, boolean | bigint + postgis_raster | public | st_countagg | raster, boolean | bigint + postgis_raster | public | st_coveredby | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_coveredby | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_covers | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_covers | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_createoverview | tab regclass, col name, factor integer, algo text | regclass + postgis_raster | public | st_dfullywithin | rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision | boolean + postgis_raster | public | st_dfullywithin | rast1 raster, rast2 raster, distance double precision | boolean + postgis_raster | public | st_disjoint | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_disjoint | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_distinct4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_distinct4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_dumpaspolygons | rast raster, band integer, exclude_nodata_value boolean | SETOF geomval + postgis_raster | public | st_dumpvalues | rast raster, nband integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | st_dumpvalues | rast raster, nband integer[], exclude_nodata_value boolean | TABLE(nband integer, valarray double precision[]) + postgis_raster | public | st_dwithin | rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision | boolean + postgis_raster | public | st_dwithin | rast1 raster, rast2 raster, distance double precision | boolean + postgis_raster | public | st_envelope | raster | geometry + postgis_raster | public | st_fromgdalraster | gdaldata bytea, srid integer | raster + postgis_raster | public | st_gdaldrivers | OUT idx integer, OUT short_name text, OUT long_name text, OUT can_read boolean, OUT can_write boolean, OUT create_options text | SETOF record + postgis_raster | public | st_georeference | rast raster, format text | text + postgis_raster | public | st_geotransform | raster, OUT imag double precision, OUT jmag double precision, OUT theta_i double precision, OUT theta_ij double precision, OUT xoffset double precision, OUT yoffset double precision | record + postgis_raster | public | st_grayscale | rastbandargset rastbandarg[], extenttype text | raster + postgis_raster | public | st_grayscale | rast raster, redband integer, greenband integer, blueband integer, extenttype text | raster + postgis_raster | public | st_hasnoband | rast raster, nband integer | boolean + postgis_raster | public | st_height | raster | integer + postgis_raster | public | st_hillshade | rast raster, nband integer, customextent raster, pixeltype text, azimuth double precision, altitude double precision, max_bright double precision, scale double precision, interpolate_nodata boolean | raster + postgis_raster | public | st_hillshade | rast raster, nband integer, pixeltype text, azimuth double precision, altitude double precision, max_bright double precision, scale double precision, interpolate_nodata boolean | raster + postgis_raster | public | st_histogram | rast raster, nband integer, bins integer, "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_histogram | rast raster, nband integer, bins integer, width double precision[], "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_histogram | rast raster, nband integer, exclude_nodata_value boolean, bins integer, "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_histogram | rast raster, nband integer, exclude_nodata_value boolean, bins integer, width double precision[], "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_interpolateraster | geom geometry, options text, rast raster, bandnumber integer | raster + postgis_raster | public | st_intersection | rast1 raster, rast2 raster, returnband text, nodataval double precision[] | raster + postgis_raster | public | st_intersection | rast1 raster, band1 integer, rast2 raster, band2 integer, returnband text, nodataval double precision | raster + postgis_raster | public | st_intersection | rast1 raster, band1 integer, rast2 raster, band2 integer, returnband text, nodataval double precision[] | raster + postgis_raster | public | st_intersection | geomin geometry, rast raster, band integer | SETOF geomval + postgis_raster | public | st_intersection | rast1 raster, rast2 raster, nodataval double precision | raster + postgis_raster | public | st_intersection | rast1 raster, band1 integer, rast2 raster, band2 integer, nodataval double precision | raster + postgis_raster | public | st_intersection | rast1 raster, rast2 raster, returnband text, nodataval double precision | raster + postgis_raster | public | st_intersection | rast raster, band integer, geomin geometry | SETOF geomval + postgis_raster | public | st_intersection | rast1 raster, band1 integer, rast2 raster, band2 integer, nodataval double precision[] | raster + postgis_raster | public | st_intersection | rast raster, geomin geometry | SETOF geomval + postgis_raster | public | st_intersection | rast1 raster, rast2 raster, nodataval double precision[] | raster + postgis_raster | public | st_intersects | rast raster, geom geometry, nband integer | boolean + postgis_raster | public | st_intersects | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_intersects | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_intersects | rast raster, nband integer, geom geometry | boolean + postgis_raster | public | st_intersects | geom geometry, rast raster, nband integer | boolean + postgis_raster | public | st_invdistweight4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_iscoveragetile | rast raster, coverage raster, tilewidth integer, tileheight integer | boolean + postgis_raster | public | st_isempty | rast raster | boolean + postgis_raster | public | st_makeemptycoverage | tilewidth integer, tileheight integer, width integer, height integer, upperleftx double precision, upperlefty double precision, scalex double precision, scaley double precision, skewx double precision, skewy double precision, srid integer | SETOF raster + postgis_raster | public | st_makeemptyraster | width integer, height integer, upperleftx double precision, upperlefty double precision, scalex double precision, scaley double precision, skewx double precision, skewy double precision, srid integer | raster + postgis_raster | public | st_makeemptyraster | width integer, height integer, upperleftx double precision, upperlefty double precision, pixelsize double precision | raster + postgis_raster | public | st_makeemptyraster | rast raster | raster + postgis_raster | public | st_mapalgebra | rast1 raster, rast2 raster, expression text, pixeltype text, extenttype text, nodata1expr text, nodata2expr text, nodatanodataval double precision | raster + postgis_raster | public | st_mapalgebra | rast raster, pixeltype text, expression text, nodataval double precision | raster + postgis_raster | public | st_mapalgebra | rast1 raster, band1 integer, rast2 raster, band2 integer, expression text, pixeltype text, extenttype text, nodata1expr text, nodata2expr text, nodatanodataval double precision | raster + postgis_raster | public | st_mapalgebra | rast raster, nband integer[], callbackfunc regprocedure, pixeltype text, extenttype text, customextent raster, distancex integer, distancey integer, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebra | rast raster, nband integer, callbackfunc regprocedure, mask double precision[], weighted boolean, pixeltype text, extenttype text, customextent raster, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebra | rastbandargset rastbandarg[], callbackfunc regprocedure, pixeltype text, extenttype text, customextent raster, distancex integer, distancey integer, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebra | rast1 raster, nband1 integer, rast2 raster, nband2 integer, callbackfunc regprocedure, pixeltype text, extenttype text, customextent raster, distancex integer, distancey integer, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebra | rast raster, nband integer, callbackfunc regprocedure, pixeltype text, extenttype text, customextent raster, distancex integer, distancey integer, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebra | rast raster, nband integer, pixeltype text, expression text, nodataval double precision | raster + postgis_raster | public | st_mapalgebraexpr | rast1 raster, rast2 raster, expression text, pixeltype text, extenttype text, nodata1expr text, nodata2expr text, nodatanodataval double precision | raster + postgis_raster | public | st_mapalgebraexpr | rast raster, pixeltype text, expression text, nodataval double precision | raster + postgis_raster | public | st_mapalgebraexpr | rast1 raster, band1 integer, rast2 raster, band2 integer, expression text, pixeltype text, extenttype text, nodata1expr text, nodata2expr text, nodatanodataval double precision | raster + postgis_raster | public | st_mapalgebraexpr | rast raster, band integer, pixeltype text, expression text, nodataval double precision | raster + postgis_raster | public | st_mapalgebrafct | rast raster, onerastuserfunc regprocedure | raster + postgis_raster | public | st_mapalgebrafct | rast1 raster, band1 integer, rast2 raster, band2 integer, tworastuserfunc regprocedure, pixeltype text, extenttype text, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, pixeltype text, onerastuserfunc regprocedure | raster + postgis_raster | public | st_mapalgebrafct | rast raster, onerastuserfunc regprocedure, VARIADIC args text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, pixeltype text, onerastuserfunc regprocedure, VARIADIC args text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, band integer, onerastuserfunc regprocedure, VARIADIC args text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, band integer, pixeltype text, onerastuserfunc regprocedure | raster + postgis_raster | public | st_mapalgebrafct | rast1 raster, rast2 raster, tworastuserfunc regprocedure, pixeltype text, extenttype text, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, band integer, pixeltype text, onerastuserfunc regprocedure, VARIADIC args text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, band integer, onerastuserfunc regprocedure | raster + postgis_raster | public | st_mapalgebrafctngb | rast raster, band integer, pixeltype text, ngbwidth integer, ngbheight integer, onerastngbuserfunc regprocedure, nodatamode text, VARIADIC args text[] | raster + postgis_raster | public | st_max4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_max4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_mean4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_mean4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_memsize | raster | integer + postgis_raster | public | st_metadata | rast raster, OUT upperleftx double precision, OUT upperlefty double precision, OUT width integer, OUT height integer, OUT scalex double precision, OUT scaley double precision, OUT skewx double precision, OUT skewy double precision, OUT srid integer, OUT numbands integer | record + postgis_raster | public | st_min4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_min4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_minconvexhull | rast raster, nband integer | geometry + postgis_raster | public | st_mindist4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_minpossiblevalue | pixeltype text | double precision + postgis_raster | public | st_nearestvalue | rast raster, columnx integer, rowy integer, exclude_nodata_value boolean | double precision + postgis_raster | public | st_nearestvalue | rast raster, band integer, columnx integer, rowy integer, exclude_nodata_value boolean | double precision + postgis_raster | public | st_nearestvalue | rast raster, band integer, pt geometry, exclude_nodata_value boolean | double precision + postgis_raster | public | st_nearestvalue | rast raster, pt geometry, exclude_nodata_value boolean | double precision + postgis_raster | public | st_neighborhood | rast raster, columnx integer, rowy integer, distancex integer, distancey integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | st_neighborhood | rast raster, band integer, pt geometry, distancex integer, distancey integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | st_neighborhood | rast raster, band integer, columnx integer, rowy integer, distancex integer, distancey integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | st_neighborhood | rast raster, pt geometry, distancex integer, distancey integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | st_notsamealignmentreason | rast1 raster, rast2 raster | text + postgis_raster | public | st_numbands | raster | integer + postgis_raster | public | st_overlaps | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_overlaps | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_pixelascentroid | rast raster, x integer, y integer | geometry + postgis_raster | public | st_pixelascentroids | rast raster, band integer, exclude_nodata_value boolean | TABLE(geom geometry, val double precision, x integer, y integer) + postgis_raster | public | st_pixelaspoint | rast raster, x integer, y integer | geometry + postgis_raster | public | st_pixelaspoints | rast raster, band integer, exclude_nodata_value boolean | TABLE(geom geometry, val double precision, x integer, y integer) + postgis_raster | public | st_pixelaspolygon | rast raster, x integer, y integer | geometry + postgis_raster | public | st_pixelaspolygons | rast raster, band integer, exclude_nodata_value boolean | TABLE(geom geometry, val double precision, x integer, y integer) + postgis_raster | public | st_pixelheight | raster | double precision + postgis_raster | public | st_pixelofvalue | rast raster, nband integer, search double precision, exclude_nodata_value boolean | TABLE(x integer, y integer) + postgis_raster | public | st_pixelofvalue | rast raster, search double precision, exclude_nodata_value boolean | TABLE(x integer, y integer) + postgis_raster | public | st_pixelofvalue | rast raster, nband integer, search double precision[], exclude_nodata_value boolean | TABLE(val double precision, x integer, y integer) + postgis_raster | public | st_pixelofvalue | rast raster, search double precision[], exclude_nodata_value boolean | TABLE(val double precision, x integer, y integer) + postgis_raster | public | st_pixelwidth | raster | double precision + postgis_raster | public | st_polygon | rast raster, band integer | geometry + postgis_raster | public | st_quantile | rast raster, exclude_nodata_value boolean, quantile double precision | double precision + postgis_raster | public | st_quantile | rast raster, nband integer, quantile double precision | double precision + postgis_raster | public | st_quantile | rast raster, nband integer, exclude_nodata_value boolean, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_quantile | rast raster, quantile double precision | double precision + postgis_raster | public | st_quantile | rast raster, nband integer, exclude_nodata_value boolean, quantile double precision | double precision + postgis_raster | public | st_quantile | rast raster, nband integer, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_quantile | rast raster, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_range4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_range4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_rastertoworldcoord | rast raster, columnx integer, rowy integer, OUT longitude double precision, OUT latitude double precision | record + postgis_raster | public | st_rastertoworldcoordx | rast raster, xr integer | double precision + postgis_raster | public | st_rastertoworldcoordx | rast raster, xr integer, yr integer | double precision + postgis_raster | public | st_rastertoworldcoordy | rast raster, xr integer, yr integer | double precision + postgis_raster | public | st_rastertoworldcoordy | rast raster, yr integer | double precision + postgis_raster | public | st_rastfromhexwkb | text | raster + postgis_raster | public | st_rastfromwkb | bytea | raster + postgis_raster | public | st_reclass | rast raster, nband integer, reclassexpr text, pixeltype text, nodataval double precision | raster + postgis_raster | public | st_reclass | rast raster, VARIADIC reclassargset reclassarg[] | raster + postgis_raster | public | st_reclass | rast raster, reclassexpr text, pixeltype text | raster + postgis_raster | public | st_resample | rast raster, ref raster, usescale boolean, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resample | rast raster, width integer, height integer, gridx double precision, gridy double precision, skewx double precision, skewy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resample | rast raster, scalex double precision, scaley double precision, gridx double precision, gridy double precision, skewx double precision, skewy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resample | rast raster, ref raster, algorithm text, maxerr double precision, usescale boolean | raster + postgis_raster | public | st_rescale | rast raster, scalexy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_rescale | rast raster, scalex double precision, scaley double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resize | rast raster, width integer, height integer, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resize | rast raster, width text, height text, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resize | rast raster, percentwidth double precision, percentheight double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_reskew | rast raster, skewx double precision, skewy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_reskew | rast raster, skewxy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_retile | tab regclass, col name, ext geometry, sfx double precision, sfy double precision, tw integer, th integer, algo text | SETOF raster + postgis_raster | public | st_rotation | raster | double precision + postgis_raster | public | st_roughness | rast raster, nband integer, customextent raster, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_roughness | rast raster, nband integer, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_samealignment | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_samealignment | raster | boolean + postgis_raster | public | st_samealignment | ulx1 double precision, uly1 double precision, scalex1 double precision, scaley1 double precision, skewx1 double precision, skewy1 double precision, ulx2 double precision, uly2 double precision, scalex2 double precision, scaley2 double precision, skewx2 double precision, skewy2 double precision | boolean + postgis_raster | public | st_scalex | raster | double precision + postgis_raster | public | st_scaley | raster | double precision + postgis_raster | public | st_setbandindex | rast raster, band integer, outdbindex integer, force boolean | raster + postgis_raster | public | st_setbandisnodata | rast raster, band integer | raster + postgis_raster | public | st_setbandnodatavalue | rast raster, band integer, nodatavalue double precision, forcechecking boolean | raster + postgis_raster | public | st_setbandnodatavalue | rast raster, nodatavalue double precision | raster + postgis_raster | public | st_setbandpath | rast raster, band integer, outdbpath text, outdbindex integer, force boolean | raster + postgis_raster | public | st_setgeoreference | rast raster, upperleftx double precision, upperlefty double precision, scalex double precision, scaley double precision, skewx double precision, skewy double precision | raster + postgis_raster | public | st_setgeoreference | rast raster, georef text, format text | raster + postgis_raster | public | st_setgeotransform | rast raster, imag double precision, jmag double precision, theta_i double precision, theta_ij double precision, xoffset double precision, yoffset double precision | raster + postgis_raster | public | st_setm | rast raster, geom geometry, resample text, band integer | geometry + postgis_raster | public | st_setrotation | rast raster, rotation double precision | raster + postgis_raster | public | st_setscale | rast raster, scalex double precision, scaley double precision | raster + postgis_raster | public | st_setscale | rast raster, scale double precision | raster + postgis_raster | public | st_setskew | rast raster, skewx double precision, skewy double precision | raster + postgis_raster | public | st_setskew | rast raster, skew double precision | raster + postgis_raster | public | st_setsrid | rast raster, srid integer | raster + postgis_raster | public | st_setupperleft | rast raster, upperleftx double precision, upperlefty double precision | raster + postgis_raster | public | st_setvalue | rast raster, nband integer, geom geometry, newvalue double precision | raster + postgis_raster | public | st_setvalue | rast raster, geom geometry, newvalue double precision | raster + postgis_raster | public | st_setvalue | rast raster, x integer, y integer, newvalue double precision | raster + postgis_raster | public | st_setvalue | rast raster, band integer, x integer, y integer, newvalue double precision | raster + postgis_raster | public | st_setvalues | rast raster, nband integer, x integer, y integer, newvalueset double precision[], nosetvalue double precision, keepnodata boolean | raster + postgis_raster | public | st_setvalues | rast raster, nband integer, x integer, y integer, newvalueset double precision[], noset boolean[], keepnodata boolean | raster + postgis_raster | public | st_setvalues | rast raster, nband integer, x integer, y integer, width integer, height integer, newvalue double precision, keepnodata boolean | raster + postgis_raster | public | st_setvalues | rast raster, x integer, y integer, width integer, height integer, newvalue double precision, keepnodata boolean | raster + postgis_raster | public | st_setvalues | rast raster, nband integer, geomvalset geomval[], keepnodata boolean | raster + postgis_raster | public | st_setz | rast raster, geom geometry, resample text, band integer | geometry + postgis_raster | public | st_skewx | raster | double precision + postgis_raster | public | st_skewy | raster | double precision + postgis_raster | public | st_slope | rast raster, nband integer, customextent raster, pixeltype text, units text, scale double precision, interpolate_nodata boolean | raster + postgis_raster | public | st_slope | rast raster, nband integer, pixeltype text, units text, scale double precision, interpolate_nodata boolean | raster + postgis_raster | public | st_snaptogrid | rast raster, gridx double precision, gridy double precision, scalex double precision, scaley double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_snaptogrid | rast raster, gridx double precision, gridy double precision, algorithm text, maxerr double precision, scalex double precision, scaley double precision | raster + postgis_raster | public | st_snaptogrid | rast raster, gridx double precision, gridy double precision, scalexy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_srid | raster | integer + postgis_raster | public | st_stddev4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_stddev4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_sum4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_sum4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_summary | rast raster | text + postgis_raster | public | st_summarystats | rast raster, nband integer, exclude_nodata_value boolean | summarystats + postgis_raster | public | st_summarystats | rast raster, exclude_nodata_value boolean | summarystats + postgis_raster | public | st_summarystatsagg | raster, integer, boolean, double precision | summarystats + postgis_raster | public | st_summarystatsagg | raster, integer, boolean | summarystats + postgis_raster | public | st_summarystatsagg | raster, boolean, double precision | summarystats + postgis_raster | public | st_tile | rast raster, nband integer, width integer, height integer, padwithnodata boolean, nodataval double precision | SETOF raster + postgis_raster | public | st_tile | rast raster, nband integer[], width integer, height integer, padwithnodata boolean, nodataval double precision | SETOF raster + postgis_raster | public | st_tile | rast raster, width integer, height integer, padwithnodata boolean, nodataval double precision | SETOF raster + postgis_raster | public | st_touches | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_touches | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_tpi | rast raster, nband integer, customextent raster, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_tpi | rast raster, nband integer, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_transform | rast raster, srid integer, algorithm text, maxerr double precision, scalex double precision, scaley double precision | raster + postgis_raster | public | st_transform | rast raster, srid integer, scalexy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_transform | rast raster, alignto raster, algorithm text, maxerr double precision | raster + postgis_raster | public | st_transform | rast raster, srid integer, scalex double precision, scaley double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_tri | rast raster, nband integer, customextent raster, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_tri | rast raster, nband integer, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_union | raster, integer | raster + postgis_raster | public | st_union | raster | raster + postgis_raster | public | st_union | raster, unionarg[] | raster + postgis_raster | public | st_union | raster, integer, text | raster + postgis_raster | public | st_union | raster, text | raster + postgis_raster | public | st_upperleftx | raster | double precision + postgis_raster | public | st_upperlefty | raster | double precision + postgis_raster | public | st_value | rast raster, band integer, x integer, y integer, exclude_nodata_value boolean | double precision + postgis_raster | public | st_value | rast raster, x integer, y integer, exclude_nodata_value boolean | double precision + postgis_raster | public | st_value | rast raster, band integer, pt geometry, exclude_nodata_value boolean, resample text | double precision + postgis_raster | public | st_value | rast raster, pt geometry, exclude_nodata_value boolean | double precision + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, nband integer, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rast raster, nband integer, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, nband integer, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuecount | rast raster, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rast raster, nband integer, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuecount | rast raster, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuecount | rast raster, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rast raster, nband integer, exclude_nodata_value boolean, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuepercent | rast raster, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, nband integer, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_valuepercent | rast raster, nband integer, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rast raster, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rast raster, nband integer, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, nband integer, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_valuepercent | rast raster, nband integer, exclude_nodata_value boolean, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rast raster, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_width | raster | integer + postgis_raster | public | st_within | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_within | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_worldtorastercoord | rast raster, longitude double precision, latitude double precision, OUT columnx integer, OUT rowy integer | record + postgis_raster | public | st_worldtorastercoord | rast raster, pt geometry, OUT columnx integer, OUT rowy integer | record + postgis_raster | public | st_worldtorastercoordx | rast raster, xw double precision | integer + postgis_raster | public | st_worldtorastercoordx | rast raster, xw double precision, yw double precision | integer + postgis_raster | public | st_worldtorastercoordx | rast raster, pt geometry | integer + postgis_raster | public | st_worldtorastercoordy | rast raster, xw double precision, yw double precision | integer + postgis_raster | public | st_worldtorastercoordy | rast raster, pt geometry | integer + postgis_raster | public | st_worldtorastercoordy | rast raster, yw double precision | integer + postgis_raster | public | updaterastersrid | table_name name, column_name name, new_srid integer | boolean + postgis_raster | public | updaterastersrid | schema_name name, table_name name, column_name name, new_srid integer | boolean + postgis_sfcgal | public | postgis_sfcgal_full_version | | text + postgis_sfcgal | public | postgis_sfcgal_noop | geometry | geometry + postgis_sfcgal | public | postgis_sfcgal_scripts_installed | | text + postgis_sfcgal | public | postgis_sfcgal_version | | text + postgis_sfcgal | public | st_3darea | geometry | double precision + postgis_sfcgal | public | st_3dconvexhull | geometry | geometry + postgis_sfcgal | public | st_3ddifference | geom1 geometry, geom2 geometry | geometry + postgis_sfcgal | public | st_3dintersection | geom1 geometry, geom2 geometry | geometry + postgis_sfcgal | public | st_3dunion | geom1 geometry, geom2 geometry | geometry + postgis_sfcgal | public | st_3dunion | geometry | geometry + postgis_sfcgal | public | st_alphashape | g1 geometry, alpha double precision, allow_holes boolean | geometry + postgis_sfcgal | public | st_approximatemedialaxis | geometry | geometry + postgis_sfcgal | public | st_constraineddelaunaytriangles | geometry | geometry + postgis_sfcgal | public | st_extrude | geometry, double precision, double precision, double precision | geometry + postgis_sfcgal | public | st_forcelhr | geometry | geometry + postgis_sfcgal | public | st_isplanar | geometry | boolean + postgis_sfcgal | public | st_issolid | geometry | boolean + postgis_sfcgal | public | st_makesolid | geometry | geometry + postgis_sfcgal | public | st_minkowskisum | geometry, geometry | geometry + postgis_sfcgal | public | st_optimalalphashape | g1 geometry, allow_holes boolean, nb_components integer | geometry + postgis_sfcgal | public | st_orientation | geometry | integer + postgis_sfcgal | public | st_straightskeleton | geometry | geometry + postgis_sfcgal | public | st_tesselate | geometry | geometry + postgis_sfcgal | public | st_volume | geometry | double precision + postgis_topology | topology | _asgmledge | edge_id integer, start_node integer, end_node integer, line geometry, visitedtable regclass, nsprefix_in text, prec integer, options integer, idprefix text, gmlver integer | text + postgis_topology | topology | _asgmlface | toponame text, face_id integer, visitedtable regclass, nsprefix_in text, prec integer, options integer, idprefix text, gmlver integer | text + postgis_topology | topology | _asgmlnode | id integer, point geometry, nsprefix_in text, prec integer, options integer, idprefix text, gmlver integer | text + postgis_topology | topology | _checkedgelinking | curedge_edge_id integer, prevedge_edge_id integer, prevedge_next_left_edge integer, prevedge_next_right_edge integer | topology.validatetopology_returntype + postgis_topology | topology | _st_adjacentedges | atopology character varying, anode integer, anedge integer | integer[] + postgis_topology | topology | _st_mintolerance | ageom geometry | double precision + postgis_topology | topology | _st_mintolerance | atopology character varying, ageom geometry | double precision + postgis_topology | topology | _validatetopologyedgelinking | bbox geometry | SETOF topology.validatetopology_returntype + postgis_topology | topology | _validatetopologygetfaceshellmaximaledgering | atopology character varying, aface integer | geometry + postgis_topology | topology | _validatetopologygetringedges | starting_edge integer | integer[] + postgis_topology | topology | _validatetopologyrings | bbox geometry | SETOF topology.validatetopology_returntype + postgis_topology | topology | addedge | atopology character varying, aline geometry | integer + postgis_topology | topology | addface | atopology character varying, apoly geometry, force_new boolean | integer + postgis_topology | topology | addnode | atopology character varying, apoint geometry, allowedgesplitting boolean, setcontainingface boolean | integer + postgis_topology | topology | addtopogeometrycolumn | toponame character varying, schema character varying, tbl character varying, col character varying, ltype character varying, child integer | integer + postgis_topology | topology | addtopogeometrycolumn | character varying, character varying, character varying, character varying, character varying | integer + postgis_topology | topology | addtosearchpath | a_schema_name character varying | text + postgis_topology | topology | asgml | tg topology.topogeometry | text + postgis_topology | topology | asgml | tg topology.topogeometry, nsprefix text | text + postgis_topology | topology | asgml | tg topology.topogeometry, nsprefix text, prec integer, opts integer | text + postgis_topology | topology | asgml | tg topology.topogeometry, nsprefix text, prec integer, options integer, vis regclass | text + postgis_topology | topology | asgml | tg topology.topogeometry, nsprefix_in text, precision_in integer, options_in integer, visitedtable regclass, idprefix text, gmlver integer | text + postgis_topology | topology | asgml | tg topology.topogeometry, nsprefix text, prec integer, options integer, visitedtable regclass, idprefix text | text + postgis_topology | topology | asgml | tg topology.topogeometry, visitedtable regclass, nsprefix text | text + postgis_topology | topology | asgml | tg topology.topogeometry, visitedtable regclass | text + postgis_topology | topology | astopojson | tg topology.topogeometry, edgemaptable regclass | text + postgis_topology | topology | cleartopogeom | tg topology.topogeometry | topology.topogeometry + postgis_topology | topology | copytopology | atopology character varying, newtopo character varying | integer + postgis_topology | topology | createtopogeom | toponame character varying, tg_type integer, layer_id integer, tg_objs topology.topoelementarray | topology.topogeometry + postgis_topology | topology | createtopogeom | toponame character varying, tg_type integer, layer_id integer | topology.topogeometry + postgis_topology | topology | createtopology | atopology character varying, srid integer, prec double precision, hasz boolean | integer + postgis_topology | topology | createtopology | character varying, integer | integer + postgis_topology | topology | createtopology | toponame character varying, srid integer, prec double precision | integer + postgis_topology | topology | createtopology | character varying | integer + postgis_topology | topology | droptopogeometrycolumn | schema character varying, tbl character varying, col character varying | text + postgis_topology | topology | droptopology | atopology character varying | text + postgis_topology | topology | equals | tg1 topology.topogeometry, tg2 topology.topogeometry | boolean + postgis_topology | topology | findlayer | tg topology.topogeometry | topology.layer + postgis_topology | topology | findlayer | schema_name name, table_name name, feature_column name | topology.layer + postgis_topology | topology | findlayer | topology_id integer, layer_id integer | topology.layer + postgis_topology | topology | findlayer | layer_table regclass, feature_column name | topology.layer + postgis_topology | topology | findtopology | integer | topology.topology + postgis_topology | topology | findtopology | text | topology.topology + postgis_topology | topology | findtopology | name, name, name | topology.topology + postgis_topology | topology | findtopology | topology.topogeometry | topology.topology + postgis_topology | topology | findtopology | regclass, name | topology.topology + postgis_topology | topology | geometry | topogeom topology.topogeometry | geometry + postgis_topology | topology | geometrytype | tg topology.topogeometry | text + postgis_topology | topology | getedgebypoint | atopology character varying, apoint geometry, tol1 double precision | integer + postgis_topology | topology | getfacebypoint | atopology character varying, apoint geometry, tol1 double precision | integer + postgis_topology | topology | getfacecontainingpoint | atopology text, apoint geometry | integer + postgis_topology | topology | getnodebypoint | atopology character varying, apoint geometry, tol1 double precision | integer + postgis_topology | topology | getnodeedges | atopology character varying, anode integer | SETOF topology.getfaceedges_returntype + postgis_topology | topology | getringedges | atopology character varying, anedge integer, maxedges integer | SETOF topology.getfaceedges_returntype + postgis_topology | topology | gettopogeomelementarray | tg topology.topogeometry | topology.topoelementarray + postgis_topology | topology | gettopogeomelementarray | toponame character varying, layer_id integer, tgid integer | topology.topoelementarray + postgis_topology | topology | gettopogeomelements | tg topology.topogeometry | SETOF topology.topoelement + postgis_topology | topology | gettopogeomelements | toponame character varying, layerid integer, tgid integer | SETOF topology.topoelement + postgis_topology | topology | gettopologyid | toponame character varying | integer + postgis_topology | topology | gettopologyname | topoid integer | character varying + postgis_topology | topology | gettopologysrid | toponame character varying | integer + postgis_topology | topology | intersects | tg1 topology.topogeometry, tg2 topology.topogeometry | boolean + postgis_topology | topology | layertrigger | | trigger + postgis_topology | topology | polygonize | toponame character varying | text + postgis_topology | topology | populate_topology_layer | | TABLE(schema_name text, table_name text, feature_column text) + postgis_topology | topology | postgis_topology_scripts_installed | | text + postgis_topology | topology | relationtrigger | | trigger + postgis_topology | topology | removeunusedprimitives | atopology text, bbox geometry | integer + postgis_topology | topology | st_addedgemodface | atopology character varying, anode integer, anothernode integer, acurve geometry | integer + postgis_topology | topology | st_addedgenewfaces | atopology character varying, anode integer, anothernode integer, acurve geometry | integer + postgis_topology | topology | st_addisoedge | atopology character varying, anode integer, anothernode integer, acurve geometry | integer + postgis_topology | topology | st_addisonode | atopology character varying, aface integer, apoint geometry | integer + postgis_topology | topology | st_changeedgegeom | atopology character varying, anedge integer, acurve geometry | text + postgis_topology | topology | st_createtopogeo | atopology character varying, acollection geometry | text + postgis_topology | topology | st_geometrytype | tg topology.topogeometry | text + postgis_topology | topology | st_getfaceedges | toponame character varying, face_id integer | SETOF topology.getfaceedges_returntype + postgis_topology | topology | st_getfacegeometry | toponame character varying, aface integer | geometry + postgis_topology | topology | st_inittopogeo | atopology character varying | text + postgis_topology | topology | st_modedgeheal | toponame character varying, e1id integer, e2id integer | integer + postgis_topology | topology | st_modedgesplit | atopology character varying, anedge integer, apoint geometry | integer + postgis_topology | topology | st_moveisonode | atopology character varying, anode integer, apoint geometry | text + postgis_topology | topology | st_newedgeheal | toponame character varying, e1id integer, e2id integer | integer + postgis_topology | topology | st_newedgessplit | atopology character varying, anedge integer, apoint geometry | integer + postgis_topology | topology | st_remedgemodface | toponame character varying, e1id integer | integer + postgis_topology | topology | st_remedgenewface | toponame character varying, e1id integer | integer + postgis_topology | topology | st_remisonode | character varying, integer | text + postgis_topology | topology | st_removeisoedge | atopology character varying, anedge integer | text + postgis_topology | topology | st_removeisonode | atopology character varying, anode integer | text + postgis_topology | topology | st_simplify | tg topology.topogeometry, tolerance double precision | geometry + postgis_topology | topology | st_srid | tg topology.topogeometry | integer + postgis_topology | topology | topoelementarray_agg | topology.topoelement | topology.topoelementarray + postgis_topology | topology | topoelementarray_append | topology.topoelementarray, topology.topoelement | topology.topoelementarray + postgis_topology | topology | topogeo_addgeometry | atopology character varying, ageom geometry, tolerance double precision | void + postgis_topology | topology | topogeo_addlinestring | atopology character varying, aline geometry, tolerance double precision | SETOF integer + postgis_topology | topology | topogeo_addpoint | atopology character varying, apoint geometry, tolerance double precision | integer + postgis_topology | topology | topogeo_addpolygon | atopology character varying, apoly geometry, tolerance double precision | SETOF integer + postgis_topology | topology | topogeom_addelement | tg topology.topogeometry, el topology.topoelement | topology.topogeometry + postgis_topology | topology | topogeom_addtopogeom | tgt topology.topogeometry, src topology.topogeometry | topology.topogeometry + postgis_topology | topology | topogeom_remelement | tg topology.topogeometry, el topology.topoelement | topology.topogeometry + postgis_topology | topology | topologysummary | atopology character varying | text + postgis_topology | topology | totopogeom | ageom geometry, atopology character varying, alayer integer, atolerance double precision | topology.topogeometry + postgis_topology | topology | totopogeom | ageom geometry, tg topology.topogeometry, atolerance double precision | topology.topogeometry + postgis_topology | topology | validatetopology | toponame character varying, bbox geometry | SETOF topology.validatetopology_returntype + postgis_topology | topology | validatetopologyrelation | toponame character varying | TABLE(error text, layer_id integer, topogeo_id integer, element_id integer) + postgres_fdw | public | postgres_fdw_disconnect | text | boolean + postgres_fdw | public | postgres_fdw_disconnect_all | | boolean + postgres_fdw | public | postgres_fdw_get_connections | OUT server_name text, OUT valid boolean | SETOF record + postgres_fdw | public | postgres_fdw_handler | | fdw_handler + postgres_fdw | public | postgres_fdw_validator | text[], oid | void + refint | public | check_foreign_key | | trigger + refint | public | check_primary_key | | trigger + rum | public | rum_anyarray_config | internal | void + rum | public | rum_anyarray_consistent | internal, smallint, anyarray, integer, internal, internal, internal, internal | boolean + rum | public | rum_anyarray_distance | anyarray, anyarray | double precision + rum | public | rum_anyarray_ordering | internal, smallint, anyarray, integer, internal, internal, internal, internal, internal | double precision + rum | public | rum_anyarray_similar | anyarray, anyarray | boolean + rum | public | rum_bit_compare_prefix | bit, bit, smallint, internal | integer + rum | public | rum_bit_extract_query | bit, internal, smallint, internal, internal | internal + rum | public | rum_bit_extract_value | bit, internal | internal + rum | public | rum_btree_consistent | internal, smallint, internal, integer, internal, internal, internal, internal | boolean + rum | public | rum_bytea_compare_prefix | bytea, bytea, smallint, internal | integer + rum | public | rum_bytea_extract_query | bytea, internal, smallint, internal, internal | internal + rum | public | rum_bytea_extract_value | bytea, internal | internal + rum | public | rum_char_compare_prefix | "char", "char", smallint, internal | integer + rum | public | rum_char_extract_query | "char", internal, smallint, internal, internal | internal + rum | public | rum_char_extract_value | "char", internal | internal + rum | public | rum_cidr_compare_prefix | cidr, cidr, smallint, internal | integer + rum | public | rum_cidr_extract_query | cidr, internal, smallint, internal, internal | internal + rum | public | rum_cidr_extract_value | cidr, internal | internal + rum | public | rum_date_compare_prefix | date, date, smallint, internal | integer + rum | public | rum_date_extract_query | date, internal, smallint, internal, internal | internal + rum | public | rum_date_extract_value | date, internal | internal + rum | public | rum_extract_anyarray | anyarray, internal, internal, internal, internal | internal + rum | public | rum_extract_anyarray_query | anyarray, internal, smallint, internal, internal, internal, internal | internal + rum | public | rum_extract_tsquery | tsquery, internal, smallint, internal, internal, internal, internal | internal + rum | public | rum_extract_tsquery_hash | tsquery, internal, smallint, internal, internal, internal, internal | internal + rum | public | rum_extract_tsvector | tsvector, internal, internal, internal, internal | internal + rum | public | rum_extract_tsvector_hash | tsvector, internal, internal, internal, internal | internal + rum | public | rum_float4_compare_prefix | real, real, smallint, internal | integer + rum | public | rum_float4_config | internal | void + rum | public | rum_float4_distance | real, real | double precision + rum | public | rum_float4_extract_query | real, internal, smallint, internal, internal | internal + rum | public | rum_float4_extract_value | real, internal | internal + rum | public | rum_float4_key_distance | real, real, smallint | double precision + rum | public | rum_float4_left_distance | real, real | double precision + rum | public | rum_float4_outer_distance | real, real, smallint | double precision + rum | public | rum_float4_right_distance | real, real | double precision + rum | public | rum_float8_compare_prefix | double precision, double precision, smallint, internal | integer + rum | public | rum_float8_config | internal | void + rum | public | rum_float8_distance | double precision, double precision | double precision + rum | public | rum_float8_extract_query | double precision, internal, smallint, internal, internal | internal + rum | public | rum_float8_extract_value | double precision, internal | internal + rum | public | rum_float8_key_distance | double precision, double precision, smallint | double precision + rum | public | rum_float8_left_distance | double precision, double precision | double precision + rum | public | rum_float8_outer_distance | double precision, double precision, smallint | double precision + rum | public | rum_float8_right_distance | double precision, double precision | double precision + rum | public | rum_inet_compare_prefix | inet, inet, smallint, internal | integer + rum | public | rum_inet_extract_query | inet, internal, smallint, internal, internal | internal + rum | public | rum_inet_extract_value | inet, internal | internal + rum | public | rum_int2_compare_prefix | smallint, smallint, smallint, internal | integer + rum | public | rum_int2_config | internal | void + rum | public | rum_int2_distance | smallint, smallint | double precision + rum | public | rum_int2_extract_query | smallint, internal, smallint, internal, internal | internal + rum | public | rum_int2_extract_value | smallint, internal | internal + rum | public | rum_int2_key_distance | smallint, smallint, smallint | double precision + rum | public | rum_int2_left_distance | smallint, smallint | double precision + rum | public | rum_int2_outer_distance | smallint, smallint, smallint | double precision + rum | public | rum_int2_right_distance | smallint, smallint | double precision + rum | public | rum_int4_compare_prefix | integer, integer, smallint, internal | integer + rum | public | rum_int4_config | internal | void + rum | public | rum_int4_distance | integer, integer | double precision + rum | public | rum_int4_extract_query | integer, internal, smallint, internal, internal | internal + rum | public | rum_int4_extract_value | integer, internal | internal + rum | public | rum_int4_key_distance | integer, integer, smallint | double precision + rum | public | rum_int4_left_distance | integer, integer | double precision + rum | public | rum_int4_outer_distance | integer, integer, smallint | double precision + rum | public | rum_int4_right_distance | integer, integer | double precision + rum | public | rum_int8_compare_prefix | bigint, bigint, smallint, internal | integer + rum | public | rum_int8_config | internal | void + rum | public | rum_int8_distance | bigint, bigint | double precision + rum | public | rum_int8_extract_query | bigint, internal, smallint, internal, internal | internal + rum | public | rum_int8_extract_value | bigint, internal | internal + rum | public | rum_int8_key_distance | bigint, bigint, smallint | double precision + rum | public | rum_int8_left_distance | bigint, bigint | double precision + rum | public | rum_int8_outer_distance | bigint, bigint, smallint | double precision + rum | public | rum_int8_right_distance | bigint, bigint | double precision + rum | public | rum_interval_compare_prefix | interval, interval, smallint, internal | integer + rum | public | rum_interval_extract_query | interval, internal, smallint, internal, internal | internal + rum | public | rum_interval_extract_value | interval, internal | internal + rum | public | rum_macaddr_compare_prefix | macaddr, macaddr, smallint, internal | integer + rum | public | rum_macaddr_extract_query | macaddr, internal, smallint, internal, internal | internal + rum | public | rum_macaddr_extract_value | macaddr, internal | internal + rum | public | rum_money_compare_prefix | money, money, smallint, internal | integer + rum | public | rum_money_config | internal | void + rum | public | rum_money_distance | money, money | double precision + rum | public | rum_money_extract_query | money, internal, smallint, internal, internal | internal + rum | public | rum_money_extract_value | money, internal | internal + rum | public | rum_money_key_distance | money, money, smallint | double precision + rum | public | rum_money_left_distance | money, money | double precision + rum | public | rum_money_outer_distance | money, money, smallint | double precision + rum | public | rum_money_right_distance | money, money | double precision + rum | public | rum_numeric_cmp | numeric, numeric | integer + rum | public | rum_numeric_compare_prefix | numeric, numeric, smallint, internal | integer + rum | public | rum_numeric_extract_query | numeric, internal, smallint, internal, internal | internal + rum | public | rum_numeric_extract_value | numeric, internal | internal + rum | public | rum_oid_compare_prefix | oid, oid, smallint, internal | integer + rum | public | rum_oid_config | internal | void + rum | public | rum_oid_distance | oid, oid | double precision + rum | public | rum_oid_extract_query | oid, internal, smallint, internal, internal | internal + rum | public | rum_oid_extract_value | oid, internal | internal + rum | public | rum_oid_key_distance | oid, oid, smallint | double precision + rum | public | rum_oid_left_distance | oid, oid | double precision + rum | public | rum_oid_outer_distance | oid, oid, smallint | double precision + rum | public | rum_oid_right_distance | oid, oid | double precision + rum | public | rum_text_compare_prefix | text, text, smallint, internal | integer + rum | public | rum_text_extract_query | text, internal, smallint, internal, internal | internal + rum | public | rum_text_extract_value | text, internal | internal + rum | public | rum_time_compare_prefix | time without time zone, time without time zone, smallint, internal | integer + rum | public | rum_time_extract_query | time without time zone, internal, smallint, internal, internal | internal + rum | public | rum_time_extract_value | time without time zone, internal | internal + rum | public | rum_timestamp_compare_prefix | timestamp without time zone, timestamp without time zone, smallint, internal | integer + rum | public | rum_timestamp_config | internal | void + rum | public | rum_timestamp_consistent | internal, smallint, timestamp without time zone, integer, internal, internal, internal, internal | boolean + rum | public | rum_timestamp_distance | timestamp without time zone, timestamp without time zone | double precision + rum | public | rum_timestamp_extract_query | timestamp without time zone, internal, smallint, internal, internal, internal, internal | internal + rum | public | rum_timestamp_extract_value | timestamp without time zone, internal, internal, internal, internal | internal + rum | public | rum_timestamp_key_distance | timestamp without time zone, timestamp without time zone, smallint | double precision + rum | public | rum_timestamp_left_distance | timestamp without time zone, timestamp without time zone | double precision + rum | public | rum_timestamp_outer_distance | timestamp without time zone, timestamp without time zone, smallint | double precision + rum | public | rum_timestamp_right_distance | timestamp without time zone, timestamp without time zone | double precision + rum | public | rum_timestamptz_distance | timestamp with time zone, timestamp with time zone | double precision + rum | public | rum_timestamptz_key_distance | timestamp with time zone, timestamp with time zone, smallint | double precision + rum | public | rum_timestamptz_left_distance | timestamp with time zone, timestamp with time zone | double precision + rum | public | rum_timestamptz_right_distance | timestamp with time zone, timestamp with time zone | double precision + rum | public | rum_timetz_compare_prefix | time with time zone, time with time zone, smallint, internal | integer + rum | public | rum_timetz_extract_query | time with time zone, internal, smallint, internal, internal | internal + rum | public | rum_timetz_extract_value | time with time zone, internal | internal + rum | public | rum_ts_distance | tsvector, tsquery, integer | real + rum | public | rum_ts_distance | tsvector, tsquery | real + rum | public | rum_ts_distance | tsvector, rum_distance_query | real + rum | public | rum_ts_join_pos | internal, internal | bytea + rum | public | rum_ts_score | tsvector, tsquery, integer | real + rum | public | rum_ts_score | tsvector, tsquery | real + rum | public | rum_ts_score | tsvector, rum_distance_query | real + rum | public | rum_tsquery_addon_consistent | internal, smallint, tsvector, integer, internal, internal, internal, internal | boolean + rum | public | rum_tsquery_consistent | internal, smallint, tsvector, integer, internal, internal, internal, internal | boolean + rum | public | rum_tsquery_distance | internal, smallint, tsvector, integer, internal, internal, internal, internal, internal | double precision + rum | public | rum_tsquery_pre_consistent | internal, smallint, tsvector, integer, internal, internal, internal, internal | boolean + rum | public | rum_tsvector_config | internal | void + rum | public | rum_varbit_compare_prefix | bit varying, bit varying, smallint, internal | integer + rum | public | rum_varbit_extract_query | bit varying, internal, smallint, internal, internal | internal + rum | public | rum_varbit_extract_value | bit varying, internal | internal + rum | public | rumhandler | internal | index_am_handler + rum | public | ruminv_extract_tsquery | tsquery, internal, internal, internal, internal | internal + rum | public | ruminv_extract_tsvector | tsvector, internal, smallint, internal, internal, internal, internal | internal + rum | public | ruminv_tsquery_config | internal | void + rum | public | ruminv_tsvector_consistent | internal, smallint, tsvector, integer, internal, internal, internal, internal | boolean + rum | public | tsquery_to_distance_query | tsquery | rum_distance_query + seg | public | gseg_consistent | internal, seg, smallint, oid, internal | boolean + seg | public | gseg_penalty | internal, internal, internal | internal + seg | public | gseg_picksplit | internal, internal | internal + seg | public | gseg_same | seg, seg, internal | internal + seg | public | gseg_union | internal, internal | seg + seg | public | seg_center | seg | real + seg | public | seg_cmp | seg, seg | integer + seg | public | seg_contained | seg, seg | boolean + seg | public | seg_contains | seg, seg | boolean + seg | public | seg_different | seg, seg | boolean + seg | public | seg_ge | seg, seg | boolean + seg | public | seg_gt | seg, seg | boolean + seg | public | seg_in | cstring | seg + seg | public | seg_inter | seg, seg | seg + seg | public | seg_le | seg, seg | boolean + seg | public | seg_left | seg, seg | boolean + seg | public | seg_lower | seg | real + seg | public | seg_lt | seg, seg | boolean + seg | public | seg_out | seg | cstring + seg | public | seg_over_left | seg, seg | boolean + seg | public | seg_over_right | seg, seg | boolean + seg | public | seg_overlap | seg, seg | boolean + seg | public | seg_right | seg, seg | boolean + seg | public | seg_same | seg, seg | boolean + seg | public | seg_size | seg | real + seg | public | seg_union | seg, seg | seg + seg | public | seg_upper | seg | real + sslinfo | public | ssl_cipher | | text + sslinfo | public | ssl_client_cert_present | | boolean + sslinfo | public | ssl_client_dn | | text + sslinfo | public | ssl_client_dn_field | text | text + sslinfo | public | ssl_client_serial | | numeric + sslinfo | public | ssl_extension_info | OUT name text, OUT value text, OUT critical boolean | SETOF record + sslinfo | public | ssl_is_used | | boolean + sslinfo | public | ssl_issuer_dn | | text + sslinfo | public | ssl_issuer_field | text | text + sslinfo | public | ssl_version | | text + supabase_vault | vault | _crypto_aead_det_decrypt | message bytea, additional bytea, key_id bigint, context bytea, nonce bytea | bytea + supabase_vault | vault | _crypto_aead_det_encrypt | message bytea, additional bytea, key_id bigint, context bytea, nonce bytea | bytea + supabase_vault | vault | _crypto_aead_det_noncegen | | bytea + supabase_vault | vault | create_secret | new_secret text, new_name text, new_description text, new_key_id uuid | uuid + supabase_vault | vault | update_secret | secret_id uuid, new_secret text, new_name text, new_description text, new_key_id uuid | void + tablefunc | public | connectby | text, text, text, text, integer, text | SETOF record + tablefunc | public | connectby | text, text, text, text, text, integer, text | SETOF record + tablefunc | public | connectby | text, text, text, text, integer | SETOF record + tablefunc | public | connectby | text, text, text, text, text, integer | SETOF record + tablefunc | public | crosstab | text | SETOF record + tablefunc | public | crosstab | text, integer | SETOF record + tablefunc | public | crosstab | text, text | SETOF record + tablefunc | public | crosstab2 | text | SETOF tablefunc_crosstab_2 + tablefunc | public | crosstab3 | text | SETOF tablefunc_crosstab_3 + tablefunc | public | crosstab4 | text | SETOF tablefunc_crosstab_4 + tablefunc | public | normal_rand | integer, double precision, double precision | SETOF double precision + tcn | public | triggered_change_notification | | trigger + tsm_system_rows | public | system_rows | internal | tsm_handler + unaccent | public | unaccent | text | text + unaccent | public | unaccent | regdictionary, text | text + unaccent | public | unaccent_init | internal | internal + unaccent | public | unaccent_lexize | internal, internal, internal, internal | internal + uuid-ossp | extensions | uuid_generate_v1 | | uuid + uuid-ossp | extensions | uuid_generate_v1mc | | uuid + uuid-ossp | extensions | uuid_generate_v3 | namespace uuid, name text | uuid + uuid-ossp | extensions | uuid_generate_v4 | | uuid + uuid-ossp | extensions | uuid_generate_v5 | namespace uuid, name text | uuid + uuid-ossp | extensions | uuid_nil | | uuid + uuid-ossp | extensions | uuid_ns_dns | | uuid + uuid-ossp | extensions | uuid_ns_oid | | uuid + uuid-ossp | extensions | uuid_ns_url | | uuid + uuid-ossp | extensions | uuid_ns_x500 | | uuid + vector | public | array_to_halfvec | real[], integer, boolean | halfvec + vector | public | array_to_halfvec | integer[], integer, boolean | halfvec + vector | public | array_to_halfvec | numeric[], integer, boolean | halfvec + vector | public | array_to_halfvec | double precision[], integer, boolean | halfvec + vector | public | array_to_sparsevec | real[], integer, boolean | sparsevec + vector | public | array_to_sparsevec | integer[], integer, boolean | sparsevec + vector | public | array_to_sparsevec | numeric[], integer, boolean | sparsevec + vector | public | array_to_sparsevec | double precision[], integer, boolean | sparsevec + vector | public | array_to_vector | real[], integer, boolean | vector + vector | public | array_to_vector | integer[], integer, boolean | vector + vector | public | array_to_vector | numeric[], integer, boolean | vector + vector | public | array_to_vector | double precision[], integer, boolean | vector + vector | public | avg | vector | vector + vector | public | avg | halfvec | halfvec + vector | public | binary_quantize | vector | bit + vector | public | binary_quantize | halfvec | bit + vector | public | cosine_distance | vector, vector | double precision + vector | public | cosine_distance | halfvec, halfvec | double precision + vector | public | cosine_distance | sparsevec, sparsevec | double precision + vector | public | halfvec | halfvec, integer, boolean | halfvec + vector | public | halfvec_accum | double precision[], halfvec | double precision[] + vector | public | halfvec_add | halfvec, halfvec | halfvec + vector | public | halfvec_avg | double precision[] | halfvec + vector | public | halfvec_cmp | halfvec, halfvec | integer + vector | public | halfvec_combine | double precision[], double precision[] | double precision[] + vector | public | halfvec_concat | halfvec, halfvec | halfvec + vector | public | halfvec_eq | halfvec, halfvec | boolean + vector | public | halfvec_ge | halfvec, halfvec | boolean + vector | public | halfvec_gt | halfvec, halfvec | boolean + vector | public | halfvec_in | cstring, oid, integer | halfvec + vector | public | halfvec_l2_squared_distance | halfvec, halfvec | double precision + vector | public | halfvec_le | halfvec, halfvec | boolean + vector | public | halfvec_lt | halfvec, halfvec | boolean + vector | public | halfvec_mul | halfvec, halfvec | halfvec + vector | public | halfvec_ne | halfvec, halfvec | boolean + vector | public | halfvec_negative_inner_product | halfvec, halfvec | double precision + vector | public | halfvec_out | halfvec | cstring + vector | public | halfvec_recv | internal, oid, integer | halfvec + vector | public | halfvec_send | halfvec | bytea + vector | public | halfvec_spherical_distance | halfvec, halfvec | double precision + vector | public | halfvec_sub | halfvec, halfvec | halfvec + vector | public | halfvec_to_float4 | halfvec, integer, boolean | real[] + vector | public | halfvec_to_sparsevec | halfvec, integer, boolean | sparsevec + vector | public | halfvec_to_vector | halfvec, integer, boolean | vector + vector | public | halfvec_typmod_in | cstring[] | integer + vector | public | hamming_distance | bit, bit | double precision + vector | public | hnsw_bit_support | internal | internal + vector | public | hnsw_halfvec_support | internal | internal + vector | public | hnsw_sparsevec_support | internal | internal + vector | public | hnswhandler | internal | index_am_handler + vector | public | inner_product | vector, vector | double precision + vector | public | inner_product | halfvec, halfvec | double precision + vector | public | inner_product | sparsevec, sparsevec | double precision + vector | public | ivfflat_bit_support | internal | internal + vector | public | ivfflat_halfvec_support | internal | internal + vector | public | ivfflathandler | internal | index_am_handler + vector | public | jaccard_distance | bit, bit | double precision + vector | public | l1_distance | vector, vector | double precision + vector | public | l1_distance | halfvec, halfvec | double precision + vector | public | l1_distance | sparsevec, sparsevec | double precision + vector | public | l2_distance | vector, vector | double precision + vector | public | l2_distance | halfvec, halfvec | double precision + vector | public | l2_distance | sparsevec, sparsevec | double precision + vector | public | l2_norm | halfvec | double precision + vector | public | l2_norm | sparsevec | double precision + vector | public | l2_normalize | vector | vector + vector | public | l2_normalize | halfvec | halfvec + vector | public | l2_normalize | sparsevec | sparsevec + vector | public | sparsevec | sparsevec, integer, boolean | sparsevec + vector | public | sparsevec_cmp | sparsevec, sparsevec | integer + vector | public | sparsevec_eq | sparsevec, sparsevec | boolean + vector | public | sparsevec_ge | sparsevec, sparsevec | boolean + vector | public | sparsevec_gt | sparsevec, sparsevec | boolean + vector | public | sparsevec_in | cstring, oid, integer | sparsevec + vector | public | sparsevec_l2_squared_distance | sparsevec, sparsevec | double precision + vector | public | sparsevec_le | sparsevec, sparsevec | boolean + vector | public | sparsevec_lt | sparsevec, sparsevec | boolean + vector | public | sparsevec_ne | sparsevec, sparsevec | boolean + vector | public | sparsevec_negative_inner_product | sparsevec, sparsevec | double precision + vector | public | sparsevec_out | sparsevec | cstring + vector | public | sparsevec_recv | internal, oid, integer | sparsevec + vector | public | sparsevec_send | sparsevec | bytea + vector | public | sparsevec_to_halfvec | sparsevec, integer, boolean | halfvec + vector | public | sparsevec_to_vector | sparsevec, integer, boolean | vector + vector | public | sparsevec_typmod_in | cstring[] | integer + vector | public | subvector | halfvec, integer, integer | halfvec + vector | public | subvector | vector, integer, integer | vector + vector | public | sum | vector | vector + vector | public | sum | halfvec | halfvec + vector | public | vector | vector, integer, boolean | vector + vector | public | vector_accum | double precision[], vector | double precision[] + vector | public | vector_add | vector, vector | vector + vector | public | vector_avg | double precision[] | vector + vector | public | vector_cmp | vector, vector | integer + vector | public | vector_combine | double precision[], double precision[] | double precision[] + vector | public | vector_concat | vector, vector | vector + vector | public | vector_dims | vector | integer + vector | public | vector_dims | halfvec | integer + vector | public | vector_eq | vector, vector | boolean + vector | public | vector_ge | vector, vector | boolean + vector | public | vector_gt | vector, vector | boolean + vector | public | vector_in | cstring, oid, integer | vector + vector | public | vector_l2_squared_distance | vector, vector | double precision + vector | public | vector_le | vector, vector | boolean + vector | public | vector_lt | vector, vector | boolean + vector | public | vector_mul | vector, vector | vector + vector | public | vector_ne | vector, vector | boolean + vector | public | vector_negative_inner_product | vector, vector | double precision + vector | public | vector_norm | vector | double precision + vector | public | vector_out | vector | cstring + vector | public | vector_recv | internal, oid, integer | vector + vector | public | vector_send | vector | bytea + vector | public | vector_spherical_distance | vector, vector | double precision + vector | public | vector_sub | vector, vector | vector + vector | public | vector_to_float4 | vector, integer, boolean | real[] + vector | public | vector_to_halfvec | vector, integer, boolean | halfvec + vector | public | vector_to_sparsevec | vector, integer, boolean | sparsevec + vector | public | vector_typmod_in | cstring[] | integer + wrappers | public | airtable_fdw_handler | | fdw_handler + wrappers | public | airtable_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | airtable_fdw_validator | options text[], catalog oid | void + wrappers | public | auth0_fdw_handler | | fdw_handler + wrappers | public | auth0_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | auth0_fdw_validator | options text[], catalog oid | void + wrappers | public | big_query_fdw_handler | | fdw_handler + wrappers | public | big_query_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | big_query_fdw_validator | options text[], catalog oid | void + wrappers | public | click_house_fdw_handler | | fdw_handler + wrappers | public | click_house_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | click_house_fdw_validator | options text[], catalog oid | void + wrappers | public | cognito_fdw_handler | | fdw_handler + wrappers | public | cognito_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | cognito_fdw_validator | options text[], catalog oid | void + wrappers | public | firebase_fdw_handler | | fdw_handler + wrappers | public | firebase_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | firebase_fdw_validator | options text[], catalog oid | void + wrappers | public | hello_world_fdw_handler | | fdw_handler + wrappers | public | hello_world_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | hello_world_fdw_validator | options text[], catalog oid | void + wrappers | public | logflare_fdw_handler | | fdw_handler + wrappers | public | logflare_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | logflare_fdw_validator | options text[], catalog oid | void + wrappers | public | mssql_fdw_handler | | fdw_handler + wrappers | public | mssql_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | mssql_fdw_validator | options text[], catalog oid | void + wrappers | public | redis_fdw_handler | | fdw_handler + wrappers | public | redis_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | redis_fdw_validator | options text[], catalog oid | void + wrappers | public | s3_fdw_handler | | fdw_handler + wrappers | public | s3_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | s3_fdw_validator | options text[], catalog oid | void + wrappers | public | stripe_fdw_handler | | fdw_handler + wrappers | public | stripe_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | stripe_fdw_validator | options text[], catalog oid | void + wrappers | public | wasm_fdw_handler | | fdw_handler + wrappers | public | wasm_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | wasm_fdw_validator | options text[], catalog oid | void + xml2 | public | xml_encode_special_chars | text | text + xml2 | public | xml_valid | text | boolean + xml2 | public | xpath_bool | text, text | boolean + xml2 | public | xpath_list | text, text | text + xml2 | public | xpath_list | text, text, text | text + xml2 | public | xpath_nodeset | text, text, text, text | text + xml2 | public | xpath_nodeset | text, text | text + xml2 | public | xpath_nodeset | text, text, text | text + xml2 | public | xpath_number | text, text | real + xml2 | public | xpath_string | text, text | text + xml2 | public | xpath_table | text, text, text, text, text | SETOF record + xml2 | public | xslt_process | text, text | text + xml2 | public | xslt_process | text, text, text | text +(4708 rows) + +/* + +Monitor extension public table/view/matview/index interface + +*/ +select + e.extname as extension_name, + n.nspname as schema_name, + pc.relname as entity_name, + pa.attname +from + pg_catalog.pg_class pc + join pg_catalog.pg_namespace n + on n.oid = pc.relnamespace + join pg_catalog.pg_depend d + on d.objid = pc.oid + join pg_catalog.pg_extension e + on e.oid = d.refobjid + left join pg_catalog.pg_attribute pa + on pa.attrelid = pc.oid + and pa.attnum > 0 + and not pa.attisdropped +where + d.deptype = 'e' + and pc.relkind in ('r', 'v', 'm', 'i') +order by + e.extname, + n.nspname, + pc.relname, + pa.attname; + extension_name | schema_name | entity_name | attname +------------------------------+-------------+-------------------------+------------------------ + address_standardizer_data_us | public | us_gaz | id + address_standardizer_data_us | public | us_gaz | is_custom + address_standardizer_data_us | public | us_gaz | seq + address_standardizer_data_us | public | us_gaz | stdword + address_standardizer_data_us | public | us_gaz | token + address_standardizer_data_us | public | us_gaz | word + address_standardizer_data_us | public | us_lex | id + address_standardizer_data_us | public | us_lex | is_custom + address_standardizer_data_us | public | us_lex | seq + address_standardizer_data_us | public | us_lex | stdword + address_standardizer_data_us | public | us_lex | token + address_standardizer_data_us | public | us_lex | word + address_standardizer_data_us | public | us_rules | id + address_standardizer_data_us | public | us_rules | is_custom + address_standardizer_data_us | public | us_rules | rule + hypopg | public | hypopg_hidden_indexes | am_name + hypopg | public | hypopg_hidden_indexes | index_name + hypopg | public | hypopg_hidden_indexes | indexrelid + hypopg | public | hypopg_hidden_indexes | is_hypo + hypopg | public | hypopg_hidden_indexes | schema_name + hypopg | public | hypopg_hidden_indexes | table_name + hypopg | public | hypopg_list_indexes | am_name + hypopg | public | hypopg_list_indexes | index_name + hypopg | public | hypopg_list_indexes | indexrelid + hypopg | public | hypopg_list_indexes | schema_name + hypopg | public | hypopg_list_indexes | table_name + pg_buffercache | public | pg_buffercache | bufferid + pg_buffercache | public | pg_buffercache | isdirty + pg_buffercache | public | pg_buffercache | pinning_backends + pg_buffercache | public | pg_buffercache | relblocknumber + pg_buffercache | public | pg_buffercache | reldatabase + pg_buffercache | public | pg_buffercache | relfilenode + pg_buffercache | public | pg_buffercache | relforknumber + pg_buffercache | public | pg_buffercache | reltablespace + pg_buffercache | public | pg_buffercache | usagecount + pg_net | net | _http_response | content + pg_net | net | _http_response | content_type + pg_net | net | _http_response | created + pg_net | net | _http_response | error_msg + pg_net | net | _http_response | headers + pg_net | net | _http_response | id + pg_net | net | _http_response | status_code + pg_net | net | _http_response | timed_out + pg_net | net | http_request_queue | body + pg_net | net | http_request_queue | headers + pg_net | net | http_request_queue | id + pg_net | net | http_request_queue | method + pg_net | net | http_request_queue | timeout_milliseconds + pg_net | net | http_request_queue | url + pg_repack | repack | primary_keys | indexrelid + pg_repack | repack | primary_keys | indrelid + pg_repack | repack | tables | alter_col_storage + pg_repack | repack | tables | ckey + pg_repack | repack | tables | ckid + pg_repack | repack | tables | copy_data + pg_repack | repack | tables | create_log + pg_repack | repack | tables | create_pktype + pg_repack | repack | tables | create_table + pg_repack | repack | tables | create_trigger + pg_repack | repack | tables | delete_log + pg_repack | repack | tables | drop_columns + pg_repack | repack | tables | enable_trigger + pg_repack | repack | tables | lock_table + pg_repack | repack | tables | pkid + pg_repack | repack | tables | relid + pg_repack | repack | tables | relname + pg_repack | repack | tables | reltoastidxid + pg_repack | repack | tables | reltoastrelid + pg_repack | repack | tables | schemaname + pg_repack | repack | tables | sql_delete + pg_repack | repack | tables | sql_insert + pg_repack | repack | tables | sql_peek + pg_repack | repack | tables | sql_pop + pg_repack | repack | tables | sql_update + pg_repack | repack | tables | tablespace_orig + pg_stat_monitor | public | pg_stat_monitor | application_name + pg_stat_monitor | public | pg_stat_monitor | bucket + pg_stat_monitor | public | pg_stat_monitor | bucket_done + pg_stat_monitor | public | pg_stat_monitor | bucket_start_time + pg_stat_monitor | public | pg_stat_monitor | calls + pg_stat_monitor | public | pg_stat_monitor | client_ip + pg_stat_monitor | public | pg_stat_monitor | cmd_type + pg_stat_monitor | public | pg_stat_monitor | cmd_type_text + pg_stat_monitor | public | pg_stat_monitor | comments + pg_stat_monitor | public | pg_stat_monitor | cpu_sys_time + pg_stat_monitor | public | pg_stat_monitor | cpu_user_time + pg_stat_monitor | public | pg_stat_monitor | datname + pg_stat_monitor | public | pg_stat_monitor | dbid + pg_stat_monitor | public | pg_stat_monitor | elevel + pg_stat_monitor | public | pg_stat_monitor | jit_deform_count + pg_stat_monitor | public | pg_stat_monitor | jit_deform_time + pg_stat_monitor | public | pg_stat_monitor | jit_emission_count + pg_stat_monitor | public | pg_stat_monitor | jit_emission_time + pg_stat_monitor | public | pg_stat_monitor | jit_functions + pg_stat_monitor | public | pg_stat_monitor | jit_generation_time + pg_stat_monitor | public | pg_stat_monitor | jit_inlining_count + pg_stat_monitor | public | pg_stat_monitor | jit_inlining_time + pg_stat_monitor | public | pg_stat_monitor | jit_optimization_count + pg_stat_monitor | public | pg_stat_monitor | jit_optimization_time + pg_stat_monitor | public | pg_stat_monitor | local_blk_read_time + pg_stat_monitor | public | pg_stat_monitor | local_blk_write_time + pg_stat_monitor | public | pg_stat_monitor | local_blks_dirtied + pg_stat_monitor | public | pg_stat_monitor | local_blks_hit + pg_stat_monitor | public | pg_stat_monitor | local_blks_read + pg_stat_monitor | public | pg_stat_monitor | local_blks_written + pg_stat_monitor | public | pg_stat_monitor | max_exec_time + pg_stat_monitor | public | pg_stat_monitor | max_plan_time + pg_stat_monitor | public | pg_stat_monitor | mean_exec_time + pg_stat_monitor | public | pg_stat_monitor | mean_plan_time + pg_stat_monitor | public | pg_stat_monitor | message + pg_stat_monitor | public | pg_stat_monitor | min_exec_time + pg_stat_monitor | public | pg_stat_monitor | min_plan_time + pg_stat_monitor | public | pg_stat_monitor | minmax_stats_since + pg_stat_monitor | public | pg_stat_monitor | pgsm_query_id + pg_stat_monitor | public | pg_stat_monitor | planid + pg_stat_monitor | public | pg_stat_monitor | plans + pg_stat_monitor | public | pg_stat_monitor | query + pg_stat_monitor | public | pg_stat_monitor | query_plan + pg_stat_monitor | public | pg_stat_monitor | queryid + pg_stat_monitor | public | pg_stat_monitor | relations + pg_stat_monitor | public | pg_stat_monitor | resp_calls + pg_stat_monitor | public | pg_stat_monitor | rows + pg_stat_monitor | public | pg_stat_monitor | shared_blk_read_time + pg_stat_monitor | public | pg_stat_monitor | shared_blk_write_time + pg_stat_monitor | public | pg_stat_monitor | shared_blks_dirtied + pg_stat_monitor | public | pg_stat_monitor | shared_blks_hit + pg_stat_monitor | public | pg_stat_monitor | shared_blks_read + pg_stat_monitor | public | pg_stat_monitor | shared_blks_written + pg_stat_monitor | public | pg_stat_monitor | sqlcode + pg_stat_monitor | public | pg_stat_monitor | stats_since + pg_stat_monitor | public | pg_stat_monitor | stddev_exec_time + pg_stat_monitor | public | pg_stat_monitor | stddev_plan_time + pg_stat_monitor | public | pg_stat_monitor | temp_blk_read_time + pg_stat_monitor | public | pg_stat_monitor | temp_blk_write_time + pg_stat_monitor | public | pg_stat_monitor | temp_blks_read + pg_stat_monitor | public | pg_stat_monitor | temp_blks_written + pg_stat_monitor | public | pg_stat_monitor | top_query + pg_stat_monitor | public | pg_stat_monitor | top_queryid + pg_stat_monitor | public | pg_stat_monitor | toplevel + pg_stat_monitor | public | pg_stat_monitor | total_exec_time + pg_stat_monitor | public | pg_stat_monitor | total_plan_time + pg_stat_monitor | public | pg_stat_monitor | userid + pg_stat_monitor | public | pg_stat_monitor | username + pg_stat_monitor | public | pg_stat_monitor | wal_bytes + pg_stat_monitor | public | pg_stat_monitor | wal_fpi + pg_stat_monitor | public | pg_stat_monitor | wal_records + pg_stat_statements | extensions | pg_stat_statements | calls + pg_stat_statements | extensions | pg_stat_statements | dbid + pg_stat_statements | extensions | pg_stat_statements | jit_deform_count + pg_stat_statements | extensions | pg_stat_statements | jit_deform_time + pg_stat_statements | extensions | pg_stat_statements | jit_emission_count + pg_stat_statements | extensions | pg_stat_statements | jit_emission_time + pg_stat_statements | extensions | pg_stat_statements | jit_functions + pg_stat_statements | extensions | pg_stat_statements | jit_generation_time + pg_stat_statements | extensions | pg_stat_statements | jit_inlining_count + pg_stat_statements | extensions | pg_stat_statements | jit_inlining_time + pg_stat_statements | extensions | pg_stat_statements | jit_optimization_count + pg_stat_statements | extensions | pg_stat_statements | jit_optimization_time + pg_stat_statements | extensions | pg_stat_statements | local_blk_read_time + pg_stat_statements | extensions | pg_stat_statements | local_blk_write_time + pg_stat_statements | extensions | pg_stat_statements | local_blks_dirtied + pg_stat_statements | extensions | pg_stat_statements | local_blks_hit + pg_stat_statements | extensions | pg_stat_statements | local_blks_read + pg_stat_statements | extensions | pg_stat_statements | local_blks_written + pg_stat_statements | extensions | pg_stat_statements | max_exec_time + pg_stat_statements | extensions | pg_stat_statements | max_plan_time + pg_stat_statements | extensions | pg_stat_statements | mean_exec_time + pg_stat_statements | extensions | pg_stat_statements | mean_plan_time + pg_stat_statements | extensions | pg_stat_statements | min_exec_time + pg_stat_statements | extensions | pg_stat_statements | min_plan_time + pg_stat_statements | extensions | pg_stat_statements | minmax_stats_since + pg_stat_statements | extensions | pg_stat_statements | plans + pg_stat_statements | extensions | pg_stat_statements | query + pg_stat_statements | extensions | pg_stat_statements | queryid + pg_stat_statements | extensions | pg_stat_statements | rows + pg_stat_statements | extensions | pg_stat_statements | shared_blk_read_time + pg_stat_statements | extensions | pg_stat_statements | shared_blk_write_time + pg_stat_statements | extensions | pg_stat_statements | shared_blks_dirtied + pg_stat_statements | extensions | pg_stat_statements | shared_blks_hit + pg_stat_statements | extensions | pg_stat_statements | shared_blks_read + pg_stat_statements | extensions | pg_stat_statements | shared_blks_written + pg_stat_statements | extensions | pg_stat_statements | stats_since + pg_stat_statements | extensions | pg_stat_statements | stddev_exec_time + pg_stat_statements | extensions | pg_stat_statements | stddev_plan_time + pg_stat_statements | extensions | pg_stat_statements | temp_blk_read_time + pg_stat_statements | extensions | pg_stat_statements | temp_blk_write_time + pg_stat_statements | extensions | pg_stat_statements | temp_blks_read + pg_stat_statements | extensions | pg_stat_statements | temp_blks_written + pg_stat_statements | extensions | pg_stat_statements | toplevel + pg_stat_statements | extensions | pg_stat_statements | total_exec_time + pg_stat_statements | extensions | pg_stat_statements | total_plan_time + pg_stat_statements | extensions | pg_stat_statements | userid + pg_stat_statements | extensions | pg_stat_statements | wal_bytes + pg_stat_statements | extensions | pg_stat_statements | wal_fpi + pg_stat_statements | extensions | pg_stat_statements | wal_records + pg_stat_statements | extensions | pg_stat_statements_info | dealloc + pg_stat_statements | extensions | pg_stat_statements_info | stats_reset + pg_tle | pgtle | feature_info | feature + pg_tle | pgtle | feature_info | obj_identity + pg_tle | pgtle | feature_info | proname + pg_tle | pgtle | feature_info | schema_name + pgmq | pgmq | a_foo | archived_at + pgmq | pgmq | a_foo | enqueued_at + pgmq | pgmq | a_foo | message + pgmq | pgmq | a_foo | msg_id + pgmq | pgmq | a_foo | read_ct + pgmq | pgmq | a_foo | vt + pgmq | pgmq | meta | created_at + pgmq | pgmq | meta | is_partitioned + pgmq | pgmq | meta | is_unlogged + pgmq | pgmq | meta | queue_name + pgmq | pgmq | q_foo | enqueued_at + pgmq | pgmq | q_foo | message + pgmq | pgmq | q_foo | msg_id + pgmq | pgmq | q_foo | read_ct + pgmq | pgmq | q_foo | vt + pgsodium | pgsodium | decrypted_key | associated_data + pgsodium | pgsodium | decrypted_key | comment + pgsodium | pgsodium | decrypted_key | created + pgsodium | pgsodium | decrypted_key | decrypted_raw_key + pgsodium | pgsodium | decrypted_key | expires + pgsodium | pgsodium | decrypted_key | id + pgsodium | pgsodium | decrypted_key | key_context + pgsodium | pgsodium | decrypted_key | key_id + pgsodium | pgsodium | decrypted_key | key_type + pgsodium | pgsodium | decrypted_key | name + pgsodium | pgsodium | decrypted_key | parent_key + pgsodium | pgsodium | decrypted_key | raw_key + pgsodium | pgsodium | decrypted_key | raw_key_nonce + pgsodium | pgsodium | decrypted_key | status + pgsodium | pgsodium | key | associated_data + pgsodium | pgsodium | key | comment + pgsodium | pgsodium | key | created + pgsodium | pgsodium | key | expires + pgsodium | pgsodium | key | id + pgsodium | pgsodium | key | key_context + pgsodium | pgsodium | key | key_id + pgsodium | pgsodium | key | key_type + pgsodium | pgsodium | key | name + pgsodium | pgsodium | key | parent_key + pgsodium | pgsodium | key | raw_key + pgsodium | pgsodium | key | raw_key_nonce + pgsodium | pgsodium | key | status + pgsodium | pgsodium | key | user_data + pgsodium | pgsodium | mask_columns | associated_columns + pgsodium | pgsodium | mask_columns | attname + pgsodium | pgsodium | mask_columns | attrelid + pgsodium | pgsodium | mask_columns | format_type + pgsodium | pgsodium | mask_columns | key_id + pgsodium | pgsodium | mask_columns | key_id_column + pgsodium | pgsodium | mask_columns | nonce_column + pgsodium | pgsodium | masking_rule | associated_columns + pgsodium | pgsodium | masking_rule | attname + pgsodium | pgsodium | masking_rule | attnum + pgsodium | pgsodium | masking_rule | attrelid + pgsodium | pgsodium | masking_rule | col_description + pgsodium | pgsodium | masking_rule | format_type + pgsodium | pgsodium | masking_rule | key_id + pgsodium | pgsodium | masking_rule | key_id_column + pgsodium | pgsodium | masking_rule | nonce_column + pgsodium | pgsodium | masking_rule | priority + pgsodium | pgsodium | masking_rule | relname + pgsodium | pgsodium | masking_rule | relnamespace + pgsodium | pgsodium | masking_rule | security_invoker + pgsodium | pgsodium | masking_rule | view_name + pgsodium | pgsodium | valid_key | associated_data + pgsodium | pgsodium | valid_key | created + pgsodium | pgsodium | valid_key | expires + pgsodium | pgsodium | valid_key | id + pgsodium | pgsodium | valid_key | key_context + pgsodium | pgsodium | valid_key | key_id + pgsodium | pgsodium | valid_key | key_type + pgsodium | pgsodium | valid_key | name + pgsodium | pgsodium | valid_key | status + pgtap | public | pg_all_foreign_keys | fk_columns + pgtap | public | pg_all_foreign_keys | fk_constraint_name + pgtap | public | pg_all_foreign_keys | fk_schema_name + pgtap | public | pg_all_foreign_keys | fk_table_name + pgtap | public | pg_all_foreign_keys | fk_table_oid + pgtap | public | pg_all_foreign_keys | is_deferrable + pgtap | public | pg_all_foreign_keys | is_deferred + pgtap | public | pg_all_foreign_keys | match_type + pgtap | public | pg_all_foreign_keys | on_delete + pgtap | public | pg_all_foreign_keys | on_update + pgtap | public | pg_all_foreign_keys | pk_columns + pgtap | public | pg_all_foreign_keys | pk_constraint_name + pgtap | public | pg_all_foreign_keys | pk_index_name + pgtap | public | pg_all_foreign_keys | pk_schema_name + pgtap | public | pg_all_foreign_keys | pk_table_name + pgtap | public | pg_all_foreign_keys | pk_table_oid + pgtap | public | tap_funky | args + pgtap | public | tap_funky | is_definer + pgtap | public | tap_funky | is_strict + pgtap | public | tap_funky | is_visible + pgtap | public | tap_funky | kind + pgtap | public | tap_funky | langoid + pgtap | public | tap_funky | name + pgtap | public | tap_funky | oid + pgtap | public | tap_funky | owner + pgtap | public | tap_funky | returns + pgtap | public | tap_funky | returns_set + pgtap | public | tap_funky | schema + pgtap | public | tap_funky | volatility + postgis | public | geography_columns | coord_dimension + postgis | public | geography_columns | f_geography_column + postgis | public | geography_columns | f_table_catalog + postgis | public | geography_columns | f_table_name + postgis | public | geography_columns | f_table_schema + postgis | public | geography_columns | srid + postgis | public | geography_columns | type + postgis | public | geometry_columns | coord_dimension + postgis | public | geometry_columns | f_geometry_column + postgis | public | geometry_columns | f_table_catalog + postgis | public | geometry_columns | f_table_name + postgis | public | geometry_columns | f_table_schema + postgis | public | geometry_columns | srid + postgis | public | geometry_columns | type + postgis | public | spatial_ref_sys | auth_name + postgis | public | spatial_ref_sys | auth_srid + postgis | public | spatial_ref_sys | proj4text + postgis | public | spatial_ref_sys | srid + postgis | public | spatial_ref_sys | srtext + postgis_raster | public | raster_columns | blocksize_x + postgis_raster | public | raster_columns | blocksize_y + postgis_raster | public | raster_columns | extent + postgis_raster | public | raster_columns | nodata_values + postgis_raster | public | raster_columns | num_bands + postgis_raster | public | raster_columns | out_db + postgis_raster | public | raster_columns | pixel_types + postgis_raster | public | raster_columns | r_raster_column + postgis_raster | public | raster_columns | r_table_catalog + postgis_raster | public | raster_columns | r_table_name + postgis_raster | public | raster_columns | r_table_schema + postgis_raster | public | raster_columns | regular_blocking + postgis_raster | public | raster_columns | same_alignment + postgis_raster | public | raster_columns | scale_x + postgis_raster | public | raster_columns | scale_y + postgis_raster | public | raster_columns | spatial_index + postgis_raster | public | raster_columns | srid + postgis_raster | public | raster_overviews | o_raster_column + postgis_raster | public | raster_overviews | o_table_catalog + postgis_raster | public | raster_overviews | o_table_name + postgis_raster | public | raster_overviews | o_table_schema + postgis_raster | public | raster_overviews | overview_factor + postgis_raster | public | raster_overviews | r_raster_column + postgis_raster | public | raster_overviews | r_table_catalog + postgis_raster | public | raster_overviews | r_table_name + postgis_raster | public | raster_overviews | r_table_schema + postgis_topology | topology | layer | child_id + postgis_topology | topology | layer | feature_column + postgis_topology | topology | layer | feature_type + postgis_topology | topology | layer | layer_id + postgis_topology | topology | layer | level + postgis_topology | topology | layer | schema_name + postgis_topology | topology | layer | table_name + postgis_topology | topology | layer | topology_id + postgis_topology | topology | topology | hasz + postgis_topology | topology | topology | id + postgis_topology | topology | topology | name + postgis_topology | topology | topology | precision + postgis_topology | topology | topology | srid + supabase_vault | vault | decrypted_secrets | created_at + supabase_vault | vault | decrypted_secrets | decrypted_secret + supabase_vault | vault | decrypted_secrets | description + supabase_vault | vault | decrypted_secrets | id + supabase_vault | vault | decrypted_secrets | key_id + supabase_vault | vault | decrypted_secrets | name + supabase_vault | vault | decrypted_secrets | nonce + supabase_vault | vault | decrypted_secrets | secret + supabase_vault | vault | decrypted_secrets | updated_at + supabase_vault | vault | secrets | created_at + supabase_vault | vault | secrets | description + supabase_vault | vault | secrets | id + supabase_vault | vault | secrets | key_id + supabase_vault | vault | secrets | name + supabase_vault | vault | secrets | nonce + supabase_vault | vault | secrets | secret + supabase_vault | vault | secrets | updated_at + wrappers | public | wrappers_fdw_stats | bytes_in + wrappers | public | wrappers_fdw_stats | bytes_out + wrappers | public | wrappers_fdw_stats | create_times + wrappers | public | wrappers_fdw_stats | created_at + wrappers | public | wrappers_fdw_stats | fdw_name + wrappers | public | wrappers_fdw_stats | metadata + wrappers | public | wrappers_fdw_stats | rows_in + wrappers | public | wrappers_fdw_stats | rows_out + wrappers | public | wrappers_fdw_stats | updated_at +(387 rows) + diff --git a/nix/tests/expected/z_17_pg_stat_monitor.out b/nix/tests/expected/z_17_pg_stat_monitor.out new file mode 100644 index 000000000..8b90c12fc --- /dev/null +++ b/nix/tests/expected/z_17_pg_stat_monitor.out @@ -0,0 +1,10 @@ +select + * +from + pg_stat_monitor +where + false; + bucket | bucket_start_time | userid | username | dbid | datname | client_ip | pgsm_query_id | queryid | toplevel | top_queryid | query | comments | planid | query_plan | top_query | application_name | relations | cmd_type | cmd_type_text | elevel | sqlcode | message | calls | total_exec_time | min_exec_time | max_exec_time | mean_exec_time | stddev_exec_time | rows | shared_blks_hit | shared_blks_read | shared_blks_dirtied | shared_blks_written | local_blks_hit | local_blks_read | local_blks_dirtied | local_blks_written | temp_blks_read | temp_blks_written | shared_blk_read_time | shared_blk_write_time | local_blk_read_time | local_blk_write_time | temp_blk_read_time | temp_blk_write_time | resp_calls | cpu_user_time | cpu_sys_time | wal_records | wal_fpi | wal_bytes | bucket_done | plans | total_plan_time | min_plan_time | max_plan_time | mean_plan_time | stddev_plan_time | jit_functions | jit_generation_time | jit_inlining_count | jit_inlining_time | jit_optimization_count | jit_optimization_time | jit_emission_count | jit_emission_time | jit_deform_count | jit_deform_time | stats_since | minmax_stats_since +--------+-------------------+--------+----------+------+---------+-----------+---------------+---------+----------+-------------+-------+----------+--------+------------+-----------+------------------+-----------+----------+---------------+--------+---------+---------+-------+-----------------+---------------+---------------+----------------+------------------+------+-----------------+------------------+---------------------+---------------------+----------------+-----------------+--------------------+--------------------+----------------+-------------------+----------------------+-----------------------+---------------------+----------------------+--------------------+---------------------+------------+---------------+--------------+-------------+---------+-----------+-------------+-------+-----------------+---------------+---------------+----------------+------------------+---------------+---------------------+--------------------+-------------------+------------------------+-----------------------+--------------------+-------------------+------------------+-----------------+-------------+-------------------- +(0 rows) + diff --git a/nix/tests/expected/z_17_pgvector.out b/nix/tests/expected/z_17_pgvector.out new file mode 100644 index 000000000..2c1cb1007 --- /dev/null +++ b/nix/tests/expected/z_17_pgvector.out @@ -0,0 +1,59 @@ +/* +This test excludes indexes shipped with pgvector because orioledb doesn't support them yet +*/ +create schema v; +create table v.items( + id serial primary key, + embedding vector(3), + half_embedding halfvec(3), + bit_embedding bit(3), + sparse_embedding sparsevec(3) +); +-- Populate some records +insert into v.items( + embedding, + half_embedding, + bit_embedding, + sparse_embedding +) +values + ('[1,2,3]', '[1,2,3]', '101', '{1:4}/3'), + ('[2,3,4]', '[2,3,4]', '010', '{1:7,3:0}/3'); +-- Test op types +select + * +from + v.items +order by + embedding <-> '[2,3,5]', + embedding <=> '[2,3,5]', + embedding <+> '[2,3,5]', + embedding <#> '[2,3,5]', + half_embedding <-> '[2,3,5]', + half_embedding <=> '[2,3,5]', + half_embedding <+> '[2,3,5]', + half_embedding <#> '[2,3,5]', + sparse_embedding <-> '{2:4,3:1}/3', + sparse_embedding <=> '{2:4,3:1}/3', + sparse_embedding <+> '{2:4,3:1}/3', + sparse_embedding <#> '{2:4,3:1}/3', + bit_embedding <~> '011'; + id | embedding | half_embedding | bit_embedding | sparse_embedding +----+-----------+----------------+---------------+------------------ + 2 | [2,3,4] | [2,3,4] | 010 | {1:7}/3 + 1 | [1,2,3] | [1,2,3] | 101 | {1:4}/3 +(2 rows) + +select + avg(embedding), + avg(half_embedding) +from + v.items; + avg | avg +---------------+--------------- + [1.5,2.5,3.5] | [1.5,2.5,3.5] +(1 row) + +-- Cleanup +drop schema v cascade; +NOTICE: drop cascades to table v.items diff --git a/nix/tests/expected/z_orioledb-17_ext_interface.out b/nix/tests/expected/z_orioledb-17_ext_interface.out new file mode 100644 index 000000000..f7750f849 --- /dev/null +++ b/nix/tests/expected/z_orioledb-17_ext_interface.out @@ -0,0 +1,5290 @@ +/* + +The purpose of this test is to monitor the SQL interface exposed +by Postgres extensions so we have to manually review/approve any difference +that emerge as versions change. + +*/ +/* + +List all extensions that are not enabled +If a new entry shows up in this list, that means a new extension has been +added and you should `create extension ...` to enable it in ./nix/tests/prime + +*/ +select + name +from + pg_available_extensions +where + installed_version is null +order by + name asc; + name +------------------------ + pg_cron + pgjwt + postgis_tiger_geocoder + tsm_system_time +(4 rows) + +/* + +Monitor relocatability and config of each extension +- lesson learned from pg_cron + +*/ +select + extname as extension_name, + extrelocatable as is_relocatable +from + pg_extension +order by + extname asc; + extension_name | is_relocatable +------------------------------+---------------- + address_standardizer | t + address_standardizer_data_us | t + amcheck | t + autoinc | t + bloom | t + btree_gin | t + btree_gist | t + citext | t + cube | t + dblink | t + dict_int | t + dict_xsyn | t + earthdistance | t + file_fdw | t + fuzzystrmatch | t + hstore | t + http | f + hypopg | t + index_advisor | t + insert_username | t + intagg | t + intarray | t + isn | t + lo | t + ltree | t + moddatetime | t + pageinspect | t + pg_buffercache | t + pg_freespacemap | t + pg_graphql | f + pg_hashids | t + pg_jsonschema | f + pg_net | f + pg_prewarm | t + pg_repack | f + pg_stat_monitor | t + pg_stat_statements | t + pg_surgery | t + pg_tle | f + pg_trgm | t + pg_visibility | t + pg_walinspect | t + pgaudit | t + pgcrypto | t + pgmq | f + pgroonga | f + pgroonga_database | f + pgrouting | t + pgrowlocks | t + pgsodium | f + pgstattuple | t + pgtap | t + plpgsql | f + plpgsql_check | f + postgis | f + postgis_raster | f + postgis_sfcgal | t + postgis_topology | f + postgres_fdw | t + refint | t + rum | t + seg | t + sslinfo | t + supabase_vault | f + tablefunc | t + tcn | t + tsm_system_rows | t + unaccent | t + uuid-ossp | t + vector | t + wrappers | f + xml2 | f +(72 rows) + +/* + +Monitor extension public function interface + +*/ +select + e.extname as extension_name, + n.nspname as schema_name, + p.proname as function_name, + pg_catalog.pg_get_function_identity_arguments(p.oid) as argument_types, + pg_catalog.pg_get_function_result(p.oid) as return_type +from + pg_catalog.pg_proc p + join pg_catalog.pg_namespace n + on n.oid = p.pronamespace + join pg_catalog.pg_depend d + on d.objid = p.oid + join pg_catalog.pg_extension e + on e.oid = d.refobjid +where + d.deptype = 'e' + -- Filter out changes between pg15 and pg16 from extensions that ship with postgres + -- new in pg16 + and not (e.extname = 'fuzzystrmatch' and p.proname = 'daitch_mokotoff') + and not (e.extname = 'pageinspect' and p.proname = 'bt_multi_page_stats') + and not (e.extname = 'pg_buffercache' and p.proname = 'pg_buffercache_summary') + and not (e.extname = 'pg_buffercache' and p.proname = 'pg_buffercache_usage_counts') + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_block_info') + -- removed in pg16 + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_records_info_till_end_of_wal') + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_stats_till_end_of_wal') + -- changed in pg16 - output signature added a column + and not (e.extname = 'pageinspect' and p.proname = 'brin_page_items') +order by + e.extname, + n.nspname, + p.proname, + md5(pg_catalog.pg_get_function_identity_arguments(p.oid)); + extension_name | schema_name | function_name | argument_types | return_type +----------------------+----------------+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + address_standardizer | public | parse_address | text, OUT num text, OUT street text, OUT street2 text, OUT address1 text, OUT city text, OUT state text, OUT zip text, OUT zipplus text, OUT country text | record + address_standardizer | public | standardize_address | lextab text, gaztab text, rultab text, address text | stdaddr + address_standardizer | public | standardize_address | lextab text, gaztab text, rultab text, micro text, macro text | stdaddr + amcheck | public | bt_index_check | index regclass | void + amcheck | public | bt_index_check | index regclass, heapallindexed boolean, checkunique boolean | void + amcheck | public | bt_index_check | index regclass, heapallindexed boolean | void + amcheck | public | bt_index_parent_check | index regclass | void + amcheck | public | bt_index_parent_check | index regclass, heapallindexed boolean, rootdescend boolean, checkunique boolean | void + amcheck | public | bt_index_parent_check | index regclass, heapallindexed boolean | void + amcheck | public | bt_index_parent_check | index regclass, heapallindexed boolean, rootdescend boolean | void + amcheck | public | verify_heapam | relation regclass, on_error_stop boolean, check_toast boolean, skip text, startblock bigint, endblock bigint, OUT blkno bigint, OUT offnum integer, OUT attnum integer, OUT msg text | SETOF record + autoinc | public | autoinc | | trigger + bloom | public | blhandler | internal | index_am_handler + btree_gin | public | gin_btree_consistent | internal, smallint, anyelement, integer, internal, internal | boolean + btree_gin | public | gin_compare_prefix_anyenum | anyenum, anyenum, smallint, internal | integer + btree_gin | public | gin_compare_prefix_bit | bit, bit, smallint, internal | integer + btree_gin | public | gin_compare_prefix_bool | boolean, boolean, smallint, internal | integer + btree_gin | public | gin_compare_prefix_bpchar | character, character, smallint, internal | integer + btree_gin | public | gin_compare_prefix_bytea | bytea, bytea, smallint, internal | integer + btree_gin | public | gin_compare_prefix_char | "char", "char", smallint, internal | integer + btree_gin | public | gin_compare_prefix_cidr | cidr, cidr, smallint, internal | integer + btree_gin | public | gin_compare_prefix_date | date, date, smallint, internal | integer + btree_gin | public | gin_compare_prefix_float4 | real, real, smallint, internal | integer + btree_gin | public | gin_compare_prefix_float8 | double precision, double precision, smallint, internal | integer + btree_gin | public | gin_compare_prefix_inet | inet, inet, smallint, internal | integer + btree_gin | public | gin_compare_prefix_int2 | smallint, smallint, smallint, internal | integer + btree_gin | public | gin_compare_prefix_int4 | integer, integer, smallint, internal | integer + btree_gin | public | gin_compare_prefix_int8 | bigint, bigint, smallint, internal | integer + btree_gin | public | gin_compare_prefix_interval | interval, interval, smallint, internal | integer + btree_gin | public | gin_compare_prefix_macaddr | macaddr, macaddr, smallint, internal | integer + btree_gin | public | gin_compare_prefix_macaddr8 | macaddr8, macaddr8, smallint, internal | integer + btree_gin | public | gin_compare_prefix_money | money, money, smallint, internal | integer + btree_gin | public | gin_compare_prefix_name | name, name, smallint, internal | integer + btree_gin | public | gin_compare_prefix_numeric | numeric, numeric, smallint, internal | integer + btree_gin | public | gin_compare_prefix_oid | oid, oid, smallint, internal | integer + btree_gin | public | gin_compare_prefix_text | text, text, smallint, internal | integer + btree_gin | public | gin_compare_prefix_time | time without time zone, time without time zone, smallint, internal | integer + btree_gin | public | gin_compare_prefix_timestamp | timestamp without time zone, timestamp without time zone, smallint, internal | integer + btree_gin | public | gin_compare_prefix_timestamptz | timestamp with time zone, timestamp with time zone, smallint, internal | integer + btree_gin | public | gin_compare_prefix_timetz | time with time zone, time with time zone, smallint, internal | integer + btree_gin | public | gin_compare_prefix_uuid | uuid, uuid, smallint, internal | integer + btree_gin | public | gin_compare_prefix_varbit | bit varying, bit varying, smallint, internal | integer + btree_gin | public | gin_enum_cmp | anyenum, anyenum | integer + btree_gin | public | gin_extract_query_anyenum | anyenum, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_bit | bit, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_bool | boolean, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_bpchar | character, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_bytea | bytea, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_char | "char", internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_cidr | cidr, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_date | date, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_float4 | real, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_float8 | double precision, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_inet | inet, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_int2 | smallint, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_int4 | integer, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_int8 | bigint, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_interval | interval, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_macaddr | macaddr, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_macaddr8 | macaddr8, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_money | money, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_name | name, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_numeric | numeric, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_oid | oid, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_text | text, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_time | time without time zone, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_timestamp | timestamp without time zone, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_timestamptz | timestamp with time zone, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_timetz | time with time zone, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_uuid | uuid, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_query_varbit | bit varying, internal, smallint, internal, internal | internal + btree_gin | public | gin_extract_value_anyenum | anyenum, internal | internal + btree_gin | public | gin_extract_value_bit | bit, internal | internal + btree_gin | public | gin_extract_value_bool | boolean, internal | internal + btree_gin | public | gin_extract_value_bpchar | character, internal | internal + btree_gin | public | gin_extract_value_bytea | bytea, internal | internal + btree_gin | public | gin_extract_value_char | "char", internal | internal + btree_gin | public | gin_extract_value_cidr | cidr, internal | internal + btree_gin | public | gin_extract_value_date | date, internal | internal + btree_gin | public | gin_extract_value_float4 | real, internal | internal + btree_gin | public | gin_extract_value_float8 | double precision, internal | internal + btree_gin | public | gin_extract_value_inet | inet, internal | internal + btree_gin | public | gin_extract_value_int2 | smallint, internal | internal + btree_gin | public | gin_extract_value_int4 | integer, internal | internal + btree_gin | public | gin_extract_value_int8 | bigint, internal | internal + btree_gin | public | gin_extract_value_interval | interval, internal | internal + btree_gin | public | gin_extract_value_macaddr | macaddr, internal | internal + btree_gin | public | gin_extract_value_macaddr8 | macaddr8, internal | internal + btree_gin | public | gin_extract_value_money | money, internal | internal + btree_gin | public | gin_extract_value_name | name, internal | internal + btree_gin | public | gin_extract_value_numeric | numeric, internal | internal + btree_gin | public | gin_extract_value_oid | oid, internal | internal + btree_gin | public | gin_extract_value_text | text, internal | internal + btree_gin | public | gin_extract_value_time | time without time zone, internal | internal + btree_gin | public | gin_extract_value_timestamp | timestamp without time zone, internal | internal + btree_gin | public | gin_extract_value_timestamptz | timestamp with time zone, internal | internal + btree_gin | public | gin_extract_value_timetz | time with time zone, internal | internal + btree_gin | public | gin_extract_value_uuid | uuid, internal | internal + btree_gin | public | gin_extract_value_varbit | bit varying, internal | internal + btree_gin | public | gin_numeric_cmp | numeric, numeric | integer + btree_gist | public | cash_dist | money, money | money + btree_gist | public | date_dist | date, date | integer + btree_gist | public | float4_dist | real, real | real + btree_gist | public | float8_dist | double precision, double precision | double precision + btree_gist | public | gbt_bit_compress | internal | internal + btree_gist | public | gbt_bit_consistent | internal, bit, smallint, oid, internal | boolean + btree_gist | public | gbt_bit_penalty | internal, internal, internal | internal + btree_gist | public | gbt_bit_picksplit | internal, internal | internal + btree_gist | public | gbt_bit_same | gbtreekey_var, gbtreekey_var, internal | internal + btree_gist | public | gbt_bit_union | internal, internal | gbtreekey_var + btree_gist | public | gbt_bool_compress | internal | internal + btree_gist | public | gbt_bool_consistent | internal, boolean, smallint, oid, internal | boolean + btree_gist | public | gbt_bool_fetch | internal | internal + btree_gist | public | gbt_bool_penalty | internal, internal, internal | internal + btree_gist | public | gbt_bool_picksplit | internal, internal | internal + btree_gist | public | gbt_bool_same | gbtreekey2, gbtreekey2, internal | internal + btree_gist | public | gbt_bool_union | internal, internal | gbtreekey2 + btree_gist | public | gbt_bpchar_compress | internal | internal + btree_gist | public | gbt_bpchar_consistent | internal, character, smallint, oid, internal | boolean + btree_gist | public | gbt_bytea_compress | internal | internal + btree_gist | public | gbt_bytea_consistent | internal, bytea, smallint, oid, internal | boolean + btree_gist | public | gbt_bytea_penalty | internal, internal, internal | internal + btree_gist | public | gbt_bytea_picksplit | internal, internal | internal + btree_gist | public | gbt_bytea_same | gbtreekey_var, gbtreekey_var, internal | internal + btree_gist | public | gbt_bytea_union | internal, internal | gbtreekey_var + btree_gist | public | gbt_cash_compress | internal | internal + btree_gist | public | gbt_cash_consistent | internal, money, smallint, oid, internal | boolean + btree_gist | public | gbt_cash_distance | internal, money, smallint, oid, internal | double precision + btree_gist | public | gbt_cash_fetch | internal | internal + btree_gist | public | gbt_cash_penalty | internal, internal, internal | internal + btree_gist | public | gbt_cash_picksplit | internal, internal | internal + btree_gist | public | gbt_cash_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_cash_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_date_compress | internal | internal + btree_gist | public | gbt_date_consistent | internal, date, smallint, oid, internal | boolean + btree_gist | public | gbt_date_distance | internal, date, smallint, oid, internal | double precision + btree_gist | public | gbt_date_fetch | internal | internal + btree_gist | public | gbt_date_penalty | internal, internal, internal | internal + btree_gist | public | gbt_date_picksplit | internal, internal | internal + btree_gist | public | gbt_date_same | gbtreekey8, gbtreekey8, internal | internal + btree_gist | public | gbt_date_union | internal, internal | gbtreekey8 + btree_gist | public | gbt_decompress | internal | internal + btree_gist | public | gbt_enum_compress | internal | internal + btree_gist | public | gbt_enum_consistent | internal, anyenum, smallint, oid, internal | boolean + btree_gist | public | gbt_enum_fetch | internal | internal + btree_gist | public | gbt_enum_penalty | internal, internal, internal | internal + btree_gist | public | gbt_enum_picksplit | internal, internal | internal + btree_gist | public | gbt_enum_same | gbtreekey8, gbtreekey8, internal | internal + btree_gist | public | gbt_enum_union | internal, internal | gbtreekey8 + btree_gist | public | gbt_float4_compress | internal | internal + btree_gist | public | gbt_float4_consistent | internal, real, smallint, oid, internal | boolean + btree_gist | public | gbt_float4_distance | internal, real, smallint, oid, internal | double precision + btree_gist | public | gbt_float4_fetch | internal | internal + btree_gist | public | gbt_float4_penalty | internal, internal, internal | internal + btree_gist | public | gbt_float4_picksplit | internal, internal | internal + btree_gist | public | gbt_float4_same | gbtreekey8, gbtreekey8, internal | internal + btree_gist | public | gbt_float4_union | internal, internal | gbtreekey8 + btree_gist | public | gbt_float8_compress | internal | internal + btree_gist | public | gbt_float8_consistent | internal, double precision, smallint, oid, internal | boolean + btree_gist | public | gbt_float8_distance | internal, double precision, smallint, oid, internal | double precision + btree_gist | public | gbt_float8_fetch | internal | internal + btree_gist | public | gbt_float8_penalty | internal, internal, internal | internal + btree_gist | public | gbt_float8_picksplit | internal, internal | internal + btree_gist | public | gbt_float8_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_float8_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_inet_compress | internal | internal + btree_gist | public | gbt_inet_consistent | internal, inet, smallint, oid, internal | boolean + btree_gist | public | gbt_inet_penalty | internal, internal, internal | internal + btree_gist | public | gbt_inet_picksplit | internal, internal | internal + btree_gist | public | gbt_inet_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_inet_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_int2_compress | internal | internal + btree_gist | public | gbt_int2_consistent | internal, smallint, smallint, oid, internal | boolean + btree_gist | public | gbt_int2_distance | internal, smallint, smallint, oid, internal | double precision + btree_gist | public | gbt_int2_fetch | internal | internal + btree_gist | public | gbt_int2_penalty | internal, internal, internal | internal + btree_gist | public | gbt_int2_picksplit | internal, internal | internal + btree_gist | public | gbt_int2_same | gbtreekey4, gbtreekey4, internal | internal + btree_gist | public | gbt_int2_union | internal, internal | gbtreekey4 + btree_gist | public | gbt_int4_compress | internal | internal + btree_gist | public | gbt_int4_consistent | internal, integer, smallint, oid, internal | boolean + btree_gist | public | gbt_int4_distance | internal, integer, smallint, oid, internal | double precision + btree_gist | public | gbt_int4_fetch | internal | internal + btree_gist | public | gbt_int4_penalty | internal, internal, internal | internal + btree_gist | public | gbt_int4_picksplit | internal, internal | internal + btree_gist | public | gbt_int4_same | gbtreekey8, gbtreekey8, internal | internal + btree_gist | public | gbt_int4_union | internal, internal | gbtreekey8 + btree_gist | public | gbt_int8_compress | internal | internal + btree_gist | public | gbt_int8_consistent | internal, bigint, smallint, oid, internal | boolean + btree_gist | public | gbt_int8_distance | internal, bigint, smallint, oid, internal | double precision + btree_gist | public | gbt_int8_fetch | internal | internal + btree_gist | public | gbt_int8_penalty | internal, internal, internal | internal + btree_gist | public | gbt_int8_picksplit | internal, internal | internal + btree_gist | public | gbt_int8_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_int8_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_intv_compress | internal | internal + btree_gist | public | gbt_intv_consistent | internal, interval, smallint, oid, internal | boolean + btree_gist | public | gbt_intv_decompress | internal | internal + btree_gist | public | gbt_intv_distance | internal, interval, smallint, oid, internal | double precision + btree_gist | public | gbt_intv_fetch | internal | internal + btree_gist | public | gbt_intv_penalty | internal, internal, internal | internal + btree_gist | public | gbt_intv_picksplit | internal, internal | internal + btree_gist | public | gbt_intv_same | gbtreekey32, gbtreekey32, internal | internal + btree_gist | public | gbt_intv_union | internal, internal | gbtreekey32 + btree_gist | public | gbt_macad8_compress | internal | internal + btree_gist | public | gbt_macad8_consistent | internal, macaddr8, smallint, oid, internal | boolean + btree_gist | public | gbt_macad8_fetch | internal | internal + btree_gist | public | gbt_macad8_penalty | internal, internal, internal | internal + btree_gist | public | gbt_macad8_picksplit | internal, internal | internal + btree_gist | public | gbt_macad8_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_macad8_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_macad_compress | internal | internal + btree_gist | public | gbt_macad_consistent | internal, macaddr, smallint, oid, internal | boolean + btree_gist | public | gbt_macad_fetch | internal | internal + btree_gist | public | gbt_macad_penalty | internal, internal, internal | internal + btree_gist | public | gbt_macad_picksplit | internal, internal | internal + btree_gist | public | gbt_macad_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_macad_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_numeric_compress | internal | internal + btree_gist | public | gbt_numeric_consistent | internal, numeric, smallint, oid, internal | boolean + btree_gist | public | gbt_numeric_penalty | internal, internal, internal | internal + btree_gist | public | gbt_numeric_picksplit | internal, internal | internal + btree_gist | public | gbt_numeric_same | gbtreekey_var, gbtreekey_var, internal | internal + btree_gist | public | gbt_numeric_union | internal, internal | gbtreekey_var + btree_gist | public | gbt_oid_compress | internal | internal + btree_gist | public | gbt_oid_consistent | internal, oid, smallint, oid, internal | boolean + btree_gist | public | gbt_oid_distance | internal, oid, smallint, oid, internal | double precision + btree_gist | public | gbt_oid_fetch | internal | internal + btree_gist | public | gbt_oid_penalty | internal, internal, internal | internal + btree_gist | public | gbt_oid_picksplit | internal, internal | internal + btree_gist | public | gbt_oid_same | gbtreekey8, gbtreekey8, internal | internal + btree_gist | public | gbt_oid_union | internal, internal | gbtreekey8 + btree_gist | public | gbt_text_compress | internal | internal + btree_gist | public | gbt_text_consistent | internal, text, smallint, oid, internal | boolean + btree_gist | public | gbt_text_penalty | internal, internal, internal | internal + btree_gist | public | gbt_text_picksplit | internal, internal | internal + btree_gist | public | gbt_text_same | gbtreekey_var, gbtreekey_var, internal | internal + btree_gist | public | gbt_text_union | internal, internal | gbtreekey_var + btree_gist | public | gbt_time_compress | internal | internal + btree_gist | public | gbt_time_consistent | internal, time without time zone, smallint, oid, internal | boolean + btree_gist | public | gbt_time_distance | internal, time without time zone, smallint, oid, internal | double precision + btree_gist | public | gbt_time_fetch | internal | internal + btree_gist | public | gbt_time_penalty | internal, internal, internal | internal + btree_gist | public | gbt_time_picksplit | internal, internal | internal + btree_gist | public | gbt_time_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_time_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_timetz_compress | internal | internal + btree_gist | public | gbt_timetz_consistent | internal, time with time zone, smallint, oid, internal | boolean + btree_gist | public | gbt_ts_compress | internal | internal + btree_gist | public | gbt_ts_consistent | internal, timestamp without time zone, smallint, oid, internal | boolean + btree_gist | public | gbt_ts_distance | internal, timestamp without time zone, smallint, oid, internal | double precision + btree_gist | public | gbt_ts_fetch | internal | internal + btree_gist | public | gbt_ts_penalty | internal, internal, internal | internal + btree_gist | public | gbt_ts_picksplit | internal, internal | internal + btree_gist | public | gbt_ts_same | gbtreekey16, gbtreekey16, internal | internal + btree_gist | public | gbt_ts_union | internal, internal | gbtreekey16 + btree_gist | public | gbt_tstz_compress | internal | internal + btree_gist | public | gbt_tstz_consistent | internal, timestamp with time zone, smallint, oid, internal | boolean + btree_gist | public | gbt_tstz_distance | internal, timestamp with time zone, smallint, oid, internal | double precision + btree_gist | public | gbt_uuid_compress | internal | internal + btree_gist | public | gbt_uuid_consistent | internal, uuid, smallint, oid, internal | boolean + btree_gist | public | gbt_uuid_fetch | internal | internal + btree_gist | public | gbt_uuid_penalty | internal, internal, internal | internal + btree_gist | public | gbt_uuid_picksplit | internal, internal | internal + btree_gist | public | gbt_uuid_same | gbtreekey32, gbtreekey32, internal | internal + btree_gist | public | gbt_uuid_union | internal, internal | gbtreekey32 + btree_gist | public | gbt_var_decompress | internal | internal + btree_gist | public | gbt_var_fetch | internal | internal + btree_gist | public | gbtreekey16_in | cstring | gbtreekey16 + btree_gist | public | gbtreekey16_out | gbtreekey16 | cstring + btree_gist | public | gbtreekey2_in | cstring | gbtreekey2 + btree_gist | public | gbtreekey2_out | gbtreekey2 | cstring + btree_gist | public | gbtreekey32_in | cstring | gbtreekey32 + btree_gist | public | gbtreekey32_out | gbtreekey32 | cstring + btree_gist | public | gbtreekey4_in | cstring | gbtreekey4 + btree_gist | public | gbtreekey4_out | gbtreekey4 | cstring + btree_gist | public | gbtreekey8_in | cstring | gbtreekey8 + btree_gist | public | gbtreekey8_out | gbtreekey8 | cstring + btree_gist | public | gbtreekey_var_in | cstring | gbtreekey_var + btree_gist | public | gbtreekey_var_out | gbtreekey_var | cstring + btree_gist | public | int2_dist | smallint, smallint | smallint + btree_gist | public | int4_dist | integer, integer | integer + btree_gist | public | int8_dist | bigint, bigint | bigint + btree_gist | public | interval_dist | interval, interval | interval + btree_gist | public | oid_dist | oid, oid | oid + btree_gist | public | time_dist | time without time zone, time without time zone | interval + btree_gist | public | ts_dist | timestamp without time zone, timestamp without time zone | interval + btree_gist | public | tstz_dist | timestamp with time zone, timestamp with time zone | interval + citext | public | citext | boolean | citext + citext | public | citext | inet | citext + citext | public | citext | character | citext + citext | public | citext_cmp | citext, citext | integer + citext | public | citext_eq | citext, citext | boolean + citext | public | citext_ge | citext, citext | boolean + citext | public | citext_gt | citext, citext | boolean + citext | public | citext_hash | citext | integer + citext | public | citext_hash_extended | citext, bigint | bigint + citext | public | citext_larger | citext, citext | citext + citext | public | citext_le | citext, citext | boolean + citext | public | citext_lt | citext, citext | boolean + citext | public | citext_ne | citext, citext | boolean + citext | public | citext_pattern_cmp | citext, citext | integer + citext | public | citext_pattern_ge | citext, citext | boolean + citext | public | citext_pattern_gt | citext, citext | boolean + citext | public | citext_pattern_le | citext, citext | boolean + citext | public | citext_pattern_lt | citext, citext | boolean + citext | public | citext_smaller | citext, citext | citext + citext | public | citextin | cstring | citext + citext | public | citextout | citext | cstring + citext | public | citextrecv | internal | citext + citext | public | citextsend | citext | bytea + citext | public | max | citext | citext + citext | public | min | citext | citext + citext | public | regexp_match | citext, citext | text[] + citext | public | regexp_match | citext, citext, text | text[] + citext | public | regexp_matches | citext, citext | SETOF text[] + citext | public | regexp_matches | citext, citext, text | SETOF text[] + citext | public | regexp_replace | citext, citext, text, text | text + citext | public | regexp_replace | citext, citext, text | text + citext | public | regexp_split_to_array | citext, citext | text[] + citext | public | regexp_split_to_array | citext, citext, text | text[] + citext | public | regexp_split_to_table | citext, citext | SETOF text + citext | public | regexp_split_to_table | citext, citext, text | SETOF text + citext | public | replace | citext, citext, citext | text + citext | public | split_part | citext, citext, integer | text + citext | public | strpos | citext, citext | integer + citext | public | texticlike | citext, citext | boolean + citext | public | texticlike | citext, text | boolean + citext | public | texticnlike | citext, citext | boolean + citext | public | texticnlike | citext, text | boolean + citext | public | texticregexeq | citext, citext | boolean + citext | public | texticregexeq | citext, text | boolean + citext | public | texticregexne | citext, citext | boolean + citext | public | texticregexne | citext, text | boolean + citext | public | translate | citext, citext, text | text + cube | public | cube | cube, double precision, double precision | cube + cube | public | cube | double precision | cube + cube | public | cube | double precision[], double precision[] | cube + cube | public | cube | cube, double precision | cube + cube | public | cube | double precision, double precision | cube + cube | public | cube | double precision[] | cube + cube | public | cube_cmp | cube, cube | integer + cube | public | cube_contained | cube, cube | boolean + cube | public | cube_contains | cube, cube | boolean + cube | public | cube_coord | cube, integer | double precision + cube | public | cube_coord_llur | cube, integer | double precision + cube | public | cube_dim | cube | integer + cube | public | cube_distance | cube, cube | double precision + cube | public | cube_enlarge | cube, double precision, integer | cube + cube | public | cube_eq | cube, cube | boolean + cube | public | cube_ge | cube, cube | boolean + cube | public | cube_gt | cube, cube | boolean + cube | public | cube_in | cstring | cube + cube | public | cube_inter | cube, cube | cube + cube | public | cube_is_point | cube | boolean + cube | public | cube_le | cube, cube | boolean + cube | public | cube_ll_coord | cube, integer | double precision + cube | public | cube_lt | cube, cube | boolean + cube | public | cube_ne | cube, cube | boolean + cube | public | cube_out | cube | cstring + cube | public | cube_overlap | cube, cube | boolean + cube | public | cube_recv | internal | cube + cube | public | cube_send | cube | bytea + cube | public | cube_size | cube | double precision + cube | public | cube_subset | cube, integer[] | cube + cube | public | cube_union | cube, cube | cube + cube | public | cube_ur_coord | cube, integer | double precision + cube | public | distance_chebyshev | cube, cube | double precision + cube | public | distance_taxicab | cube, cube | double precision + cube | public | g_cube_consistent | internal, cube, smallint, oid, internal | boolean + cube | public | g_cube_distance | internal, cube, smallint, oid, internal | double precision + cube | public | g_cube_penalty | internal, internal, internal | internal + cube | public | g_cube_picksplit | internal, internal | internal + cube | public | g_cube_same | cube, cube, internal | internal + cube | public | g_cube_union | internal, internal | cube + dblink | public | dblink | text, boolean | SETOF record + dblink | public | dblink | text | SETOF record + dblink | public | dblink | text, text | SETOF record + dblink | public | dblink | text, text, boolean | SETOF record + dblink | public | dblink_build_sql_delete | text, int2vector, integer, text[] | text + dblink | public | dblink_build_sql_insert | text, int2vector, integer, text[], text[] | text + dblink | public | dblink_build_sql_update | text, int2vector, integer, text[], text[] | text + dblink | public | dblink_cancel_query | text | text + dblink | public | dblink_close | text, boolean | text + dblink | public | dblink_close | text | text + dblink | public | dblink_close | text, text | text + dblink | public | dblink_close | text, text, boolean | text + dblink | public | dblink_connect | text | text + dblink | public | dblink_connect | text, text | text + dblink | public | dblink_connect_u | text | text + dblink | public | dblink_connect_u | text, text | text + dblink | public | dblink_current_query | | text + dblink | public | dblink_disconnect | text | text + dblink | public | dblink_disconnect | | text + dblink | public | dblink_error_message | text | text + dblink | public | dblink_exec | text, boolean | text + dblink | public | dblink_exec | text | text + dblink | public | dblink_exec | text, text | text + dblink | public | dblink_exec | text, text, boolean | text + dblink | public | dblink_fdw_validator | options text[], catalog oid | void + dblink | public | dblink_fetch | text, text, integer, boolean | SETOF record + dblink | public | dblink_fetch | text, integer | SETOF record + dblink | public | dblink_fetch | text, text, integer | SETOF record + dblink | public | dblink_fetch | text, integer, boolean | SETOF record + dblink | public | dblink_get_connections | | text[] + dblink | public | dblink_get_notify | OUT notify_name text, OUT be_pid integer, OUT extra text | SETOF record + dblink | public | dblink_get_notify | conname text, OUT notify_name text, OUT be_pid integer, OUT extra text | SETOF record + dblink | public | dblink_get_pkey | text | SETOF dblink_pkey_results + dblink | public | dblink_get_result | text, boolean | SETOF record + dblink | public | dblink_get_result | text | SETOF record + dblink | public | dblink_is_busy | text | integer + dblink | public | dblink_open | text, text, text, boolean | text + dblink | public | dblink_open | text, text | text + dblink | public | dblink_open | text, text, boolean | text + dblink | public | dblink_open | text, text, text | text + dblink | public | dblink_send_query | text, text | integer + dict_int | public | dintdict_init | internal | internal + dict_int | public | dintdict_lexize | internal, internal, internal, internal | internal + dict_xsyn | public | dxsyn_init | internal | internal + dict_xsyn | public | dxsyn_lexize | internal, internal, internal, internal | internal + earthdistance | public | earth | | double precision + earthdistance | public | earth_box | earth, double precision | cube + earthdistance | public | earth_distance | earth, earth | double precision + earthdistance | public | gc_to_sec | double precision | double precision + earthdistance | public | geo_distance | point, point | double precision + earthdistance | public | latitude | earth | double precision + earthdistance | public | ll_to_earth | double precision, double precision | earth + earthdistance | public | longitude | earth | double precision + earthdistance | public | sec_to_gc | double precision | double precision + file_fdw | public | file_fdw_handler | | fdw_handler + file_fdw | public | file_fdw_validator | text[], oid | void + fuzzystrmatch | public | difference | text, text | integer + fuzzystrmatch | public | dmetaphone | text | text + fuzzystrmatch | public | dmetaphone_alt | text | text + fuzzystrmatch | public | levenshtein | text, text | integer + fuzzystrmatch | public | levenshtein | text, text, integer, integer, integer | integer + fuzzystrmatch | public | levenshtein_less_equal | text, text, integer, integer, integer, integer | integer + fuzzystrmatch | public | levenshtein_less_equal | text, text, integer | integer + fuzzystrmatch | public | metaphone | text, integer | text + fuzzystrmatch | public | soundex | text | text + fuzzystrmatch | public | text_soundex | text | text + hstore | public | akeys | hstore | text[] + hstore | public | avals | hstore | text[] + hstore | public | defined | hstore, text | boolean + hstore | public | delete | hstore, text | hstore + hstore | public | delete | hstore, text[] | hstore + hstore | public | delete | hstore, hstore | hstore + hstore | public | each | hs hstore, OUT key text, OUT value text | SETOF record + hstore | public | exist | hstore, text | boolean + hstore | public | exists_all | hstore, text[] | boolean + hstore | public | exists_any | hstore, text[] | boolean + hstore | public | fetchval | hstore, text | text + hstore | public | ghstore_compress | internal | internal + hstore | public | ghstore_consistent | internal, hstore, smallint, oid, internal | boolean + hstore | public | ghstore_decompress | internal | internal + hstore | public | ghstore_in | cstring | ghstore + hstore | public | ghstore_options | internal | void + hstore | public | ghstore_out | ghstore | cstring + hstore | public | ghstore_penalty | internal, internal, internal | internal + hstore | public | ghstore_picksplit | internal, internal | internal + hstore | public | ghstore_same | ghstore, ghstore, internal | internal + hstore | public | ghstore_union | internal, internal | ghstore + hstore | public | gin_consistent_hstore | internal, smallint, hstore, integer, internal, internal | boolean + hstore | public | gin_extract_hstore | hstore, internal | internal + hstore | public | gin_extract_hstore_query | hstore, internal, smallint, internal, internal | internal + hstore | public | hs_concat | hstore, hstore | hstore + hstore | public | hs_contained | hstore, hstore | boolean + hstore | public | hs_contains | hstore, hstore | boolean + hstore | public | hstore | text[], text[] | hstore + hstore | public | hstore | text, text | hstore + hstore | public | hstore | text[] | hstore + hstore | public | hstore | record | hstore + hstore | public | hstore_cmp | hstore, hstore | integer + hstore | public | hstore_eq | hstore, hstore | boolean + hstore | public | hstore_ge | hstore, hstore | boolean + hstore | public | hstore_gt | hstore, hstore | boolean + hstore | public | hstore_hash | hstore | integer + hstore | public | hstore_hash_extended | hstore, bigint | bigint + hstore | public | hstore_in | cstring | hstore + hstore | public | hstore_le | hstore, hstore | boolean + hstore | public | hstore_lt | hstore, hstore | boolean + hstore | public | hstore_ne | hstore, hstore | boolean + hstore | public | hstore_out | hstore | cstring + hstore | public | hstore_recv | internal | hstore + hstore | public | hstore_send | hstore | bytea + hstore | public | hstore_subscript_handler | internal | internal + hstore | public | hstore_to_array | hstore | text[] + hstore | public | hstore_to_json | hstore | json + hstore | public | hstore_to_json_loose | hstore | json + hstore | public | hstore_to_jsonb | hstore | jsonb + hstore | public | hstore_to_jsonb_loose | hstore | jsonb + hstore | public | hstore_to_matrix | hstore | text[] + hstore | public | hstore_version_diag | hstore | integer + hstore | public | isdefined | hstore, text | boolean + hstore | public | isexists | hstore, text | boolean + hstore | public | populate_record | anyelement, hstore | anyelement + hstore | public | skeys | hstore | SETOF text + hstore | public | slice | hstore, text[] | hstore + hstore | public | slice_array | hstore, text[] | text[] + hstore | public | svals | hstore | SETOF text + hstore | public | tconvert | text, text | hstore + http | public | bytea_to_text | data bytea | text + http | public | http | request http_request | http_response + http | public | http_delete | uri character varying, content character varying, content_type character varying | http_response + http | public | http_delete | uri character varying | http_response + http | public | http_get | uri character varying, data jsonb | http_response + http | public | http_get | uri character varying | http_response + http | public | http_head | uri character varying | http_response + http | public | http_header | field character varying, value character varying | http_header + http | public | http_list_curlopt | | TABLE(curlopt text, value text) + http | public | http_patch | uri character varying, content character varying, content_type character varying | http_response + http | public | http_post | uri character varying, data jsonb | http_response + http | public | http_post | uri character varying, content character varying, content_type character varying | http_response + http | public | http_put | uri character varying, content character varying, content_type character varying | http_response + http | public | http_reset_curlopt | | boolean + http | public | http_set_curlopt | curlopt character varying, value character varying | boolean + http | public | text_to_bytea | data text | bytea + http | public | urlencode | data jsonb | text + http | public | urlencode | string character varying | text + http | public | urlencode | string bytea | text + hypopg | public | hypopg | OUT indexname text, OUT indexrelid oid, OUT indrelid oid, OUT innatts integer, OUT indisunique boolean, OUT indkey int2vector, OUT indcollation oidvector, OUT indclass oidvector, OUT indoption oidvector, OUT indexprs pg_node_tree, OUT indpred pg_node_tree, OUT amid oid | SETOF record + hypopg | public | hypopg_create_index | sql_order text, OUT indexrelid oid, OUT indexname text | SETOF record + hypopg | public | hypopg_drop_index | indexid oid | boolean + hypopg | public | hypopg_get_indexdef | indexid oid | text + hypopg | public | hypopg_hidden_indexes | | TABLE(indexid oid) + hypopg | public | hypopg_hide_index | indexid oid | boolean + hypopg | public | hypopg_relation_size | indexid oid | bigint + hypopg | public | hypopg_reset | | void + hypopg | public | hypopg_reset_index | | void + hypopg | public | hypopg_unhide_all_indexes | | void + hypopg | public | hypopg_unhide_index | indexid oid | boolean + index_advisor | public | index_advisor | query text | TABLE(startup_cost_before jsonb, startup_cost_after jsonb, total_cost_before jsonb, total_cost_after jsonb, index_statements text[], errors text[]) + insert_username | public | insert_username | | trigger + intagg | public | int_agg_final_array | internal | integer[] + intagg | public | int_agg_state | internal, integer | internal + intagg | public | int_array_aggregate | integer | integer[] + intagg | public | int_array_enum | integer[] | SETOF integer + intarray | public | _int_contained | integer[], integer[] | boolean + intarray | public | _int_contained_joinsel | internal, oid, internal, smallint, internal | double precision + intarray | public | _int_contained_sel | internal, oid, internal, integer | double precision + intarray | public | _int_contains | integer[], integer[] | boolean + intarray | public | _int_contains_joinsel | internal, oid, internal, smallint, internal | double precision + intarray | public | _int_contains_sel | internal, oid, internal, integer | double precision + intarray | public | _int_different | integer[], integer[] | boolean + intarray | public | _int_inter | integer[], integer[] | integer[] + intarray | public | _int_matchsel | internal, oid, internal, integer | double precision + intarray | public | _int_overlap | integer[], integer[] | boolean + intarray | public | _int_overlap_joinsel | internal, oid, internal, smallint, internal | double precision + intarray | public | _int_overlap_sel | internal, oid, internal, integer | double precision + intarray | public | _int_same | integer[], integer[] | boolean + intarray | public | _int_union | integer[], integer[] | integer[] + intarray | public | _intbig_in | cstring | intbig_gkey + intarray | public | _intbig_out | intbig_gkey | cstring + intarray | public | boolop | integer[], query_int | boolean + intarray | public | bqarr_in | cstring | query_int + intarray | public | bqarr_out | query_int | cstring + intarray | public | g_int_compress | internal | internal + intarray | public | g_int_consistent | internal, integer[], smallint, oid, internal | boolean + intarray | public | g_int_decompress | internal | internal + intarray | public | g_int_options | internal | void + intarray | public | g_int_penalty | internal, internal, internal | internal + intarray | public | g_int_picksplit | internal, internal | internal + intarray | public | g_int_same | integer[], integer[], internal | internal + intarray | public | g_int_union | internal, internal | integer[] + intarray | public | g_intbig_compress | internal | internal + intarray | public | g_intbig_consistent | internal, integer[], smallint, oid, internal | boolean + intarray | public | g_intbig_decompress | internal | internal + intarray | public | g_intbig_options | internal | void + intarray | public | g_intbig_penalty | internal, internal, internal | internal + intarray | public | g_intbig_picksplit | internal, internal | internal + intarray | public | g_intbig_same | intbig_gkey, intbig_gkey, internal | internal + intarray | public | g_intbig_union | internal, internal | intbig_gkey + intarray | public | ginint4_consistent | internal, smallint, integer[], integer, internal, internal, internal, internal | boolean + intarray | public | ginint4_queryextract | integer[], internal, smallint, internal, internal, internal, internal | internal + intarray | public | icount | integer[] | integer + intarray | public | idx | integer[], integer | integer + intarray | public | intarray_del_elem | integer[], integer | integer[] + intarray | public | intarray_push_array | integer[], integer[] | integer[] + intarray | public | intarray_push_elem | integer[], integer | integer[] + intarray | public | intset | integer | integer[] + intarray | public | intset_subtract | integer[], integer[] | integer[] + intarray | public | intset_union_elem | integer[], integer | integer[] + intarray | public | querytree | query_int | text + intarray | public | rboolop | query_int, integer[] | boolean + intarray | public | sort | integer[] | integer[] + intarray | public | sort | integer[], text | integer[] + intarray | public | sort_asc | integer[] | integer[] + intarray | public | sort_desc | integer[] | integer[] + intarray | public | subarray | integer[], integer | integer[] + intarray | public | subarray | integer[], integer, integer | integer[] + intarray | public | uniq | integer[] | integer[] + isn | public | btean13cmp | ean13, ean13 | integer + isn | public | btean13cmp | ean13, issn | integer + isn | public | btean13cmp | ean13, upc | integer + isn | public | btean13cmp | ean13, issn13 | integer + isn | public | btean13cmp | ean13, ismn | integer + isn | public | btean13cmp | ean13, ismn13 | integer + isn | public | btean13cmp | ean13, isbn13 | integer + isn | public | btean13cmp | ean13, isbn | integer + isn | public | btisbn13cmp | isbn13, isbn13 | integer + isn | public | btisbn13cmp | isbn13, ean13 | integer + isn | public | btisbn13cmp | isbn13, isbn | integer + isn | public | btisbncmp | isbn, ean13 | integer + isn | public | btisbncmp | isbn, isbn | integer + isn | public | btisbncmp | isbn, isbn13 | integer + isn | public | btismn13cmp | ismn13, ismn13 | integer + isn | public | btismn13cmp | ismn13, ean13 | integer + isn | public | btismn13cmp | ismn13, ismn | integer + isn | public | btismncmp | ismn, ismn | integer + isn | public | btismncmp | ismn, ean13 | integer + isn | public | btismncmp | ismn, ismn13 | integer + isn | public | btissn13cmp | issn13, issn13 | integer + isn | public | btissn13cmp | issn13, ean13 | integer + isn | public | btissn13cmp | issn13, issn | integer + isn | public | btissncmp | issn, ean13 | integer + isn | public | btissncmp | issn, issn13 | integer + isn | public | btissncmp | issn, issn | integer + isn | public | btupccmp | upc, upc | integer + isn | public | btupccmp | upc, ean13 | integer + isn | public | ean13_in | cstring | ean13 + isn | public | ean13_out | isbn13 | cstring + isn | public | ean13_out | ismn13 | cstring + isn | public | ean13_out | ean13 | cstring + isn | public | ean13_out | issn13 | cstring + isn | public | hashean13 | ean13 | integer + isn | public | hashisbn | isbn | integer + isn | public | hashisbn13 | isbn13 | integer + isn | public | hashismn | ismn | integer + isn | public | hashismn13 | ismn13 | integer + isn | public | hashissn | issn | integer + isn | public | hashissn13 | issn13 | integer + isn | public | hashupc | upc | integer + isn | public | is_valid | isbn13 | boolean + isn | public | is_valid | upc | boolean + isn | public | is_valid | ismn | boolean + isn | public | is_valid | issn | boolean + isn | public | is_valid | isbn | boolean + isn | public | is_valid | ismn13 | boolean + isn | public | is_valid | ean13 | boolean + isn | public | is_valid | issn13 | boolean + isn | public | isbn | ean13 | isbn + isn | public | isbn13 | ean13 | isbn13 + isn | public | isbn13_in | cstring | isbn13 + isn | public | isbn_in | cstring | isbn + isn | public | ismn | ean13 | ismn + isn | public | ismn13 | ean13 | ismn13 + isn | public | ismn13_in | cstring | ismn13 + isn | public | ismn_in | cstring | ismn + isn | public | isn_out | upc | cstring + isn | public | isn_out | ismn | cstring + isn | public | isn_out | issn | cstring + isn | public | isn_out | isbn | cstring + isn | public | isn_weak | boolean | boolean + isn | public | isn_weak | | boolean + isn | public | isneq | ismn, ismn | boolean + isn | public | isneq | ean13, ean13 | boolean + isn | public | isneq | isbn, ean13 | boolean + isn | public | isneq | issn, ean13 | boolean + isn | public | isneq | isbn13, isbn13 | boolean + isn | public | isneq | ean13, issn | boolean + isn | public | isneq | isbn, isbn | boolean + isn | public | isneq | ean13, upc | boolean + isn | public | isneq | ean13, issn13 | boolean + isn | public | isneq | ean13, ismn | boolean + isn | public | isneq | upc, upc | boolean + isn | public | isneq | issn13, issn13 | boolean + isn | public | isneq | upc, ean13 | boolean + isn | public | isneq | ismn13, ismn13 | boolean + isn | public | isneq | issn13, ean13 | boolean + isn | public | isneq | ean13, ismn13 | boolean + isn | public | isneq | ismn13, ean13 | boolean + isn | public | isneq | issn13, issn | boolean + isn | public | isneq | ismn, ean13 | boolean + isn | public | isneq | ismn13, ismn | boolean + isn | public | isneq | ean13, isbn13 | boolean + isn | public | isneq | isbn13, ean13 | boolean + isn | public | isneq | isbn13, isbn | boolean + isn | public | isneq | isbn, isbn13 | boolean + isn | public | isneq | ismn, ismn13 | boolean + isn | public | isneq | ean13, isbn | boolean + isn | public | isneq | issn, issn13 | boolean + isn | public | isneq | issn, issn | boolean + isn | public | isnge | ismn, ismn | boolean + isn | public | isnge | ean13, ean13 | boolean + isn | public | isnge | isbn, ean13 | boolean + isn | public | isnge | issn, ean13 | boolean + isn | public | isnge | isbn13, isbn13 | boolean + isn | public | isnge | ean13, issn | boolean + isn | public | isnge | isbn, isbn | boolean + isn | public | isnge | ean13, upc | boolean + isn | public | isnge | ean13, issn13 | boolean + isn | public | isnge | ean13, ismn | boolean + isn | public | isnge | upc, upc | boolean + isn | public | isnge | issn13, issn13 | boolean + isn | public | isnge | upc, ean13 | boolean + isn | public | isnge | ismn13, ismn13 | boolean + isn | public | isnge | issn13, ean13 | boolean + isn | public | isnge | ean13, ismn13 | boolean + isn | public | isnge | ismn13, ean13 | boolean + isn | public | isnge | issn13, issn | boolean + isn | public | isnge | ismn, ean13 | boolean + isn | public | isnge | ismn13, ismn | boolean + isn | public | isnge | ean13, isbn13 | boolean + isn | public | isnge | isbn13, ean13 | boolean + isn | public | isnge | isbn13, isbn | boolean + isn | public | isnge | isbn, isbn13 | boolean + isn | public | isnge | ismn, ismn13 | boolean + isn | public | isnge | ean13, isbn | boolean + isn | public | isnge | issn, issn13 | boolean + isn | public | isnge | issn, issn | boolean + isn | public | isngt | ismn, ismn | boolean + isn | public | isngt | ean13, ean13 | boolean + isn | public | isngt | isbn, ean13 | boolean + isn | public | isngt | issn, ean13 | boolean + isn | public | isngt | isbn13, isbn13 | boolean + isn | public | isngt | ean13, issn | boolean + isn | public | isngt | isbn, isbn | boolean + isn | public | isngt | ean13, upc | boolean + isn | public | isngt | ean13, issn13 | boolean + isn | public | isngt | ean13, ismn | boolean + isn | public | isngt | upc, upc | boolean + isn | public | isngt | issn13, issn13 | boolean + isn | public | isngt | upc, ean13 | boolean + isn | public | isngt | ismn13, ismn13 | boolean + isn | public | isngt | issn13, ean13 | boolean + isn | public | isngt | ean13, ismn13 | boolean + isn | public | isngt | ismn13, ean13 | boolean + isn | public | isngt | issn13, issn | boolean + isn | public | isngt | ismn, ean13 | boolean + isn | public | isngt | ismn13, ismn | boolean + isn | public | isngt | ean13, isbn13 | boolean + isn | public | isngt | isbn13, ean13 | boolean + isn | public | isngt | isbn13, isbn | boolean + isn | public | isngt | isbn, isbn13 | boolean + isn | public | isngt | ismn, ismn13 | boolean + isn | public | isngt | ean13, isbn | boolean + isn | public | isngt | issn, issn13 | boolean + isn | public | isngt | issn, issn | boolean + isn | public | isnle | ismn, ismn | boolean + isn | public | isnle | ean13, ean13 | boolean + isn | public | isnle | isbn, ean13 | boolean + isn | public | isnle | issn, ean13 | boolean + isn | public | isnle | isbn13, isbn13 | boolean + isn | public | isnle | ean13, issn | boolean + isn | public | isnle | isbn, isbn | boolean + isn | public | isnle | ean13, upc | boolean + isn | public | isnle | ean13, issn13 | boolean + isn | public | isnle | ean13, ismn | boolean + isn | public | isnle | upc, upc | boolean + isn | public | isnle | issn13, issn13 | boolean + isn | public | isnle | upc, ean13 | boolean + isn | public | isnle | ismn13, ismn13 | boolean + isn | public | isnle | issn13, ean13 | boolean + isn | public | isnle | ean13, ismn13 | boolean + isn | public | isnle | ismn13, ean13 | boolean + isn | public | isnle | issn13, issn | boolean + isn | public | isnle | ismn, ean13 | boolean + isn | public | isnle | ismn13, ismn | boolean + isn | public | isnle | ean13, isbn13 | boolean + isn | public | isnle | isbn13, ean13 | boolean + isn | public | isnle | isbn13, isbn | boolean + isn | public | isnle | isbn, isbn13 | boolean + isn | public | isnle | ismn, ismn13 | boolean + isn | public | isnle | ean13, isbn | boolean + isn | public | isnle | issn, issn13 | boolean + isn | public | isnle | issn, issn | boolean + isn | public | isnlt | ismn, ismn | boolean + isn | public | isnlt | ean13, ean13 | boolean + isn | public | isnlt | isbn, ean13 | boolean + isn | public | isnlt | issn, ean13 | boolean + isn | public | isnlt | isbn13, isbn13 | boolean + isn | public | isnlt | ean13, issn | boolean + isn | public | isnlt | isbn, isbn | boolean + isn | public | isnlt | ean13, upc | boolean + isn | public | isnlt | ean13, issn13 | boolean + isn | public | isnlt | ean13, ismn | boolean + isn | public | isnlt | upc, upc | boolean + isn | public | isnlt | issn13, issn13 | boolean + isn | public | isnlt | upc, ean13 | boolean + isn | public | isnlt | ismn13, ismn13 | boolean + isn | public | isnlt | issn13, ean13 | boolean + isn | public | isnlt | ean13, ismn13 | boolean + isn | public | isnlt | ismn13, ean13 | boolean + isn | public | isnlt | issn13, issn | boolean + isn | public | isnlt | ismn, ean13 | boolean + isn | public | isnlt | ismn13, ismn | boolean + isn | public | isnlt | ean13, isbn13 | boolean + isn | public | isnlt | isbn13, ean13 | boolean + isn | public | isnlt | isbn13, isbn | boolean + isn | public | isnlt | isbn, isbn13 | boolean + isn | public | isnlt | ismn, ismn13 | boolean + isn | public | isnlt | ean13, isbn | boolean + isn | public | isnlt | issn, issn13 | boolean + isn | public | isnlt | issn, issn | boolean + isn | public | isnne | ismn, ismn | boolean + isn | public | isnne | ean13, ean13 | boolean + isn | public | isnne | isbn, ean13 | boolean + isn | public | isnne | issn, ean13 | boolean + isn | public | isnne | isbn13, isbn13 | boolean + isn | public | isnne | ean13, issn | boolean + isn | public | isnne | isbn, isbn | boolean + isn | public | isnne | ean13, upc | boolean + isn | public | isnne | ean13, issn13 | boolean + isn | public | isnne | ean13, ismn | boolean + isn | public | isnne | upc, upc | boolean + isn | public | isnne | issn13, issn13 | boolean + isn | public | isnne | upc, ean13 | boolean + isn | public | isnne | ismn13, ismn13 | boolean + isn | public | isnne | issn13, ean13 | boolean + isn | public | isnne | ean13, ismn13 | boolean + isn | public | isnne | ismn13, ean13 | boolean + isn | public | isnne | issn13, issn | boolean + isn | public | isnne | ismn, ean13 | boolean + isn | public | isnne | ismn13, ismn | boolean + isn | public | isnne | ean13, isbn13 | boolean + isn | public | isnne | isbn13, ean13 | boolean + isn | public | isnne | isbn13, isbn | boolean + isn | public | isnne | isbn, isbn13 | boolean + isn | public | isnne | ismn, ismn13 | boolean + isn | public | isnne | ean13, isbn | boolean + isn | public | isnne | issn, issn13 | boolean + isn | public | isnne | issn, issn | boolean + isn | public | issn | ean13 | issn + isn | public | issn13 | ean13 | issn13 + isn | public | issn13_in | cstring | issn13 + isn | public | issn_in | cstring | issn + isn | public | make_valid | isbn13 | isbn13 + isn | public | make_valid | upc | upc + isn | public | make_valid | ismn | ismn + isn | public | make_valid | issn | issn + isn | public | make_valid | isbn | isbn + isn | public | make_valid | ismn13 | ismn13 + isn | public | make_valid | ean13 | ean13 + isn | public | make_valid | issn13 | issn13 + isn | public | upc | ean13 | upc + isn | public | upc_in | cstring | upc + lo | public | lo_manage | | trigger + lo | public | lo_oid | lo | oid + ltree | public | _lt_q_regex | ltree[], lquery[] | boolean + ltree | public | _lt_q_rregex | lquery[], ltree[] | boolean + ltree | public | _ltq_extract_regex | ltree[], lquery | ltree + ltree | public | _ltq_regex | ltree[], lquery | boolean + ltree | public | _ltq_rregex | lquery, ltree[] | boolean + ltree | public | _ltree_compress | internal | internal + ltree | public | _ltree_consistent | internal, ltree[], smallint, oid, internal | boolean + ltree | public | _ltree_extract_isparent | ltree[], ltree | ltree + ltree | public | _ltree_extract_risparent | ltree[], ltree | ltree + ltree | public | _ltree_gist_options | internal | void + ltree | public | _ltree_isparent | ltree[], ltree | boolean + ltree | public | _ltree_penalty | internal, internal, internal | internal + ltree | public | _ltree_picksplit | internal, internal | internal + ltree | public | _ltree_r_isparent | ltree, ltree[] | boolean + ltree | public | _ltree_r_risparent | ltree, ltree[] | boolean + ltree | public | _ltree_risparent | ltree[], ltree | boolean + ltree | public | _ltree_same | ltree_gist, ltree_gist, internal | internal + ltree | public | _ltree_union | internal, internal | ltree_gist + ltree | public | _ltxtq_exec | ltree[], ltxtquery | boolean + ltree | public | _ltxtq_extract_exec | ltree[], ltxtquery | ltree + ltree | public | _ltxtq_rexec | ltxtquery, ltree[] | boolean + ltree | public | hash_ltree | ltree | integer + ltree | public | hash_ltree_extended | ltree, bigint | bigint + ltree | public | index | ltree, ltree | integer + ltree | public | index | ltree, ltree, integer | integer + ltree | public | lca | ltree, ltree, ltree, ltree, ltree, ltree | ltree + ltree | public | lca | ltree, ltree | ltree + ltree | public | lca | ltree, ltree, ltree | ltree + ltree | public | lca | ltree, ltree, ltree, ltree, ltree, ltree, ltree, ltree | ltree + ltree | public | lca | ltree, ltree, ltree, ltree, ltree | ltree + ltree | public | lca | ltree[] | ltree + ltree | public | lca | ltree, ltree, ltree, ltree, ltree, ltree, ltree | ltree + ltree | public | lca | ltree, ltree, ltree, ltree | ltree + ltree | public | lquery_in | cstring | lquery + ltree | public | lquery_out | lquery | cstring + ltree | public | lquery_recv | internal | lquery + ltree | public | lquery_send | lquery | bytea + ltree | public | lt_q_regex | ltree, lquery[] | boolean + ltree | public | lt_q_rregex | lquery[], ltree | boolean + ltree | public | ltq_regex | ltree, lquery | boolean + ltree | public | ltq_rregex | lquery, ltree | boolean + ltree | public | ltree2text | ltree | text + ltree | public | ltree_addltree | ltree, ltree | ltree + ltree | public | ltree_addtext | ltree, text | ltree + ltree | public | ltree_cmp | ltree, ltree | integer + ltree | public | ltree_compress | internal | internal + ltree | public | ltree_consistent | internal, ltree, smallint, oid, internal | boolean + ltree | public | ltree_decompress | internal | internal + ltree | public | ltree_eq | ltree, ltree | boolean + ltree | public | ltree_ge | ltree, ltree | boolean + ltree | public | ltree_gist_in | cstring | ltree_gist + ltree | public | ltree_gist_options | internal | void + ltree | public | ltree_gist_out | ltree_gist | cstring + ltree | public | ltree_gt | ltree, ltree | boolean + ltree | public | ltree_in | cstring | ltree + ltree | public | ltree_isparent | ltree, ltree | boolean + ltree | public | ltree_le | ltree, ltree | boolean + ltree | public | ltree_lt | ltree, ltree | boolean + ltree | public | ltree_ne | ltree, ltree | boolean + ltree | public | ltree_out | ltree | cstring + ltree | public | ltree_penalty | internal, internal, internal | internal + ltree | public | ltree_picksplit | internal, internal | internal + ltree | public | ltree_recv | internal | ltree + ltree | public | ltree_risparent | ltree, ltree | boolean + ltree | public | ltree_same | ltree_gist, ltree_gist, internal | internal + ltree | public | ltree_send | ltree | bytea + ltree | public | ltree_textadd | text, ltree | ltree + ltree | public | ltree_union | internal, internal | ltree_gist + ltree | public | ltreeparentsel | internal, oid, internal, integer | double precision + ltree | public | ltxtq_exec | ltree, ltxtquery | boolean + ltree | public | ltxtq_in | cstring | ltxtquery + ltree | public | ltxtq_out | ltxtquery | cstring + ltree | public | ltxtq_recv | internal | ltxtquery + ltree | public | ltxtq_rexec | ltxtquery, ltree | boolean + ltree | public | ltxtq_send | ltxtquery | bytea + ltree | public | nlevel | ltree | integer + ltree | public | subltree | ltree, integer, integer | ltree + ltree | public | subpath | ltree, integer | ltree + ltree | public | subpath | ltree, integer, integer | ltree + ltree | public | text2ltree | text | ltree + moddatetime | public | moddatetime | | trigger + pageinspect | public | brin_metapage_info | page bytea, OUT magic text, OUT version integer, OUT pagesperrange integer, OUT lastrevmappage bigint | record + pageinspect | public | brin_page_type | page bytea | text + pageinspect | public | brin_revmap_data | page bytea, OUT pages tid | SETOF tid + pageinspect | public | bt_metap | relname text, OUT magic integer, OUT version integer, OUT root bigint, OUT level bigint, OUT fastroot bigint, OUT fastlevel bigint, OUT last_cleanup_num_delpages bigint, OUT last_cleanup_num_tuples double precision, OUT allequalimage boolean | record + pageinspect | public | bt_page_items | page bytea, OUT itemoffset smallint, OUT ctid tid, OUT itemlen smallint, OUT nulls boolean, OUT vars boolean, OUT data text, OUT dead boolean, OUT htid tid, OUT tids tid[] | SETOF record + pageinspect | public | bt_page_items | relname text, blkno bigint, OUT itemoffset smallint, OUT ctid tid, OUT itemlen smallint, OUT nulls boolean, OUT vars boolean, OUT data text, OUT dead boolean, OUT htid tid, OUT tids tid[] | SETOF record + pageinspect | public | bt_page_stats | relname text, blkno bigint, OUT blkno bigint, OUT type "char", OUT live_items integer, OUT dead_items integer, OUT avg_item_size integer, OUT page_size integer, OUT free_size integer, OUT btpo_prev bigint, OUT btpo_next bigint, OUT btpo_level bigint, OUT btpo_flags integer | record + pageinspect | public | fsm_page_contents | page bytea | text + pageinspect | public | get_raw_page | text, bigint | bytea + pageinspect | public | get_raw_page | text, text, bigint | bytea + pageinspect | public | gin_leafpage_items | page bytea, OUT first_tid tid, OUT nbytes smallint, OUT tids tid[] | SETOF record + pageinspect | public | gin_metapage_info | page bytea, OUT pending_head bigint, OUT pending_tail bigint, OUT tail_free_size integer, OUT n_pending_pages bigint, OUT n_pending_tuples bigint, OUT n_total_pages bigint, OUT n_entry_pages bigint, OUT n_data_pages bigint, OUT n_entries bigint, OUT version integer | record + pageinspect | public | gin_page_opaque_info | page bytea, OUT rightlink bigint, OUT maxoff integer, OUT flags text[] | record + pageinspect | public | gist_page_items | page bytea, index_oid regclass, OUT itemoffset smallint, OUT ctid tid, OUT itemlen smallint, OUT dead boolean, OUT keys text | SETOF record + pageinspect | public | gist_page_items_bytea | page bytea, OUT itemoffset smallint, OUT ctid tid, OUT itemlen smallint, OUT dead boolean, OUT key_data bytea | SETOF record + pageinspect | public | gist_page_opaque_info | page bytea, OUT lsn pg_lsn, OUT nsn pg_lsn, OUT rightlink bigint, OUT flags text[] | record + pageinspect | public | hash_bitmap_info | index_oid regclass, blkno bigint, OUT bitmapblkno bigint, OUT bitmapbit integer, OUT bitstatus boolean | SETOF record + pageinspect | public | hash_metapage_info | page bytea, OUT magic bigint, OUT version bigint, OUT ntuples double precision, OUT ffactor integer, OUT bsize integer, OUT bmsize integer, OUT bmshift integer, OUT maxbucket bigint, OUT highmask bigint, OUT lowmask bigint, OUT ovflpoint bigint, OUT firstfree bigint, OUT nmaps bigint, OUT procid oid, OUT spares bigint[], OUT mapp bigint[] | record + pageinspect | public | hash_page_items | page bytea, OUT itemoffset integer, OUT ctid tid, OUT data bigint | SETOF record + pageinspect | public | hash_page_stats | page bytea, OUT live_items integer, OUT dead_items integer, OUT page_size integer, OUT free_size integer, OUT hasho_prevblkno bigint, OUT hasho_nextblkno bigint, OUT hasho_bucket bigint, OUT hasho_flag integer, OUT hasho_page_id integer | record + pageinspect | public | hash_page_type | page bytea | text + pageinspect | public | heap_page_item_attrs | page bytea, rel_oid regclass, OUT lp smallint, OUT lp_off smallint, OUT lp_flags smallint, OUT lp_len smallint, OUT t_xmin xid, OUT t_xmax xid, OUT t_field3 integer, OUT t_ctid tid, OUT t_infomask2 integer, OUT t_infomask integer, OUT t_hoff smallint, OUT t_bits text, OUT t_oid oid, OUT t_attrs bytea[] | SETOF record + pageinspect | public | heap_page_item_attrs | page bytea, rel_oid regclass, do_detoast boolean, OUT lp smallint, OUT lp_off smallint, OUT lp_flags smallint, OUT lp_len smallint, OUT t_xmin xid, OUT t_xmax xid, OUT t_field3 integer, OUT t_ctid tid, OUT t_infomask2 integer, OUT t_infomask integer, OUT t_hoff smallint, OUT t_bits text, OUT t_oid oid, OUT t_attrs bytea[] | SETOF record + pageinspect | public | heap_page_items | page bytea, OUT lp smallint, OUT lp_off smallint, OUT lp_flags smallint, OUT lp_len smallint, OUT t_xmin xid, OUT t_xmax xid, OUT t_field3 integer, OUT t_ctid tid, OUT t_infomask2 integer, OUT t_infomask integer, OUT t_hoff smallint, OUT t_bits text, OUT t_oid oid, OUT t_data bytea | SETOF record + pageinspect | public | heap_tuple_infomask_flags | t_infomask integer, t_infomask2 integer, OUT raw_flags text[], OUT combined_flags text[] | record + pageinspect | public | page_checksum | page bytea, blkno bigint | smallint + pageinspect | public | page_header | page bytea, OUT lsn pg_lsn, OUT checksum smallint, OUT flags smallint, OUT lower integer, OUT upper integer, OUT special integer, OUT pagesize integer, OUT version smallint, OUT prune_xid xid | record + pageinspect | public | tuple_data_split | rel_oid oid, t_data bytea, t_infomask integer, t_infomask2 integer, t_bits text | bytea[] + pageinspect | public | tuple_data_split | rel_oid oid, t_data bytea, t_infomask integer, t_infomask2 integer, t_bits text, do_detoast boolean | bytea[] + pg_buffercache | public | pg_buffercache_evict | integer | boolean + pg_buffercache | public | pg_buffercache_pages | | SETOF record + pg_freespacemap | public | pg_freespace | rel regclass, OUT blkno bigint, OUT avail smallint | SETOF record + pg_freespacemap | public | pg_freespace | regclass, bigint | smallint + pg_graphql | graphql | _internal_resolve | query text, variables jsonb, "operationName" text, extensions jsonb | jsonb + pg_graphql | graphql | comment_directive | comment_ text | jsonb + pg_graphql | graphql | exception | message text | text + pg_graphql | graphql | get_schema_version | | integer + pg_graphql | graphql | increment_schema_version | | event_trigger + pg_graphql | graphql | resolve | query text, variables jsonb, "operationName" text, extensions jsonb | jsonb + pg_graphql | graphql_public | graphql | "operationName" text, query text, variables jsonb, extensions jsonb | jsonb + pg_hashids | public | hash_decode | text, text, integer | integer + pg_hashids | public | hash_encode | bigint | text + pg_hashids | public | hash_encode | bigint, text | text + pg_hashids | public | hash_encode | bigint, text, integer | text + pg_hashids | public | id_decode | text | bigint[] + pg_hashids | public | id_decode | text, text | bigint[] + pg_hashids | public | id_decode | text, text, integer, text | bigint[] + pg_hashids | public | id_decode | text, text, integer | bigint[] + pg_hashids | public | id_decode_once | text | bigint + pg_hashids | public | id_decode_once | text, text | bigint + pg_hashids | public | id_decode_once | text, text, integer, text | bigint + pg_hashids | public | id_decode_once | text, text, integer | bigint + pg_hashids | public | id_encode | bigint | text + pg_hashids | public | id_encode | bigint[] | text + pg_hashids | public | id_encode | bigint[], text | text + pg_hashids | public | id_encode | bigint[], text, integer | text + pg_hashids | public | id_encode | bigint, text | text + pg_hashids | public | id_encode | bigint, text, integer | text + pg_hashids | public | id_encode | bigint, text, integer, text | text + pg_hashids | public | id_encode | bigint[], text, integer, text | text + pg_jsonschema | public | json_matches_schema | schema json, instance json | boolean + pg_jsonschema | public | jsonb_matches_schema | schema json, instance jsonb | boolean + pg_jsonschema | public | jsonschema_is_valid | schema json | boolean + pg_jsonschema | public | jsonschema_validation_errors | schema json, instance json | text[] + pg_net | net | _await_response | request_id bigint | boolean + pg_net | net | _encode_url_with_params_array | url text, params_array text[] | text + pg_net | net | _http_collect_response | request_id bigint, async boolean | net.http_response_result + pg_net | net | _urlencode_string | string character varying | text + pg_net | net | check_worker_is_up | | void + pg_net | net | http_collect_response | request_id bigint, async boolean | net.http_response_result + pg_net | net | http_delete | url text, params jsonb, headers jsonb, timeout_milliseconds integer | bigint + pg_net | net | http_get | url text, params jsonb, headers jsonb, timeout_milliseconds integer | bigint + pg_net | net | http_post | url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer | bigint + pg_net | net | worker_restart | | boolean + pg_prewarm | public | autoprewarm_dump_now | | bigint + pg_prewarm | public | autoprewarm_start_worker | | void + pg_prewarm | public | pg_prewarm | regclass, mode text, fork text, first_block bigint, last_block bigint | bigint + pg_repack | repack | conflicted_triggers | oid | SETOF name + pg_repack | repack | create_index_type | oid, oid | void + pg_repack | repack | create_log_table | oid | void + pg_repack | repack | create_table | oid, name | void + pg_repack | repack | disable_autovacuum | regclass | void + pg_repack | repack | get_alter_col_storage | oid | text + pg_repack | repack | get_assign | oid, text | text + pg_repack | repack | get_columns_for_create_as | oid | text + pg_repack | repack | get_compare_pkey | oid, text | text + pg_repack | repack | get_create_index_type | oid, name | text + pg_repack | repack | get_create_trigger | relid oid, pkid oid | text + pg_repack | repack | get_drop_columns | oid, text | text + pg_repack | repack | get_enable_trigger | relid oid | text + pg_repack | repack | get_index_columns | oid | text + pg_repack | repack | get_order_by | oid, oid | text + pg_repack | repack | get_storage_param | oid | text + pg_repack | repack | get_table_and_inheritors | regclass | regclass[] + pg_repack | repack | oid2text | oid | text + pg_repack | repack | repack_apply | sql_peek cstring, sql_insert cstring, sql_delete cstring, sql_update cstring, sql_pop cstring, count integer | integer + pg_repack | repack | repack_drop | oid, integer | void + pg_repack | repack | repack_index_swap | oid | void + pg_repack | repack | repack_indexdef | oid, oid, name, boolean | text + pg_repack | repack | repack_swap | oid | void + pg_repack | repack | repack_trigger | | trigger + pg_repack | repack | version | | text + pg_repack | repack | version_sql | | text + pg_stat_monitor | public | decode_error_level | elevel integer | text + pg_stat_monitor | public | get_cmd_type | cmd_type integer | text + pg_stat_monitor | public | get_histogram_timings | | text + pg_stat_monitor | public | histogram | _bucket integer, _quryid bigint | SETOF record + pg_stat_monitor | public | pg_stat_monitor_internal | showtext boolean, OUT bucket bigint, OUT userid oid, OUT username text, OUT dbid oid, OUT datname text, OUT client_ip bigint, OUT queryid bigint, OUT planid bigint, OUT query text, OUT query_plan text, OUT pgsm_query_id bigint, OUT top_queryid bigint, OUT top_query text, OUT application_name text, OUT relations text, OUT cmd_type integer, OUT elevel integer, OUT sqlcode text, OUT message text, OUT bucket_start_time timestamp with time zone, OUT calls bigint, OUT total_exec_time double precision, OUT min_exec_time double precision, OUT max_exec_time double precision, OUT mean_exec_time double precision, OUT stddev_exec_time double precision, OUT rows bigint, OUT plans bigint, OUT total_plan_time double precision, OUT min_plan_time double precision, OUT max_plan_time double precision, OUT mean_plan_time double precision, OUT stddev_plan_time double precision, OUT shared_blks_hit bigint, OUT shared_blks_read bigint, OUT shared_blks_dirtied bigint, OUT shared_blks_written bigint, OUT local_blks_hit bigint, OUT local_blks_read bigint, OUT local_blks_dirtied bigint, OUT local_blks_written bigint, OUT temp_blks_read bigint, OUT temp_blks_written bigint, OUT shared_blk_read_time double precision, OUT shared_blk_write_time double precision, OUT local_blk_read_time double precision, OUT local_blk_write_time double precision, OUT temp_blk_read_time double precision, OUT temp_blk_write_time double precision, OUT resp_calls text, OUT cpu_user_time double precision, OUT cpu_sys_time double precision, OUT wal_records bigint, OUT wal_fpi bigint, OUT wal_bytes numeric, OUT comments text, OUT jit_functions bigint, OUT jit_generation_time double precision, OUT jit_inlining_count bigint, OUT jit_inlining_time double precision, OUT jit_optimization_count bigint, OUT jit_optimization_time double precision, OUT jit_emission_count bigint, OUT jit_emission_time double precision, OUT jit_deform_count bigint, OUT jit_deform_time double precision, OUT stats_since timestamp with time zone, OUT minmax_stats_since timestamp with time zone, OUT toplevel boolean, OUT bucket_done boolean | SETOF record + pg_stat_monitor | public | pg_stat_monitor_reset | | void + pg_stat_monitor | public | pg_stat_monitor_version | | text + pg_stat_monitor | public | pgsm_create_11_view | | integer + pg_stat_monitor | public | pgsm_create_13_view | | integer + pg_stat_monitor | public | pgsm_create_14_view | | integer + pg_stat_monitor | public | pgsm_create_15_view | | integer + pg_stat_monitor | public | pgsm_create_17_view | | integer + pg_stat_monitor | public | pgsm_create_view | | integer + pg_stat_monitor | public | range | | text[] + pg_stat_statements | extensions | pg_stat_statements | showtext boolean, OUT userid oid, OUT dbid oid, OUT toplevel boolean, OUT queryid bigint, OUT query text, OUT plans bigint, OUT total_plan_time double precision, OUT min_plan_time double precision, OUT max_plan_time double precision, OUT mean_plan_time double precision, OUT stddev_plan_time double precision, OUT calls bigint, OUT total_exec_time double precision, OUT min_exec_time double precision, OUT max_exec_time double precision, OUT mean_exec_time double precision, OUT stddev_exec_time double precision, OUT rows bigint, OUT shared_blks_hit bigint, OUT shared_blks_read bigint, OUT shared_blks_dirtied bigint, OUT shared_blks_written bigint, OUT local_blks_hit bigint, OUT local_blks_read bigint, OUT local_blks_dirtied bigint, OUT local_blks_written bigint, OUT temp_blks_read bigint, OUT temp_blks_written bigint, OUT shared_blk_read_time double precision, OUT shared_blk_write_time double precision, OUT local_blk_read_time double precision, OUT local_blk_write_time double precision, OUT temp_blk_read_time double precision, OUT temp_blk_write_time double precision, OUT wal_records bigint, OUT wal_fpi bigint, OUT wal_bytes numeric, OUT jit_functions bigint, OUT jit_generation_time double precision, OUT jit_inlining_count bigint, OUT jit_inlining_time double precision, OUT jit_optimization_count bigint, OUT jit_optimization_time double precision, OUT jit_emission_count bigint, OUT jit_emission_time double precision, OUT jit_deform_count bigint, OUT jit_deform_time double precision, OUT stats_since timestamp with time zone, OUT minmax_stats_since timestamp with time zone | SETOF record + pg_stat_statements | extensions | pg_stat_statements_info | OUT dealloc bigint, OUT stats_reset timestamp with time zone | record + pg_stat_statements | extensions | pg_stat_statements_reset | userid oid, dbid oid, queryid bigint, minmax_only boolean | timestamp with time zone + pg_surgery | public | heap_force_freeze | reloid regclass, tids tid[] | void + pg_surgery | public | heap_force_kill | reloid regclass, tids tid[] | void + pg_tle | pgtle | available_extension_versions | OUT name name, OUT version text, OUT superuser boolean, OUT trusted boolean, OUT relocatable boolean, OUT schema name, OUT requires name[], OUT comment text | SETOF record + pg_tle | pgtle | available_extensions | OUT name name, OUT default_version text, OUT comment text | SETOF record + pg_tle | pgtle | create_base_type | typenamespace regnamespace, typename name, infunc regprocedure, outfunc regprocedure, internallength integer, alignment text, storage text | void + pg_tle | pgtle | create_base_type_if_not_exists | typenamespace regnamespace, typename name, infunc regprocedure, outfunc regprocedure, internallength integer, alignment text, storage text | boolean + pg_tle | pgtle | create_operator_func | typenamespace regnamespace, typename name, opfunc regprocedure | void + pg_tle | pgtle | create_operator_func_if_not_exists | typenamespace regnamespace, typename name, opfunc regprocedure | boolean + pg_tle | pgtle | create_shell_type | typenamespace regnamespace, typename name | void + pg_tle | pgtle | create_shell_type_if_not_exists | typenamespace regnamespace, typename name | boolean + pg_tle | pgtle | extension_update_paths | name name, OUT source text, OUT target text, OUT path text | SETOF record + pg_tle | pgtle | install_extension | name text, version text, description text, ext text, requires text[] | boolean + pg_tle | pgtle | install_extension_version_sql | name text, version text, ext text | boolean + pg_tle | pgtle | install_update_path | name text, fromvers text, tovers text, ext text | boolean + pg_tle | pgtle | pg_tle_feature_info_sql_drop | | event_trigger + pg_tle | pgtle | register_feature | proc regproc, feature pgtle.pg_tle_features | void + pg_tle | pgtle | register_feature_if_not_exists | proc regproc, feature pgtle.pg_tle_features | boolean + pg_tle | pgtle | set_default_version | name text, version text | boolean + pg_tle | pgtle | uninstall_extension | extname text | boolean + pg_tle | pgtle | uninstall_extension | extname text, version text | boolean + pg_tle | pgtle | uninstall_extension_if_exists | extname text | boolean + pg_tle | pgtle | uninstall_update_path | extname text, fromvers text, tovers text | boolean + pg_tle | pgtle | uninstall_update_path_if_exists | extname text, fromvers text, tovers text | boolean + pg_tle | pgtle | unregister_feature | proc regproc, feature pgtle.pg_tle_features | void + pg_tle | pgtle | unregister_feature_if_exists | proc regproc, feature pgtle.pg_tle_features | boolean + pg_trgm | public | gin_extract_query_trgm | text, internal, smallint, internal, internal, internal, internal | internal + pg_trgm | public | gin_extract_value_trgm | text, internal | internal + pg_trgm | public | gin_trgm_consistent | internal, smallint, text, integer, internal, internal, internal, internal | boolean + pg_trgm | public | gin_trgm_triconsistent | internal, smallint, text, integer, internal, internal, internal | "char" + pg_trgm | public | gtrgm_compress | internal | internal + pg_trgm | public | gtrgm_consistent | internal, text, smallint, oid, internal | boolean + pg_trgm | public | gtrgm_decompress | internal | internal + pg_trgm | public | gtrgm_distance | internal, text, smallint, oid, internal | double precision + pg_trgm | public | gtrgm_in | cstring | gtrgm + pg_trgm | public | gtrgm_options | internal | void + pg_trgm | public | gtrgm_out | gtrgm | cstring + pg_trgm | public | gtrgm_penalty | internal, internal, internal | internal + pg_trgm | public | gtrgm_picksplit | internal, internal | internal + pg_trgm | public | gtrgm_same | gtrgm, gtrgm, internal | internal + pg_trgm | public | gtrgm_union | internal, internal | gtrgm + pg_trgm | public | set_limit | real | real + pg_trgm | public | show_limit | | real + pg_trgm | public | show_trgm | text | text[] + pg_trgm | public | similarity | text, text | real + pg_trgm | public | similarity_dist | text, text | real + pg_trgm | public | similarity_op | text, text | boolean + pg_trgm | public | strict_word_similarity | text, text | real + pg_trgm | public | strict_word_similarity_commutator_op | text, text | boolean + pg_trgm | public | strict_word_similarity_dist_commutator_op | text, text | real + pg_trgm | public | strict_word_similarity_dist_op | text, text | real + pg_trgm | public | strict_word_similarity_op | text, text | boolean + pg_trgm | public | word_similarity | text, text | real + pg_trgm | public | word_similarity_commutator_op | text, text | boolean + pg_trgm | public | word_similarity_dist_commutator_op | text, text | real + pg_trgm | public | word_similarity_dist_op | text, text | real + pg_trgm | public | word_similarity_op | text, text | boolean + pg_visibility | public | pg_check_frozen | regclass, OUT t_ctid tid | SETOF tid + pg_visibility | public | pg_check_visible | regclass, OUT t_ctid tid | SETOF tid + pg_visibility | public | pg_truncate_visibility_map | regclass | void + pg_visibility | public | pg_visibility | regclass, OUT blkno bigint, OUT all_visible boolean, OUT all_frozen boolean, OUT pd_all_visible boolean | SETOF record + pg_visibility | public | pg_visibility | regclass, blkno bigint, OUT all_visible boolean, OUT all_frozen boolean, OUT pd_all_visible boolean | record + pg_visibility | public | pg_visibility_map | regclass, blkno bigint, OUT all_visible boolean, OUT all_frozen boolean | record + pg_visibility | public | pg_visibility_map | regclass, OUT blkno bigint, OUT all_visible boolean, OUT all_frozen boolean | SETOF record + pg_visibility | public | pg_visibility_map_summary | regclass, OUT all_visible bigint, OUT all_frozen bigint | record + pg_walinspect | public | pg_get_wal_record_info | in_lsn pg_lsn, OUT start_lsn pg_lsn, OUT end_lsn pg_lsn, OUT prev_lsn pg_lsn, OUT xid xid, OUT resource_manager text, OUT record_type text, OUT record_length integer, OUT main_data_length integer, OUT fpi_length integer, OUT description text, OUT block_ref text | record + pg_walinspect | public | pg_get_wal_records_info | start_lsn pg_lsn, end_lsn pg_lsn, OUT start_lsn pg_lsn, OUT end_lsn pg_lsn, OUT prev_lsn pg_lsn, OUT xid xid, OUT resource_manager text, OUT record_type text, OUT record_length integer, OUT main_data_length integer, OUT fpi_length integer, OUT description text, OUT block_ref text | SETOF record + pg_walinspect | public | pg_get_wal_stats | start_lsn pg_lsn, end_lsn pg_lsn, per_record boolean, OUT "resource_manager/record_type" text, OUT count bigint, OUT count_percentage double precision, OUT record_size bigint, OUT record_size_percentage double precision, OUT fpi_size bigint, OUT fpi_size_percentage double precision, OUT combined_size bigint, OUT combined_size_percentage double precision | SETOF record + pgaudit | public | pgaudit_ddl_command_end | | event_trigger + pgaudit | public | pgaudit_sql_drop | | event_trigger + pgcrypto | extensions | armor | bytea, text[], text[] | text + pgcrypto | extensions | armor | bytea | text + pgcrypto | extensions | crypt | text, text | text + pgcrypto | extensions | dearmor | text | bytea + pgcrypto | extensions | decrypt | bytea, bytea, text | bytea + pgcrypto | extensions | decrypt_iv | bytea, bytea, bytea, text | bytea + pgcrypto | extensions | digest | text, text | bytea + pgcrypto | extensions | digest | bytea, text | bytea + pgcrypto | extensions | encrypt | bytea, bytea, text | bytea + pgcrypto | extensions | encrypt_iv | bytea, bytea, bytea, text | bytea + pgcrypto | extensions | gen_random_bytes | integer | bytea + pgcrypto | extensions | gen_random_uuid | | uuid + pgcrypto | extensions | gen_salt | text | text + pgcrypto | extensions | gen_salt | text, integer | text + pgcrypto | extensions | hmac | text, text, text | bytea + pgcrypto | extensions | hmac | bytea, bytea, text | bytea + pgcrypto | extensions | pgp_armor_headers | text, OUT key text, OUT value text | SETOF record + pgcrypto | extensions | pgp_key_id | bytea | text + pgcrypto | extensions | pgp_pub_decrypt | bytea, bytea | text + pgcrypto | extensions | pgp_pub_decrypt | bytea, bytea, text, text | text + pgcrypto | extensions | pgp_pub_decrypt | bytea, bytea, text | text + pgcrypto | extensions | pgp_pub_decrypt_bytea | bytea, bytea | bytea + pgcrypto | extensions | pgp_pub_decrypt_bytea | bytea, bytea, text, text | bytea + pgcrypto | extensions | pgp_pub_decrypt_bytea | bytea, bytea, text | bytea + pgcrypto | extensions | pgp_pub_encrypt | text, bytea, text | bytea + pgcrypto | extensions | pgp_pub_encrypt | text, bytea | bytea + pgcrypto | extensions | pgp_pub_encrypt_bytea | bytea, bytea | bytea + pgcrypto | extensions | pgp_pub_encrypt_bytea | bytea, bytea, text | bytea + pgcrypto | extensions | pgp_sym_decrypt | bytea, text | text + pgcrypto | extensions | pgp_sym_decrypt | bytea, text, text | text + pgcrypto | extensions | pgp_sym_decrypt_bytea | bytea, text | bytea + pgcrypto | extensions | pgp_sym_decrypt_bytea | bytea, text, text | bytea + pgcrypto | extensions | pgp_sym_encrypt | text, text | bytea + pgcrypto | extensions | pgp_sym_encrypt | text, text, text | bytea + pgcrypto | extensions | pgp_sym_encrypt_bytea | bytea, text | bytea + pgcrypto | extensions | pgp_sym_encrypt_bytea | bytea, text, text | bytea + pgmq | pgmq | _belongs_to_pgmq | table_name text | boolean + pgmq | pgmq | _ensure_pg_partman_installed | | void + pgmq | pgmq | _get_partition_col | partition_interval text | text + pgmq | pgmq | _get_pg_partman_major_version | | integer + pgmq | pgmq | _get_pg_partman_schema | | text + pgmq | pgmq | archive | queue_name text, msg_id bigint | boolean + pgmq | pgmq | archive | queue_name text, msg_ids bigint[] | SETOF bigint + pgmq | pgmq | convert_archive_partitioned | table_name text, partition_interval text, retention_interval text, leading_partition integer | void + pgmq | pgmq | create | queue_name text | void + pgmq | pgmq | create_non_partitioned | queue_name text | void + pgmq | pgmq | create_partitioned | queue_name text, partition_interval text, retention_interval text | void + pgmq | pgmq | create_unlogged | queue_name text | void + pgmq | pgmq | delete | queue_name text, msg_id bigint | boolean + pgmq | pgmq | delete | queue_name text, msg_ids bigint[] | SETOF bigint + pgmq | pgmq | detach_archive | queue_name text | void + pgmq | pgmq | drop_queue | queue_name text | boolean + pgmq | pgmq | format_table_name | queue_name text, prefix text | text + pgmq | pgmq | list_queues | | SETOF pgmq.queue_record + pgmq | pgmq | metrics | queue_name text | pgmq.metrics_result + pgmq | pgmq | metrics_all | | SETOF pgmq.metrics_result + pgmq | pgmq | pop | queue_name text | SETOF pgmq.message_record + pgmq | pgmq | purge_queue | queue_name text | bigint + pgmq | pgmq | read | queue_name text, vt integer, qty integer | SETOF pgmq.message_record + pgmq | pgmq | read_with_poll | queue_name text, vt integer, qty integer, max_poll_seconds integer, poll_interval_ms integer | SETOF pgmq.message_record + pgmq | pgmq | send | queue_name text, msg jsonb, delay integer | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], delay integer | SETOF bigint + pgmq | pgmq | set_vt | queue_name text, msg_id bigint, vt integer | SETOF pgmq.message_record + pgmq | pgmq | validate_queue_name | queue_name text | void + pgroonga | pgroonga | command | groongacommand text | text + pgroonga | pgroonga | command | groongacommand text, arguments text[] | text + pgroonga | pgroonga | command_escape_value | value text | text + pgroonga | pgroonga | contain_varchar_array | character varying[], character varying | boolean + pgroonga | pgroonga | escape | value bigint | text + pgroonga | pgroonga | escape | value double precision | text + pgroonga | pgroonga | escape | value text, special_characters text | text + pgroonga | pgroonga | escape | value timestamp without time zone | text + pgroonga | pgroonga | escape | value smallint | text + pgroonga | pgroonga | escape | value text | text + pgroonga | pgroonga | escape | value timestamp with time zone | text + pgroonga | pgroonga | escape | value real | text + pgroonga | pgroonga | escape | value boolean | text + pgroonga | pgroonga | escape | value integer | text + pgroonga | pgroonga | flush | indexname cstring | boolean + pgroonga | pgroonga | highlight_html | target text, keywords text[] | text + pgroonga | pgroonga | match_in_text | text, text[] | boolean + pgroonga | pgroonga | match_in_text_array | text[], text[] | boolean + pgroonga | pgroonga | match_in_varchar | character varying, character varying[] | boolean + pgroonga | pgroonga | match_jsonb | jsonb, text | boolean + pgroonga | pgroonga | match_positions_byte | target text, keywords text[] | integer[] + pgroonga | pgroonga | match_positions_character | target text, keywords text[] | integer[] + pgroonga | pgroonga | match_query | text, text | boolean + pgroonga | pgroonga | match_query | character varying, character varying | boolean + pgroonga | pgroonga | match_query | text[], text | boolean + pgroonga | pgroonga | match_regexp | text, text | boolean + pgroonga | pgroonga | match_regexp | character varying, character varying | boolean + pgroonga | pgroonga | match_script_jsonb | jsonb, text | boolean + pgroonga | pgroonga | match_term | target text, term text | boolean + pgroonga | pgroonga | match_term | target text[], term text | boolean + pgroonga | pgroonga | match_term | target character varying[], term character varying | boolean + pgroonga | pgroonga | match_term | target character varying, term character varying | boolean + pgroonga | pgroonga | match_text | text, text | boolean + pgroonga | pgroonga | match_text_array | text[], text | boolean + pgroonga | pgroonga | match_varchar | character varying, character varying | boolean + pgroonga | pgroonga | prefix_in_text | text, text[] | boolean + pgroonga | pgroonga | prefix_in_text_array | text[], text[] | boolean + pgroonga | pgroonga | prefix_rk_in_text | text, text[] | boolean + pgroonga | pgroonga | prefix_rk_in_text_array | text[], text[] | boolean + pgroonga | pgroonga | prefix_rk_text | text, text | boolean + pgroonga | pgroonga | prefix_rk_text_array | text[], text | boolean + pgroonga | pgroonga | prefix_text | text, text | boolean + pgroonga | pgroonga | prefix_text_array | text[], text | boolean + pgroonga | pgroonga | query_escape | query text | text + pgroonga | pgroonga | query_expand | tablename cstring, termcolumnname text, synonymscolumnname text, query text | text + pgroonga | pgroonga | query_extract_keywords | query text | text[] + pgroonga | pgroonga | query_in_text | text, text[] | boolean + pgroonga | pgroonga | query_in_text_array | text[], text[] | boolean + pgroonga | pgroonga | query_in_varchar | character varying, character varying[] | boolean + pgroonga | pgroonga | query_jsonb | jsonb, text | boolean + pgroonga | pgroonga | query_text | text, text | boolean + pgroonga | pgroonga | query_text_array | text[], text | boolean + pgroonga | pgroonga | query_varchar | character varying, character varying | boolean + pgroonga | pgroonga | regexp_text | text, text | boolean + pgroonga | pgroonga | regexp_varchar | character varying, character varying | boolean + pgroonga | pgroonga | score | "row" record | double precision + pgroonga | pgroonga | script_jsonb | jsonb, text | boolean + pgroonga | pgroonga | script_text | text, text | boolean + pgroonga | pgroonga | script_text_array | text[], text | boolean + pgroonga | pgroonga | script_varchar | character varying, character varying | boolean + pgroonga | pgroonga | similar_text | text, text | boolean + pgroonga | pgroonga | similar_text_array | text[], text | boolean + pgroonga | pgroonga | similar_varchar | character varying, character varying | boolean + pgroonga | pgroonga | snippet_html | target text, keywords text[], width integer | text[] + pgroonga | pgroonga | table_name | indexname cstring | text + pgroonga | public | pgroonga_command | groongacommand text | text + pgroonga | public | pgroonga_command | groongacommand text, arguments text[] | text + pgroonga | public | pgroonga_command_escape_value | value text | text + pgroonga | public | pgroonga_condition | query text, weights integer[], scorers text[], schema_name text, index_name text, column_name text, fuzzy_max_distance_ratio real | pgroonga_condition + pgroonga | public | pgroonga_contain_varchar_array | character varying[], character varying | boolean + pgroonga | public | pgroonga_equal_query_text_array | targets text[], query text | boolean + pgroonga | public | pgroonga_equal_query_text_array_condition | targets text[], condition pgroonga_condition | boolean + pgroonga | public | pgroonga_equal_query_text_array_condition | targets text[], condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_equal_query_varchar_array | targets character varying[], query text | boolean + pgroonga | public | pgroonga_equal_query_varchar_array_condition | targets character varying[], condition pgroonga_condition | boolean + pgroonga | public | pgroonga_equal_query_varchar_array_condition | targets character varying[], condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_equal_text | target text, other text | boolean + pgroonga | public | pgroonga_equal_text_condition | target text, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_equal_text_condition | target text, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_equal_varchar | target character varying, other character varying | boolean + pgroonga | public | pgroonga_equal_varchar_condition | target character varying, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_equal_varchar_condition | target character varying, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_escape | value bigint | text + pgroonga | public | pgroonga_escape | value double precision | text + pgroonga | public | pgroonga_escape | value text, special_characters text | text + pgroonga | public | pgroonga_escape | value timestamp without time zone | text + pgroonga | public | pgroonga_escape | value smallint | text + pgroonga | public | pgroonga_escape | value text | text + pgroonga | public | pgroonga_escape | value timestamp with time zone | text + pgroonga | public | pgroonga_escape | value real | text + pgroonga | public | pgroonga_escape | value boolean | text + pgroonga | public | pgroonga_escape | value integer | text + pgroonga | public | pgroonga_flush | indexname cstring | boolean + pgroonga | public | pgroonga_handler | internal | index_am_handler + pgroonga | public | pgroonga_highlight_html | target text, keywords text[], indexname cstring | text + pgroonga | public | pgroonga_highlight_html | targets text[], keywords text[], indexname cstring | text[] + pgroonga | public | pgroonga_highlight_html | target text, keywords text[] | text + pgroonga | public | pgroonga_highlight_html | targets text[], keywords text[] | text[] + pgroonga | public | pgroonga_index_column_name | indexname cstring, columnindex integer | text + pgroonga | public | pgroonga_index_column_name | indexname cstring, columnname text | text + pgroonga | public | pgroonga_is_writable | | boolean + pgroonga | public | pgroonga_list_broken_indexes | | SETOF text + pgroonga | public | pgroonga_list_lagged_indexes | | SETOF text + pgroonga | public | pgroonga_match_in_text | text, text[] | boolean + pgroonga | public | pgroonga_match_in_text_array | text[], text[] | boolean + pgroonga | public | pgroonga_match_in_varchar | character varying, character varying[] | boolean + pgroonga | public | pgroonga_match_jsonb | jsonb, text | boolean + pgroonga | public | pgroonga_match_positions_byte | target text, keywords text[], indexname cstring | integer[] + pgroonga | public | pgroonga_match_positions_byte | target text, keywords text[] | integer[] + pgroonga | public | pgroonga_match_positions_character | target text, keywords text[], indexname cstring | integer[] + pgroonga | public | pgroonga_match_positions_character | target text, keywords text[] | integer[] + pgroonga | public | pgroonga_match_query | text, text | boolean + pgroonga | public | pgroonga_match_query | character varying, character varying | boolean + pgroonga | public | pgroonga_match_query | text[], text | boolean + pgroonga | public | pgroonga_match_regexp | text, text | boolean + pgroonga | public | pgroonga_match_regexp | character varying, character varying | boolean + pgroonga | public | pgroonga_match_script_jsonb | jsonb, text | boolean + pgroonga | public | pgroonga_match_term | target text, term text | boolean + pgroonga | public | pgroonga_match_term | target text[], term text | boolean + pgroonga | public | pgroonga_match_term | target character varying[], term character varying | boolean + pgroonga | public | pgroonga_match_term | target character varying, term character varying | boolean + pgroonga | public | pgroonga_match_text | text, text | boolean + pgroonga | public | pgroonga_match_text_array | text[], text | boolean + pgroonga | public | pgroonga_match_text_array_condition | target text[], condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_match_text_array_condition | target text[], condition pgroonga_condition | boolean + pgroonga | public | pgroonga_match_text_array_condition_with_scorers | target text[], condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_match_text_condition | target text, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_match_text_condition | target text, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_match_text_condition_with_scorers | target text, condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_match_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_match_varchar_condition | target character varying, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_match_varchar_condition | target character varying, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_match_varchar_condition_with_scorers | target character varying, condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_normalize | target text | text + pgroonga | public | pgroonga_normalize | target text, normalizername text | text + pgroonga | public | pgroonga_not_prefix_in_text | text, text[] | boolean + pgroonga | public | pgroonga_prefix_in_text | text, text[] | boolean + pgroonga | public | pgroonga_prefix_in_text_array | text[], text[] | boolean + pgroonga | public | pgroonga_prefix_in_varchar | character varying, character varying[] | boolean + pgroonga | public | pgroonga_prefix_in_varchar_array | character varying[], character varying[] | boolean + pgroonga | public | pgroonga_prefix_rk_in_text | text, text[] | boolean + pgroonga | public | pgroonga_prefix_rk_in_text_array | text[], text[] | boolean + pgroonga | public | pgroonga_prefix_rk_in_varchar | character varying, character varying[] | boolean + pgroonga | public | pgroonga_prefix_rk_in_varchar_array | character varying[], character varying[] | boolean + pgroonga | public | pgroonga_prefix_rk_text | text, text | boolean + pgroonga | public | pgroonga_prefix_rk_text_array | text[], text | boolean + pgroonga | public | pgroonga_prefix_rk_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_prefix_rk_varchar_array | character varying[], character varying | boolean + pgroonga | public | pgroonga_prefix_text | text, text | boolean + pgroonga | public | pgroonga_prefix_text_array | text[], text | boolean + pgroonga | public | pgroonga_prefix_text_array_condition | text[], pgroonga_condition | boolean + pgroonga | public | pgroonga_prefix_text_condition | text, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_prefix_text_condition | text, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_prefix_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_prefix_varchar_array | character varying[], character varying | boolean + pgroonga | public | pgroonga_prefix_varchar_array_condition | character varying[], pgroonga_condition | boolean + pgroonga | public | pgroonga_prefix_varchar_condition | target character varying, conditoin pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_prefix_varchar_condition | target character varying, conditoin pgroonga_condition | boolean + pgroonga | public | pgroonga_query_escape | query text | text + pgroonga | public | pgroonga_query_expand | tablename cstring, termcolumnname text, synonymscolumnname text, query text | text + pgroonga | public | pgroonga_query_extract_keywords | query text, index_name text | text[] + pgroonga | public | pgroonga_query_in_text | text, text[] | boolean + pgroonga | public | pgroonga_query_in_text_array | text[], text[] | boolean + pgroonga | public | pgroonga_query_in_varchar | character varying, character varying[] | boolean + pgroonga | public | pgroonga_query_jsonb | jsonb, text | boolean + pgroonga | public | pgroonga_query_text | text, text | boolean + pgroonga | public | pgroonga_query_text_array | text[], text | boolean + pgroonga | public | pgroonga_query_text_array_condition | targets text[], condition pgroonga_condition | boolean + pgroonga | public | pgroonga_query_text_array_condition | targets text[], condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_query_text_array_condition_with_scorers | targets text[], condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_query_text_condition | target text, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_query_text_condition | target text, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_query_text_condition_with_scorers | target text, condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_query_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_query_varchar_condition | target character varying, condition pgroonga_full_text_search_condition | boolean + pgroonga | public | pgroonga_query_varchar_condition | target character varying, condition pgroonga_condition | boolean + pgroonga | public | pgroonga_query_varchar_condition_with_scorers | target character varying, condition pgroonga_full_text_search_condition_with_scorers | boolean + pgroonga | public | pgroonga_regexp_in_text | text, text[] | boolean + pgroonga | public | pgroonga_regexp_in_varchar | character varying, character varying[] | boolean + pgroonga | public | pgroonga_regexp_text | text, text | boolean + pgroonga | public | pgroonga_regexp_text_array | targets text[], pattern text | boolean + pgroonga | public | pgroonga_regexp_text_array_condition | targets text[], pattern pgroonga_condition | boolean + pgroonga | public | pgroonga_regexp_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_result_to_jsonb_objects | result jsonb | jsonb + pgroonga | public | pgroonga_result_to_recordset | result jsonb | SETOF record + pgroonga | public | pgroonga_score | "row" record | double precision + pgroonga | public | pgroonga_score | tableoid oid, ctid tid | double precision + pgroonga | public | pgroonga_script_jsonb | jsonb, text | boolean + pgroonga | public | pgroonga_script_text | text, text | boolean + pgroonga | public | pgroonga_script_text_array | text[], text | boolean + pgroonga | public | pgroonga_script_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_set_writable | newwritable boolean | boolean + pgroonga | public | pgroonga_similar_text | text, text | boolean + pgroonga | public | pgroonga_similar_text_array | text[], text | boolean + pgroonga | public | pgroonga_similar_varchar | character varying, character varying | boolean + pgroonga | public | pgroonga_snippet_html | target text, keywords text[], width integer | text[] + pgroonga | public | pgroonga_table_name | indexname cstring | text + pgroonga | public | pgroonga_tokenize | target text, VARIADIC options text[] | json[] + pgroonga | public | pgroonga_vacuum | | boolean + pgroonga | public | pgroonga_wal_apply | indexname cstring | bigint + pgroonga | public | pgroonga_wal_apply | | bigint + pgroonga | public | pgroonga_wal_set_applied_position | block bigint, "offset" bigint | boolean + pgroonga | public | pgroonga_wal_set_applied_position | indexname cstring, block bigint, "offset" bigint | boolean + pgroonga | public | pgroonga_wal_set_applied_position | indexname cstring | boolean + pgroonga | public | pgroonga_wal_set_applied_position | | boolean + pgroonga | public | pgroonga_wal_status | | TABLE(name text, oid oid, current_block bigint, current_offset bigint, current_size bigint, last_block bigint, last_offset bigint, last_size bigint) + pgroonga | public | pgroonga_wal_truncate | indexname cstring | bigint + pgroonga | public | pgroonga_wal_truncate | | bigint + pgroonga_database | public | pgroonga_database_remove | | boolean + pgrouting | public | _pgr_alphashape | text, alpha double precision, OUT seq1 bigint, OUT textgeom text | SETOF record + pgrouting | public | _pgr_array_reverse | anyarray | anyarray + pgrouting | public | _pgr_articulationpoints | edges_sql text, OUT seq integer, OUT node bigint | SETOF record + pgrouting | public | _pgr_astar | edges_sql text, start_vids anyarray, end_vids anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, only_cost boolean, normal boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_astar | edges_sql text, combinations_sql text, directed boolean, heuristic integer, factor double precision, epsilon double precision, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bdastar | text, text, directed boolean, heuristic integer, factor double precision, epsilon double precision, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bdastar | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bddijkstra | text, anyarray, anyarray, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bddijkstra | text, text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bellmanford | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bellmanford | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_biconnectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record + pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, combinations_sql text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_binarybreadthfirstsearch | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bipartite | edges_sql text, OUT node bigint, OUT color bigint | SETOF record + pgrouting | public | _pgr_boost_version | | text + pgrouting | public | _pgr_breadthfirstsearch | edges_sql text, from_vids anyarray, max_depth bigint, directed boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_bridges | edges_sql text, OUT seq integer, OUT edge bigint | SETOF record + pgrouting | public | _pgr_build_type | | text + pgrouting | public | _pgr_checkcolumn | text, text, text, is_optional boolean, dryrun boolean | boolean + pgrouting | public | _pgr_checkquery | text | text + pgrouting | public | _pgr_checkverttab | vertname text, columnsarr text[], reporterrs integer, fnname text, OUT sname text, OUT vname text | record + pgrouting | public | _pgr_chinesepostman | edges_sql text, only_cost boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_compilation_date | | text + pgrouting | public | _pgr_compiler_version | | text + pgrouting | public | _pgr_connectedcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record + pgrouting | public | _pgr_contraction | edges_sql text, contraction_order bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | _pgr_createindex | tabname text, colname text, indext text, reporterrs integer, fnname text | void + pgrouting | public | _pgr_createindex | sname text, tname text, colname text, indext text, reporterrs integer, fnname text | void + pgrouting | public | _pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record + pgrouting | public | _pgr_dagshortestpath | text, anyarray, anyarray, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dagshortestpath | text, text, directed boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_depthfirstsearch | edges_sql text, root_vids anyarray, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstra | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, normal boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstra | edges_sql text, start_vids anyarray, end_vids anyarray, directed boolean, only_cost boolean, normal boolean, n_goals bigint, global boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstra | edges_sql text, combinations_sql text, directed boolean, only_cost boolean, n_goals bigint, global boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstra | edges_sql text, start_vids anyarray, end_vids anyarray, directed boolean, only_cost boolean, normal boolean, n_goals bigint, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstranear | text, anyarray, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstranear | text, anyarray, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstranear | text, bigint, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_dijkstravia | edges_sql text, via_vids anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | _pgr_drivingdistance | edges_sql text, start_vids anyarray, distance double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_edgecoloring | edges_sql text, OUT edge_id bigint, OUT color_id bigint | SETOF record + pgrouting | public | _pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_edgedisjointpaths | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_edwardmoore | edges_sql text, combinations_sql text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_edwardmoore | edges_sql text, from_vids anyarray, to_vids anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_endpoint | g geometry | geometry + pgrouting | public | _pgr_floydwarshall | edges_sql text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_get_statement | o_sql text | text + pgrouting | public | _pgr_getcolumnname | tab text, col text, reporterrs integer, fnname text | text + pgrouting | public | _pgr_getcolumnname | sname text, tname text, col text, reporterrs integer, fnname text | text + pgrouting | public | _pgr_getcolumntype | tab text, col text, reporterrs integer, fnname text | text + pgrouting | public | _pgr_getcolumntype | sname text, tname text, cname text, reporterrs integer, fnname text | text + pgrouting | public | _pgr_gettablename | tab text, reporterrs integer, fnname text, OUT sname text, OUT tname text | record + pgrouting | public | _pgr_git_hash | | text + pgrouting | public | _pgr_hawickcircuits | text, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_iscolumnindexed | tab text, col text, reporterrs integer, fnname text | boolean + pgrouting | public | _pgr_iscolumnindexed | sname text, tname text, cname text, reporterrs integer, fnname text | boolean + pgrouting | public | _pgr_iscolumnintable | tab text, col text | boolean + pgrouting | public | _pgr_isplanar | text | boolean + pgrouting | public | _pgr_johnson | edges_sql text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_kruskal | text, anyarray, fn_suffix text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_ksp | edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_lengauertarjandominatortree | edges_sql text, root_vid bigint, OUT seq integer, OUT vid bigint, OUT idom bigint | SETOF record + pgrouting | public | _pgr_lib_version | | text + pgrouting | public | _pgr_linegraph | text, directed boolean, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT reverse_cost double precision | SETOF record + pgrouting | public | _pgr_linegraphfull | text, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT edge bigint | SETOF record + pgrouting | public | _pgr_makeconnected | text, OUT seq bigint, OUT start_vid bigint, OUT end_vid bigint | SETOF record + pgrouting | public | _pgr_maxcardinalitymatch | edges_sql text, directed boolean, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint | SETOF record + pgrouting | public | _pgr_maxflow | edges_sql text, combinations_sql text, algorithm integer, only_flow boolean, OUT seq integer, OUT edge_id bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | _pgr_maxflow | edges_sql text, sources anyarray, targets anyarray, algorithm integer, only_flow boolean, OUT seq integer, OUT edge_id bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | _pgr_maxflowmincost | edges_sql text, sources anyarray, targets anyarray, only_cost boolean, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_maxflowmincost | edges_sql text, combinations_sql text, only_cost boolean, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_msg | msgkind integer, fnname text, msg text | void + pgrouting | public | _pgr_onerror | errcond boolean, reporterrs integer, fnname text, msgerr text, hinto text, msgok text | void + pgrouting | public | _pgr_operating_system | | text + pgrouting | public | _pgr_parameter_check | fn text, sql text, big boolean | boolean + pgrouting | public | _pgr_pgsql_version | | text + pgrouting | public | _pgr_pickdeliver | text, text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record + pgrouting | public | _pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record + pgrouting | public | _pgr_pointtoid | point geometry, tolerance double precision, vertname text, srid integer | bigint + pgrouting | public | _pgr_prim | text, anyarray, order_by text, max_depth bigint, distance double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_quote_ident | idname text | text + pgrouting | public | _pgr_sequentialvertexcoloring | edges_sql text, OUT vertex_id bigint, OUT color_id bigint | SETOF record + pgrouting | public | _pgr_startpoint | g geometry | geometry + pgrouting | public | _pgr_stoerwagner | edges_sql text, OUT seq integer, OUT edge bigint, OUT cost double precision, OUT mincut double precision | SETOF record + pgrouting | public | _pgr_strongcomponents | edges_sql text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record + pgrouting | public | _pgr_topologicalsort | edges_sql text, OUT seq integer, OUT sorted_v bigint | SETOF record + pgrouting | public | _pgr_transitiveclosure | edges_sql text, OUT seq integer, OUT vid bigint, OUT target_array bigint[] | SETOF record + pgrouting | public | _pgr_trsp | sql text, source_eid integer, source_pos double precision, target_eid integer, target_pos double precision, directed boolean, has_reverse_cost boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT cost double precision | SETOF record + pgrouting | public | _pgr_trsp | text, text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trsp | text, text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trsp | text, text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trsp | text, text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trsp_withpoints | text, text, text, text, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trsp_withpoints | text, text, text, anyarray, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT departure bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_trspvia | text, text, anyarray, boolean, boolean, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | _pgr_trspvia_withpoints | text, text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | _pgr_trspviavertices | sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT id3 integer, OUT cost double precision | SETOF record + pgrouting | public | _pgr_tsp | matrix_row_sql text, start_id bigint, end_id bigint, max_processing_time double precision, tries_per_temperature integer, max_changes_per_temperature integer, max_consecutive_non_changes integer, initial_temperature double precision, final_temperature double precision, cooling_factor double precision, randomize boolean, OUT seq integer, OUT node bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_tspeuclidean | coordinates_sql text, start_id bigint, end_id bigint, max_processing_time double precision, tries_per_temperature integer, max_changes_per_temperature integer, max_consecutive_non_changes integer, initial_temperature double precision, final_temperature double precision, cooling_factor double precision, randomize boolean, OUT seq integer, OUT node bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_turnrestrictedpath | text, text, bigint, bigint, integer, directed boolean, heap_paths boolean, stop_on_first boolean, strict boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_versionless | v1 text, v2 text | boolean + pgrouting | public | _pgr_vrponedepot | text, text, text, integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record + pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, combinations_sql text, directed boolean, driving_side character, details boolean, only_cost boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpoints | edges_sql text, points_sql text, start_pids anyarray, end_pids anyarray, directed boolean, driving_side character, details boolean, only_cost boolean, normal boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsdd | edges_sql text, points_sql text, start_pid anyarray, distance double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsksp | edges_sql text, points_sql text, start_pid bigint, end_pid bigint, k integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsvia | sql text, via_edges bigint[], fraction double precision[], directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | _pgr_withpointsvia | text, text, anyarray, boolean, boolean, boolean, character, boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | _trsp | text, text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _v4trsp | text, text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | _v4trsp | text, text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_alphashape | geometry, alpha double precision | geometry + pgrouting | public | pgr_analyzegraph | text, double precision, the_geom text, id text, source text, target text, rows_where text | character varying + pgrouting | public | pgr_analyzeoneway | text, text[], text[], text[], text[], two_way_if_null boolean, oneway text, source text, target text | text + pgrouting | public | pgr_articulationpoints | text, OUT node bigint | SETOF bigint + pgrouting | public | pgr_astar | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astar | text, text, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcost | text, bigint, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcost | text, text, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcost | text, anyarray, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcost | text, bigint, bigint, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_astarcostmatrix | text, anyarray, directed boolean, heuristic integer, factor double precision, epsilon double precision, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastar | text, text, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcost | text, anyarray, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcost | text, bigint, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcost | text, anyarray, bigint, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcost | text, bigint, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcost | text, text, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bdastarcostmatrix | text, anyarray, directed boolean, heuristic integer, factor numeric, epsilon numeric, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstra | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstra | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracost | text, text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracost | text, bigint, bigint, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracost | text, anyarray, bigint, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracost | text, anyarray, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracost | text, bigint, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bddijkstracostmatrix | text, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bellmanford | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bellmanford | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bellmanford | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bellmanford | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bellmanford | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_biconnectedcomponents | text, OUT seq bigint, OUT component bigint, OUT edge bigint | SETOF record + pgrouting | public | pgr_binarybreadthfirstsearch | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_binarybreadthfirstsearch | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_binarybreadthfirstsearch | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_binarybreadthfirstsearch | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_binarybreadthfirstsearch | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bipartite | text, OUT vertex_id bigint, OUT color_id bigint | SETOF record + pgrouting | public | pgr_boykovkolmogorov | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_boykovkolmogorov | text, text, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_boykovkolmogorov | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_boykovkolmogorov | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_boykovkolmogorov | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_breadthfirstsearch | text, anyarray, max_depth bigint, directed boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_breadthfirstsearch | text, bigint, max_depth bigint, directed boolean, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_bridges | text, OUT edge bigint | SETOF bigint + pgrouting | public | pgr_chinesepostman | text, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_chinesepostmancost | text | double precision + pgrouting | public | pgr_connectedcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record + pgrouting | public | pgr_contraction | text, bigint[], max_cycles integer, forbidden_vertices bigint[], directed boolean, OUT type text, OUT id bigint, OUT contracted_vertices bigint[], OUT source bigint, OUT target bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_createtopology | text, double precision, the_geom text, id text, source text, target text, rows_where text, clean boolean | character varying + pgrouting | public | pgr_createverticestable | text, the_geom text, source text, target text, rows_where text | text + pgrouting | public | pgr_cuthillmckeeordering | text, OUT seq bigint, OUT node bigint | SETOF record + pgrouting | public | pgr_dagshortestpath | text, anyarray, anyarray, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dagshortestpath | text, bigint, bigint, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dagshortestpath | text, anyarray, bigint, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dagshortestpath | text, text, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dagshortestpath | text, bigint, anyarray, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_degree | text, text, dryrun boolean, OUT node bigint, OUT degree bigint | SETOF record + pgrouting | public | pgr_depthfirstsearch | text, bigint, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_depthfirstsearch | text, anyarray, directed boolean, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstra | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracost | text, text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracost | text, bigint, bigint, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracost | text, anyarray, bigint, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracost | text, anyarray, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracost | text, bigint, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstracostmatrix | text, anyarray, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranear | text, bigint, anyarray, directed boolean, cap bigint, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranear | text, anyarray, bigint, directed boolean, cap bigint, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranear | text, anyarray, anyarray, directed boolean, cap bigint, global boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranear | text, text, directed boolean, cap bigint, global boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranearcost | text, text, directed boolean, cap bigint, global boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranearcost | text, anyarray, anyarray, directed boolean, cap bigint, global boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranearcost | text, bigint, anyarray, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstranearcost | text, anyarray, bigint, directed boolean, cap bigint, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_dijkstravia | text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, bigint, double precision, directed boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_drivingdistance | text, anyarray, double precision, directed boolean, equicost boolean, OUT seq integer, OUT from_v bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edgecoloring | text, OUT edge_id bigint, OUT color_id bigint | SETOF record + pgrouting | public | pgr_edgedisjointpaths | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edgedisjointpaths | text, text, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edgedisjointpaths | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edgedisjointpaths | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edgedisjointpaths | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edmondskarp | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_edmondskarp | text, text, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_edmondskarp | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_edmondskarp | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_edmondskarp | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_edwardmoore | text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edwardmoore | text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edwardmoore | text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edwardmoore | text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_edwardmoore | text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_extractvertices | text, dryrun boolean, OUT id bigint, OUT in_edges bigint[], OUT out_edges bigint[], OUT x double precision, OUT y double precision, OUT geom geometry | SETOF record + pgrouting | public | pgr_findcloseedges | text, geometry[], double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record + pgrouting | public | pgr_findcloseedges | text, geometry, double precision, cap integer, partial boolean, dryrun boolean, OUT edge_id bigint, OUT fraction double precision, OUT side character, OUT distance double precision, OUT geom geometry, OUT edge geometry | SETOF record + pgrouting | public | pgr_floydwarshall | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_full_version | OUT version text, OUT build_type text, OUT compile_date text, OUT library text, OUT system text, OUT postgresql text, OUT compiler text, OUT boost text, OUT hash text | record + pgrouting | public | pgr_hawickcircuits | text, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_isplanar | text | boolean + pgrouting | public | pgr_johnson | text, directed boolean, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskal | text, OUT edge bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskalbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_kruskaldfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_ksp | text, bigint, bigint, integer, directed boolean, heap_paths boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_lengauertarjandominatortree | text, bigint, OUT seq integer, OUT vertex_id bigint, OUT idom bigint | SETOF record + pgrouting | public | pgr_linegraph | text, directed boolean, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT reverse_cost double precision | SETOF record + pgrouting | public | pgr_linegraphfull | text, OUT seq integer, OUT source bigint, OUT target bigint, OUT cost double precision, OUT edge bigint | SETOF record + pgrouting | public | pgr_makeconnected | text, OUT seq bigint, OUT start_vid bigint, OUT end_vid bigint | SETOF record + pgrouting | public | pgr_maxcardinalitymatch | text, directed boolean, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint | SETOF record + pgrouting | public | pgr_maxcardinalitymatch | text, OUT edge bigint | SETOF bigint + pgrouting | public | pgr_maxflow | text, anyarray, anyarray | bigint + pgrouting | public | pgr_maxflow | text, text | bigint + pgrouting | public | pgr_maxflow | text, bigint, anyarray | bigint + pgrouting | public | pgr_maxflow | text, anyarray, bigint | bigint + pgrouting | public | pgr_maxflow | text, bigint, bigint | bigint + pgrouting | public | pgr_maxflowmincost | text, text, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_maxflowmincost | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_maxflowmincost | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_maxflowmincost | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_maxflowmincost | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT source bigint, OUT target bigint, OUT flow bigint, OUT residual_capacity bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_maxflowmincost_cost | text, anyarray, anyarray | double precision + pgrouting | public | pgr_maxflowmincost_cost | text, text | double precision + pgrouting | public | pgr_maxflowmincost_cost | text, bigint, anyarray | double precision + pgrouting | public | pgr_maxflowmincost_cost | text, anyarray, bigint | double precision + pgrouting | public | pgr_maxflowmincost_cost | text, bigint, bigint | double precision + pgrouting | public | pgr_nodenetwork | text, double precision, id text, the_geom text, table_ending text, rows_where text, outall boolean | text + pgrouting | public | pgr_pickdeliver | text, text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT stop_id bigint, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record + pgrouting | public | pgr_pickdelivereuclidean | text, text, factor double precision, max_cycles integer, initial_sol integer, OUT seq integer, OUT vehicle_seq integer, OUT vehicle_id bigint, OUT stop_seq integer, OUT stop_type integer, OUT order_id bigint, OUT cargo double precision, OUT travel_time double precision, OUT arrival_time double precision, OUT wait_time double precision, OUT service_time double precision, OUT departure_time double precision | SETOF record + pgrouting | public | pgr_prim | text, OUT edge bigint, OUT cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primbfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, bigint, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, double precision, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdd | text, anyarray, numeric, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, anyarray, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_primdfs | text, bigint, max_depth bigint, OUT seq bigint, OUT depth bigint, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_pushrelabel | text, anyarray, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_pushrelabel | text, text, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_pushrelabel | text, bigint, anyarray, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_pushrelabel | text, bigint, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_pushrelabel | text, anyarray, bigint, OUT seq integer, OUT edge bigint, OUT start_vid bigint, OUT end_vid bigint, OUT flow bigint, OUT residual_capacity bigint | SETOF record + pgrouting | public | pgr_sequentialvertexcoloring | text, OUT vertex_id bigint, OUT color_id bigint | SETOF record + pgrouting | public | pgr_stoerwagner | text, OUT seq integer, OUT edge bigint, OUT cost double precision, OUT mincut double precision | SETOF record + pgrouting | public | pgr_strongcomponents | text, OUT seq bigint, OUT component bigint, OUT node bigint | SETOF record + pgrouting | public | pgr_topologicalsort | text, OUT seq integer, OUT sorted_v bigint | SETOF record + pgrouting | public | pgr_transitiveclosure | text, OUT seq integer, OUT vid bigint, OUT target_array bigint[] | SETOF record + pgrouting | public | pgr_trsp | text, text, text, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, text, bigint, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, text, anyarray, anyarray, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, text, bigint, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, integer, double precision, integer, double precision, boolean, boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, integer, integer, boolean, boolean, restrictions_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT cost double precision | SETOF record + pgrouting | public | pgr_trsp | text, text, anyarray, bigint, directed boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp_withpoints | text, text, text, anyarray, bigint, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp_withpoints | text, text, text, bigint, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp_withpoints | text, text, text, anyarray, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp_withpoints | text, text, text, bigint, bigint, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trsp_withpoints | text, text, text, text, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_trspvia | text, text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | pgr_trspvia_withpoints | text, text, text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrouting | public | pgr_trspviaedges | text, integer[], double precision[], boolean, boolean, turn_restrict_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT id3 integer, OUT cost double precision | SETOF record + pgrouting | public | pgr_trspviavertices | text, anyarray, boolean, boolean, restrictions_sql text, OUT seq integer, OUT id1 integer, OUT id2 integer, OUT id3 integer, OUT cost double precision | SETOF record + pgrouting | public | pgr_tsp | text, start_id bigint, end_id bigint, max_processing_time double precision, tries_per_temperature integer, max_changes_per_temperature integer, max_consecutive_non_changes integer, initial_temperature double precision, final_temperature double precision, cooling_factor double precision, randomize boolean, OUT seq integer, OUT node bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_tspeuclidean | text, start_id bigint, end_id bigint, max_processing_time double precision, tries_per_temperature integer, max_changes_per_temperature integer, max_consecutive_non_changes integer, initial_temperature double precision, final_temperature double precision, cooling_factor double precision, randomize boolean, OUT seq integer, OUT node bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_turnrestrictedpath | text, text, bigint, bigint, integer, directed boolean, heap_paths boolean, stop_on_first boolean, strict boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_version | | text + pgrouting | public | pgr_vrponedepot | text, text, text, integer, OUT oid integer, OUT opos integer, OUT vid integer, OUT tarrival integer, OUT tdepart integer | SETOF record + pgrouting | public | pgr_withpoints | text, text, anyarray, bigint, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpoints | text, text, bigint, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpoints | text, text, text, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpoints | text, text, bigint, bigint, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpoints | text, text, anyarray, anyarray, directed boolean, driving_side character, details boolean, OUT seq integer, OUT path_seq integer, OUT start_pid bigint, OUT end_pid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscost | text, text, text, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscost | text, text, bigint, bigint, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscost | text, text, anyarray, anyarray, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscost | text, text, anyarray, bigint, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscost | text, text, bigint, anyarray, directed boolean, driving_side character, OUT start_pid bigint, OUT end_pid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointscostmatrix | text, text, anyarray, directed boolean, driving_side character, OUT start_vid bigint, OUT end_vid bigint, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsdd | text, text, bigint, double precision, directed boolean, driving_side character, details boolean, OUT seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsdd | text, text, anyarray, double precision, directed boolean, driving_side character, details boolean, equicost boolean, OUT seq integer, OUT start_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsksp | text, text, bigint, bigint, integer, directed boolean, heap_paths boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision | SETOF record + pgrouting | public | pgr_withpointsvia | text, text, anyarray, directed boolean, strict boolean, u_turn_on_edge boolean, driving_side character, details boolean, OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT start_vid bigint, OUT end_vid bigint, OUT node bigint, OUT edge bigint, OUT cost double precision, OUT agg_cost double precision, OUT route_agg_cost double precision | SETOF record + pgrowlocks | public | pgrowlocks | relname text, OUT locked_row tid, OUT locker xid, OUT multi boolean, OUT xids xid[], OUT modes text[], OUT pids integer[] | SETOF record + pgsodium | pgsodium | create_key | key_type pgsodium.key_type, name text, raw_key bytea, raw_key_nonce bytea, parent_key uuid, key_context bytea, expires timestamp with time zone, associated_data text | pgsodium.valid_key + pgsodium | pgsodium | create_mask_view | relid oid, debug boolean | void + pgsodium | pgsodium | create_mask_view | relid oid, subid integer, debug boolean | void + pgsodium | pgsodium | crypto_aead_det_decrypt | message bytea, additional bytea, key_uuid uuid, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_decrypt | message bytea, additional bytea, key_id bigint, context bytea, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_decrypt | message bytea, additional bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_aead_det_decrypt | ciphertext bytea, additional bytea, key bytea, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_encrypt | message bytea, additional bytea, key_uuid uuid, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_encrypt | message bytea, additional bytea, key_id bigint, context bytea, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_encrypt | message bytea, additional bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_aead_det_encrypt | message bytea, additional bytea, key bytea, nonce bytea | bytea + pgsodium | pgsodium | crypto_aead_det_keygen | | bytea + pgsodium | pgsodium | crypto_aead_det_noncegen | | bytea + pgsodium | pgsodium | crypto_aead_ietf_decrypt | message bytea, additional bytea, nonce bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_aead_ietf_decrypt | message bytea, additional bytea, nonce bytea, key bytea | bytea + pgsodium | pgsodium | crypto_aead_ietf_decrypt | message bytea, additional bytea, nonce bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_aead_ietf_encrypt | message bytea, additional bytea, nonce bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_aead_ietf_encrypt | message bytea, additional bytea, nonce bytea, key bytea | bytea + pgsodium | pgsodium | crypto_aead_ietf_encrypt | message bytea, additional bytea, nonce bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_aead_ietf_keygen | | bytea + pgsodium | pgsodium | crypto_aead_ietf_noncegen | | bytea + pgsodium | pgsodium | crypto_auth | message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_auth | message bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_auth | message bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_auth_hmacsha256 | message bytea, secret bytea | bytea + pgsodium | pgsodium | crypto_auth_hmacsha256 | message bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_auth_hmacsha256 | message bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_auth_hmacsha256_keygen | | bytea + pgsodium | pgsodium | crypto_auth_hmacsha256_verify | hash bytea, message bytea, key_id bigint, context bytea | boolean + pgsodium | pgsodium | crypto_auth_hmacsha256_verify | signature bytea, message bytea, key_uuid uuid | boolean + pgsodium | pgsodium | crypto_auth_hmacsha256_verify | hash bytea, message bytea, secret bytea | boolean + pgsodium | pgsodium | crypto_auth_hmacsha512 | message bytea, secret bytea | bytea + pgsodium | pgsodium | crypto_auth_hmacsha512 | message bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_auth_hmacsha512 | message bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_auth_hmacsha512_keygen | | bytea + pgsodium | pgsodium | crypto_auth_hmacsha512_verify | hash bytea, message bytea, key_id bigint, context bytea | boolean + pgsodium | pgsodium | crypto_auth_hmacsha512_verify | signature bytea, message bytea, key_uuid uuid | boolean + pgsodium | pgsodium | crypto_auth_hmacsha512_verify | hash bytea, message bytea, secret bytea | boolean + pgsodium | pgsodium | crypto_auth_keygen | | bytea + pgsodium | pgsodium | crypto_auth_verify | mac bytea, message bytea, key_uuid uuid | boolean + pgsodium | pgsodium | crypto_auth_verify | mac bytea, message bytea, key bytea | boolean + pgsodium | pgsodium | crypto_auth_verify | mac bytea, message bytea, key_id bigint, context bytea | boolean + pgsodium | pgsodium | crypto_box | message bytea, nonce bytea, public bytea, secret bytea | bytea + pgsodium | pgsodium | crypto_box_new_keypair | | pgsodium.crypto_box_keypair + pgsodium | pgsodium | crypto_box_new_seed | | bytea + pgsodium | pgsodium | crypto_box_noncegen | | bytea + pgsodium | pgsodium | crypto_box_open | ciphertext bytea, nonce bytea, public bytea, secret bytea | bytea + pgsodium | pgsodium | crypto_box_seal | message bytea, public_key bytea | bytea + pgsodium | pgsodium | crypto_box_seal_open | ciphertext bytea, public_key bytea, secret_key bytea | bytea + pgsodium | pgsodium | crypto_box_seed_new_keypair | seed bytea | pgsodium.crypto_box_keypair + pgsodium | pgsodium | crypto_cmp | text, text | boolean + pgsodium | pgsodium | crypto_generichash | message bytea, key bigint, context bytea | bytea + pgsodium | pgsodium | crypto_generichash | message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_generichash | message bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_generichash_keygen | | bytea + pgsodium | pgsodium | crypto_hash_sha256 | message bytea | bytea + pgsodium | pgsodium | crypto_hash_sha512 | message bytea | bytea + pgsodium | pgsodium | crypto_kdf_derive_from_key | subkey_size integer, subkey_id bigint, context bytea, primary_key uuid | bytea + pgsodium | pgsodium | crypto_kdf_derive_from_key | subkey_size bigint, subkey_id bigint, context bytea, primary_key bytea | bytea + pgsodium | pgsodium | crypto_kdf_keygen | | bytea + pgsodium | pgsodium | crypto_kx_client_session_keys | client_pk bytea, client_sk bytea, server_pk bytea | pgsodium.crypto_kx_session + pgsodium | pgsodium | crypto_kx_new_keypair | | pgsodium.crypto_kx_keypair + pgsodium | pgsodium | crypto_kx_new_seed | | bytea + pgsodium | pgsodium | crypto_kx_seed_new_keypair | seed bytea | pgsodium.crypto_kx_keypair + pgsodium | pgsodium | crypto_kx_server_session_keys | server_pk bytea, server_sk bytea, client_pk bytea | pgsodium.crypto_kx_session + pgsodium | pgsodium | crypto_pwhash | password bytea, salt bytea | bytea + pgsodium | pgsodium | crypto_pwhash_saltgen | | bytea + pgsodium | pgsodium | crypto_pwhash_str | password bytea | bytea + pgsodium | pgsodium | crypto_pwhash_str_verify | hashed_password bytea, password bytea | boolean + pgsodium | pgsodium | crypto_secretbox | message bytea, nonce bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_secretbox | message bytea, nonce bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_secretbox | message bytea, nonce bytea, key bytea | bytea + pgsodium | pgsodium | crypto_secretbox_keygen | | bytea + pgsodium | pgsodium | crypto_secretbox_noncegen | | bytea + pgsodium | pgsodium | crypto_secretbox_open | ciphertext bytea, nonce bytea, key bytea | bytea + pgsodium | pgsodium | crypto_secretbox_open | message bytea, nonce bytea, key_id bigint, context bytea | bytea + pgsodium | pgsodium | crypto_secretbox_open | message bytea, nonce bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_secretstream_keygen | | bytea + pgsodium | pgsodium | crypto_shorthash | message bytea, key bigint, context bytea | bytea + pgsodium | pgsodium | crypto_shorthash | message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_shorthash | message bytea, key_uuid uuid | bytea + pgsodium | pgsodium | crypto_shorthash_keygen | | bytea + pgsodium | pgsodium | crypto_sign | message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_sign_detached | message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_sign_final_create | state bytea, key bytea | bytea + pgsodium | pgsodium | crypto_sign_final_verify | state bytea, signature bytea, key bytea | boolean + pgsodium | pgsodium | crypto_sign_init | | bytea + pgsodium | pgsodium | crypto_sign_new_keypair | | pgsodium.crypto_sign_keypair + pgsodium | pgsodium | crypto_sign_new_seed | | bytea + pgsodium | pgsodium | crypto_sign_open | signed_message bytea, key bytea | bytea + pgsodium | pgsodium | crypto_sign_seed_new_keypair | seed bytea | pgsodium.crypto_sign_keypair + pgsodium | pgsodium | crypto_sign_update | state bytea, message bytea | bytea + pgsodium | pgsodium | crypto_sign_update_agg | message bytea | bytea + pgsodium | pgsodium | crypto_sign_update_agg | state bytea, message bytea | bytea + pgsodium | pgsodium | crypto_sign_update_agg1 | state bytea, message bytea | bytea + pgsodium | pgsodium | crypto_sign_update_agg2 | cur_state bytea, initial_state bytea, message bytea | bytea + pgsodium | pgsodium | crypto_sign_verify_detached | sig bytea, message bytea, key bytea | boolean + pgsodium | pgsodium | crypto_signcrypt_new_keypair | | pgsodium.crypto_signcrypt_keypair + pgsodium | pgsodium | crypto_signcrypt_sign_after | state bytea, sender_sk bytea, ciphertext bytea | bytea + pgsodium | pgsodium | crypto_signcrypt_sign_before | sender bytea, recipient bytea, sender_sk bytea, recipient_pk bytea, additional bytea | pgsodium.crypto_signcrypt_state_key + pgsodium | pgsodium | crypto_signcrypt_verify_after | state bytea, signature bytea, sender_pk bytea, ciphertext bytea | boolean + pgsodium | pgsodium | crypto_signcrypt_verify_before | signature bytea, sender bytea, recipient bytea, additional bytea, sender_pk bytea, recipient_sk bytea | pgsodium.crypto_signcrypt_state_key + pgsodium | pgsodium | crypto_signcrypt_verify_public | signature bytea, sender bytea, recipient bytea, additional bytea, sender_pk bytea, ciphertext bytea | boolean + pgsodium | pgsodium | crypto_stream_xchacha20 | bigint, bytea, bytea | bytea + pgsodium | pgsodium | crypto_stream_xchacha20 | bigint, bytea, bigint, context bytea | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_keygen | | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_noncegen | | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_xor | bytea, bytea, bigint, context bytea | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_xor | bytea, bytea, bytea | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_xor_ic | bytea, bytea, bigint, bigint, context bytea | bytea + pgsodium | pgsodium | crypto_stream_xchacha20_xor_ic | bytea, bytea, bigint, bytea | bytea + pgsodium | pgsodium | decrypted_columns | relid oid | text + pgsodium | pgsodium | derive_key | key_id bigint, key_len integer, context bytea | bytea + pgsodium | pgsodium | disable_security_label_trigger | | void + pgsodium | pgsodium | enable_security_label_trigger | | void + pgsodium | pgsodium | encrypted_column | relid oid, m record | text + pgsodium | pgsodium | encrypted_columns | relid oid | text + pgsodium | pgsodium | get_key_by_id | uuid | pgsodium.valid_key + pgsodium | pgsodium | get_key_by_name | text | pgsodium.valid_key + pgsodium | pgsodium | get_named_keys | filter text | SETOF pgsodium.valid_key + pgsodium | pgsodium | has_mask | role regrole, source_name text | boolean + pgsodium | pgsodium | key_encrypt_secret_raw_key | | trigger + pgsodium | pgsodium | mask_columns | source_relid oid | TABLE(attname name, key_id text, key_id_column text, associated_column text, nonce_column text, format_type text) + pgsodium | pgsodium | mask_role | masked_role regrole, source_name text, view_name text | void + pgsodium | pgsodium | pgsodium_derive | key_id bigint, key_len integer, context bytea | bytea + pgsodium | pgsodium | quote_assoc | text, boolean | text + pgsodium | pgsodium | randombytes_buf | size integer | bytea + pgsodium | pgsodium | randombytes_buf_deterministic | size integer, seed bytea | bytea + pgsodium | pgsodium | randombytes_new_seed | | bytea + pgsodium | pgsodium | randombytes_random | | integer + pgsodium | pgsodium | randombytes_uniform | upper_bound integer | integer + pgsodium | pgsodium | sodium_base642bin | base64 text | bytea + pgsodium | pgsodium | sodium_bin2base64 | bin bytea | text + pgsodium | pgsodium | trg_mask_update | | event_trigger + pgsodium | pgsodium | update_mask | target oid, debug boolean | void + pgsodium | pgsodium | update_masks | debug boolean | void + pgsodium | pgsodium | version | | text + pgstattuple | public | pg_relpages | relname text | bigint + pgstattuple | public | pg_relpages | relname regclass | bigint + pgstattuple | public | pgstatginindex | relname regclass, OUT version integer, OUT pending_pages integer, OUT pending_tuples bigint | record + pgstattuple | public | pgstathashindex | relname regclass, OUT version integer, OUT bucket_pages bigint, OUT overflow_pages bigint, OUT bitmap_pages bigint, OUT unused_pages bigint, OUT live_items bigint, OUT dead_items bigint, OUT free_percent double precision | record + pgstattuple | public | pgstatindex | relname regclass, OUT version integer, OUT tree_level integer, OUT index_size bigint, OUT root_block_no bigint, OUT internal_pages bigint, OUT leaf_pages bigint, OUT empty_pages bigint, OUT deleted_pages bigint, OUT avg_leaf_density double precision, OUT leaf_fragmentation double precision | record + pgstattuple | public | pgstatindex | relname text, OUT version integer, OUT tree_level integer, OUT index_size bigint, OUT root_block_no bigint, OUT internal_pages bigint, OUT leaf_pages bigint, OUT empty_pages bigint, OUT deleted_pages bigint, OUT avg_leaf_density double precision, OUT leaf_fragmentation double precision | record + pgstattuple | public | pgstattuple | reloid regclass, OUT table_len bigint, OUT tuple_count bigint, OUT tuple_len bigint, OUT tuple_percent double precision, OUT dead_tuple_count bigint, OUT dead_tuple_len bigint, OUT dead_tuple_percent double precision, OUT free_space bigint, OUT free_percent double precision | record + pgstattuple | public | pgstattuple | relname text, OUT table_len bigint, OUT tuple_count bigint, OUT tuple_len bigint, OUT tuple_percent double precision, OUT dead_tuple_count bigint, OUT dead_tuple_len bigint, OUT dead_tuple_percent double precision, OUT free_space bigint, OUT free_percent double precision | record + pgstattuple | public | pgstattuple_approx | reloid regclass, OUT table_len bigint, OUT scanned_percent double precision, OUT approx_tuple_count bigint, OUT approx_tuple_len bigint, OUT approx_tuple_percent double precision, OUT dead_tuple_count bigint, OUT dead_tuple_len bigint, OUT dead_tuple_percent double precision, OUT approx_free_space bigint, OUT approx_free_percent double precision | record + pgtap | public | _add | text, integer | integer + pgtap | public | _add | text, integer, text | integer + pgtap | public | _alike | boolean, anyelement, text, text | text + pgtap | public | _ancestor_of | name, name, integer | boolean + pgtap | public | _ancestor_of | name, name, name, name, integer | boolean + pgtap | public | _are | text, name[], name[], text | text + pgtap | public | _areni | text, text[], text[], text | text + pgtap | public | _array_to_sorted_string | name[], text | text + pgtap | public | _assets_are | text, text[], text[], text | text + pgtap | public | _cast_exists | name, name, name, name | boolean + pgtap | public | _cast_exists | name, name | boolean + pgtap | public | _cast_exists | name, name, name | boolean + pgtap | public | _cdi | name, name, anyelement | text + pgtap | public | _cdi | name, name, anyelement, text | text + pgtap | public | _cdi | name, name, name, anyelement, text | text + pgtap | public | _cexists | name, name | boolean + pgtap | public | _cexists | name, name, name | boolean + pgtap | public | _ckeys | name, character | name[] + pgtap | public | _ckeys | name, name, character | name[] + pgtap | public | _cleanup | | boolean + pgtap | public | _cmp_types | oid, name | boolean + pgtap | public | _col_is_null | name, name, name, text, boolean | text + pgtap | public | _col_is_null | name, name, text, boolean | text + pgtap | public | _constraint | name, character, name[], text, text | text + pgtap | public | _constraint | name, name, character, name[], text, text | text + pgtap | public | _contract_on | text | "char" + pgtap | public | _currtest | | integer + pgtap | public | _db_privs | | name[] + pgtap | public | _def_is | text, text, anyelement, text | text + pgtap | public | _definer | name, name, name[] | boolean + pgtap | public | _definer | name, name[] | boolean + pgtap | public | _definer | name | boolean + pgtap | public | _definer | name, name | boolean + pgtap | public | _dexists | name | boolean + pgtap | public | _dexists | name, name | boolean + pgtap | public | _do_ne | text, text, text, text | text + pgtap | public | _docomp | text, text, text, text | text + pgtap | public | _error_diag | text, text, text, text, text, text, text, text, text, text | text + pgtap | public | _expand_context | character | text + pgtap | public | _expand_on | character | text + pgtap | public | _expand_vol | character | text + pgtap | public | _ext_exists | name | boolean + pgtap | public | _ext_exists | name, name | boolean + pgtap | public | _extensions | name | SETOF name + pgtap | public | _extensions | | SETOF name + pgtap | public | _extras | character, name, name[] | name[] + pgtap | public | _extras | character[], name[] | name[] + pgtap | public | _extras | character, name[] | name[] + pgtap | public | _extras | character[], name, name[] | name[] + pgtap | public | _finish | integer, integer, integer, boolean | SETOF text + pgtap | public | _fkexists | name, name, name[] | boolean + pgtap | public | _fkexists | name, name[] | boolean + pgtap | public | _fprivs_are | text, name, name[], text | text + pgtap | public | _func_compare | name, name, boolean, text | text + pgtap | public | _func_compare | name, name, name[], anyelement, anyelement, text | text + pgtap | public | _func_compare | name, name, name[], boolean, text | text + pgtap | public | _func_compare | name, name, anyelement, anyelement, text | text + pgtap | public | _funkargs | name[] | text + pgtap | public | _get | text | integer + pgtap | public | _get_ac_privs | name, text | text[] + pgtap | public | _get_col_ns_type | name, name, name | text + pgtap | public | _get_col_privs | name, text, name | text[] + pgtap | public | _get_col_type | name, name | text + pgtap | public | _get_col_type | name, name, name | text + pgtap | public | _get_context | name, name | "char" + pgtap | public | _get_db_owner | name | name + pgtap | public | _get_db_privs | name, text | text[] + pgtap | public | _get_dtype | name, text, boolean | text + pgtap | public | _get_dtype | name | text + pgtap | public | _get_fdw_privs | name, text | text[] + pgtap | public | _get_func_owner | name, name, name[] | name + pgtap | public | _get_func_owner | name, name[] | name + pgtap | public | _get_func_privs | text, text | text[] + pgtap | public | _get_index_owner | name, name | name + pgtap | public | _get_index_owner | name, name, name | name + pgtap | public | _get_lang_privs | name, text | text[] + pgtap | public | _get_language_owner | name | name + pgtap | public | _get_latest | text | integer[] + pgtap | public | _get_latest | text, integer | integer + pgtap | public | _get_note | integer | text + pgtap | public | _get_note | text | text + pgtap | public | _get_opclass_owner | name | name + pgtap | public | _get_opclass_owner | name, name | name + pgtap | public | _get_rel_owner | character[], name, name | name + pgtap | public | _get_rel_owner | character, name | name + pgtap | public | _get_rel_owner | name | name + pgtap | public | _get_rel_owner | name, name | name + pgtap | public | _get_rel_owner | character[], name | name + pgtap | public | _get_rel_owner | character, name, name | name + pgtap | public | _get_schema_owner | name | name + pgtap | public | _get_schema_privs | name, text | text[] + pgtap | public | _get_sequence_privs | name, text | text[] + pgtap | public | _get_server_privs | name, text | text[] + pgtap | public | _get_table_privs | name, text | text[] + pgtap | public | _get_tablespace_owner | name | name + pgtap | public | _get_tablespaceprivs | name, text | text[] + pgtap | public | _get_type_owner | name | name + pgtap | public | _get_type_owner | name, name | name + pgtap | public | _got_func | name, name, name[] | boolean + pgtap | public | _got_func | name, name[] | boolean + pgtap | public | _got_func | name | boolean + pgtap | public | _got_func | name, name | boolean + pgtap | public | _grolist | name | oid[] + pgtap | public | _has_def | name, name | boolean + pgtap | public | _has_def | name, name, name | boolean + pgtap | public | _has_group | name | boolean + pgtap | public | _has_role | name | boolean + pgtap | public | _has_type | name, name, character[] | boolean + pgtap | public | _has_type | name, character[] | boolean + pgtap | public | _has_user | name | boolean + pgtap | public | _hasc | name, character | boolean + pgtap | public | _hasc | name, name, character | boolean + pgtap | public | _have_index | name, name | boolean + pgtap | public | _have_index | name, name, name | boolean + pgtap | public | _ident_array_to_sorted_string | name[], text | text + pgtap | public | _ident_array_to_string | name[], text | text + pgtap | public | _ikeys | name, name | text[] + pgtap | public | _ikeys | name, name, name | text[] + pgtap | public | _inherited | name | boolean + pgtap | public | _inherited | name, name | boolean + pgtap | public | _is_indexed | name, name, text[] | boolean + pgtap | public | _is_instead | name, name | boolean + pgtap | public | _is_instead | name, name, name | boolean + pgtap | public | _is_schema | name | boolean + pgtap | public | _is_super | name | boolean + pgtap | public | _is_trusted | name | boolean + pgtap | public | _is_verbose | | boolean + pgtap | public | _keys | name, character | SETOF name[] + pgtap | public | _keys | name, name, character | SETOF name[] + pgtap | public | _lang | name, name, name[] | name + pgtap | public | _lang | name, name[] | name + pgtap | public | _lang | name | name + pgtap | public | _lang | name, name | name + pgtap | public | _missing | character, name, name[] | name[] + pgtap | public | _missing | character[], name[] | name[] + pgtap | public | _missing | character, name[] | name[] + pgtap | public | _missing | character[], name, name[] | name[] + pgtap | public | _nosuch | name, name, name[] | text + pgtap | public | _op_exists | name, name, name, name | boolean + pgtap | public | _op_exists | name, name, name, name, name | boolean + pgtap | public | _op_exists | name, name, name | boolean + pgtap | public | _opc_exists | name | boolean + pgtap | public | _opc_exists | name, name | boolean + pgtap | public | _partof | name, name, name, name | boolean + pgtap | public | _partof | name, name | boolean + pgtap | public | _parts | name | SETOF name + pgtap | public | _parts | name, name | SETOF name + pgtap | public | _pg_sv_column_array | oid, smallint[] | name[] + pgtap | public | _pg_sv_table_accessible | oid, oid | boolean + pgtap | public | _pg_sv_type_array | oid[] | name[] + pgtap | public | _prokind | p_oid oid | "char" + pgtap | public | _query | text | text + pgtap | public | _quote_ident_like | text, text | text + pgtap | public | _refine_vol | text | text + pgtap | public | _relcomp | text, text, text, text, text | text + pgtap | public | _relcomp | text, text, text, text | text + pgtap | public | _relcomp | text, anyarray, text, text | text + pgtap | public | _relexists | name | boolean + pgtap | public | _relexists | name, name | boolean + pgtap | public | _relne | text, text, text, text | text + pgtap | public | _relne | text, anyarray, text, text | text + pgtap | public | _returns | name, name, name[] | text + pgtap | public | _returns | name, name[] | text + pgtap | public | _returns | name | text + pgtap | public | _returns | name, name | text + pgtap | public | _rexists | character[], name, name | boolean + pgtap | public | _rexists | character, name | boolean + pgtap | public | _rexists | character[], name | boolean + pgtap | public | _rexists | character, name, name | boolean + pgtap | public | _rule_on | name, name | "char" + pgtap | public | _rule_on | name, name, name | "char" + pgtap | public | _runem | text[], boolean | SETOF text + pgtap | public | _runner | text[], text[], text[], text[], text[] | SETOF text + pgtap | public | _set | text, integer | integer + pgtap | public | _set | integer, integer | integer + pgtap | public | _set | text, integer, text | integer + pgtap | public | _strict | name, name, name[] | boolean + pgtap | public | _strict | name, name[] | boolean + pgtap | public | _strict | name | boolean + pgtap | public | _strict | name, name | boolean + pgtap | public | _table_privs | | name[] + pgtap | public | _temptable | text, text | text + pgtap | public | _temptable | anyarray, text | text + pgtap | public | _temptypes | text | text + pgtap | public | _time_trials | text, integer, numeric | SETOF _time_trial_type + pgtap | public | _tlike | boolean, text, text, text | text + pgtap | public | _todo | | text + pgtap | public | _trig | name, name | boolean + pgtap | public | _trig | name, name, name | boolean + pgtap | public | _type_func | "char", name | boolean + pgtap | public | _type_func | "char", name, name, name[] | boolean + pgtap | public | _type_func | "char", name, name[] | boolean + pgtap | public | _type_func | "char", name, name | boolean + pgtap | public | _types_are | name, name[], text, character[] | text + pgtap | public | _types_are | name[], text, character[] | text + pgtap | public | _unalike | boolean, anyelement, text, text | text + pgtap | public | _vol | name, name, name[] | text + pgtap | public | _vol | name, name[] | text + pgtap | public | _vol | name | text + pgtap | public | _vol | name, name | text + pgtap | public | add_result | boolean, boolean, text, text, text | integer + pgtap | public | alike | anyelement, text | text + pgtap | public | alike | anyelement, text, text | text + pgtap | public | any_column_privs_are | name, name, name, name[], text | text + pgtap | public | any_column_privs_are | name, name, name[] | text + pgtap | public | any_column_privs_are | name, name, name, name[] | text + pgtap | public | any_column_privs_are | name, name, name[], text | text + pgtap | public | bag_eq | text, anyarray, text | text + pgtap | public | bag_eq | text, text | text + pgtap | public | bag_eq | text, text, text | text + pgtap | public | bag_eq | text, anyarray | text + pgtap | public | bag_has | text, text | text + pgtap | public | bag_has | text, text, text | text + pgtap | public | bag_hasnt | text, text | text + pgtap | public | bag_hasnt | text, text, text | text + pgtap | public | bag_ne | text, anyarray, text | text + pgtap | public | bag_ne | text, text | text + pgtap | public | bag_ne | text, text, text | text + pgtap | public | bag_ne | text, anyarray | text + pgtap | public | can | name[] | text + pgtap | public | can | name[], text | text + pgtap | public | can | name, name[], text | text + pgtap | public | can | name, name[] | text + pgtap | public | cast_context_is | name, name, text, text | text + pgtap | public | cast_context_is | name, name, text | text + pgtap | public | casts_are | text[] | text + pgtap | public | casts_are | text[], text | text + pgtap | public | check_test | text, boolean | SETOF text + pgtap | public | check_test | text, boolean, text, text, text, boolean | SETOF text + pgtap | public | check_test | text, boolean, text, text | SETOF text + pgtap | public | check_test | text, boolean, text | SETOF text + pgtap | public | check_test | text, boolean, text, text, text | SETOF text + pgtap | public | cmp_ok | anyelement, text, anyelement | text + pgtap | public | cmp_ok | anyelement, text, anyelement, text | text + pgtap | public | col_default_is | name, name, anyelement | text + pgtap | public | col_default_is | name, name, text, text | text + pgtap | public | col_default_is | name, name, name, text, text | text + pgtap | public | col_default_is | name, name, text | text + pgtap | public | col_default_is | name, name, anyelement, text | text + pgtap | public | col_default_is | name, name, name, anyelement, text | text + pgtap | public | col_has_check | name, name, name, text | text + pgtap | public | col_has_check | name, name[], text | text + pgtap | public | col_has_check | name, name[] | text + pgtap | public | col_has_check | name, name, text | text + pgtap | public | col_has_check | name, name, name[], text | text + pgtap | public | col_has_check | name, name | text + pgtap | public | col_has_default | name, name, name, text | text + pgtap | public | col_has_default | name, name, text | text + pgtap | public | col_has_default | name, name | text + pgtap | public | col_hasnt_default | name, name, name, text | text + pgtap | public | col_hasnt_default | name, name, text | text + pgtap | public | col_hasnt_default | name, name | text + pgtap | public | col_is_fk | name, name, name, text | text + pgtap | public | col_is_fk | name, name[], text | text + pgtap | public | col_is_fk | name, name[] | text + pgtap | public | col_is_fk | name, name, text | text + pgtap | public | col_is_fk | name, name, name[], text | text + pgtap | public | col_is_fk | name, name | text + pgtap | public | col_is_null | table_name name, column_name name, description text | text + pgtap | public | col_is_null | schema_name name, table_name name, column_name name, description text | text + pgtap | public | col_is_pk | name, name, name, text | text + pgtap | public | col_is_pk | name, name[], text | text + pgtap | public | col_is_pk | name, name[] | text + pgtap | public | col_is_pk | name, name, text | text + pgtap | public | col_is_pk | name, name, name[], text | text + pgtap | public | col_is_pk | name, name | text + pgtap | public | col_is_unique | name, name, name, text | text + pgtap | public | col_is_unique | name, name[], text | text + pgtap | public | col_is_unique | name, name, name[] | text + pgtap | public | col_is_unique | name, name[] | text + pgtap | public | col_is_unique | name, name, text | text + pgtap | public | col_is_unique | name, name, name[], text | text + pgtap | public | col_is_unique | name, name | text + pgtap | public | col_is_unique | name, name, name | text + pgtap | public | col_isnt_fk | name, name, name, text | text + pgtap | public | col_isnt_fk | name, name[], text | text + pgtap | public | col_isnt_fk | name, name[] | text + pgtap | public | col_isnt_fk | name, name, text | text + pgtap | public | col_isnt_fk | name, name, name[], text | text + pgtap | public | col_isnt_fk | name, name | text + pgtap | public | col_isnt_pk | name, name, name, text | text + pgtap | public | col_isnt_pk | name, name[], text | text + pgtap | public | col_isnt_pk | name, name[] | text + pgtap | public | col_isnt_pk | name, name, text | text + pgtap | public | col_isnt_pk | name, name, name[], text | text + pgtap | public | col_isnt_pk | name, name | text + pgtap | public | col_not_null | table_name name, column_name name, description text | text + pgtap | public | col_not_null | schema_name name, table_name name, column_name name, description text | text + pgtap | public | col_type_is | name, name, name, text | text + pgtap | public | col_type_is | name, name, text, text | text + pgtap | public | col_type_is | name, name, name, text, text | text + pgtap | public | col_type_is | name, name, name, name, text, text | text + pgtap | public | col_type_is | name, name, text | text + pgtap | public | col_type_is | name, name, name, name, text | text + pgtap | public | collect_tap | VARIADIC text[] | text + pgtap | public | collect_tap | character varying[] | text + pgtap | public | column_privs_are | name, name, name, name[], text | text + pgtap | public | column_privs_are | name, name, name, name, name[] | text + pgtap | public | column_privs_are | name, name, name, name[] | text + pgtap | public | column_privs_are | name, name, name, name, name[], text | text + pgtap | public | columns_are | name, name[], text | text + pgtap | public | columns_are | name, name, name[] | text + pgtap | public | columns_are | name, name[] | text + pgtap | public | columns_are | name, name, name[], text | text + pgtap | public | composite_owner_is | name, name, name, text | text + pgtap | public | composite_owner_is | name, name, text | text + pgtap | public | composite_owner_is | name, name | text + pgtap | public | composite_owner_is | name, name, name | text + pgtap | public | database_privs_are | name, name, name[] | text + pgtap | public | database_privs_are | name, name, name[], text | text + pgtap | public | db_owner_is | name, name, text | text + pgtap | public | db_owner_is | name, name | text + pgtap | public | diag | msg text | text + pgtap | public | diag | VARIADIC text[] | text + pgtap | public | diag | VARIADIC anyarray | text + pgtap | public | diag | msg anyelement | text + pgtap | public | diag_test_name | text | text + pgtap | public | display_oper | name, oid | text + pgtap | public | do_tap | text | SETOF text + pgtap | public | do_tap | name, text | SETOF text + pgtap | public | do_tap | name | SETOF text + pgtap | public | do_tap | | SETOF text + pgtap | public | doesnt_imatch | anyelement, text | text + pgtap | public | doesnt_imatch | anyelement, text, text | text + pgtap | public | doesnt_match | anyelement, text | text + pgtap | public | doesnt_match | anyelement, text, text | text + pgtap | public | domain_type_is | name, text, name, text, text | text + pgtap | public | domain_type_is | text, text | text + pgtap | public | domain_type_is | name, text, text, text | text + pgtap | public | domain_type_is | name, text, text | text + pgtap | public | domain_type_is | text, text, text | text + pgtap | public | domain_type_is | name, text, name, text | text + pgtap | public | domain_type_isnt | name, text, name, text, text | text + pgtap | public | domain_type_isnt | text, text | text + pgtap | public | domain_type_isnt | name, text, text, text | text + pgtap | public | domain_type_isnt | name, text, text | text + pgtap | public | domain_type_isnt | text, text, text | text + pgtap | public | domain_type_isnt | name, text, name, text | text + pgtap | public | domains_are | name[] | text + pgtap | public | domains_are | name[], text | text + pgtap | public | domains_are | name, name[], text | text + pgtap | public | domains_are | name, name[] | text + pgtap | public | enum_has_labels | name, name[], text | text + pgtap | public | enum_has_labels | name, name, name[] | text + pgtap | public | enum_has_labels | name, name[] | text + pgtap | public | enum_has_labels | name, name, name[], text | text + pgtap | public | enums_are | name[] | text + pgtap | public | enums_are | name[], text | text + pgtap | public | enums_are | name, name[], text | text + pgtap | public | enums_are | name, name[] | text + pgtap | public | extensions_are | name[] | text + pgtap | public | extensions_are | name[], text | text + pgtap | public | extensions_are | name, name[], text | text + pgtap | public | extensions_are | name, name[] | text + pgtap | public | fail | text | text + pgtap | public | fail | | text + pgtap | public | fdw_privs_are | name, name, name[] | text + pgtap | public | fdw_privs_are | name, name, name[], text | text + pgtap | public | findfuncs | text | text[] + pgtap | public | findfuncs | text, text | text[] + pgtap | public | findfuncs | name, text, text | text[] + pgtap | public | findfuncs | name, text | text[] + pgtap | public | finish | exception_on_failure boolean | SETOF text + pgtap | public | fk_ok | name, name, name, name, name, text | text + pgtap | public | fk_ok | name, name, name, name, name, name, text | text + pgtap | public | fk_ok | name, name, name, name | text + pgtap | public | fk_ok | name, name, name, name, text | text + pgtap | public | fk_ok | name, name, name[], name, name, name[], text | text + pgtap | public | fk_ok | name, name, name[], name, name, name[] | text + pgtap | public | fk_ok | name, name[], name, name[] | text + pgtap | public | fk_ok | name, name[], name, name[], text | text + pgtap | public | foreign_table_owner_is | name, name, name, text | text + pgtap | public | foreign_table_owner_is | name, name, text | text + pgtap | public | foreign_table_owner_is | name, name | text + pgtap | public | foreign_table_owner_is | name, name, name | text + pgtap | public | foreign_tables_are | name[] | text + pgtap | public | foreign_tables_are | name[], text | text + pgtap | public | foreign_tables_are | name, name[], text | text + pgtap | public | foreign_tables_are | name, name[] | text + pgtap | public | function_lang_is | name, name, name, text | text + pgtap | public | function_lang_is | name, name, text | text + pgtap | public | function_lang_is | name, name[], name, text | text + pgtap | public | function_lang_is | name, name, name[], name | text + pgtap | public | function_lang_is | name, name | text + pgtap | public | function_lang_is | name, name, name | text + pgtap | public | function_lang_is | name, name[], name | text + pgtap | public | function_lang_is | name, name, name[], name, text | text + pgtap | public | function_owner_is | name, name[], name, text | text + pgtap | public | function_owner_is | name, name, name[], name | text + pgtap | public | function_owner_is | name, name[], name | text + pgtap | public | function_owner_is | name, name, name[], name, text | text + pgtap | public | function_privs_are | name, name, name[], name, name[], text | text + pgtap | public | function_privs_are | name, name[], name, name[] | text + pgtap | public | function_privs_are | name, name[], name, name[], text | text + pgtap | public | function_privs_are | name, name, name[], name, name[] | text + pgtap | public | function_returns | name, name, name[], text, text | text + pgtap | public | function_returns | name, name[], text | text + pgtap | public | function_returns | name, name, text, text | text + pgtap | public | function_returns | name, name, text | text + pgtap | public | function_returns | name, text, text | text + pgtap | public | function_returns | name, text | text + pgtap | public | function_returns | name, name, name[], text | text + pgtap | public | function_returns | name, name[], text, text | text + pgtap | public | functions_are | name[] | text + pgtap | public | functions_are | name[], text | text + pgtap | public | functions_are | name, name[], text | text + pgtap | public | functions_are | name, name[] | text + pgtap | public | groups_are | name[] | text + pgtap | public | groups_are | name[], text | text + pgtap | public | has_cast | name, name, name, text | text + pgtap | public | has_cast | name, name, name, name | text + pgtap | public | has_cast | name, name, text | text + pgtap | public | has_cast | name, name, name, name, text | text + pgtap | public | has_cast | name, name | text + pgtap | public | has_cast | name, name, name | text + pgtap | public | has_check | name, name, text | text + pgtap | public | has_check | name, text | text + pgtap | public | has_check | name | text + pgtap | public | has_column | name, name, name, text | text + pgtap | public | has_column | name, name, text | text + pgtap | public | has_column | name, name | text + pgtap | public | has_composite | name, name, text | text + pgtap | public | has_composite | name, text | text + pgtap | public | has_composite | name | text + pgtap | public | has_domain | name, name, text | text + pgtap | public | has_domain | name, text | text + pgtap | public | has_domain | name | text + pgtap | public | has_domain | name, name | text + pgtap | public | has_enum | name, name, text | text + pgtap | public | has_enum | name, text | text + pgtap | public | has_enum | name | text + pgtap | public | has_enum | name, name | text + pgtap | public | has_extension | name, name, text | text + pgtap | public | has_extension | name, text | text + pgtap | public | has_extension | name | text + pgtap | public | has_extension | name, name | text + pgtap | public | has_fk | name, name, text | text + pgtap | public | has_fk | name, text | text + pgtap | public | has_fk | name | text + pgtap | public | has_foreign_table | name, name, text | text + pgtap | public | has_foreign_table | name, text | text + pgtap | public | has_foreign_table | name | text + pgtap | public | has_foreign_table | name, name | text + pgtap | public | has_function | name, name[], text | text + pgtap | public | has_function | name, name, name[] | text + pgtap | public | has_function | name, name[] | text + pgtap | public | has_function | name, name, text | text + pgtap | public | has_function | name, text | text + pgtap | public | has_function | name | text + pgtap | public | has_function | name, name, name[], text | text + pgtap | public | has_function | name, name | text + pgtap | public | has_group | name, text | text + pgtap | public | has_group | name | text + pgtap | public | has_index | name, name, name, text | text + pgtap | public | has_index | name, name, name, name[], text | text + pgtap | public | has_index | name, name, name[] | text + pgtap | public | has_index | name, name, name, name | text + pgtap | public | has_index | name, name, text | text + pgtap | public | has_index | name, name, name, name[] | text + pgtap | public | has_index | name, name, name, name, text | text + pgtap | public | has_index | name, name, name[], text | text + pgtap | public | has_index | name, name | text + pgtap | public | has_index | name, name, name | text + pgtap | public | has_inherited_tables | name, name, text | text + pgtap | public | has_inherited_tables | name, text | text + pgtap | public | has_inherited_tables | name | text + pgtap | public | has_inherited_tables | name, name | text + pgtap | public | has_language | name, text | text + pgtap | public | has_language | name | text + pgtap | public | has_leftop | name, name, name, text | text + pgtap | public | has_leftop | name, name, name, name | text + pgtap | public | has_leftop | name, name, text | text + pgtap | public | has_leftop | name, name, name, name, text | text + pgtap | public | has_leftop | name, name | text + pgtap | public | has_leftop | name, name, name | text + pgtap | public | has_materialized_view | name, name, text | text + pgtap | public | has_materialized_view | name, text | text + pgtap | public | has_materialized_view | name | text + pgtap | public | has_opclass | name, name, text | text + pgtap | public | has_opclass | name, text | text + pgtap | public | has_opclass | name | text + pgtap | public | has_opclass | name, name | text + pgtap | public | has_operator | name, name, name, text | text + pgtap | public | has_operator | name, name, name, name, name, text | text + pgtap | public | has_operator | name, name, name, name | text + pgtap | public | has_operator | name, name, name, name, text | text + pgtap | public | has_operator | name, name, name, name, name | text + pgtap | public | has_operator | name, name, name | text + pgtap | public | has_pk | name, name, text | text + pgtap | public | has_pk | name, text | text + pgtap | public | has_pk | name | text + pgtap | public | has_relation | name, name, text | text + pgtap | public | has_relation | name, text | text + pgtap | public | has_relation | name | text + pgtap | public | has_rightop | name, name, name, text | text + pgtap | public | has_rightop | name, name, name, name | text + pgtap | public | has_rightop | name, name, text | text + pgtap | public | has_rightop | name, name, name, name, text | text + pgtap | public | has_rightop | name, name | text + pgtap | public | has_rightop | name, name, name | text + pgtap | public | has_role | name, text | text + pgtap | public | has_role | name | text + pgtap | public | has_rule | name, name, name, text | text + pgtap | public | has_rule | name, name, text | text + pgtap | public | has_rule | name, name | text + pgtap | public | has_rule | name, name, name | text + pgtap | public | has_schema | name, text | text + pgtap | public | has_schema | name | text + pgtap | public | has_sequence | name, name, text | text + pgtap | public | has_sequence | name, text | text + pgtap | public | has_sequence | name | text + pgtap | public | has_sequence | name, name | text + pgtap | public | has_table | name, name, text | text + pgtap | public | has_table | name, text | text + pgtap | public | has_table | name | text + pgtap | public | has_table | name, name | text + pgtap | public | has_tablespace | name, text, text | text + pgtap | public | has_tablespace | name, text | text + pgtap | public | has_tablespace | name | text + pgtap | public | has_trigger | name, name, name, text | text + pgtap | public | has_trigger | name, name, text | text + pgtap | public | has_trigger | name, name | text + pgtap | public | has_trigger | name, name, name | text + pgtap | public | has_type | name, name, text | text + pgtap | public | has_type | name, text | text + pgtap | public | has_type | name | text + pgtap | public | has_type | name, name | text + pgtap | public | has_unique | text | text + pgtap | public | has_unique | text, text | text + pgtap | public | has_unique | text, text, text | text + pgtap | public | has_user | name, text | text + pgtap | public | has_user | name | text + pgtap | public | has_view | name, name, text | text + pgtap | public | has_view | name, text | text + pgtap | public | has_view | name | text + pgtap | public | has_view | name, name | text + pgtap | public | hasnt_cast | name, name, name, text | text + pgtap | public | hasnt_cast | name, name, name, name | text + pgtap | public | hasnt_cast | name, name, text | text + pgtap | public | hasnt_cast | name, name, name, name, text | text + pgtap | public | hasnt_cast | name, name | text + pgtap | public | hasnt_cast | name, name, name | text + pgtap | public | hasnt_column | name, name, name, text | text + pgtap | public | hasnt_column | name, name, text | text + pgtap | public | hasnt_column | name, name | text + pgtap | public | hasnt_composite | name, name, text | text + pgtap | public | hasnt_composite | name, text | text + pgtap | public | hasnt_composite | name | text + pgtap | public | hasnt_domain | name, name, text | text + pgtap | public | hasnt_domain | name, text | text + pgtap | public | hasnt_domain | name | text + pgtap | public | hasnt_domain | name, name | text + pgtap | public | hasnt_enum | name, name, text | text + pgtap | public | hasnt_enum | name, text | text + pgtap | public | hasnt_enum | name | text + pgtap | public | hasnt_enum | name, name | text + pgtap | public | hasnt_extension | name, name, text | text + pgtap | public | hasnt_extension | name, text | text + pgtap | public | hasnt_extension | name | text + pgtap | public | hasnt_extension | name, name | text + pgtap | public | hasnt_fk | name, name, text | text + pgtap | public | hasnt_fk | name, text | text + pgtap | public | hasnt_fk | name | text + pgtap | public | hasnt_foreign_table | name, name, text | text + pgtap | public | hasnt_foreign_table | name, text | text + pgtap | public | hasnt_foreign_table | name | text + pgtap | public | hasnt_foreign_table | name, name | text + pgtap | public | hasnt_function | name, name[], text | text + pgtap | public | hasnt_function | name, name, name[] | text + pgtap | public | hasnt_function | name, name[] | text + pgtap | public | hasnt_function | name, name, text | text + pgtap | public | hasnt_function | name, text | text + pgtap | public | hasnt_function | name | text + pgtap | public | hasnt_function | name, name, name[], text | text + pgtap | public | hasnt_function | name, name | text + pgtap | public | hasnt_group | name, text | text + pgtap | public | hasnt_group | name | text + pgtap | public | hasnt_index | name, name, name, text | text + pgtap | public | hasnt_index | name, name, text | text + pgtap | public | hasnt_index | name, name | text + pgtap | public | hasnt_index | name, name, name | text + pgtap | public | hasnt_inherited_tables | name, name, text | text + pgtap | public | hasnt_inherited_tables | name, text | text + pgtap | public | hasnt_inherited_tables | name | text + pgtap | public | hasnt_inherited_tables | name, name | text + pgtap | public | hasnt_language | name, text | text + pgtap | public | hasnt_language | name | text + pgtap | public | hasnt_leftop | name, name, name, text | text + pgtap | public | hasnt_leftop | name, name, name, name | text + pgtap | public | hasnt_leftop | name, name, text | text + pgtap | public | hasnt_leftop | name, name, name, name, text | text + pgtap | public | hasnt_leftop | name, name | text + pgtap | public | hasnt_leftop | name, name, name | text + pgtap | public | hasnt_materialized_view | name, name, text | text + pgtap | public | hasnt_materialized_view | name, text | text + pgtap | public | hasnt_materialized_view | name | text + pgtap | public | hasnt_opclass | name, name, text | text + pgtap | public | hasnt_opclass | name, text | text + pgtap | public | hasnt_opclass | name | text + pgtap | public | hasnt_opclass | name, name | text + pgtap | public | hasnt_operator | name, name, name, text | text + pgtap | public | hasnt_operator | name, name, name, name, name, text | text + pgtap | public | hasnt_operator | name, name, name, name | text + pgtap | public | hasnt_operator | name, name, name, name, text | text + pgtap | public | hasnt_operator | name, name, name, name, name | text + pgtap | public | hasnt_operator | name, name, name | text + pgtap | public | hasnt_pk | name, name, text | text + pgtap | public | hasnt_pk | name, text | text + pgtap | public | hasnt_pk | name | text + pgtap | public | hasnt_relation | name, name, text | text + pgtap | public | hasnt_relation | name, text | text + pgtap | public | hasnt_relation | name | text + pgtap | public | hasnt_rightop | name, name, name, text | text + pgtap | public | hasnt_rightop | name, name, name, name | text + pgtap | public | hasnt_rightop | name, name, text | text + pgtap | public | hasnt_rightop | name, name, name, name, text | text + pgtap | public | hasnt_rightop | name, name | text + pgtap | public | hasnt_rightop | name, name, name | text + pgtap | public | hasnt_role | name, text | text + pgtap | public | hasnt_role | name | text + pgtap | public | hasnt_rule | name, name, name, text | text + pgtap | public | hasnt_rule | name, name, text | text + pgtap | public | hasnt_rule | name, name | text + pgtap | public | hasnt_rule | name, name, name | text + pgtap | public | hasnt_schema | name, text | text + pgtap | public | hasnt_schema | name | text + pgtap | public | hasnt_sequence | name, name, text | text + pgtap | public | hasnt_sequence | name, text | text + pgtap | public | hasnt_sequence | name | text + pgtap | public | hasnt_table | name, name, text | text + pgtap | public | hasnt_table | name, text | text + pgtap | public | hasnt_table | name | text + pgtap | public | hasnt_table | name, name | text + pgtap | public | hasnt_tablespace | name, text | text + pgtap | public | hasnt_tablespace | name | text + pgtap | public | hasnt_trigger | name, name, name, text | text + pgtap | public | hasnt_trigger | name, name, text | text + pgtap | public | hasnt_trigger | name, name | text + pgtap | public | hasnt_trigger | name, name, name | text + pgtap | public | hasnt_type | name, name, text | text + pgtap | public | hasnt_type | name, text | text + pgtap | public | hasnt_type | name | text + pgtap | public | hasnt_type | name, name | text + pgtap | public | hasnt_user | name, text | text + pgtap | public | hasnt_user | name | text + pgtap | public | hasnt_view | name, name, text | text + pgtap | public | hasnt_view | name, text | text + pgtap | public | hasnt_view | name | text + pgtap | public | hasnt_view | name, name | text + pgtap | public | ialike | anyelement, text | text + pgtap | public | ialike | anyelement, text, text | text + pgtap | public | imatches | anyelement, text | text + pgtap | public | imatches | anyelement, text, text | text + pgtap | public | in_todo | | boolean + pgtap | public | index_is_primary | name, name, name, text | text + pgtap | public | index_is_primary | name | text + pgtap | public | index_is_primary | name, name | text + pgtap | public | index_is_primary | name, name, name | text + pgtap | public | index_is_type | name, name, name, name | text + pgtap | public | index_is_type | name, name, name, name, text | text + pgtap | public | index_is_type | name, name | text + pgtap | public | index_is_type | name, name, name | text + pgtap | public | index_is_unique | name, name, name, text | text + pgtap | public | index_is_unique | name | text + pgtap | public | index_is_unique | name, name | text + pgtap | public | index_is_unique | name, name, name | text + pgtap | public | index_owner_is | name, name, name, text | text + pgtap | public | index_owner_is | name, name, name, name | text + pgtap | public | index_owner_is | name, name, name, name, text | text + pgtap | public | index_owner_is | name, name, name | text + pgtap | public | indexes_are | name, name[], text | text + pgtap | public | indexes_are | name, name, name[] | text + pgtap | public | indexes_are | name, name[] | text + pgtap | public | indexes_are | name, name, name[], text | text + pgtap | public | is | anyelement, anyelement, text | text + pgtap | public | is | anyelement, anyelement | text + pgtap | public | is_aggregate | name, name[], text | text + pgtap | public | is_aggregate | name, name, name[] | text + pgtap | public | is_aggregate | name, name[] | text + pgtap | public | is_aggregate | name, name, text | text + pgtap | public | is_aggregate | name, text | text + pgtap | public | is_aggregate | name | text + pgtap | public | is_aggregate | name, name, name[], text | text + pgtap | public | is_aggregate | name, name | text + pgtap | public | is_ancestor_of | name, name, name, name, integer, text | text + pgtap | public | is_ancestor_of | name, name, integer | text + pgtap | public | is_ancestor_of | name, name, name, name | text + pgtap | public | is_ancestor_of | name, name, text | text + pgtap | public | is_ancestor_of | name, name, name, name, text | text + pgtap | public | is_ancestor_of | name, name, name, name, integer | text + pgtap | public | is_ancestor_of | name, name | text + pgtap | public | is_ancestor_of | name, name, integer, text | text + pgtap | public | is_clustered | name, name, name, text | text + pgtap | public | is_clustered | name | text + pgtap | public | is_clustered | name, name | text + pgtap | public | is_clustered | name, name, name | text + pgtap | public | is_definer | name, name[], text | text + pgtap | public | is_definer | name, name, name[] | text + pgtap | public | is_definer | name, name[] | text + pgtap | public | is_definer | name, name, text | text + pgtap | public | is_definer | name, text | text + pgtap | public | is_definer | name | text + pgtap | public | is_definer | name, name, name[], text | text + pgtap | public | is_definer | name, name | text + pgtap | public | is_descendent_of | name, name, name, name, integer, text | text + pgtap | public | is_descendent_of | name, name, integer | text + pgtap | public | is_descendent_of | name, name, name, name | text + pgtap | public | is_descendent_of | name, name, text | text + pgtap | public | is_descendent_of | name, name, name, name, text | text + pgtap | public | is_descendent_of | name, name, name, name, integer | text + pgtap | public | is_descendent_of | name, name | text + pgtap | public | is_descendent_of | name, name, integer, text | text + pgtap | public | is_empty | text | text + pgtap | public | is_empty | text, text | text + pgtap | public | is_indexed | name, name, name, text | text + pgtap | public | is_indexed | name, name[], text | text + pgtap | public | is_indexed | name, name, name[] | text + pgtap | public | is_indexed | name, name[] | text + pgtap | public | is_indexed | name, name, name[], text | text + pgtap | public | is_indexed | name, name | text + pgtap | public | is_indexed | name, name, name | text + pgtap | public | is_member_of | name, name[], text | text + pgtap | public | is_member_of | name, name[] | text + pgtap | public | is_member_of | name, name, text | text + pgtap | public | is_member_of | name, name | text + pgtap | public | is_normal_function | name, name[], text | text + pgtap | public | is_normal_function | name, name, name[] | text + pgtap | public | is_normal_function | name, name[] | text + pgtap | public | is_normal_function | name, name, text | text + pgtap | public | is_normal_function | name, text | text + pgtap | public | is_normal_function | name | text + pgtap | public | is_normal_function | name, name, name[], text | text + pgtap | public | is_normal_function | name, name | text + pgtap | public | is_partition_of | name, name, name, name | text + pgtap | public | is_partition_of | name, name, text | text + pgtap | public | is_partition_of | name, name, name, name, text | text + pgtap | public | is_partition_of | name, name | text + pgtap | public | is_partitioned | name, name, text | text + pgtap | public | is_partitioned | name, text | text + pgtap | public | is_partitioned | name | text + pgtap | public | is_partitioned | name, name | text + pgtap | public | is_procedure | name, name[], text | text + pgtap | public | is_procedure | name, name, name[] | text + pgtap | public | is_procedure | name, name[] | text + pgtap | public | is_procedure | name, name, text | text + pgtap | public | is_procedure | name, text | text + pgtap | public | is_procedure | name | text + pgtap | public | is_procedure | name, name, name[], text | text + pgtap | public | is_procedure | name, name | text + pgtap | public | is_strict | name, name[], text | text + pgtap | public | is_strict | name, name, name[] | text + pgtap | public | is_strict | name, name[] | text + pgtap | public | is_strict | name, name, text | text + pgtap | public | is_strict | name, text | text + pgtap | public | is_strict | name | text + pgtap | public | is_strict | name, name, name[], text | text + pgtap | public | is_strict | name, name | text + pgtap | public | is_superuser | name, text | text + pgtap | public | is_superuser | name | text + pgtap | public | is_window | name, name[], text | text + pgtap | public | is_window | name, name, name[] | text + pgtap | public | is_window | name, name[] | text + pgtap | public | is_window | name, name, text | text + pgtap | public | is_window | name, text | text + pgtap | public | is_window | name | text + pgtap | public | is_window | name, name, name[], text | text + pgtap | public | is_window | name, name | text + pgtap | public | isa_ok | anyelement, regtype | text + pgtap | public | isa_ok | anyelement, regtype, text | text + pgtap | public | isnt | anyelement, anyelement, text | text + pgtap | public | isnt | anyelement, anyelement | text + pgtap | public | isnt_aggregate | name, name[], text | text + pgtap | public | isnt_aggregate | name, name, name[] | text + pgtap | public | isnt_aggregate | name, name[] | text + pgtap | public | isnt_aggregate | name, name, text | text + pgtap | public | isnt_aggregate | name, text | text + pgtap | public | isnt_aggregate | name | text + pgtap | public | isnt_aggregate | name, name, name[], text | text + pgtap | public | isnt_aggregate | name, name | text + pgtap | public | isnt_ancestor_of | name, name, name, name, integer, text | text + pgtap | public | isnt_ancestor_of | name, name, integer | text + pgtap | public | isnt_ancestor_of | name, name, name, name | text + pgtap | public | isnt_ancestor_of | name, name, text | text + pgtap | public | isnt_ancestor_of | name, name, name, name, text | text + pgtap | public | isnt_ancestor_of | name, name, name, name, integer | text + pgtap | public | isnt_ancestor_of | name, name | text + pgtap | public | isnt_ancestor_of | name, name, integer, text | text + pgtap | public | isnt_definer | name, name[], text | text + pgtap | public | isnt_definer | name, name, name[] | text + pgtap | public | isnt_definer | name, name[] | text + pgtap | public | isnt_definer | name, name, text | text + pgtap | public | isnt_definer | name, text | text + pgtap | public | isnt_definer | name | text + pgtap | public | isnt_definer | name, name, name[], text | text + pgtap | public | isnt_definer | name, name | text + pgtap | public | isnt_descendent_of | name, name, name, name, integer, text | text + pgtap | public | isnt_descendent_of | name, name, integer | text + pgtap | public | isnt_descendent_of | name, name, name, name | text + pgtap | public | isnt_descendent_of | name, name, text | text + pgtap | public | isnt_descendent_of | name, name, name, name, text | text + pgtap | public | isnt_descendent_of | name, name, name, name, integer | text + pgtap | public | isnt_descendent_of | name, name | text + pgtap | public | isnt_descendent_of | name, name, integer, text | text + pgtap | public | isnt_empty | text | text + pgtap | public | isnt_empty | text, text | text + pgtap | public | isnt_member_of | name, name[], text | text + pgtap | public | isnt_member_of | name, name[] | text + pgtap | public | isnt_member_of | name, name, text | text + pgtap | public | isnt_member_of | name, name | text + pgtap | public | isnt_normal_function | name, name[], text | text + pgtap | public | isnt_normal_function | name, name, name[] | text + pgtap | public | isnt_normal_function | name, name[] | text + pgtap | public | isnt_normal_function | name, name, text | text + pgtap | public | isnt_normal_function | name, text | text + pgtap | public | isnt_normal_function | name | text + pgtap | public | isnt_normal_function | name, name, name[], text | text + pgtap | public | isnt_normal_function | name, name | text + pgtap | public | isnt_partitioned | name, name, text | text + pgtap | public | isnt_partitioned | name, text | text + pgtap | public | isnt_partitioned | name | text + pgtap | public | isnt_partitioned | name, name | text + pgtap | public | isnt_procedure | name, name[], text | text + pgtap | public | isnt_procedure | name, name, name[] | text + pgtap | public | isnt_procedure | name, name[] | text + pgtap | public | isnt_procedure | name, name, text | text + pgtap | public | isnt_procedure | name, text | text + pgtap | public | isnt_procedure | name | text + pgtap | public | isnt_procedure | name, name, name[], text | text + pgtap | public | isnt_procedure | name, name | text + pgtap | public | isnt_strict | name, name[], text | text + pgtap | public | isnt_strict | name, name, name[] | text + pgtap | public | isnt_strict | name, name[] | text + pgtap | public | isnt_strict | name, name, text | text + pgtap | public | isnt_strict | name, text | text + pgtap | public | isnt_strict | name | text + pgtap | public | isnt_strict | name, name, name[], text | text + pgtap | public | isnt_strict | name, name | text + pgtap | public | isnt_superuser | name, text | text + pgtap | public | isnt_superuser | name | text + pgtap | public | isnt_window | name, name[], text | text + pgtap | public | isnt_window | name, name, name[] | text + pgtap | public | isnt_window | name, name[] | text + pgtap | public | isnt_window | name, name, text | text + pgtap | public | isnt_window | name, text | text + pgtap | public | isnt_window | name | text + pgtap | public | isnt_window | name, name, name[], text | text + pgtap | public | isnt_window | name, name | text + pgtap | public | language_is_trusted | name, text | text + pgtap | public | language_is_trusted | name | text + pgtap | public | language_owner_is | name, name, text | text + pgtap | public | language_owner_is | name, name | text + pgtap | public | language_privs_are | name, name, name[] | text + pgtap | public | language_privs_are | name, name, name[], text | text + pgtap | public | languages_are | name[] | text + pgtap | public | languages_are | name[], text | text + pgtap | public | lives_ok | text | text + pgtap | public | lives_ok | text, text | text + pgtap | public | matches | anyelement, text | text + pgtap | public | matches | anyelement, text, text | text + pgtap | public | materialized_view_owner_is | name, name, name, text | text + pgtap | public | materialized_view_owner_is | name, name, text | text + pgtap | public | materialized_view_owner_is | name, name | text + pgtap | public | materialized_view_owner_is | name, name, name | text + pgtap | public | materialized_views_are | name[] | text + pgtap | public | materialized_views_are | name[], text | text + pgtap | public | materialized_views_are | name, name[], text | text + pgtap | public | materialized_views_are | name, name[] | text + pgtap | public | no_plan | | SETOF boolean + pgtap | public | num_failed | | integer + pgtap | public | ok | boolean | text + pgtap | public | ok | boolean, text | text + pgtap | public | opclass_owner_is | name, name, name, text | text + pgtap | public | opclass_owner_is | name, name, text | text + pgtap | public | opclass_owner_is | name, name | text + pgtap | public | opclass_owner_is | name, name, name | text + pgtap | public | opclasses_are | name[] | text + pgtap | public | opclasses_are | name[], text | text + pgtap | public | opclasses_are | name, name[], text | text + pgtap | public | opclasses_are | name, name[] | text + pgtap | public | operators_are | name, text[] | text + pgtap | public | operators_are | text[] | text + pgtap | public | operators_are | text[], text | text + pgtap | public | operators_are | name, text[], text | text + pgtap | public | os_name | | text + pgtap | public | partitions_are | name, name[], text | text + pgtap | public | partitions_are | name, name, name[] | text + pgtap | public | partitions_are | name, name[] | text + pgtap | public | partitions_are | name, name, name[], text | text + pgtap | public | pass | text | text + pgtap | public | pass | | text + pgtap | public | performs_ok | text, numeric, text | text + pgtap | public | performs_ok | text, numeric | text + pgtap | public | performs_within | text, numeric, numeric, integer | text + pgtap | public | performs_within | text, numeric, numeric | text + pgtap | public | performs_within | text, numeric, numeric, integer, text | text + pgtap | public | performs_within | text, numeric, numeric, text | text + pgtap | public | pg_version | | text + pgtap | public | pg_version_num | | integer + pgtap | public | pgtap_version | | numeric + pgtap | public | plan | integer | text + pgtap | public | policies_are | name, name[], text | text + pgtap | public | policies_are | name, name, name[] | text + pgtap | public | policies_are | name, name[] | text + pgtap | public | policies_are | name, name, name[], text | text + pgtap | public | policy_cmd_is | name, name, name, text | text + pgtap | public | policy_cmd_is | name, name, text, text | text + pgtap | public | policy_cmd_is | name, name, name, text, text | text + pgtap | public | policy_cmd_is | name, name, text | text + pgtap | public | policy_roles_are | name, name, name, name[], text | text + pgtap | public | policy_roles_are | name, name, name[] | text + pgtap | public | policy_roles_are | name, name, name, name[] | text + pgtap | public | policy_roles_are | name, name, name[], text | text + pgtap | public | relation_owner_is | name, name, name, text | text + pgtap | public | relation_owner_is | name, name, text | text + pgtap | public | relation_owner_is | name, name | text + pgtap | public | relation_owner_is | name, name, name | text + pgtap | public | results_eq | text, refcursor | text + pgtap | public | results_eq | text, anyarray, text | text + pgtap | public | results_eq | text, text | text + pgtap | public | results_eq | text, refcursor, text | text + pgtap | public | results_eq | refcursor, anyarray | text + pgtap | public | results_eq | refcursor, anyarray, text | text + pgtap | public | results_eq | text, text, text | text + pgtap | public | results_eq | text, anyarray | text + pgtap | public | results_eq | refcursor, refcursor, text | text + pgtap | public | results_eq | refcursor, text, text | text + pgtap | public | results_eq | refcursor, text | text + pgtap | public | results_eq | refcursor, refcursor | text + pgtap | public | results_ne | text, refcursor | text + pgtap | public | results_ne | text, anyarray, text | text + pgtap | public | results_ne | text, text | text + pgtap | public | results_ne | text, refcursor, text | text + pgtap | public | results_ne | refcursor, anyarray | text + pgtap | public | results_ne | refcursor, anyarray, text | text + pgtap | public | results_ne | text, text, text | text + pgtap | public | results_ne | text, anyarray | text + pgtap | public | results_ne | refcursor, refcursor, text | text + pgtap | public | results_ne | refcursor, text, text | text + pgtap | public | results_ne | refcursor, text | text + pgtap | public | results_ne | refcursor, refcursor | text + pgtap | public | roles_are | name[] | text + pgtap | public | roles_are | name[], text | text + pgtap | public | row_eq | text, anyelement | text + pgtap | public | row_eq | text, anyelement, text | text + pgtap | public | rule_is_instead | name, name, name, text | text + pgtap | public | rule_is_instead | name, name, text | text + pgtap | public | rule_is_instead | name, name | text + pgtap | public | rule_is_instead | name, name, name | text + pgtap | public | rule_is_on | name, name, name, text | text + pgtap | public | rule_is_on | name, name, text, text | text + pgtap | public | rule_is_on | name, name, name, text, text | text + pgtap | public | rule_is_on | name, name, text | text + pgtap | public | rules_are | name, name[], text | text + pgtap | public | rules_are | name, name, name[] | text + pgtap | public | rules_are | name, name[] | text + pgtap | public | rules_are | name, name, name[], text | text + pgtap | public | runtests | text | SETOF text + pgtap | public | runtests | name, text | SETOF text + pgtap | public | runtests | name | SETOF text + pgtap | public | runtests | | SETOF text + pgtap | public | schema_owner_is | name, name, text | text + pgtap | public | schema_owner_is | name, name | text + pgtap | public | schema_privs_are | name, name, name[] | text + pgtap | public | schema_privs_are | name, name, name[], text | text + pgtap | public | schemas_are | name[] | text + pgtap | public | schemas_are | name[], text | text + pgtap | public | sequence_owner_is | name, name, name, text | text + pgtap | public | sequence_owner_is | name, name, text | text + pgtap | public | sequence_owner_is | name, name | text + pgtap | public | sequence_owner_is | name, name, name | text + pgtap | public | sequence_privs_are | name, name, name, name[], text | text + pgtap | public | sequence_privs_are | name, name, name[] | text + pgtap | public | sequence_privs_are | name, name, name, name[] | text + pgtap | public | sequence_privs_are | name, name, name[], text | text + pgtap | public | sequences_are | name[] | text + pgtap | public | sequences_are | name[], text | text + pgtap | public | sequences_are | name, name[], text | text + pgtap | public | sequences_are | name, name[] | text + pgtap | public | server_privs_are | name, name, name[] | text + pgtap | public | server_privs_are | name, name, name[], text | text + pgtap | public | set_eq | text, anyarray, text | text + pgtap | public | set_eq | text, text | text + pgtap | public | set_eq | text, text, text | text + pgtap | public | set_eq | text, anyarray | text + pgtap | public | set_has | text, text | text + pgtap | public | set_has | text, text, text | text + pgtap | public | set_hasnt | text, text | text + pgtap | public | set_hasnt | text, text, text | text + pgtap | public | set_ne | text, anyarray, text | text + pgtap | public | set_ne | text, text | text + pgtap | public | set_ne | text, text, text | text + pgtap | public | set_ne | text, anyarray | text + pgtap | public | skip | integer | text + pgtap | public | skip | text | text + pgtap | public | skip | why text, how_many integer | text + pgtap | public | skip | integer, text | text + pgtap | public | table_owner_is | name, name, name, text | text + pgtap | public | table_owner_is | name, name, text | text + pgtap | public | table_owner_is | name, name | text + pgtap | public | table_owner_is | name, name, name | text + pgtap | public | table_privs_are | name, name, name, name[], text | text + pgtap | public | table_privs_are | name, name, name[] | text + pgtap | public | table_privs_are | name, name, name, name[] | text + pgtap | public | table_privs_are | name, name, name[], text | text + pgtap | public | tables_are | name[] | text + pgtap | public | tables_are | name[], text | text + pgtap | public | tables_are | name, name[], text | text + pgtap | public | tables_are | name, name[] | text + pgtap | public | tablespace_owner_is | name, name, text | text + pgtap | public | tablespace_owner_is | name, name | text + pgtap | public | tablespace_privs_are | name, name, name[] | text + pgtap | public | tablespace_privs_are | name, name, name[], text | text + pgtap | public | tablespaces_are | name[] | text + pgtap | public | tablespaces_are | name[], text | text + pgtap | public | throws_ilike | text, text | text + pgtap | public | throws_ilike | text, text, text | text + pgtap | public | throws_imatching | text, text | text + pgtap | public | throws_imatching | text, text, text | text + pgtap | public | throws_like | text, text | text + pgtap | public | throws_like | text, text, text | text + pgtap | public | throws_matching | text, text | text + pgtap | public | throws_matching | text, text, text | text + pgtap | public | throws_ok | text | text + pgtap | public | throws_ok | text, integer | text + pgtap | public | throws_ok | text, text | text + pgtap | public | throws_ok | text, character, text, text | text + pgtap | public | throws_ok | text, text, text | text + pgtap | public | throws_ok | text, integer, text, text | text + pgtap | public | throws_ok | text, integer, text | text + pgtap | public | todo | how_many integer, why text | SETOF boolean + pgtap | public | todo | why text, how_many integer | SETOF boolean + pgtap | public | todo | why text | SETOF boolean + pgtap | public | todo | how_many integer | SETOF boolean + pgtap | public | todo_end | | SETOF boolean + pgtap | public | todo_start | text | SETOF boolean + pgtap | public | todo_start | | SETOF boolean + pgtap | public | trigger_is | name, name, name, text | text + pgtap | public | trigger_is | name, name, name, name, name, text | text + pgtap | public | trigger_is | name, name, name, name, name | text + pgtap | public | trigger_is | name, name, name | text + pgtap | public | triggers_are | name, name[], text | text + pgtap | public | triggers_are | name, name, name[] | text + pgtap | public | triggers_are | name, name[] | text + pgtap | public | triggers_are | name, name, name[], text | text + pgtap | public | type_owner_is | name, name, name, text | text + pgtap | public | type_owner_is | name, name, text | text + pgtap | public | type_owner_is | name, name | text + pgtap | public | type_owner_is | name, name, name | text + pgtap | public | types_are | name[] | text + pgtap | public | types_are | name[], text | text + pgtap | public | types_are | name, name[], text | text + pgtap | public | types_are | name, name[] | text + pgtap | public | unalike | anyelement, text | text + pgtap | public | unalike | anyelement, text, text | text + pgtap | public | unialike | anyelement, text | text + pgtap | public | unialike | anyelement, text, text | text + pgtap | public | users_are | name[] | text + pgtap | public | users_are | name[], text | text + pgtap | public | view_owner_is | name, name, name, text | text + pgtap | public | view_owner_is | name, name, text | text + pgtap | public | view_owner_is | name, name | text + pgtap | public | view_owner_is | name, name, name | text + pgtap | public | views_are | name[] | text + pgtap | public | views_are | name[], text | text + pgtap | public | views_are | name, name[], text | text + pgtap | public | views_are | name, name[] | text + pgtap | public | volatility_is | name, name, name[], text, text | text + pgtap | public | volatility_is | name, name[], text | text + pgtap | public | volatility_is | name, name, text, text | text + pgtap | public | volatility_is | name, name, text | text + pgtap | public | volatility_is | name, text, text | text + pgtap | public | volatility_is | name, text | text + pgtap | public | volatility_is | name, name, name[], text | text + pgtap | public | volatility_is | name, name[], text, text | text + plpgsql | pg_catalog | plpgsql_call_handler | | language_handler + plpgsql | pg_catalog | plpgsql_inline_handler | internal | void + plpgsql | pg_catalog | plpgsql_validator | oid | void + plpgsql_check | public | __plpgsql_show_dependency_tb | funcoid regprocedure, relid regclass, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype | TABLE(type text, oid oid, schema text, name text, params text) + plpgsql_check | public | __plpgsql_show_dependency_tb | name text, relid regclass, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype | TABLE(type text, oid oid, schema text, name text, params text) + plpgsql_check | public | plpgsql_check_function | funcoid regprocedure, relid regclass, format text, fatal_errors boolean, other_warnings boolean, performance_warnings boolean, extra_warnings boolean, security_warnings boolean, compatibility_warnings boolean, oldtable name, newtable name, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype, without_warnings boolean, all_warnings boolean, use_incomment_options boolean, incomment_options_usage_warning boolean, constant_tracing boolean | SETOF text + plpgsql_check | public | plpgsql_check_function | name text, relid regclass, format text, fatal_errors boolean, other_warnings boolean, performance_warnings boolean, extra_warnings boolean, security_warnings boolean, compatibility_warnings boolean, oldtable name, newtable name, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype, without_warnings boolean, all_warnings boolean, use_incomment_options boolean, incomment_options_usage_warning boolean, constant_tracing boolean | SETOF text + plpgsql_check | public | plpgsql_check_function_tb | funcoid regprocedure, relid regclass, fatal_errors boolean, other_warnings boolean, performance_warnings boolean, extra_warnings boolean, security_warnings boolean, compatibility_warnings boolean, oldtable name, newtable name, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype, without_warnings boolean, all_warnings boolean, use_incomment_options boolean, incomment_options_usage_warning boolean, constant_tracing boolean | TABLE(functionid regproc, lineno integer, statement text, sqlstate text, message text, detail text, hint text, level text, "position" integer, query text, context text) + plpgsql_check | public | plpgsql_check_function_tb | name text, relid regclass, fatal_errors boolean, other_warnings boolean, performance_warnings boolean, extra_warnings boolean, security_warnings boolean, compatibility_warnings boolean, oldtable name, newtable name, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype, without_warnings boolean, all_warnings boolean, use_incomment_options boolean, incomment_options_usage_warning boolean, constant_tracing boolean | TABLE(functionid regproc, lineno integer, statement text, sqlstate text, message text, detail text, hint text, level text, "position" integer, query text, context text) + plpgsql_check | public | plpgsql_check_pragma | VARIADIC name text[] | integer + plpgsql_check | public | plpgsql_check_profiler | enable boolean | boolean + plpgsql_check | public | plpgsql_check_tracer | enable boolean, verbosity text | boolean + plpgsql_check | public | plpgsql_coverage_branches | funcoid regprocedure | double precision + plpgsql_check | public | plpgsql_coverage_branches | name text | double precision + plpgsql_check | public | plpgsql_coverage_statements | funcoid regprocedure | double precision + plpgsql_check | public | plpgsql_coverage_statements | name text | double precision + plpgsql_check | public | plpgsql_profiler_function_statements_tb | funcoid regprocedure | TABLE(stmtid integer, parent_stmtid integer, parent_note text, block_num integer, lineno integer, queryid bigint, exec_stmts bigint, exec_stmts_err bigint, total_time double precision, avg_time double precision, max_time double precision, processed_rows bigint, stmtname text) + plpgsql_check | public | plpgsql_profiler_function_statements_tb | name text | TABLE(stmtid integer, parent_stmtid integer, parent_note text, block_num integer, lineno integer, queryid bigint, exec_stmts bigint, exec_stmts_err bigint, total_time double precision, avg_time double precision, max_time double precision, processed_rows bigint, stmtname text) + plpgsql_check | public | plpgsql_profiler_function_tb | funcoid regprocedure | TABLE(lineno integer, stmt_lineno integer, queryids bigint[], cmds_on_row integer, exec_stmts bigint, exec_stmts_err bigint, total_time double precision, avg_time double precision, max_time double precision[], processed_rows bigint[], source text) + plpgsql_check | public | plpgsql_profiler_function_tb | name text | TABLE(lineno integer, stmt_lineno integer, queryids bigint[], cmds_on_row integer, exec_stmts bigint, exec_stmts_err bigint, total_time double precision, avg_time double precision, max_time double precision[], processed_rows bigint[], source text) + plpgsql_check | public | plpgsql_profiler_functions_all | | TABLE(funcoid regprocedure, exec_count bigint, exec_stmts_err bigint, total_time double precision, avg_time double precision, stddev_time double precision, min_time double precision, max_time double precision) + plpgsql_check | public | plpgsql_profiler_install_fake_queryid_hook | | void + plpgsql_check | public | plpgsql_profiler_remove_fake_queryid_hook | | void + plpgsql_check | public | plpgsql_profiler_reset | funcoid regprocedure | void + plpgsql_check | public | plpgsql_profiler_reset_all | | void + plpgsql_check | public | plpgsql_show_dependency_tb | funcoid regprocedure, relid regclass, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype | TABLE(type text, oid oid, schema text, name text, params text) + plpgsql_check | public | plpgsql_show_dependency_tb | fnname text, relid regclass, anyelememttype regtype, anyenumtype regtype, anyrangetype regtype, anycompatibletype regtype, anycompatiblerangetype regtype | TABLE(type text, oid oid, schema text, name text, params text) + postgis | public | _postgis_deprecate | oldname text, newname text, version text | void + postgis | public | _postgis_index_extent | tbl regclass, col text | box2d + postgis | public | _postgis_join_selectivity | regclass, text, regclass, text, text | double precision + postgis | public | _postgis_pgsql_version | | text + postgis | public | _postgis_scripts_pgsql_version | | text + postgis | public | _postgis_selectivity | tbl regclass, att_name text, geom geometry, mode text | double precision + postgis | public | _postgis_stats | tbl regclass, att_name text, text | text + postgis | public | _st_3ddfullywithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | _st_3ddwithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | _st_3dintersects | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_asgml | integer, geometry, integer, integer, text, text | text + postgis | public | _st_asx3d | integer, geometry, integer, integer, text | text + postgis | public | _st_bestsrid | geography | integer + postgis | public | _st_bestsrid | geography, geography | integer + postgis | public | _st_contains | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_containsproperly | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_coveredby | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_coveredby | geog1 geography, geog2 geography | boolean + postgis | public | _st_covers | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_covers | geog1 geography, geog2 geography | boolean + postgis | public | _st_crosses | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_dfullywithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | _st_distancetree | geography, geography, double precision, boolean | double precision + postgis | public | _st_distancetree | geography, geography | double precision + postgis | public | _st_distanceuncached | geography, geography, double precision, boolean | double precision + postgis | public | _st_distanceuncached | geography, geography, boolean | double precision + postgis | public | _st_distanceuncached | geography, geography | double precision + postgis | public | _st_dwithin | geog1 geography, geog2 geography, tolerance double precision, use_spheroid boolean | boolean + postgis | public | _st_dwithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | _st_dwithinuncached | geography, geography, double precision, boolean | boolean + postgis | public | _st_dwithinuncached | geography, geography, double precision | boolean + postgis | public | _st_equals | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_expand | geography, double precision | geography + postgis | public | _st_geomfromgml | text, integer | geometry + postgis | public | _st_intersects | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_linecrossingdirection | line1 geometry, line2 geometry | integer + postgis | public | _st_longestline | geom1 geometry, geom2 geometry | geometry + postgis | public | _st_maxdistance | geom1 geometry, geom2 geometry | double precision + postgis | public | _st_orderingequals | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_overlaps | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_pointoutside | geography | geography + postgis | public | _st_sortablehash | geom geometry | bigint + postgis | public | _st_touches | geom1 geometry, geom2 geometry | boolean + postgis | public | _st_voronoi | g1 geometry, clip geometry, tolerance double precision, return_polygons boolean | geometry + postgis | public | _st_within | geom1 geometry, geom2 geometry | boolean + postgis | public | addauth | text | boolean + postgis | public | addgeometrycolumn | schema_name character varying, table_name character varying, column_name character varying, new_srid integer, new_type character varying, new_dim integer, use_typmod boolean | text + postgis | public | addgeometrycolumn | catalog_name character varying, schema_name character varying, table_name character varying, column_name character varying, new_srid_in integer, new_type character varying, new_dim integer, use_typmod boolean | text + postgis | public | addgeometrycolumn | table_name character varying, column_name character varying, new_srid integer, new_type character varying, new_dim integer, use_typmod boolean | text + postgis | public | box | box3d | box + postgis | public | box | geometry | box + postgis | public | box2d | box3d | box2d + postgis | public | box2d | geometry | box2d + postgis | public | box2d_in | cstring | box2d + postgis | public | box2d_out | box2d | cstring + postgis | public | box2df_in | cstring | box2df + postgis | public | box2df_out | box2df | cstring + postgis | public | box3d | geometry | box3d + postgis | public | box3d | box2d | box3d + postgis | public | box3d_in | cstring | box3d + postgis | public | box3d_out | box3d | cstring + postgis | public | box3dtobox | box3d | box + postgis | public | bytea | geography | bytea + postgis | public | bytea | geometry | bytea + postgis | public | checkauth | text, text | integer + postgis | public | checkauth | text, text, text | integer + postgis | public | checkauthtrigger | | trigger + postgis | public | contains_2d | geometry, box2df | boolean + postgis | public | contains_2d | box2df, geometry | boolean + postgis | public | contains_2d | box2df, box2df | boolean + postgis | public | disablelongtransactions | | text + postgis | public | dropgeometrycolumn | schema_name character varying, table_name character varying, column_name character varying | text + postgis | public | dropgeometrycolumn | table_name character varying, column_name character varying | text + postgis | public | dropgeometrycolumn | catalog_name character varying, schema_name character varying, table_name character varying, column_name character varying | text + postgis | public | dropgeometrytable | table_name character varying | text + postgis | public | dropgeometrytable | schema_name character varying, table_name character varying | text + postgis | public | dropgeometrytable | catalog_name character varying, schema_name character varying, table_name character varying | text + postgis | public | enablelongtransactions | | text + postgis | public | equals | geom1 geometry, geom2 geometry | boolean + postgis | public | find_srid | character varying, character varying, character varying | integer + postgis | public | geog_brin_inclusion_add_value | internal, internal, internal, internal | boolean + postgis | public | geography | bytea | geography + postgis | public | geography | geometry | geography + postgis | public | geography | geography, integer, boolean | geography + postgis | public | geography_analyze | internal | boolean + postgis | public | geography_cmp | geography, geography | integer + postgis | public | geography_distance_knn | geography, geography | double precision + postgis | public | geography_eq | geography, geography | boolean + postgis | public | geography_ge | geography, geography | boolean + postgis | public | geography_gist_compress | internal | internal + postgis | public | geography_gist_consistent | internal, geography, integer | boolean + postgis | public | geography_gist_decompress | internal | internal + postgis | public | geography_gist_distance | internal, geography, integer | double precision + postgis | public | geography_gist_penalty | internal, internal, internal | internal + postgis | public | geography_gist_picksplit | internal, internal | internal + postgis | public | geography_gist_same | box2d, box2d, internal | internal + postgis | public | geography_gist_union | bytea, internal | internal + postgis | public | geography_gt | geography, geography | boolean + postgis | public | geography_in | cstring, oid, integer | geography + postgis | public | geography_le | geography, geography | boolean + postgis | public | geography_lt | geography, geography | boolean + postgis | public | geography_out | geography | cstring + postgis | public | geography_overlaps | geography, geography | boolean + postgis | public | geography_recv | internal, oid, integer | geography + postgis | public | geography_send | geography | bytea + postgis | public | geography_spgist_choose_nd | internal, internal | void + postgis | public | geography_spgist_compress_nd | internal | internal + postgis | public | geography_spgist_config_nd | internal, internal | void + postgis | public | geography_spgist_inner_consistent_nd | internal, internal | void + postgis | public | geography_spgist_leaf_consistent_nd | internal, internal | boolean + postgis | public | geography_spgist_picksplit_nd | internal, internal | void + postgis | public | geography_typmod_in | cstring[] | integer + postgis | public | geography_typmod_out | integer | cstring + postgis | public | geom2d_brin_inclusion_add_value | internal, internal, internal, internal | boolean + postgis | public | geom3d_brin_inclusion_add_value | internal, internal, internal, internal | boolean + postgis | public | geom4d_brin_inclusion_add_value | internal, internal, internal, internal | boolean + postgis | public | geometry | geometry, integer, boolean | geometry + postgis | public | geometry | box3d | geometry + postgis | public | geometry | text | geometry + postgis | public | geometry | point | geometry + postgis | public | geometry | bytea | geometry + postgis | public | geometry | geography | geometry + postgis | public | geometry | path | geometry + postgis | public | geometry | polygon | geometry + postgis | public | geometry | box2d | geometry + postgis | public | geometry_above | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_analyze | internal | boolean + postgis | public | geometry_below | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_cmp | geom1 geometry, geom2 geometry | integer + postgis | public | geometry_contained_3d | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_contains | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_contains_3d | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_contains_nd | geometry, geometry | boolean + postgis | public | geometry_distance_box | geom1 geometry, geom2 geometry | double precision + postgis | public | geometry_distance_centroid | geom1 geometry, geom2 geometry | double precision + postgis | public | geometry_distance_centroid_nd | geometry, geometry | double precision + postgis | public | geometry_distance_cpa | geometry, geometry | double precision + postgis | public | geometry_eq | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_ge | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_gist_compress_2d | internal | internal + postgis | public | geometry_gist_compress_nd | internal | internal + postgis | public | geometry_gist_consistent_2d | internal, geometry, integer | boolean + postgis | public | geometry_gist_consistent_nd | internal, geometry, integer | boolean + postgis | public | geometry_gist_decompress_2d | internal | internal + postgis | public | geometry_gist_decompress_nd | internal | internal + postgis | public | geometry_gist_distance_2d | internal, geometry, integer | double precision + postgis | public | geometry_gist_distance_nd | internal, geometry, integer | double precision + postgis | public | geometry_gist_penalty_2d | internal, internal, internal | internal + postgis | public | geometry_gist_penalty_nd | internal, internal, internal | internal + postgis | public | geometry_gist_picksplit_2d | internal, internal | internal + postgis | public | geometry_gist_picksplit_nd | internal, internal | internal + postgis | public | geometry_gist_same_2d | geom1 geometry, geom2 geometry, internal | internal + postgis | public | geometry_gist_same_nd | geometry, geometry, internal | internal + postgis | public | geometry_gist_sortsupport_2d | internal | void + postgis | public | geometry_gist_union_2d | bytea, internal | internal + postgis | public | geometry_gist_union_nd | bytea, internal | internal + postgis | public | geometry_gt | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_hash | geometry | integer + postgis | public | geometry_in | cstring | geometry + postgis | public | geometry_le | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_left | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_lt | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_out | geometry | cstring + postgis | public | geometry_overabove | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_overbelow | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_overlaps | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_overlaps_3d | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_overlaps_nd | geometry, geometry | boolean + postgis | public | geometry_overleft | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_overright | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_recv | internal | geometry + postgis | public | geometry_right | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_same | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_same_3d | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_same_nd | geometry, geometry | boolean + postgis | public | geometry_send | geometry | bytea + postgis | public | geometry_sortsupport | internal | void + postgis | public | geometry_spgist_choose_2d | internal, internal | void + postgis | public | geometry_spgist_choose_3d | internal, internal | void + postgis | public | geometry_spgist_choose_nd | internal, internal | void + postgis | public | geometry_spgist_compress_2d | internal | internal + postgis | public | geometry_spgist_compress_3d | internal | internal + postgis | public | geometry_spgist_compress_nd | internal | internal + postgis | public | geometry_spgist_config_2d | internal, internal | void + postgis | public | geometry_spgist_config_3d | internal, internal | void + postgis | public | geometry_spgist_config_nd | internal, internal | void + postgis | public | geometry_spgist_inner_consistent_2d | internal, internal | void + postgis | public | geometry_spgist_inner_consistent_3d | internal, internal | void + postgis | public | geometry_spgist_inner_consistent_nd | internal, internal | void + postgis | public | geometry_spgist_leaf_consistent_2d | internal, internal | boolean + postgis | public | geometry_spgist_leaf_consistent_3d | internal, internal | boolean + postgis | public | geometry_spgist_leaf_consistent_nd | internal, internal | boolean + postgis | public | geometry_spgist_picksplit_2d | internal, internal | void + postgis | public | geometry_spgist_picksplit_3d | internal, internal | void + postgis | public | geometry_spgist_picksplit_nd | internal, internal | void + postgis | public | geometry_typmod_in | cstring[] | integer + postgis | public | geometry_typmod_out | integer | cstring + postgis | public | geometry_within | geom1 geometry, geom2 geometry | boolean + postgis | public | geometry_within_nd | geometry, geometry | boolean + postgis | public | geometrytype | geography | text + postgis | public | geometrytype | geometry | text + postgis | public | geomfromewkb | bytea | geometry + postgis | public | geomfromewkt | text | geometry + postgis | public | get_proj4_from_srid | integer | text + postgis | public | gettransactionid | | xid + postgis | public | gidx_in | cstring | gidx + postgis | public | gidx_out | gidx | cstring + postgis | public | gserialized_gist_joinsel_2d | internal, oid, internal, smallint | double precision + postgis | public | gserialized_gist_joinsel_nd | internal, oid, internal, smallint | double precision + postgis | public | gserialized_gist_sel_2d | internal, oid, internal, integer | double precision + postgis | public | gserialized_gist_sel_nd | internal, oid, internal, integer | double precision + postgis | public | is_contained_2d | geometry, box2df | boolean + postgis | public | is_contained_2d | box2df, geometry | boolean + postgis | public | is_contained_2d | box2df, box2df | boolean + postgis | public | json | geometry | json + postgis | public | jsonb | geometry | jsonb + postgis | public | lockrow | text, text, text, timestamp without time zone | integer + postgis | public | lockrow | text, text, text, text | integer + postgis | public | lockrow | text, text, text | integer + postgis | public | lockrow | text, text, text, text, timestamp without time zone | integer + postgis | public | longtransactionsenabled | | boolean + postgis | public | overlaps_2d | geometry, box2df | boolean + postgis | public | overlaps_2d | box2df, geometry | boolean + postgis | public | overlaps_2d | box2df, box2df | boolean + postgis | public | overlaps_geog | gidx, gidx | boolean + postgis | public | overlaps_geog | geography, gidx | boolean + postgis | public | overlaps_geog | gidx, geography | boolean + postgis | public | overlaps_nd | gidx, gidx | boolean + postgis | public | overlaps_nd | geometry, gidx | boolean + postgis | public | overlaps_nd | gidx, geometry | boolean + postgis | public | path | geometry | path + postgis | public | pgis_asflatgeobuf_finalfn | internal | bytea + postgis | public | pgis_asflatgeobuf_transfn | internal, anyelement, boolean | internal + postgis | public | pgis_asflatgeobuf_transfn | internal, anyelement | internal + postgis | public | pgis_asflatgeobuf_transfn | internal, anyelement, boolean, text | internal + postgis | public | pgis_asgeobuf_finalfn | internal | bytea + postgis | public | pgis_asgeobuf_transfn | internal, anyelement | internal + postgis | public | pgis_asgeobuf_transfn | internal, anyelement, text | internal + postgis | public | pgis_asmvt_combinefn | internal, internal | internal + postgis | public | pgis_asmvt_deserialfn | bytea, internal | internal + postgis | public | pgis_asmvt_finalfn | internal | bytea + postgis | public | pgis_asmvt_serialfn | internal | bytea + postgis | public | pgis_asmvt_transfn | internal, anyelement, text, integer, text | internal + postgis | public | pgis_asmvt_transfn | internal, anyelement | internal + postgis | public | pgis_asmvt_transfn | internal, anyelement, text, integer | internal + postgis | public | pgis_asmvt_transfn | internal, anyelement, text | internal + postgis | public | pgis_asmvt_transfn | internal, anyelement, text, integer, text, text | internal + postgis | public | pgis_geometry_accum_transfn | internal, geometry, double precision | internal + postgis | public | pgis_geometry_accum_transfn | internal, geometry | internal + postgis | public | pgis_geometry_accum_transfn | internal, geometry, double precision, integer | internal + postgis | public | pgis_geometry_clusterintersecting_finalfn | internal | geometry[] + postgis | public | pgis_geometry_clusterwithin_finalfn | internal | geometry[] + postgis | public | pgis_geometry_collect_finalfn | internal | geometry + postgis | public | pgis_geometry_makeline_finalfn | internal | geometry + postgis | public | pgis_geometry_polygonize_finalfn | internal | geometry + postgis | public | pgis_geometry_union_parallel_combinefn | internal, internal | internal + postgis | public | pgis_geometry_union_parallel_deserialfn | bytea, internal | internal + postgis | public | pgis_geometry_union_parallel_finalfn | internal | geometry + postgis | public | pgis_geometry_union_parallel_serialfn | internal | bytea + postgis | public | pgis_geometry_union_parallel_transfn | internal, geometry, double precision | internal + postgis | public | pgis_geometry_union_parallel_transfn | internal, geometry | internal + postgis | public | point | geometry | point + postgis | public | polygon | geometry | polygon + postgis | public | populate_geometry_columns | tbl_oid oid, use_typmod boolean | integer + postgis | public | populate_geometry_columns | use_typmod boolean | text + postgis | public | postgis_addbbox | geometry | geometry + postgis | public | postgis_cache_bbox | | trigger + postgis | public | postgis_constraint_dims | geomschema text, geomtable text, geomcolumn text | integer + postgis | public | postgis_constraint_srid | geomschema text, geomtable text, geomcolumn text | integer + postgis | public | postgis_constraint_type | geomschema text, geomtable text, geomcolumn text | character varying + postgis | public | postgis_dropbbox | geometry | geometry + postgis | public | postgis_extensions_upgrade | | text + postgis | public | postgis_full_version | | text + postgis | public | postgis_geos_noop | geometry | geometry + postgis | public | postgis_geos_version | | text + postgis | public | postgis_getbbox | geometry | box2d + postgis | public | postgis_hasbbox | geometry | boolean + postgis | public | postgis_index_supportfn | internal | internal + postgis | public | postgis_lib_build_date | | text + postgis | public | postgis_lib_revision | | text + postgis | public | postgis_lib_version | | text + postgis | public | postgis_libjson_version | | text + postgis | public | postgis_liblwgeom_version | | text + postgis | public | postgis_libprotobuf_version | | text + postgis | public | postgis_libxml_version | | text + postgis | public | postgis_noop | geometry | geometry + postgis | public | postgis_proj_version | | text + postgis | public | postgis_scripts_build_date | | text + postgis | public | postgis_scripts_installed | | text + postgis | public | postgis_scripts_released | | text + postgis | public | postgis_svn_version | | text + postgis | public | postgis_transform_geometry | geom geometry, text, text, integer | geometry + postgis | public | postgis_type_name | geomname character varying, coord_dimension integer, use_new_name boolean | character varying + postgis | public | postgis_typmod_dims | integer | integer + postgis | public | postgis_typmod_srid | integer | integer + postgis | public | postgis_typmod_type | integer | text + postgis | public | postgis_version | | text + postgis | public | postgis_wagyu_version | | text + postgis | public | spheroid_in | cstring | spheroid + postgis | public | spheroid_out | spheroid | cstring + postgis | public | st_3dclosestpoint | geom1 geometry, geom2 geometry | geometry + postgis | public | st_3ddfullywithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | st_3ddistance | geom1 geometry, geom2 geometry | double precision + postgis | public | st_3ddwithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | st_3dextent | geometry | box3d + postgis | public | st_3dintersects | geom1 geometry, geom2 geometry | boolean + postgis | public | st_3dlength | geometry | double precision + postgis | public | st_3dlineinterpolatepoint | geometry, double precision | geometry + postgis | public | st_3dlongestline | geom1 geometry, geom2 geometry | geometry + postgis | public | st_3dmakebox | geom1 geometry, geom2 geometry | box3d + postgis | public | st_3dmaxdistance | geom1 geometry, geom2 geometry | double precision + postgis | public | st_3dperimeter | geometry | double precision + postgis | public | st_3dshortestline | geom1 geometry, geom2 geometry | geometry + postgis | public | st_addmeasure | geometry, double precision, double precision | geometry + postgis | public | st_addpoint | geom1 geometry, geom2 geometry, integer | geometry + postgis | public | st_addpoint | geom1 geometry, geom2 geometry | geometry + postgis | public | st_affine | geometry, double precision, double precision, double precision, double precision, double precision, double precision | geometry + postgis | public | st_affine | geometry, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision | geometry + postgis | public | st_angle | pt1 geometry, pt2 geometry, pt3 geometry, pt4 geometry | double precision + postgis | public | st_angle | line1 geometry, line2 geometry | double precision + postgis | public | st_area | geog geography, use_spheroid boolean | double precision + postgis | public | st_area | text | double precision + postgis | public | st_area | geometry | double precision + postgis | public | st_area2d | geometry | double precision + postgis | public | st_asbinary | geography | bytea + postgis | public | st_asbinary | geometry, text | bytea + postgis | public | st_asbinary | geometry | bytea + postgis | public | st_asbinary | geography, text | bytea + postgis | public | st_asencodedpolyline | geom geometry, nprecision integer | text + postgis | public | st_asewkb | geometry, text | bytea + postgis | public | st_asewkb | geometry | bytea + postgis | public | st_asewkt | text | text + postgis | public | st_asewkt | geography, integer | text + postgis | public | st_asewkt | geography | text + postgis | public | st_asewkt | geometry, integer | text + postgis | public | st_asewkt | geometry | text + postgis | public | st_asflatgeobuf | anyelement | bytea + postgis | public | st_asflatgeobuf | anyelement, boolean | bytea + postgis | public | st_asflatgeobuf | anyelement, boolean, text | bytea + postgis | public | st_asgeobuf | anyelement | bytea + postgis | public | st_asgeobuf | anyelement, text | bytea + postgis | public | st_asgeojson | text | text + postgis | public | st_asgeojson | geom geometry, maxdecimaldigits integer, options integer | text + postgis | public | st_asgeojson | geog geography, maxdecimaldigits integer, options integer | text + postgis | public | st_asgeojson | r record, geom_column text, maxdecimaldigits integer, pretty_bool boolean | text + postgis | public | st_asgml | text | text + postgis | public | st_asgml | version integer, geog geography, maxdecimaldigits integer, options integer, nprefix text, id text | text + postgis | public | st_asgml | geog geography, maxdecimaldigits integer, options integer, nprefix text, id text | text + postgis | public | st_asgml | geom geometry, maxdecimaldigits integer, options integer | text + postgis | public | st_asgml | version integer, geom geometry, maxdecimaldigits integer, options integer, nprefix text, id text | text + postgis | public | st_ashexewkb | geometry, text | text + postgis | public | st_ashexewkb | geometry | text + postgis | public | st_askml | text | text + postgis | public | st_askml | geom geometry, maxdecimaldigits integer, nprefix text | text + postgis | public | st_askml | geog geography, maxdecimaldigits integer, nprefix text | text + postgis | public | st_aslatlontext | geom geometry, tmpl text | text + postgis | public | st_asmarc21 | geom geometry, format text | text + postgis | public | st_asmvt | anyelement | bytea + postgis | public | st_asmvt | anyelement, text, integer, text, text | bytea + postgis | public | st_asmvt | anyelement, text, integer | bytea + postgis | public | st_asmvt | anyelement, text | bytea + postgis | public | st_asmvt | anyelement, text, integer, text | bytea + postgis | public | st_asmvtgeom | geom geometry, bounds box2d, extent integer, buffer integer, clip_geom boolean | geometry + postgis | public | st_assvg | geog geography, rel integer, maxdecimaldigits integer | text + postgis | public | st_assvg | geom geometry, rel integer, maxdecimaldigits integer | text + postgis | public | st_assvg | text | text + postgis | public | st_astext | text | text + postgis | public | st_astext | geography, integer | text + postgis | public | st_astext | geography | text + postgis | public | st_astext | geometry, integer | text + postgis | public | st_astext | geometry | text + postgis | public | st_astwkb | geom geometry[], ids bigint[], prec integer, prec_z integer, prec_m integer, with_sizes boolean, with_boxes boolean | bytea + postgis | public | st_astwkb | geom geometry, prec integer, prec_z integer, prec_m integer, with_sizes boolean, with_boxes boolean | bytea + postgis | public | st_asx3d | geom geometry, maxdecimaldigits integer, options integer | text + postgis | public | st_azimuth | geom1 geometry, geom2 geometry | double precision + postgis | public | st_azimuth | geog1 geography, geog2 geography | double precision + postgis | public | st_bdmpolyfromtext | text, integer | geometry + postgis | public | st_bdpolyfromtext | text, integer | geometry + postgis | public | st_boundary | geometry | geometry + postgis | public | st_boundingdiagonal | geom geometry, fits boolean | geometry + postgis | public | st_box2dfromgeohash | text, integer | box2d + postgis | public | st_buffer | geom geometry, radius double precision, options text | geometry + postgis | public | st_buffer | geography, double precision, text | geography + postgis | public | st_buffer | geography, double precision, integer | geography + postgis | public | st_buffer | geom geometry, radius double precision, quadsegs integer | geometry + postgis | public | st_buffer | text, double precision, text | geometry + postgis | public | st_buffer | geography, double precision | geography + postgis | public | st_buffer | text, double precision, integer | geometry + postgis | public | st_buffer | text, double precision | geometry + postgis | public | st_buildarea | geometry | geometry + postgis | public | st_centroid | text | geometry + postgis | public | st_centroid | geography, use_spheroid boolean | geography + postgis | public | st_centroid | geometry | geometry + postgis | public | st_chaikinsmoothing | geometry, integer, boolean | geometry + postgis | public | st_cleangeometry | geometry | geometry + postgis | public | st_clipbybox2d | geom geometry, box box2d | geometry + postgis | public | st_closestpoint | geom1 geometry, geom2 geometry | geometry + postgis | public | st_closestpointofapproach | geometry, geometry | double precision + postgis | public | st_clusterdbscan | geometry, eps double precision, minpoints integer | integer + postgis | public | st_clusterintersecting | geometry[] | geometry[] + postgis | public | st_clusterintersecting | geometry | geometry[] + postgis | public | st_clusterkmeans | geom geometry, k integer, max_radius double precision | integer + postgis | public | st_clusterwithin | geometry[], double precision | geometry[] + postgis | public | st_clusterwithin | geometry, double precision | geometry[] + postgis | public | st_collect | geom1 geometry, geom2 geometry | geometry + postgis | public | st_collect | geometry[] | geometry + postgis | public | st_collect | geometry | geometry + postgis | public | st_collectionextract | geometry, integer | geometry + postgis | public | st_collectionextract | geometry | geometry + postgis | public | st_collectionhomogenize | geometry | geometry + postgis | public | st_combinebbox | box2d, geometry | box2d + postgis | public | st_combinebbox | box3d, geometry | box3d + postgis | public | st_combinebbox | box3d, box3d | box3d + postgis | public | st_concavehull | param_geom geometry, param_pctconvex double precision, param_allow_holes boolean | geometry + postgis | public | st_contains | geom1 geometry, geom2 geometry | boolean + postgis | public | st_containsproperly | geom1 geometry, geom2 geometry | boolean + postgis | public | st_convexhull | geometry | geometry + postgis | public | st_coorddim | geometry geometry | smallint + postgis | public | st_coveredby | geom1 geometry, geom2 geometry | boolean + postgis | public | st_coveredby | text, text | boolean + postgis | public | st_coveredby | geog1 geography, geog2 geography | boolean + postgis | public | st_covers | geom1 geometry, geom2 geometry | boolean + postgis | public | st_covers | text, text | boolean + postgis | public | st_covers | geog1 geography, geog2 geography | boolean + postgis | public | st_cpawithin | geometry, geometry, double precision | boolean + postgis | public | st_crosses | geom1 geometry, geom2 geometry | boolean + postgis | public | st_curvetoline | geom geometry, tol double precision, toltype integer, flags integer | geometry + postgis | public | st_delaunaytriangles | g1 geometry, tolerance double precision, flags integer | geometry + postgis | public | st_dfullywithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | st_difference | geom1 geometry, geom2 geometry, gridsize double precision | geometry + postgis | public | st_dimension | geometry | integer + postgis | public | st_disjoint | geom1 geometry, geom2 geometry | boolean + postgis | public | st_distance | geom1 geometry, geom2 geometry | double precision + postgis | public | st_distance | text, text | double precision + postgis | public | st_distance | geog1 geography, geog2 geography, use_spheroid boolean | double precision + postgis | public | st_distancecpa | geometry, geometry | double precision + postgis | public | st_distancesphere | geom1 geometry, geom2 geometry | double precision + postgis | public | st_distancesphere | geom1 geometry, geom2 geometry, radius double precision | double precision + postgis | public | st_distancespheroid | geom1 geometry, geom2 geometry, spheroid | double precision + postgis | public | st_distancespheroid | geom1 geometry, geom2 geometry | double precision + postgis | public | st_dump | geometry | SETOF geometry_dump + postgis | public | st_dumppoints | geometry | SETOF geometry_dump + postgis | public | st_dumprings | geometry | SETOF geometry_dump + postgis | public | st_dumpsegments | geometry | SETOF geometry_dump + postgis | public | st_dwithin | text, text, double precision | boolean + postgis | public | st_dwithin | geog1 geography, geog2 geography, tolerance double precision, use_spheroid boolean | boolean + postgis | public | st_dwithin | geom1 geometry, geom2 geometry, double precision | boolean + postgis | public | st_endpoint | geometry | geometry + postgis | public | st_envelope | geometry | geometry + postgis | public | st_equals | geom1 geometry, geom2 geometry | boolean + postgis | public | st_estimatedextent | text, text, text, boolean | box2d + postgis | public | st_estimatedextent | text, text | box2d + postgis | public | st_estimatedextent | text, text, text | box2d + postgis | public | st_expand | box3d, double precision | box3d + postgis | public | st_expand | box box3d, dx double precision, dy double precision, dz double precision | box3d + postgis | public | st_expand | box2d, double precision | box2d + postgis | public | st_expand | box box2d, dx double precision, dy double precision | box2d + postgis | public | st_expand | geometry, double precision | geometry + postgis | public | st_expand | geom geometry, dx double precision, dy double precision, dz double precision, dm double precision | geometry + postgis | public | st_extent | geometry | box2d + postgis | public | st_exteriorring | geometry | geometry + postgis | public | st_filterbym | geometry, double precision, double precision, boolean | geometry + postgis | public | st_findextent | text, text | box2d + postgis | public | st_findextent | text, text, text | box2d + postgis | public | st_flipcoordinates | geometry | geometry + postgis | public | st_force2d | geometry | geometry + postgis | public | st_force3d | geom geometry, zvalue double precision | geometry + postgis | public | st_force3dm | geom geometry, mvalue double precision | geometry + postgis | public | st_force3dz | geom geometry, zvalue double precision | geometry + postgis | public | st_force4d | geom geometry, zvalue double precision, mvalue double precision | geometry + postgis | public | st_forcecollection | geometry | geometry + postgis | public | st_forcecurve | geometry | geometry + postgis | public | st_forcepolygonccw | geometry | geometry + postgis | public | st_forcepolygoncw | geometry | geometry + postgis | public | st_forcerhr | geometry | geometry + postgis | public | st_forcesfs | geometry, version text | geometry + postgis | public | st_forcesfs | geometry | geometry + postgis | public | st_frechetdistance | geom1 geometry, geom2 geometry, double precision | double precision + postgis | public | st_fromflatgeobuf | anyelement, bytea | SETOF anyelement + postgis | public | st_fromflatgeobuftotable | text, text, bytea | void + postgis | public | st_generatepoints | area geometry, npoints integer, seed integer | geometry + postgis | public | st_generatepoints | area geometry, npoints integer | geometry + postgis | public | st_geogfromtext | text | geography + postgis | public | st_geogfromwkb | bytea | geography + postgis | public | st_geographyfromtext | text | geography + postgis | public | st_geohash | geog geography, maxchars integer | text + postgis | public | st_geohash | geom geometry, maxchars integer | text + postgis | public | st_geomcollfromtext | text | geometry + postgis | public | st_geomcollfromtext | text, integer | geometry + postgis | public | st_geomcollfromwkb | bytea, integer | geometry + postgis | public | st_geomcollfromwkb | bytea | geometry + postgis | public | st_geometricmedian | g geometry, tolerance double precision, max_iter integer, fail_if_not_converged boolean | geometry + postgis | public | st_geometryfromtext | text | geometry + postgis | public | st_geometryfromtext | text, integer | geometry + postgis | public | st_geometryn | geometry, integer | geometry + postgis | public | st_geometrytype | geometry | text + postgis | public | st_geomfromewkb | bytea | geometry + postgis | public | st_geomfromewkt | text | geometry + postgis | public | st_geomfromgeohash | text, integer | geometry + postgis | public | st_geomfromgeojson | text | geometry + postgis | public | st_geomfromgeojson | json | geometry + postgis | public | st_geomfromgeojson | jsonb | geometry + postgis | public | st_geomfromgml | text | geometry + postgis | public | st_geomfromgml | text, integer | geometry + postgis | public | st_geomfromkml | text | geometry + postgis | public | st_geomfrommarc21 | marc21xml text | geometry + postgis | public | st_geomfromtext | text | geometry + postgis | public | st_geomfromtext | text, integer | geometry + postgis | public | st_geomfromtwkb | bytea | geometry + postgis | public | st_geomfromwkb | bytea, integer | geometry + postgis | public | st_geomfromwkb | bytea | geometry + postgis | public | st_gmltosql | text | geometry + postgis | public | st_gmltosql | text, integer | geometry + postgis | public | st_hasarc | geometry geometry | boolean + postgis | public | st_hausdorffdistance | geom1 geometry, geom2 geometry | double precision + postgis | public | st_hausdorffdistance | geom1 geometry, geom2 geometry, double precision | double precision + postgis | public | st_hexagon | size double precision, cell_i integer, cell_j integer, origin geometry | geometry + postgis | public | st_hexagongrid | size double precision, bounds geometry, OUT geom geometry, OUT i integer, OUT j integer | SETOF record + postgis | public | st_interiorringn | geometry, integer | geometry + postgis | public | st_interpolatepoint | line geometry, point geometry | double precision + postgis | public | st_intersection | geom1 geometry, geom2 geometry, gridsize double precision | geometry + postgis | public | st_intersection | text, text | geometry + postgis | public | st_intersection | geography, geography | geography + postgis | public | st_intersects | geom1 geometry, geom2 geometry | boolean + postgis | public | st_intersects | text, text | boolean + postgis | public | st_intersects | geog1 geography, geog2 geography | boolean + postgis | public | st_isclosed | geometry | boolean + postgis | public | st_iscollection | geometry | boolean + postgis | public | st_isempty | geometry | boolean + postgis | public | st_ispolygonccw | geometry | boolean + postgis | public | st_ispolygoncw | geometry | boolean + postgis | public | st_isring | geometry | boolean + postgis | public | st_issimple | geometry | boolean + postgis | public | st_isvalid | geometry, integer | boolean + postgis | public | st_isvalid | geometry | boolean + postgis | public | st_isvaliddetail | geom geometry, flags integer | valid_detail + postgis | public | st_isvalidreason | geometry, integer | text + postgis | public | st_isvalidreason | geometry | text + postgis | public | st_isvalidtrajectory | geometry | boolean + postgis | public | st_length | geog geography, use_spheroid boolean | double precision + postgis | public | st_length | text | double precision + postgis | public | st_length | geometry | double precision + postgis | public | st_length2d | geometry | double precision + postgis | public | st_length2dspheroid | geometry, spheroid | double precision + postgis | public | st_lengthspheroid | geometry, spheroid | double precision + postgis | public | st_letters | letters text, font json | geometry + postgis | public | st_linecrossingdirection | line1 geometry, line2 geometry | integer + postgis | public | st_linefromencodedpolyline | txtin text, nprecision integer | geometry + postgis | public | st_linefrommultipoint | geometry | geometry + postgis | public | st_linefromtext | text | geometry + postgis | public | st_linefromtext | text, integer | geometry + postgis | public | st_linefromwkb | bytea, integer | geometry + postgis | public | st_linefromwkb | bytea | geometry + postgis | public | st_lineinterpolatepoint | geometry, double precision | geometry + postgis | public | st_lineinterpolatepoints | geometry, double precision, repeat boolean | geometry + postgis | public | st_linelocatepoint | geom1 geometry, geom2 geometry | double precision + postgis | public | st_linemerge | geometry, boolean | geometry + postgis | public | st_linemerge | geometry | geometry + postgis | public | st_linestringfromwkb | bytea, integer | geometry + postgis | public | st_linestringfromwkb | bytea | geometry + postgis | public | st_linesubstring | geometry, double precision, double precision | geometry + postgis | public | st_linetocurve | geometry geometry | geometry + postgis | public | st_locatealong | geometry geometry, measure double precision, leftrightoffset double precision | geometry + postgis | public | st_locatebetween | geometry geometry, frommeasure double precision, tomeasure double precision, leftrightoffset double precision | geometry + postgis | public | st_locatebetweenelevations | geometry geometry, fromelevation double precision, toelevation double precision | geometry + postgis | public | st_longestline | geom1 geometry, geom2 geometry | geometry + postgis | public | st_m | geometry | double precision + postgis | public | st_makebox2d | geom1 geometry, geom2 geometry | box2d + postgis | public | st_makeenvelope | double precision, double precision, double precision, double precision, integer | geometry + postgis | public | st_makeline | geom1 geometry, geom2 geometry | geometry + postgis | public | st_makeline | geometry[] | geometry + postgis | public | st_makeline | geometry | geometry + postgis | public | st_makepoint | double precision, double precision, double precision, double precision | geometry + postgis | public | st_makepoint | double precision, double precision | geometry + postgis | public | st_makepoint | double precision, double precision, double precision | geometry + postgis | public | st_makepointm | double precision, double precision, double precision | geometry + postgis | public | st_makepolygon | geometry, geometry[] | geometry + postgis | public | st_makepolygon | geometry | geometry + postgis | public | st_makevalid | geom geometry, params text | geometry + postgis | public | st_makevalid | geometry | geometry + postgis | public | st_maxdistance | geom1 geometry, geom2 geometry | double precision + postgis | public | st_maximuminscribedcircle | geometry, OUT center geometry, OUT nearest geometry, OUT radius double precision | record + postgis | public | st_memcollect | geometry | geometry + postgis | public | st_memsize | geometry | integer + postgis | public | st_memunion | geometry | geometry + postgis | public | st_minimumboundingcircle | inputgeom geometry, segs_per_quarter integer | geometry + postgis | public | st_minimumboundingradius | geometry, OUT center geometry, OUT radius double precision | record + postgis | public | st_minimumclearance | geometry | double precision + postgis | public | st_minimumclearanceline | geometry | geometry + postgis | public | st_mlinefromtext | text | geometry + postgis | public | st_mlinefromtext | text, integer | geometry + postgis | public | st_mlinefromwkb | bytea, integer | geometry + postgis | public | st_mlinefromwkb | bytea | geometry + postgis | public | st_mpointfromtext | text | geometry + postgis | public | st_mpointfromtext | text, integer | geometry + postgis | public | st_mpointfromwkb | bytea, integer | geometry + postgis | public | st_mpointfromwkb | bytea | geometry + postgis | public | st_mpolyfromtext | text | geometry + postgis | public | st_mpolyfromtext | text, integer | geometry + postgis | public | st_mpolyfromwkb | bytea, integer | geometry + postgis | public | st_mpolyfromwkb | bytea | geometry + postgis | public | st_multi | geometry | geometry + postgis | public | st_multilinefromwkb | bytea | geometry + postgis | public | st_multilinestringfromtext | text | geometry + postgis | public | st_multilinestringfromtext | text, integer | geometry + postgis | public | st_multipointfromtext | text | geometry + postgis | public | st_multipointfromwkb | bytea, integer | geometry + postgis | public | st_multipointfromwkb | bytea | geometry + postgis | public | st_multipolyfromwkb | bytea, integer | geometry + postgis | public | st_multipolyfromwkb | bytea | geometry + postgis | public | st_multipolygonfromtext | text | geometry + postgis | public | st_multipolygonfromtext | text, integer | geometry + postgis | public | st_ndims | geometry | smallint + postgis | public | st_node | g geometry | geometry + postgis | public | st_normalize | geom geometry | geometry + postgis | public | st_npoints | geometry | integer + postgis | public | st_nrings | geometry | integer + postgis | public | st_numgeometries | geometry | integer + postgis | public | st_numinteriorring | geometry | integer + postgis | public | st_numinteriorrings | geometry | integer + postgis | public | st_numpatches | geometry | integer + postgis | public | st_numpoints | geometry | integer + postgis | public | st_offsetcurve | line geometry, distance double precision, params text | geometry + postgis | public | st_orderingequals | geom1 geometry, geom2 geometry | boolean + postgis | public | st_orientedenvelope | geometry | geometry + postgis | public | st_overlaps | geom1 geometry, geom2 geometry | boolean + postgis | public | st_patchn | geometry, integer | geometry + postgis | public | st_perimeter | geog geography, use_spheroid boolean | double precision + postgis | public | st_perimeter | geometry | double precision + postgis | public | st_perimeter2d | geometry | double precision + postgis | public | st_point | double precision, double precision, srid integer | geometry + postgis | public | st_point | double precision, double precision | geometry + postgis | public | st_pointfromgeohash | text, integer | geometry + postgis | public | st_pointfromtext | text | geometry + postgis | public | st_pointfromtext | text, integer | geometry + postgis | public | st_pointfromwkb | bytea, integer | geometry + postgis | public | st_pointfromwkb | bytea | geometry + postgis | public | st_pointinsidecircle | geometry, double precision, double precision, double precision | boolean + postgis | public | st_pointm | xcoordinate double precision, ycoordinate double precision, mcoordinate double precision, srid integer | geometry + postgis | public | st_pointn | geometry, integer | geometry + postgis | public | st_pointonsurface | geometry | geometry + postgis | public | st_points | geometry | geometry + postgis | public | st_pointz | xcoordinate double precision, ycoordinate double precision, zcoordinate double precision, srid integer | geometry + postgis | public | st_pointzm | xcoordinate double precision, ycoordinate double precision, zcoordinate double precision, mcoordinate double precision, srid integer | geometry + postgis | public | st_polyfromtext | text | geometry + postgis | public | st_polyfromtext | text, integer | geometry + postgis | public | st_polyfromwkb | bytea, integer | geometry + postgis | public | st_polyfromwkb | bytea | geometry + postgis | public | st_polygon | geometry, integer | geometry + postgis | public | st_polygonfromtext | text | geometry + postgis | public | st_polygonfromtext | text, integer | geometry + postgis | public | st_polygonfromwkb | bytea, integer | geometry + postgis | public | st_polygonfromwkb | bytea | geometry + postgis | public | st_polygonize | geometry[] | geometry + postgis | public | st_polygonize | geometry | geometry + postgis | public | st_project | geog geography, distance double precision, azimuth double precision | geography + postgis | public | st_quantizecoordinates | g geometry, prec_x integer, prec_y integer, prec_z integer, prec_m integer | geometry + postgis | public | st_reduceprecision | geom geometry, gridsize double precision | geometry + postgis | public | st_relate | geom1 geometry, geom2 geometry, integer | text + postgis | public | st_relate | geom1 geometry, geom2 geometry | text + postgis | public | st_relate | geom1 geometry, geom2 geometry, text | boolean + postgis | public | st_relatematch | text, text | boolean + postgis | public | st_removepoint | geometry, integer | geometry + postgis | public | st_removerepeatedpoints | geom geometry, tolerance double precision | geometry + postgis | public | st_reverse | geometry | geometry + postgis | public | st_rotate | geometry, double precision, geometry | geometry + postgis | public | st_rotate | geometry, double precision, double precision, double precision | geometry + postgis | public | st_rotate | geometry, double precision | geometry + postgis | public | st_rotatex | geometry, double precision | geometry + postgis | public | st_rotatey | geometry, double precision | geometry + postgis | public | st_rotatez | geometry, double precision | geometry + postgis | public | st_scale | geometry, double precision, double precision | geometry + postgis | public | st_scale | geometry, double precision, double precision, double precision | geometry + postgis | public | st_scale | geometry, geometry, origin geometry | geometry + postgis | public | st_scale | geometry, geometry | geometry + postgis | public | st_scroll | geometry, geometry | geometry + postgis | public | st_segmentize | geog geography, max_segment_length double precision | geography + postgis | public | st_segmentize | geometry, double precision | geometry + postgis | public | st_seteffectivearea | geometry, double precision, integer | geometry + postgis | public | st_setpoint | geometry, integer, geometry | geometry + postgis | public | st_setsrid | geog geography, srid integer | geography + postgis | public | st_setsrid | geom geometry, srid integer | geometry + postgis | public | st_sharedpaths | geom1 geometry, geom2 geometry | geometry + postgis | public | st_shiftlongitude | geometry | geometry + postgis | public | st_shortestline | geom1 geometry, geom2 geometry | geometry + postgis | public | st_simplify | geometry, double precision, boolean | geometry + postgis | public | st_simplify | geometry, double precision | geometry + postgis | public | st_simplifypolygonhull | geom geometry, vertex_fraction double precision, is_outer boolean | geometry + postgis | public | st_simplifypreservetopology | geometry, double precision | geometry + postgis | public | st_simplifyvw | geometry, double precision | geometry + postgis | public | st_snap | geom1 geometry, geom2 geometry, double precision | geometry + postgis | public | st_snaptogrid | geometry, double precision, double precision | geometry + postgis | public | st_snaptogrid | geom1 geometry, geom2 geometry, double precision, double precision, double precision, double precision | geometry + postgis | public | st_snaptogrid | geometry, double precision, double precision, double precision, double precision | geometry + postgis | public | st_snaptogrid | geometry, double precision | geometry + postgis | public | st_split | geom1 geometry, geom2 geometry | geometry + postgis | public | st_square | size double precision, cell_i integer, cell_j integer, origin geometry | geometry + postgis | public | st_squaregrid | size double precision, bounds geometry, OUT geom geometry, OUT i integer, OUT j integer | SETOF record + postgis | public | st_srid | geog geography | integer + postgis | public | st_srid | geom geometry | integer + postgis | public | st_startpoint | geometry | geometry + postgis | public | st_subdivide | geom geometry, maxvertices integer, gridsize double precision | SETOF geometry + postgis | public | st_summary | geography | text + postgis | public | st_summary | geometry | text + postgis | public | st_swapordinates | geom geometry, ords cstring | geometry + postgis | public | st_symdifference | geom1 geometry, geom2 geometry, gridsize double precision | geometry + postgis | public | st_symmetricdifference | geom1 geometry, geom2 geometry | geometry + postgis | public | st_tileenvelope | zoom integer, x integer, y integer, bounds geometry, margin double precision | geometry + postgis | public | st_touches | geom1 geometry, geom2 geometry | boolean + postgis | public | st_transform | geom geometry, to_proj text | geometry + postgis | public | st_transform | geom geometry, from_proj text, to_srid integer | geometry + postgis | public | st_transform | geometry, integer | geometry + postgis | public | st_transform | geom geometry, from_proj text, to_proj text | geometry + postgis | public | st_translate | geometry, double precision, double precision | geometry + postgis | public | st_translate | geometry, double precision, double precision, double precision | geometry + postgis | public | st_transscale | geometry, double precision, double precision, double precision, double precision | geometry + postgis | public | st_triangulatepolygon | g1 geometry | geometry + postgis | public | st_unaryunion | geometry, gridsize double precision | geometry + postgis | public | st_union | geom1 geometry, geom2 geometry, gridsize double precision | geometry + postgis | public | st_union | geom1 geometry, geom2 geometry | geometry + postgis | public | st_union | geometry[] | geometry + postgis | public | st_union | geometry, gridsize double precision | geometry + postgis | public | st_union | geometry | geometry + postgis | public | st_voronoilines | g1 geometry, tolerance double precision, extend_to geometry | geometry + postgis | public | st_voronoipolygons | g1 geometry, tolerance double precision, extend_to geometry | geometry + postgis | public | st_within | geom1 geometry, geom2 geometry | boolean + postgis | public | st_wkbtosql | wkb bytea | geometry + postgis | public | st_wkttosql | text | geometry + postgis | public | st_wrapx | geom geometry, wrap double precision, move double precision | geometry + postgis | public | st_x | geometry | double precision + postgis | public | st_xmax | box3d | double precision + postgis | public | st_xmin | box3d | double precision + postgis | public | st_y | geometry | double precision + postgis | public | st_ymax | box3d | double precision + postgis | public | st_ymin | box3d | double precision + postgis | public | st_z | geometry | double precision + postgis | public | st_zmax | box3d | double precision + postgis | public | st_zmflag | geometry | smallint + postgis | public | st_zmin | box3d | double precision + postgis | public | text | geometry | text + postgis | public | unlockrows | text | integer + postgis | public | updategeometrysrid | catalogn_name character varying, schema_name character varying, table_name character varying, column_name character varying, new_srid_in integer | text + postgis | public | updategeometrysrid | character varying, character varying, character varying, integer | text + postgis | public | updategeometrysrid | character varying, character varying, integer | text + postgis_raster | public | __st_countagg_transfn | agg agg_count, rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | agg_count + postgis_raster | public | _add_overview_constraint | ovschema name, ovtable name, ovcolumn name, refschema name, reftable name, refcolumn name, factor integer | boolean + postgis_raster | public | _add_raster_constraint | cn name, sql text | boolean + postgis_raster | public | _add_raster_constraint_alignment | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_blocksize | rastschema name, rasttable name, rastcolumn name, axis text | boolean + postgis_raster | public | _add_raster_constraint_coverage_tile | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_extent | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_nodata_values | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_num_bands | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_out_db | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_pixel_types | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_scale | rastschema name, rasttable name, rastcolumn name, axis character | boolean + postgis_raster | public | _add_raster_constraint_spatially_unique | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _add_raster_constraint_srid | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_overview_constraint | ovschema name, ovtable name, ovcolumn name | boolean + postgis_raster | public | _drop_raster_constraint | rastschema name, rasttable name, cn name | boolean + postgis_raster | public | _drop_raster_constraint_alignment | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_blocksize | rastschema name, rasttable name, rastcolumn name, axis text | boolean + postgis_raster | public | _drop_raster_constraint_coverage_tile | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_extent | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_nodata_values | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_num_bands | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_out_db | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_pixel_types | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_regular_blocking | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_scale | rastschema name, rasttable name, rastcolumn name, axis character | boolean + postgis_raster | public | _drop_raster_constraint_spatially_unique | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _drop_raster_constraint_srid | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _overview_constraint | ov raster, factor integer, refschema name, reftable name, refcolumn name | boolean + postgis_raster | public | _overview_constraint_info | ovschema name, ovtable name, ovcolumn name, OUT refschema name, OUT reftable name, OUT refcolumn name, OUT factor integer | record + postgis_raster | public | _raster_constraint_info_alignment | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _raster_constraint_info_blocksize | rastschema name, rasttable name, rastcolumn name, axis text | integer + postgis_raster | public | _raster_constraint_info_coverage_tile | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _raster_constraint_info_extent | rastschema name, rasttable name, rastcolumn name | geometry + postgis_raster | public | _raster_constraint_info_index | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _raster_constraint_info_nodata_values | rastschema name, rasttable name, rastcolumn name | double precision[] + postgis_raster | public | _raster_constraint_info_num_bands | rastschema name, rasttable name, rastcolumn name | integer + postgis_raster | public | _raster_constraint_info_out_db | rastschema name, rasttable name, rastcolumn name | boolean[] + postgis_raster | public | _raster_constraint_info_pixel_types | rastschema name, rasttable name, rastcolumn name | text[] + postgis_raster | public | _raster_constraint_info_regular_blocking | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _raster_constraint_info_scale | rastschema name, rasttable name, rastcolumn name, axis character | double precision + postgis_raster | public | _raster_constraint_info_spatially_unique | rastschema name, rasttable name, rastcolumn name | boolean + postgis_raster | public | _raster_constraint_info_srid | rastschema name, rasttable name, rastcolumn name | integer + postgis_raster | public | _raster_constraint_nodata_values | rast raster | numeric[] + postgis_raster | public | _raster_constraint_out_db | rast raster | boolean[] + postgis_raster | public | _raster_constraint_pixel_types | rast raster | text[] + postgis_raster | public | _st_aspect4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_asraster | geom geometry, scalex double precision, scaley double precision, width integer, height integer, pixeltype text[], value double precision[], nodataval double precision[], upperleftx double precision, upperlefty double precision, gridx double precision, gridy double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | _st_clip | rast raster, nband integer[], geom geometry, nodataval double precision[], crop boolean | raster + postgis_raster | public | _st_colormap | rast raster, nband integer, colormap text, method text | raster + postgis_raster | public | _st_contains | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_containsproperly | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_convertarray4ma | value double precision[] | double precision[] + postgis_raster | public | _st_count | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | bigint + postgis_raster | public | _st_countagg_finalfn | agg agg_count | bigint + postgis_raster | public | _st_countagg_transfn | agg agg_count, rast raster, nband integer, exclude_nodata_value boolean | agg_count + postgis_raster | public | _st_countagg_transfn | agg agg_count, rast raster, exclude_nodata_value boolean | agg_count + postgis_raster | public | _st_countagg_transfn | agg agg_count, rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | agg_count + postgis_raster | public | _st_coveredby | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_covers | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_dfullywithin | rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision | boolean + postgis_raster | public | _st_dwithin | rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision | boolean + postgis_raster | public | _st_gdalwarp | rast raster, algorithm text, maxerr double precision, srid integer, scalex double precision, scaley double precision, gridx double precision, gridy double precision, skewx double precision, skewy double precision, width integer, height integer | raster + postgis_raster | public | _st_grayscale4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_hillshade4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_histogram | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, bins integer, width double precision[], "right" boolean, min double precision, max double precision, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | _st_intersects | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_intersects | geom geometry, rast raster, nband integer | boolean + postgis_raster | public | _st_mapalgebra | rastbandargset rastbandarg[], expression text, pixeltype text, extenttype text, nodata1expr text, nodata2expr text, nodatanodataval double precision | raster + postgis_raster | public | _st_mapalgebra | rastbandargset rastbandarg[], callbackfunc regprocedure, pixeltype text, distancex integer, distancey integer, extenttype text, customextent raster, mask double precision[], weighted boolean, VARIADIC userargs text[] | raster + postgis_raster | public | _st_neighborhood | rast raster, band integer, columnx integer, rowy integer, distancex integer, distancey integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | _st_overlaps | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_pixelascentroids | rast raster, band integer, columnx integer, rowy integer, exclude_nodata_value boolean | TABLE(geom geometry, val double precision, x integer, y integer) + postgis_raster | public | _st_pixelaspolygons | rast raster, band integer, columnx integer, rowy integer, exclude_nodata_value boolean | TABLE(geom geometry, val double precision, x integer, y integer) + postgis_raster | public | _st_quantile | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | _st_rastertoworldcoord | rast raster, columnx integer, rowy integer, OUT longitude double precision, OUT latitude double precision | record + postgis_raster | public | _st_reclass | rast raster, VARIADIC reclassargset reclassarg[] | raster + postgis_raster | public | _st_roughness4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_samealignment_finalfn | agg agg_samealignment | boolean + postgis_raster | public | _st_samealignment_transfn | agg agg_samealignment, rast raster | agg_samealignment + postgis_raster | public | _st_setvalues | rast raster, nband integer, x integer, y integer, newvalueset double precision[], noset boolean[], hasnosetvalue boolean, nosetvalue double precision, keepnodata boolean | raster + postgis_raster | public | _st_slope4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_summarystats | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | summarystats + postgis_raster | public | _st_summarystats_finalfn | internal | summarystats + postgis_raster | public | _st_summarystats_transfn | internal, raster, integer, boolean, double precision | internal + postgis_raster | public | _st_summarystats_transfn | internal, raster, boolean, double precision | internal + postgis_raster | public | _st_summarystats_transfn | internal, raster, integer, boolean | internal + postgis_raster | public | _st_tile | rast raster, width integer, height integer, nband integer[], padwithnodata boolean, nodataval double precision | SETOF raster + postgis_raster | public | _st_touches | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_tpi4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_tri4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | _st_union_finalfn | internal | raster + postgis_raster | public | _st_union_transfn | internal, raster, integer, text | internal + postgis_raster | public | _st_union_transfn | internal, raster | internal + postgis_raster | public | _st_union_transfn | internal, raster, text | internal + postgis_raster | public | _st_union_transfn | internal, raster, integer | internal + postgis_raster | public | _st_union_transfn | internal, raster, unionarg[] | internal + postgis_raster | public | _st_valuecount | rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer, OUT percent double precision | SETOF record + postgis_raster | public | _st_valuecount | rast raster, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer, OUT percent double precision | SETOF record + postgis_raster | public | _st_within | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | _st_worldtorastercoord | rast raster, longitude double precision, latitude double precision, OUT columnx integer, OUT rowy integer | record + postgis_raster | public | _updaterastersrid | schema_name name, table_name name, column_name name, new_srid integer | boolean + postgis_raster | public | addoverviewconstraints | ovschema name, ovtable name, ovcolumn name, refschema name, reftable name, refcolumn name, ovfactor integer | boolean + postgis_raster | public | addoverviewconstraints | ovtable name, ovcolumn name, reftable name, refcolumn name, ovfactor integer | boolean + postgis_raster | public | addrasterconstraints | rastschema name, rasttable name, rastcolumn name, srid boolean, scale_x boolean, scale_y boolean, blocksize_x boolean, blocksize_y boolean, same_alignment boolean, regular_blocking boolean, num_bands boolean, pixel_types boolean, nodata_values boolean, out_db boolean, extent boolean | boolean + postgis_raster | public | addrasterconstraints | rasttable name, rastcolumn name, VARIADIC constraints text[] | boolean + postgis_raster | public | addrasterconstraints | rastschema name, rasttable name, rastcolumn name, VARIADIC constraints text[] | boolean + postgis_raster | public | addrasterconstraints | rasttable name, rastcolumn name, srid boolean, scale_x boolean, scale_y boolean, blocksize_x boolean, blocksize_y boolean, same_alignment boolean, regular_blocking boolean, num_bands boolean, pixel_types boolean, nodata_values boolean, out_db boolean, extent boolean | boolean + postgis_raster | public | box3d | raster | box3d + postgis_raster | public | bytea | raster | bytea + postgis_raster | public | dropoverviewconstraints | ovtable name, ovcolumn name | boolean + postgis_raster | public | dropoverviewconstraints | ovschema name, ovtable name, ovcolumn name | boolean + postgis_raster | public | droprasterconstraints | rastschema name, rasttable name, rastcolumn name, srid boolean, scale_x boolean, scale_y boolean, blocksize_x boolean, blocksize_y boolean, same_alignment boolean, regular_blocking boolean, num_bands boolean, pixel_types boolean, nodata_values boolean, out_db boolean, extent boolean | boolean + postgis_raster | public | droprasterconstraints | rasttable name, rastcolumn name, VARIADIC constraints text[] | boolean + postgis_raster | public | droprasterconstraints | rastschema name, rasttable name, rastcolumn name, VARIADIC constraints text[] | boolean + postgis_raster | public | droprasterconstraints | rasttable name, rastcolumn name, srid boolean, scale_x boolean, scale_y boolean, blocksize_x boolean, blocksize_y boolean, same_alignment boolean, regular_blocking boolean, num_bands boolean, pixel_types boolean, nodata_values boolean, out_db boolean, extent boolean | boolean + postgis_raster | public | geometry_contained_by_raster | geometry, raster | boolean + postgis_raster | public | geometry_raster_contain | geometry, raster | boolean + postgis_raster | public | geometry_raster_overlap | geometry, raster | boolean + postgis_raster | public | postgis_gdal_version | | text + postgis_raster | public | postgis_noop | raster | geometry + postgis_raster | public | postgis_raster_lib_build_date | | text + postgis_raster | public | postgis_raster_lib_version | | text + postgis_raster | public | postgis_raster_scripts_installed | | text + postgis_raster | public | raster_above | raster, raster | boolean + postgis_raster | public | raster_below | raster, raster | boolean + postgis_raster | public | raster_contain | raster, raster | boolean + postgis_raster | public | raster_contained | raster, raster | boolean + postgis_raster | public | raster_contained_by_geometry | raster, geometry | boolean + postgis_raster | public | raster_eq | raster, raster | boolean + postgis_raster | public | raster_geometry_contain | raster, geometry | boolean + postgis_raster | public | raster_geometry_overlap | raster, geometry | boolean + postgis_raster | public | raster_hash | raster | integer + postgis_raster | public | raster_in | cstring | raster + postgis_raster | public | raster_left | raster, raster | boolean + postgis_raster | public | raster_out | raster | cstring + postgis_raster | public | raster_overabove | raster, raster | boolean + postgis_raster | public | raster_overbelow | raster, raster | boolean + postgis_raster | public | raster_overlap | raster, raster | boolean + postgis_raster | public | raster_overleft | raster, raster | boolean + postgis_raster | public | raster_overright | raster, raster | boolean + postgis_raster | public | raster_right | raster, raster | boolean + postgis_raster | public | raster_same | raster, raster | boolean + postgis_raster | public | st_addband | rast raster, index integer, outdbfile text, outdbindex integer[], nodataval double precision | raster + postgis_raster | public | st_addband | rast raster, outdbfile text, outdbindex integer[], index integer, nodataval double precision | raster + postgis_raster | public | st_addband | rast raster, addbandargset addbandarg[] | raster + postgis_raster | public | st_addband | rast raster, pixeltype text, initialvalue double precision, nodataval double precision | raster + postgis_raster | public | st_addband | rast raster, index integer, pixeltype text, initialvalue double precision, nodataval double precision | raster + postgis_raster | public | st_addband | torast raster, fromrast raster, fromband integer, torastindex integer | raster + postgis_raster | public | st_addband | torast raster, fromrasts raster[], fromband integer, torastindex integer | raster + postgis_raster | public | st_approxcount | rast raster, exclude_nodata_value boolean, sample_percent double precision | bigint + postgis_raster | public | st_approxcount | rast raster, sample_percent double precision | bigint + postgis_raster | public | st_approxcount | rast raster, nband integer, sample_percent double precision | bigint + postgis_raster | public | st_approxcount | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | bigint + postgis_raster | public | st_approxhistogram | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, bins integer, "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxhistogram | rast raster, sample_percent double precision, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxhistogram | rast raster, nband integer, sample_percent double precision, bins integer, width double precision[], "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxhistogram | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, bins integer, width double precision[], "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxhistogram | rast raster, nband integer, sample_percent double precision, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxhistogram | rast raster, nband integer, sample_percent double precision, bins integer, "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_approxquantile | rast raster, exclude_nodata_value boolean, quantile double precision | double precision + postgis_raster | public | st_approxquantile | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, quantile double precision | double precision + postgis_raster | public | st_approxquantile | rast raster, nband integer, sample_percent double precision, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_approxquantile | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_approxquantile | rast raster, quantile double precision | double precision + postgis_raster | public | st_approxquantile | rast raster, sample_percent double precision, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_approxquantile | rast raster, nband integer, sample_percent double precision, quantile double precision | double precision + postgis_raster | public | st_approxquantile | rast raster, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_approxquantile | rast raster, sample_percent double precision, quantile double precision | double precision + postgis_raster | public | st_approxsummarystats | rast raster, exclude_nodata_value boolean, sample_percent double precision | summarystats + postgis_raster | public | st_approxsummarystats | rast raster, sample_percent double precision | summarystats + postgis_raster | public | st_approxsummarystats | rast raster, nband integer, sample_percent double precision | summarystats + postgis_raster | public | st_approxsummarystats | rast raster, nband integer, exclude_nodata_value boolean, sample_percent double precision | summarystats + postgis_raster | public | st_asbinary | raster, outasin boolean | bytea + postgis_raster | public | st_asgdalraster | rast raster, format text, options text[], srid integer | bytea + postgis_raster | public | st_ashexwkb | raster, outasin boolean | text + postgis_raster | public | st_asjpeg | rast raster, options text[] | bytea + postgis_raster | public | st_asjpeg | rast raster, nbands integer[], options text[] | bytea + postgis_raster | public | st_asjpeg | rast raster, nband integer, options text[] | bytea + postgis_raster | public | st_asjpeg | rast raster, nbands integer[], quality integer | bytea + postgis_raster | public | st_asjpeg | rast raster, nband integer, quality integer | bytea + postgis_raster | public | st_aspect | rast raster, nband integer, customextent raster, pixeltype text, units text, interpolate_nodata boolean | raster + postgis_raster | public | st_aspect | rast raster, nband integer, pixeltype text, units text, interpolate_nodata boolean | raster + postgis_raster | public | st_aspng | rast raster, options text[] | bytea + postgis_raster | public | st_aspng | rast raster, nbands integer[], options text[] | bytea + postgis_raster | public | st_aspng | rast raster, nband integer, compression integer | bytea + postgis_raster | public | st_aspng | rast raster, nband integer, options text[] | bytea + postgis_raster | public | st_aspng | rast raster, nbands integer[], compression integer | bytea + postgis_raster | public | st_asraster | geom geometry, ref raster, pixeltype text[], value double precision[], nodataval double precision[], touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, scalex double precision, scaley double precision, pixeltype text, value double precision, nodataval double precision, upperleftx double precision, upperlefty double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, width integer, height integer, pixeltype text[], value double precision[], nodataval double precision[], upperleftx double precision, upperlefty double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, scalex double precision, scaley double precision, gridx double precision, gridy double precision, pixeltype text[], value double precision[], nodataval double precision[], skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, width integer, height integer, gridx double precision, gridy double precision, pixeltype text, value double precision, nodataval double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, ref raster, pixeltype text, value double precision, nodataval double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, scalex double precision, scaley double precision, gridx double precision, gridy double precision, pixeltype text, value double precision, nodataval double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, width integer, height integer, gridx double precision, gridy double precision, pixeltype text[], value double precision[], nodataval double precision[], skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, width integer, height integer, pixeltype text, value double precision, nodataval double precision, upperleftx double precision, upperlefty double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_asraster | geom geometry, scalex double precision, scaley double precision, pixeltype text[], value double precision[], nodataval double precision[], upperleftx double precision, upperlefty double precision, skewx double precision, skewy double precision, touched boolean | raster + postgis_raster | public | st_astiff | rast raster, options text[], srid integer | bytea + postgis_raster | public | st_astiff | rast raster, compression text, srid integer | bytea + postgis_raster | public | st_astiff | rast raster, nbands integer[], compression text, srid integer | bytea + postgis_raster | public | st_astiff | rast raster, nbands integer[], options text[], srid integer | bytea + postgis_raster | public | st_aswkb | raster, outasin boolean | bytea + postgis_raster | public | st_band | rast raster, nbands text, delimiter character | raster + postgis_raster | public | st_band | rast raster, nbands integer[] | raster + postgis_raster | public | st_band | rast raster, nband integer | raster + postgis_raster | public | st_bandfilesize | rast raster, band integer | bigint + postgis_raster | public | st_bandfiletimestamp | rast raster, band integer | bigint + postgis_raster | public | st_bandisnodata | rast raster, forcechecking boolean | boolean + postgis_raster | public | st_bandisnodata | rast raster, band integer, forcechecking boolean | boolean + postgis_raster | public | st_bandmetadata | rast raster, band integer | TABLE(pixeltype text, nodatavalue double precision, isoutdb boolean, path text, outdbbandnum integer, filesize bigint, filetimestamp bigint) + postgis_raster | public | st_bandmetadata | rast raster, band integer[] | TABLE(bandnum integer, pixeltype text, nodatavalue double precision, isoutdb boolean, path text, outdbbandnum integer, filesize bigint, filetimestamp bigint) + postgis_raster | public | st_bandnodatavalue | rast raster, band integer | double precision + postgis_raster | public | st_bandpath | rast raster, band integer | text + postgis_raster | public | st_bandpixeltype | rast raster, band integer | text + postgis_raster | public | st_clip | rast raster, geom geometry, nodataval double precision[], crop boolean | raster + postgis_raster | public | st_clip | rast raster, geom geometry, nodataval double precision, crop boolean | raster + postgis_raster | public | st_clip | rast raster, nband integer, geom geometry, nodataval double precision, crop boolean | raster + postgis_raster | public | st_clip | rast raster, nband integer[], geom geometry, nodataval double precision[], crop boolean | raster + postgis_raster | public | st_clip | rast raster, geom geometry, crop boolean | raster + postgis_raster | public | st_clip | rast raster, nband integer, geom geometry, crop boolean | raster + postgis_raster | public | st_colormap | rast raster, colormap text, method text | raster + postgis_raster | public | st_colormap | rast raster, nband integer, colormap text, method text | raster + postgis_raster | public | st_contains | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_contains | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_containsproperly | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_containsproperly | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_contour | rast raster, bandnumber integer, level_interval double precision, level_base double precision, fixed_levels double precision[], polygonize boolean | TABLE(geom geometry, id integer, value double precision) + postgis_raster | public | st_convexhull | raster | geometry + postgis_raster | public | st_count | rast raster, nband integer, exclude_nodata_value boolean | bigint + postgis_raster | public | st_count | rast raster, exclude_nodata_value boolean | bigint + postgis_raster | public | st_countagg | raster, integer, boolean, double precision | bigint + postgis_raster | public | st_countagg | raster, integer, boolean | bigint + postgis_raster | public | st_countagg | raster, boolean | bigint + postgis_raster | public | st_coveredby | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_coveredby | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_covers | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_covers | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_createoverview | tab regclass, col name, factor integer, algo text | regclass + postgis_raster | public | st_dfullywithin | rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision | boolean + postgis_raster | public | st_dfullywithin | rast1 raster, rast2 raster, distance double precision | boolean + postgis_raster | public | st_disjoint | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_disjoint | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_distinct4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_distinct4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_dumpaspolygons | rast raster, band integer, exclude_nodata_value boolean | SETOF geomval + postgis_raster | public | st_dumpvalues | rast raster, nband integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | st_dumpvalues | rast raster, nband integer[], exclude_nodata_value boolean | TABLE(nband integer, valarray double precision[]) + postgis_raster | public | st_dwithin | rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision | boolean + postgis_raster | public | st_dwithin | rast1 raster, rast2 raster, distance double precision | boolean + postgis_raster | public | st_envelope | raster | geometry + postgis_raster | public | st_fromgdalraster | gdaldata bytea, srid integer | raster + postgis_raster | public | st_gdaldrivers | OUT idx integer, OUT short_name text, OUT long_name text, OUT can_read boolean, OUT can_write boolean, OUT create_options text | SETOF record + postgis_raster | public | st_georeference | rast raster, format text | text + postgis_raster | public | st_geotransform | raster, OUT imag double precision, OUT jmag double precision, OUT theta_i double precision, OUT theta_ij double precision, OUT xoffset double precision, OUT yoffset double precision | record + postgis_raster | public | st_grayscale | rastbandargset rastbandarg[], extenttype text | raster + postgis_raster | public | st_grayscale | rast raster, redband integer, greenband integer, blueband integer, extenttype text | raster + postgis_raster | public | st_hasnoband | rast raster, nband integer | boolean + postgis_raster | public | st_height | raster | integer + postgis_raster | public | st_hillshade | rast raster, nband integer, customextent raster, pixeltype text, azimuth double precision, altitude double precision, max_bright double precision, scale double precision, interpolate_nodata boolean | raster + postgis_raster | public | st_hillshade | rast raster, nband integer, pixeltype text, azimuth double precision, altitude double precision, max_bright double precision, scale double precision, interpolate_nodata boolean | raster + postgis_raster | public | st_histogram | rast raster, nband integer, bins integer, "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_histogram | rast raster, nband integer, bins integer, width double precision[], "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_histogram | rast raster, nband integer, exclude_nodata_value boolean, bins integer, "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_histogram | rast raster, nband integer, exclude_nodata_value boolean, bins integer, width double precision[], "right" boolean, OUT min double precision, OUT max double precision, OUT count bigint, OUT percent double precision | SETOF record + postgis_raster | public | st_interpolateraster | geom geometry, options text, rast raster, bandnumber integer | raster + postgis_raster | public | st_intersection | rast1 raster, rast2 raster, returnband text, nodataval double precision[] | raster + postgis_raster | public | st_intersection | rast1 raster, band1 integer, rast2 raster, band2 integer, returnband text, nodataval double precision | raster + postgis_raster | public | st_intersection | rast1 raster, band1 integer, rast2 raster, band2 integer, returnband text, nodataval double precision[] | raster + postgis_raster | public | st_intersection | geomin geometry, rast raster, band integer | SETOF geomval + postgis_raster | public | st_intersection | rast1 raster, rast2 raster, nodataval double precision | raster + postgis_raster | public | st_intersection | rast1 raster, band1 integer, rast2 raster, band2 integer, nodataval double precision | raster + postgis_raster | public | st_intersection | rast1 raster, rast2 raster, returnband text, nodataval double precision | raster + postgis_raster | public | st_intersection | rast raster, band integer, geomin geometry | SETOF geomval + postgis_raster | public | st_intersection | rast1 raster, band1 integer, rast2 raster, band2 integer, nodataval double precision[] | raster + postgis_raster | public | st_intersection | rast raster, geomin geometry | SETOF geomval + postgis_raster | public | st_intersection | rast1 raster, rast2 raster, nodataval double precision[] | raster + postgis_raster | public | st_intersects | rast raster, geom geometry, nband integer | boolean + postgis_raster | public | st_intersects | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_intersects | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_intersects | rast raster, nband integer, geom geometry | boolean + postgis_raster | public | st_intersects | geom geometry, rast raster, nband integer | boolean + postgis_raster | public | st_invdistweight4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_iscoveragetile | rast raster, coverage raster, tilewidth integer, tileheight integer | boolean + postgis_raster | public | st_isempty | rast raster | boolean + postgis_raster | public | st_makeemptycoverage | tilewidth integer, tileheight integer, width integer, height integer, upperleftx double precision, upperlefty double precision, scalex double precision, scaley double precision, skewx double precision, skewy double precision, srid integer | SETOF raster + postgis_raster | public | st_makeemptyraster | width integer, height integer, upperleftx double precision, upperlefty double precision, scalex double precision, scaley double precision, skewx double precision, skewy double precision, srid integer | raster + postgis_raster | public | st_makeemptyraster | width integer, height integer, upperleftx double precision, upperlefty double precision, pixelsize double precision | raster + postgis_raster | public | st_makeemptyraster | rast raster | raster + postgis_raster | public | st_mapalgebra | rast1 raster, rast2 raster, expression text, pixeltype text, extenttype text, nodata1expr text, nodata2expr text, nodatanodataval double precision | raster + postgis_raster | public | st_mapalgebra | rast raster, pixeltype text, expression text, nodataval double precision | raster + postgis_raster | public | st_mapalgebra | rast1 raster, band1 integer, rast2 raster, band2 integer, expression text, pixeltype text, extenttype text, nodata1expr text, nodata2expr text, nodatanodataval double precision | raster + postgis_raster | public | st_mapalgebra | rast raster, nband integer[], callbackfunc regprocedure, pixeltype text, extenttype text, customextent raster, distancex integer, distancey integer, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebra | rast raster, nband integer, callbackfunc regprocedure, mask double precision[], weighted boolean, pixeltype text, extenttype text, customextent raster, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebra | rastbandargset rastbandarg[], callbackfunc regprocedure, pixeltype text, extenttype text, customextent raster, distancex integer, distancey integer, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebra | rast1 raster, nband1 integer, rast2 raster, nband2 integer, callbackfunc regprocedure, pixeltype text, extenttype text, customextent raster, distancex integer, distancey integer, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebra | rast raster, nband integer, callbackfunc regprocedure, pixeltype text, extenttype text, customextent raster, distancex integer, distancey integer, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebra | rast raster, nband integer, pixeltype text, expression text, nodataval double precision | raster + postgis_raster | public | st_mapalgebraexpr | rast1 raster, rast2 raster, expression text, pixeltype text, extenttype text, nodata1expr text, nodata2expr text, nodatanodataval double precision | raster + postgis_raster | public | st_mapalgebraexpr | rast raster, pixeltype text, expression text, nodataval double precision | raster + postgis_raster | public | st_mapalgebraexpr | rast1 raster, band1 integer, rast2 raster, band2 integer, expression text, pixeltype text, extenttype text, nodata1expr text, nodata2expr text, nodatanodataval double precision | raster + postgis_raster | public | st_mapalgebraexpr | rast raster, band integer, pixeltype text, expression text, nodataval double precision | raster + postgis_raster | public | st_mapalgebrafct | rast raster, onerastuserfunc regprocedure | raster + postgis_raster | public | st_mapalgebrafct | rast1 raster, band1 integer, rast2 raster, band2 integer, tworastuserfunc regprocedure, pixeltype text, extenttype text, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, pixeltype text, onerastuserfunc regprocedure | raster + postgis_raster | public | st_mapalgebrafct | rast raster, onerastuserfunc regprocedure, VARIADIC args text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, pixeltype text, onerastuserfunc regprocedure, VARIADIC args text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, band integer, onerastuserfunc regprocedure, VARIADIC args text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, band integer, pixeltype text, onerastuserfunc regprocedure | raster + postgis_raster | public | st_mapalgebrafct | rast1 raster, rast2 raster, tworastuserfunc regprocedure, pixeltype text, extenttype text, VARIADIC userargs text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, band integer, pixeltype text, onerastuserfunc regprocedure, VARIADIC args text[] | raster + postgis_raster | public | st_mapalgebrafct | rast raster, band integer, onerastuserfunc regprocedure | raster + postgis_raster | public | st_mapalgebrafctngb | rast raster, band integer, pixeltype text, ngbwidth integer, ngbheight integer, onerastngbuserfunc regprocedure, nodatamode text, VARIADIC args text[] | raster + postgis_raster | public | st_max4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_max4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_mean4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_mean4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_memsize | raster | integer + postgis_raster | public | st_metadata | rast raster, OUT upperleftx double precision, OUT upperlefty double precision, OUT width integer, OUT height integer, OUT scalex double precision, OUT scaley double precision, OUT skewx double precision, OUT skewy double precision, OUT srid integer, OUT numbands integer | record + postgis_raster | public | st_min4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_min4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_minconvexhull | rast raster, nband integer | geometry + postgis_raster | public | st_mindist4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_minpossiblevalue | pixeltype text | double precision + postgis_raster | public | st_nearestvalue | rast raster, columnx integer, rowy integer, exclude_nodata_value boolean | double precision + postgis_raster | public | st_nearestvalue | rast raster, band integer, columnx integer, rowy integer, exclude_nodata_value boolean | double precision + postgis_raster | public | st_nearestvalue | rast raster, band integer, pt geometry, exclude_nodata_value boolean | double precision + postgis_raster | public | st_nearestvalue | rast raster, pt geometry, exclude_nodata_value boolean | double precision + postgis_raster | public | st_neighborhood | rast raster, columnx integer, rowy integer, distancex integer, distancey integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | st_neighborhood | rast raster, band integer, pt geometry, distancex integer, distancey integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | st_neighborhood | rast raster, band integer, columnx integer, rowy integer, distancex integer, distancey integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | st_neighborhood | rast raster, pt geometry, distancex integer, distancey integer, exclude_nodata_value boolean | double precision[] + postgis_raster | public | st_notsamealignmentreason | rast1 raster, rast2 raster | text + postgis_raster | public | st_numbands | raster | integer + postgis_raster | public | st_overlaps | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_overlaps | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_pixelascentroid | rast raster, x integer, y integer | geometry + postgis_raster | public | st_pixelascentroids | rast raster, band integer, exclude_nodata_value boolean | TABLE(geom geometry, val double precision, x integer, y integer) + postgis_raster | public | st_pixelaspoint | rast raster, x integer, y integer | geometry + postgis_raster | public | st_pixelaspoints | rast raster, band integer, exclude_nodata_value boolean | TABLE(geom geometry, val double precision, x integer, y integer) + postgis_raster | public | st_pixelaspolygon | rast raster, x integer, y integer | geometry + postgis_raster | public | st_pixelaspolygons | rast raster, band integer, exclude_nodata_value boolean | TABLE(geom geometry, val double precision, x integer, y integer) + postgis_raster | public | st_pixelheight | raster | double precision + postgis_raster | public | st_pixelofvalue | rast raster, nband integer, search double precision, exclude_nodata_value boolean | TABLE(x integer, y integer) + postgis_raster | public | st_pixelofvalue | rast raster, search double precision, exclude_nodata_value boolean | TABLE(x integer, y integer) + postgis_raster | public | st_pixelofvalue | rast raster, nband integer, search double precision[], exclude_nodata_value boolean | TABLE(val double precision, x integer, y integer) + postgis_raster | public | st_pixelofvalue | rast raster, search double precision[], exclude_nodata_value boolean | TABLE(val double precision, x integer, y integer) + postgis_raster | public | st_pixelwidth | raster | double precision + postgis_raster | public | st_polygon | rast raster, band integer | geometry + postgis_raster | public | st_quantile | rast raster, exclude_nodata_value boolean, quantile double precision | double precision + postgis_raster | public | st_quantile | rast raster, nband integer, quantile double precision | double precision + postgis_raster | public | st_quantile | rast raster, nband integer, exclude_nodata_value boolean, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_quantile | rast raster, quantile double precision | double precision + postgis_raster | public | st_quantile | rast raster, nband integer, exclude_nodata_value boolean, quantile double precision | double precision + postgis_raster | public | st_quantile | rast raster, nband integer, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_quantile | rast raster, quantiles double precision[], OUT quantile double precision, OUT value double precision | SETOF record + postgis_raster | public | st_range4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_range4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_rastertoworldcoord | rast raster, columnx integer, rowy integer, OUT longitude double precision, OUT latitude double precision | record + postgis_raster | public | st_rastertoworldcoordx | rast raster, xr integer | double precision + postgis_raster | public | st_rastertoworldcoordx | rast raster, xr integer, yr integer | double precision + postgis_raster | public | st_rastertoworldcoordy | rast raster, xr integer, yr integer | double precision + postgis_raster | public | st_rastertoworldcoordy | rast raster, yr integer | double precision + postgis_raster | public | st_rastfromhexwkb | text | raster + postgis_raster | public | st_rastfromwkb | bytea | raster + postgis_raster | public | st_reclass | rast raster, nband integer, reclassexpr text, pixeltype text, nodataval double precision | raster + postgis_raster | public | st_reclass | rast raster, VARIADIC reclassargset reclassarg[] | raster + postgis_raster | public | st_reclass | rast raster, reclassexpr text, pixeltype text | raster + postgis_raster | public | st_resample | rast raster, ref raster, usescale boolean, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resample | rast raster, width integer, height integer, gridx double precision, gridy double precision, skewx double precision, skewy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resample | rast raster, scalex double precision, scaley double precision, gridx double precision, gridy double precision, skewx double precision, skewy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resample | rast raster, ref raster, algorithm text, maxerr double precision, usescale boolean | raster + postgis_raster | public | st_rescale | rast raster, scalexy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_rescale | rast raster, scalex double precision, scaley double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resize | rast raster, width integer, height integer, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resize | rast raster, width text, height text, algorithm text, maxerr double precision | raster + postgis_raster | public | st_resize | rast raster, percentwidth double precision, percentheight double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_reskew | rast raster, skewx double precision, skewy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_reskew | rast raster, skewxy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_retile | tab regclass, col name, ext geometry, sfx double precision, sfy double precision, tw integer, th integer, algo text | SETOF raster + postgis_raster | public | st_rotation | raster | double precision + postgis_raster | public | st_roughness | rast raster, nband integer, customextent raster, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_roughness | rast raster, nband integer, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_samealignment | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_samealignment | raster | boolean + postgis_raster | public | st_samealignment | ulx1 double precision, uly1 double precision, scalex1 double precision, scaley1 double precision, skewx1 double precision, skewy1 double precision, ulx2 double precision, uly2 double precision, scalex2 double precision, scaley2 double precision, skewx2 double precision, skewy2 double precision | boolean + postgis_raster | public | st_scalex | raster | double precision + postgis_raster | public | st_scaley | raster | double precision + postgis_raster | public | st_setbandindex | rast raster, band integer, outdbindex integer, force boolean | raster + postgis_raster | public | st_setbandisnodata | rast raster, band integer | raster + postgis_raster | public | st_setbandnodatavalue | rast raster, band integer, nodatavalue double precision, forcechecking boolean | raster + postgis_raster | public | st_setbandnodatavalue | rast raster, nodatavalue double precision | raster + postgis_raster | public | st_setbandpath | rast raster, band integer, outdbpath text, outdbindex integer, force boolean | raster + postgis_raster | public | st_setgeoreference | rast raster, upperleftx double precision, upperlefty double precision, scalex double precision, scaley double precision, skewx double precision, skewy double precision | raster + postgis_raster | public | st_setgeoreference | rast raster, georef text, format text | raster + postgis_raster | public | st_setgeotransform | rast raster, imag double precision, jmag double precision, theta_i double precision, theta_ij double precision, xoffset double precision, yoffset double precision | raster + postgis_raster | public | st_setm | rast raster, geom geometry, resample text, band integer | geometry + postgis_raster | public | st_setrotation | rast raster, rotation double precision | raster + postgis_raster | public | st_setscale | rast raster, scalex double precision, scaley double precision | raster + postgis_raster | public | st_setscale | rast raster, scale double precision | raster + postgis_raster | public | st_setskew | rast raster, skewx double precision, skewy double precision | raster + postgis_raster | public | st_setskew | rast raster, skew double precision | raster + postgis_raster | public | st_setsrid | rast raster, srid integer | raster + postgis_raster | public | st_setupperleft | rast raster, upperleftx double precision, upperlefty double precision | raster + postgis_raster | public | st_setvalue | rast raster, nband integer, geom geometry, newvalue double precision | raster + postgis_raster | public | st_setvalue | rast raster, geom geometry, newvalue double precision | raster + postgis_raster | public | st_setvalue | rast raster, x integer, y integer, newvalue double precision | raster + postgis_raster | public | st_setvalue | rast raster, band integer, x integer, y integer, newvalue double precision | raster + postgis_raster | public | st_setvalues | rast raster, nband integer, x integer, y integer, newvalueset double precision[], nosetvalue double precision, keepnodata boolean | raster + postgis_raster | public | st_setvalues | rast raster, nband integer, x integer, y integer, newvalueset double precision[], noset boolean[], keepnodata boolean | raster + postgis_raster | public | st_setvalues | rast raster, nband integer, x integer, y integer, width integer, height integer, newvalue double precision, keepnodata boolean | raster + postgis_raster | public | st_setvalues | rast raster, x integer, y integer, width integer, height integer, newvalue double precision, keepnodata boolean | raster + postgis_raster | public | st_setvalues | rast raster, nband integer, geomvalset geomval[], keepnodata boolean | raster + postgis_raster | public | st_setz | rast raster, geom geometry, resample text, band integer | geometry + postgis_raster | public | st_skewx | raster | double precision + postgis_raster | public | st_skewy | raster | double precision + postgis_raster | public | st_slope | rast raster, nband integer, customextent raster, pixeltype text, units text, scale double precision, interpolate_nodata boolean | raster + postgis_raster | public | st_slope | rast raster, nband integer, pixeltype text, units text, scale double precision, interpolate_nodata boolean | raster + postgis_raster | public | st_snaptogrid | rast raster, gridx double precision, gridy double precision, scalex double precision, scaley double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_snaptogrid | rast raster, gridx double precision, gridy double precision, algorithm text, maxerr double precision, scalex double precision, scaley double precision | raster + postgis_raster | public | st_snaptogrid | rast raster, gridx double precision, gridy double precision, scalexy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_srid | raster | integer + postgis_raster | public | st_stddev4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_stddev4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_sum4ma | value double precision[], pos integer[], VARIADIC userargs text[] | double precision + postgis_raster | public | st_sum4ma | matrix double precision[], nodatamode text, VARIADIC args text[] | double precision + postgis_raster | public | st_summary | rast raster | text + postgis_raster | public | st_summarystats | rast raster, nband integer, exclude_nodata_value boolean | summarystats + postgis_raster | public | st_summarystats | rast raster, exclude_nodata_value boolean | summarystats + postgis_raster | public | st_summarystatsagg | raster, integer, boolean, double precision | summarystats + postgis_raster | public | st_summarystatsagg | raster, integer, boolean | summarystats + postgis_raster | public | st_summarystatsagg | raster, boolean, double precision | summarystats + postgis_raster | public | st_tile | rast raster, nband integer, width integer, height integer, padwithnodata boolean, nodataval double precision | SETOF raster + postgis_raster | public | st_tile | rast raster, nband integer[], width integer, height integer, padwithnodata boolean, nodataval double precision | SETOF raster + postgis_raster | public | st_tile | rast raster, width integer, height integer, padwithnodata boolean, nodataval double precision | SETOF raster + postgis_raster | public | st_touches | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_touches | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_tpi | rast raster, nband integer, customextent raster, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_tpi | rast raster, nband integer, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_transform | rast raster, srid integer, algorithm text, maxerr double precision, scalex double precision, scaley double precision | raster + postgis_raster | public | st_transform | rast raster, srid integer, scalexy double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_transform | rast raster, alignto raster, algorithm text, maxerr double precision | raster + postgis_raster | public | st_transform | rast raster, srid integer, scalex double precision, scaley double precision, algorithm text, maxerr double precision | raster + postgis_raster | public | st_tri | rast raster, nband integer, customextent raster, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_tri | rast raster, nband integer, pixeltype text, interpolate_nodata boolean | raster + postgis_raster | public | st_union | raster, integer | raster + postgis_raster | public | st_union | raster | raster + postgis_raster | public | st_union | raster, unionarg[] | raster + postgis_raster | public | st_union | raster, integer, text | raster + postgis_raster | public | st_union | raster, text | raster + postgis_raster | public | st_upperleftx | raster | double precision + postgis_raster | public | st_upperlefty | raster | double precision + postgis_raster | public | st_value | rast raster, band integer, x integer, y integer, exclude_nodata_value boolean | double precision + postgis_raster | public | st_value | rast raster, x integer, y integer, exclude_nodata_value boolean | double precision + postgis_raster | public | st_value | rast raster, band integer, pt geometry, exclude_nodata_value boolean, resample text | double precision + postgis_raster | public | st_value | rast raster, pt geometry, exclude_nodata_value boolean | double precision + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, nband integer, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rast raster, nband integer, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, nband integer, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuecount | rast raster, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rast raster, nband integer, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuecount | rast raster, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuecount | rast raster, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rastertable text, rastercolumn text, searchvalues double precision[], roundto double precision, OUT value double precision, OUT count integer | SETOF record + postgis_raster | public | st_valuecount | rast raster, nband integer, exclude_nodata_value boolean, searchvalue double precision, roundto double precision | integer + postgis_raster | public | st_valuepercent | rast raster, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, nband integer, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_valuepercent | rast raster, nband integer, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rast raster, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, nband integer, exclude_nodata_value boolean, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rast raster, nband integer, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_valuepercent | rastertable text, rastercolumn text, nband integer, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_valuepercent | rast raster, nband integer, exclude_nodata_value boolean, searchvalue double precision, roundto double precision | double precision + postgis_raster | public | st_valuepercent | rast raster, nband integer, exclude_nodata_value boolean, searchvalues double precision[], roundto double precision, OUT value double precision, OUT percent double precision | SETOF record + postgis_raster | public | st_width | raster | integer + postgis_raster | public | st_within | rast1 raster, rast2 raster | boolean + postgis_raster | public | st_within | rast1 raster, nband1 integer, rast2 raster, nband2 integer | boolean + postgis_raster | public | st_worldtorastercoord | rast raster, longitude double precision, latitude double precision, OUT columnx integer, OUT rowy integer | record + postgis_raster | public | st_worldtorastercoord | rast raster, pt geometry, OUT columnx integer, OUT rowy integer | record + postgis_raster | public | st_worldtorastercoordx | rast raster, xw double precision | integer + postgis_raster | public | st_worldtorastercoordx | rast raster, xw double precision, yw double precision | integer + postgis_raster | public | st_worldtorastercoordx | rast raster, pt geometry | integer + postgis_raster | public | st_worldtorastercoordy | rast raster, xw double precision, yw double precision | integer + postgis_raster | public | st_worldtorastercoordy | rast raster, pt geometry | integer + postgis_raster | public | st_worldtorastercoordy | rast raster, yw double precision | integer + postgis_raster | public | updaterastersrid | table_name name, column_name name, new_srid integer | boolean + postgis_raster | public | updaterastersrid | schema_name name, table_name name, column_name name, new_srid integer | boolean + postgis_sfcgal | public | postgis_sfcgal_full_version | | text + postgis_sfcgal | public | postgis_sfcgal_noop | geometry | geometry + postgis_sfcgal | public | postgis_sfcgal_scripts_installed | | text + postgis_sfcgal | public | postgis_sfcgal_version | | text + postgis_sfcgal | public | st_3darea | geometry | double precision + postgis_sfcgal | public | st_3dconvexhull | geometry | geometry + postgis_sfcgal | public | st_3ddifference | geom1 geometry, geom2 geometry | geometry + postgis_sfcgal | public | st_3dintersection | geom1 geometry, geom2 geometry | geometry + postgis_sfcgal | public | st_3dunion | geom1 geometry, geom2 geometry | geometry + postgis_sfcgal | public | st_3dunion | geometry | geometry + postgis_sfcgal | public | st_alphashape | g1 geometry, alpha double precision, allow_holes boolean | geometry + postgis_sfcgal | public | st_approximatemedialaxis | geometry | geometry + postgis_sfcgal | public | st_constraineddelaunaytriangles | geometry | geometry + postgis_sfcgal | public | st_extrude | geometry, double precision, double precision, double precision | geometry + postgis_sfcgal | public | st_forcelhr | geometry | geometry + postgis_sfcgal | public | st_isplanar | geometry | boolean + postgis_sfcgal | public | st_issolid | geometry | boolean + postgis_sfcgal | public | st_makesolid | geometry | geometry + postgis_sfcgal | public | st_minkowskisum | geometry, geometry | geometry + postgis_sfcgal | public | st_optimalalphashape | g1 geometry, allow_holes boolean, nb_components integer | geometry + postgis_sfcgal | public | st_orientation | geometry | integer + postgis_sfcgal | public | st_straightskeleton | geometry | geometry + postgis_sfcgal | public | st_tesselate | geometry | geometry + postgis_sfcgal | public | st_volume | geometry | double precision + postgis_topology | topology | _asgmledge | edge_id integer, start_node integer, end_node integer, line geometry, visitedtable regclass, nsprefix_in text, prec integer, options integer, idprefix text, gmlver integer | text + postgis_topology | topology | _asgmlface | toponame text, face_id integer, visitedtable regclass, nsprefix_in text, prec integer, options integer, idprefix text, gmlver integer | text + postgis_topology | topology | _asgmlnode | id integer, point geometry, nsprefix_in text, prec integer, options integer, idprefix text, gmlver integer | text + postgis_topology | topology | _checkedgelinking | curedge_edge_id integer, prevedge_edge_id integer, prevedge_next_left_edge integer, prevedge_next_right_edge integer | topology.validatetopology_returntype + postgis_topology | topology | _st_adjacentedges | atopology character varying, anode integer, anedge integer | integer[] + postgis_topology | topology | _st_mintolerance | ageom geometry | double precision + postgis_topology | topology | _st_mintolerance | atopology character varying, ageom geometry | double precision + postgis_topology | topology | _validatetopologyedgelinking | bbox geometry | SETOF topology.validatetopology_returntype + postgis_topology | topology | _validatetopologygetfaceshellmaximaledgering | atopology character varying, aface integer | geometry + postgis_topology | topology | _validatetopologygetringedges | starting_edge integer | integer[] + postgis_topology | topology | _validatetopologyrings | bbox geometry | SETOF topology.validatetopology_returntype + postgis_topology | topology | addedge | atopology character varying, aline geometry | integer + postgis_topology | topology | addface | atopology character varying, apoly geometry, force_new boolean | integer + postgis_topology | topology | addnode | atopology character varying, apoint geometry, allowedgesplitting boolean, setcontainingface boolean | integer + postgis_topology | topology | addtopogeometrycolumn | toponame character varying, schema character varying, tbl character varying, col character varying, ltype character varying, child integer | integer + postgis_topology | topology | addtopogeometrycolumn | character varying, character varying, character varying, character varying, character varying | integer + postgis_topology | topology | addtosearchpath | a_schema_name character varying | text + postgis_topology | topology | asgml | tg topology.topogeometry | text + postgis_topology | topology | asgml | tg topology.topogeometry, nsprefix text | text + postgis_topology | topology | asgml | tg topology.topogeometry, nsprefix text, prec integer, opts integer | text + postgis_topology | topology | asgml | tg topology.topogeometry, nsprefix text, prec integer, options integer, vis regclass | text + postgis_topology | topology | asgml | tg topology.topogeometry, nsprefix_in text, precision_in integer, options_in integer, visitedtable regclass, idprefix text, gmlver integer | text + postgis_topology | topology | asgml | tg topology.topogeometry, nsprefix text, prec integer, options integer, visitedtable regclass, idprefix text | text + postgis_topology | topology | asgml | tg topology.topogeometry, visitedtable regclass, nsprefix text | text + postgis_topology | topology | asgml | tg topology.topogeometry, visitedtable regclass | text + postgis_topology | topology | astopojson | tg topology.topogeometry, edgemaptable regclass | text + postgis_topology | topology | cleartopogeom | tg topology.topogeometry | topology.topogeometry + postgis_topology | topology | copytopology | atopology character varying, newtopo character varying | integer + postgis_topology | topology | createtopogeom | toponame character varying, tg_type integer, layer_id integer, tg_objs topology.topoelementarray | topology.topogeometry + postgis_topology | topology | createtopogeom | toponame character varying, tg_type integer, layer_id integer | topology.topogeometry + postgis_topology | topology | createtopology | atopology character varying, srid integer, prec double precision, hasz boolean | integer + postgis_topology | topology | createtopology | character varying, integer | integer + postgis_topology | topology | createtopology | toponame character varying, srid integer, prec double precision | integer + postgis_topology | topology | createtopology | character varying | integer + postgis_topology | topology | droptopogeometrycolumn | schema character varying, tbl character varying, col character varying | text + postgis_topology | topology | droptopology | atopology character varying | text + postgis_topology | topology | equals | tg1 topology.topogeometry, tg2 topology.topogeometry | boolean + postgis_topology | topology | findlayer | tg topology.topogeometry | topology.layer + postgis_topology | topology | findlayer | schema_name name, table_name name, feature_column name | topology.layer + postgis_topology | topology | findlayer | topology_id integer, layer_id integer | topology.layer + postgis_topology | topology | findlayer | layer_table regclass, feature_column name | topology.layer + postgis_topology | topology | findtopology | integer | topology.topology + postgis_topology | topology | findtopology | text | topology.topology + postgis_topology | topology | findtopology | name, name, name | topology.topology + postgis_topology | topology | findtopology | topology.topogeometry | topology.topology + postgis_topology | topology | findtopology | regclass, name | topology.topology + postgis_topology | topology | geometry | topogeom topology.topogeometry | geometry + postgis_topology | topology | geometrytype | tg topology.topogeometry | text + postgis_topology | topology | getedgebypoint | atopology character varying, apoint geometry, tol1 double precision | integer + postgis_topology | topology | getfacebypoint | atopology character varying, apoint geometry, tol1 double precision | integer + postgis_topology | topology | getfacecontainingpoint | atopology text, apoint geometry | integer + postgis_topology | topology | getnodebypoint | atopology character varying, apoint geometry, tol1 double precision | integer + postgis_topology | topology | getnodeedges | atopology character varying, anode integer | SETOF topology.getfaceedges_returntype + postgis_topology | topology | getringedges | atopology character varying, anedge integer, maxedges integer | SETOF topology.getfaceedges_returntype + postgis_topology | topology | gettopogeomelementarray | tg topology.topogeometry | topology.topoelementarray + postgis_topology | topology | gettopogeomelementarray | toponame character varying, layer_id integer, tgid integer | topology.topoelementarray + postgis_topology | topology | gettopogeomelements | tg topology.topogeometry | SETOF topology.topoelement + postgis_topology | topology | gettopogeomelements | toponame character varying, layerid integer, tgid integer | SETOF topology.topoelement + postgis_topology | topology | gettopologyid | toponame character varying | integer + postgis_topology | topology | gettopologyname | topoid integer | character varying + postgis_topology | topology | gettopologysrid | toponame character varying | integer + postgis_topology | topology | intersects | tg1 topology.topogeometry, tg2 topology.topogeometry | boolean + postgis_topology | topology | layertrigger | | trigger + postgis_topology | topology | polygonize | toponame character varying | text + postgis_topology | topology | populate_topology_layer | | TABLE(schema_name text, table_name text, feature_column text) + postgis_topology | topology | postgis_topology_scripts_installed | | text + postgis_topology | topology | relationtrigger | | trigger + postgis_topology | topology | removeunusedprimitives | atopology text, bbox geometry | integer + postgis_topology | topology | st_addedgemodface | atopology character varying, anode integer, anothernode integer, acurve geometry | integer + postgis_topology | topology | st_addedgenewfaces | atopology character varying, anode integer, anothernode integer, acurve geometry | integer + postgis_topology | topology | st_addisoedge | atopology character varying, anode integer, anothernode integer, acurve geometry | integer + postgis_topology | topology | st_addisonode | atopology character varying, aface integer, apoint geometry | integer + postgis_topology | topology | st_changeedgegeom | atopology character varying, anedge integer, acurve geometry | text + postgis_topology | topology | st_createtopogeo | atopology character varying, acollection geometry | text + postgis_topology | topology | st_geometrytype | tg topology.topogeometry | text + postgis_topology | topology | st_getfaceedges | toponame character varying, face_id integer | SETOF topology.getfaceedges_returntype + postgis_topology | topology | st_getfacegeometry | toponame character varying, aface integer | geometry + postgis_topology | topology | st_inittopogeo | atopology character varying | text + postgis_topology | topology | st_modedgeheal | toponame character varying, e1id integer, e2id integer | integer + postgis_topology | topology | st_modedgesplit | atopology character varying, anedge integer, apoint geometry | integer + postgis_topology | topology | st_moveisonode | atopology character varying, anode integer, apoint geometry | text + postgis_topology | topology | st_newedgeheal | toponame character varying, e1id integer, e2id integer | integer + postgis_topology | topology | st_newedgessplit | atopology character varying, anedge integer, apoint geometry | integer + postgis_topology | topology | st_remedgemodface | toponame character varying, e1id integer | integer + postgis_topology | topology | st_remedgenewface | toponame character varying, e1id integer | integer + postgis_topology | topology | st_remisonode | character varying, integer | text + postgis_topology | topology | st_removeisoedge | atopology character varying, anedge integer | text + postgis_topology | topology | st_removeisonode | atopology character varying, anode integer | text + postgis_topology | topology | st_simplify | tg topology.topogeometry, tolerance double precision | geometry + postgis_topology | topology | st_srid | tg topology.topogeometry | integer + postgis_topology | topology | topoelementarray_agg | topology.topoelement | topology.topoelementarray + postgis_topology | topology | topoelementarray_append | topology.topoelementarray, topology.topoelement | topology.topoelementarray + postgis_topology | topology | topogeo_addgeometry | atopology character varying, ageom geometry, tolerance double precision | void + postgis_topology | topology | topogeo_addlinestring | atopology character varying, aline geometry, tolerance double precision | SETOF integer + postgis_topology | topology | topogeo_addpoint | atopology character varying, apoint geometry, tolerance double precision | integer + postgis_topology | topology | topogeo_addpolygon | atopology character varying, apoly geometry, tolerance double precision | SETOF integer + postgis_topology | topology | topogeom_addelement | tg topology.topogeometry, el topology.topoelement | topology.topogeometry + postgis_topology | topology | topogeom_addtopogeom | tgt topology.topogeometry, src topology.topogeometry | topology.topogeometry + postgis_topology | topology | topogeom_remelement | tg topology.topogeometry, el topology.topoelement | topology.topogeometry + postgis_topology | topology | topologysummary | atopology character varying | text + postgis_topology | topology | totopogeom | ageom geometry, atopology character varying, alayer integer, atolerance double precision | topology.topogeometry + postgis_topology | topology | totopogeom | ageom geometry, tg topology.topogeometry, atolerance double precision | topology.topogeometry + postgis_topology | topology | validatetopology | toponame character varying, bbox geometry | SETOF topology.validatetopology_returntype + postgis_topology | topology | validatetopologyrelation | toponame character varying | TABLE(error text, layer_id integer, topogeo_id integer, element_id integer) + postgres_fdw | public | postgres_fdw_disconnect | text | boolean + postgres_fdw | public | postgres_fdw_disconnect_all | | boolean + postgres_fdw | public | postgres_fdw_get_connections | OUT server_name text, OUT valid boolean | SETOF record + postgres_fdw | public | postgres_fdw_handler | | fdw_handler + postgres_fdw | public | postgres_fdw_validator | text[], oid | void + refint | public | check_foreign_key | | trigger + refint | public | check_primary_key | | trigger + rum | public | rum_anyarray_config | internal | void + rum | public | rum_anyarray_consistent | internal, smallint, anyarray, integer, internal, internal, internal, internal | boolean + rum | public | rum_anyarray_distance | anyarray, anyarray | double precision + rum | public | rum_anyarray_ordering | internal, smallint, anyarray, integer, internal, internal, internal, internal, internal | double precision + rum | public | rum_anyarray_similar | anyarray, anyarray | boolean + rum | public | rum_bit_compare_prefix | bit, bit, smallint, internal | integer + rum | public | rum_bit_extract_query | bit, internal, smallint, internal, internal | internal + rum | public | rum_bit_extract_value | bit, internal | internal + rum | public | rum_btree_consistent | internal, smallint, internal, integer, internal, internal, internal, internal | boolean + rum | public | rum_bytea_compare_prefix | bytea, bytea, smallint, internal | integer + rum | public | rum_bytea_extract_query | bytea, internal, smallint, internal, internal | internal + rum | public | rum_bytea_extract_value | bytea, internal | internal + rum | public | rum_char_compare_prefix | "char", "char", smallint, internal | integer + rum | public | rum_char_extract_query | "char", internal, smallint, internal, internal | internal + rum | public | rum_char_extract_value | "char", internal | internal + rum | public | rum_cidr_compare_prefix | cidr, cidr, smallint, internal | integer + rum | public | rum_cidr_extract_query | cidr, internal, smallint, internal, internal | internal + rum | public | rum_cidr_extract_value | cidr, internal | internal + rum | public | rum_date_compare_prefix | date, date, smallint, internal | integer + rum | public | rum_date_extract_query | date, internal, smallint, internal, internal | internal + rum | public | rum_date_extract_value | date, internal | internal + rum | public | rum_extract_anyarray | anyarray, internal, internal, internal, internal | internal + rum | public | rum_extract_anyarray_query | anyarray, internal, smallint, internal, internal, internal, internal | internal + rum | public | rum_extract_tsquery | tsquery, internal, smallint, internal, internal, internal, internal | internal + rum | public | rum_extract_tsquery_hash | tsquery, internal, smallint, internal, internal, internal, internal | internal + rum | public | rum_extract_tsvector | tsvector, internal, internal, internal, internal | internal + rum | public | rum_extract_tsvector_hash | tsvector, internal, internal, internal, internal | internal + rum | public | rum_float4_compare_prefix | real, real, smallint, internal | integer + rum | public | rum_float4_config | internal | void + rum | public | rum_float4_distance | real, real | double precision + rum | public | rum_float4_extract_query | real, internal, smallint, internal, internal | internal + rum | public | rum_float4_extract_value | real, internal | internal + rum | public | rum_float4_key_distance | real, real, smallint | double precision + rum | public | rum_float4_left_distance | real, real | double precision + rum | public | rum_float4_outer_distance | real, real, smallint | double precision + rum | public | rum_float4_right_distance | real, real | double precision + rum | public | rum_float8_compare_prefix | double precision, double precision, smallint, internal | integer + rum | public | rum_float8_config | internal | void + rum | public | rum_float8_distance | double precision, double precision | double precision + rum | public | rum_float8_extract_query | double precision, internal, smallint, internal, internal | internal + rum | public | rum_float8_extract_value | double precision, internal | internal + rum | public | rum_float8_key_distance | double precision, double precision, smallint | double precision + rum | public | rum_float8_left_distance | double precision, double precision | double precision + rum | public | rum_float8_outer_distance | double precision, double precision, smallint | double precision + rum | public | rum_float8_right_distance | double precision, double precision | double precision + rum | public | rum_inet_compare_prefix | inet, inet, smallint, internal | integer + rum | public | rum_inet_extract_query | inet, internal, smallint, internal, internal | internal + rum | public | rum_inet_extract_value | inet, internal | internal + rum | public | rum_int2_compare_prefix | smallint, smallint, smallint, internal | integer + rum | public | rum_int2_config | internal | void + rum | public | rum_int2_distance | smallint, smallint | double precision + rum | public | rum_int2_extract_query | smallint, internal, smallint, internal, internal | internal + rum | public | rum_int2_extract_value | smallint, internal | internal + rum | public | rum_int2_key_distance | smallint, smallint, smallint | double precision + rum | public | rum_int2_left_distance | smallint, smallint | double precision + rum | public | rum_int2_outer_distance | smallint, smallint, smallint | double precision + rum | public | rum_int2_right_distance | smallint, smallint | double precision + rum | public | rum_int4_compare_prefix | integer, integer, smallint, internal | integer + rum | public | rum_int4_config | internal | void + rum | public | rum_int4_distance | integer, integer | double precision + rum | public | rum_int4_extract_query | integer, internal, smallint, internal, internal | internal + rum | public | rum_int4_extract_value | integer, internal | internal + rum | public | rum_int4_key_distance | integer, integer, smallint | double precision + rum | public | rum_int4_left_distance | integer, integer | double precision + rum | public | rum_int4_outer_distance | integer, integer, smallint | double precision + rum | public | rum_int4_right_distance | integer, integer | double precision + rum | public | rum_int8_compare_prefix | bigint, bigint, smallint, internal | integer + rum | public | rum_int8_config | internal | void + rum | public | rum_int8_distance | bigint, bigint | double precision + rum | public | rum_int8_extract_query | bigint, internal, smallint, internal, internal | internal + rum | public | rum_int8_extract_value | bigint, internal | internal + rum | public | rum_int8_key_distance | bigint, bigint, smallint | double precision + rum | public | rum_int8_left_distance | bigint, bigint | double precision + rum | public | rum_int8_outer_distance | bigint, bigint, smallint | double precision + rum | public | rum_int8_right_distance | bigint, bigint | double precision + rum | public | rum_interval_compare_prefix | interval, interval, smallint, internal | integer + rum | public | rum_interval_extract_query | interval, internal, smallint, internal, internal | internal + rum | public | rum_interval_extract_value | interval, internal | internal + rum | public | rum_macaddr_compare_prefix | macaddr, macaddr, smallint, internal | integer + rum | public | rum_macaddr_extract_query | macaddr, internal, smallint, internal, internal | internal + rum | public | rum_macaddr_extract_value | macaddr, internal | internal + rum | public | rum_money_compare_prefix | money, money, smallint, internal | integer + rum | public | rum_money_config | internal | void + rum | public | rum_money_distance | money, money | double precision + rum | public | rum_money_extract_query | money, internal, smallint, internal, internal | internal + rum | public | rum_money_extract_value | money, internal | internal + rum | public | rum_money_key_distance | money, money, smallint | double precision + rum | public | rum_money_left_distance | money, money | double precision + rum | public | rum_money_outer_distance | money, money, smallint | double precision + rum | public | rum_money_right_distance | money, money | double precision + rum | public | rum_numeric_cmp | numeric, numeric | integer + rum | public | rum_numeric_compare_prefix | numeric, numeric, smallint, internal | integer + rum | public | rum_numeric_extract_query | numeric, internal, smallint, internal, internal | internal + rum | public | rum_numeric_extract_value | numeric, internal | internal + rum | public | rum_oid_compare_prefix | oid, oid, smallint, internal | integer + rum | public | rum_oid_config | internal | void + rum | public | rum_oid_distance | oid, oid | double precision + rum | public | rum_oid_extract_query | oid, internal, smallint, internal, internal | internal + rum | public | rum_oid_extract_value | oid, internal | internal + rum | public | rum_oid_key_distance | oid, oid, smallint | double precision + rum | public | rum_oid_left_distance | oid, oid | double precision + rum | public | rum_oid_outer_distance | oid, oid, smallint | double precision + rum | public | rum_oid_right_distance | oid, oid | double precision + rum | public | rum_text_compare_prefix | text, text, smallint, internal | integer + rum | public | rum_text_extract_query | text, internal, smallint, internal, internal | internal + rum | public | rum_text_extract_value | text, internal | internal + rum | public | rum_time_compare_prefix | time without time zone, time without time zone, smallint, internal | integer + rum | public | rum_time_extract_query | time without time zone, internal, smallint, internal, internal | internal + rum | public | rum_time_extract_value | time without time zone, internal | internal + rum | public | rum_timestamp_compare_prefix | timestamp without time zone, timestamp without time zone, smallint, internal | integer + rum | public | rum_timestamp_config | internal | void + rum | public | rum_timestamp_consistent | internal, smallint, timestamp without time zone, integer, internal, internal, internal, internal | boolean + rum | public | rum_timestamp_distance | timestamp without time zone, timestamp without time zone | double precision + rum | public | rum_timestamp_extract_query | timestamp without time zone, internal, smallint, internal, internal, internal, internal | internal + rum | public | rum_timestamp_extract_value | timestamp without time zone, internal, internal, internal, internal | internal + rum | public | rum_timestamp_key_distance | timestamp without time zone, timestamp without time zone, smallint | double precision + rum | public | rum_timestamp_left_distance | timestamp without time zone, timestamp without time zone | double precision + rum | public | rum_timestamp_outer_distance | timestamp without time zone, timestamp without time zone, smallint | double precision + rum | public | rum_timestamp_right_distance | timestamp without time zone, timestamp without time zone | double precision + rum | public | rum_timestamptz_distance | timestamp with time zone, timestamp with time zone | double precision + rum | public | rum_timestamptz_key_distance | timestamp with time zone, timestamp with time zone, smallint | double precision + rum | public | rum_timestamptz_left_distance | timestamp with time zone, timestamp with time zone | double precision + rum | public | rum_timestamptz_right_distance | timestamp with time zone, timestamp with time zone | double precision + rum | public | rum_timetz_compare_prefix | time with time zone, time with time zone, smallint, internal | integer + rum | public | rum_timetz_extract_query | time with time zone, internal, smallint, internal, internal | internal + rum | public | rum_timetz_extract_value | time with time zone, internal | internal + rum | public | rum_ts_distance | tsvector, tsquery, integer | real + rum | public | rum_ts_distance | tsvector, tsquery | real + rum | public | rum_ts_distance | tsvector, rum_distance_query | real + rum | public | rum_ts_join_pos | internal, internal | bytea + rum | public | rum_ts_score | tsvector, tsquery, integer | real + rum | public | rum_ts_score | tsvector, tsquery | real + rum | public | rum_ts_score | tsvector, rum_distance_query | real + rum | public | rum_tsquery_addon_consistent | internal, smallint, tsvector, integer, internal, internal, internal, internal | boolean + rum | public | rum_tsquery_consistent | internal, smallint, tsvector, integer, internal, internal, internal, internal | boolean + rum | public | rum_tsquery_distance | internal, smallint, tsvector, integer, internal, internal, internal, internal, internal | double precision + rum | public | rum_tsquery_pre_consistent | internal, smallint, tsvector, integer, internal, internal, internal, internal | boolean + rum | public | rum_tsvector_config | internal | void + rum | public | rum_varbit_compare_prefix | bit varying, bit varying, smallint, internal | integer + rum | public | rum_varbit_extract_query | bit varying, internal, smallint, internal, internal | internal + rum | public | rum_varbit_extract_value | bit varying, internal | internal + rum | public | rumhandler | internal | index_am_handler + rum | public | ruminv_extract_tsquery | tsquery, internal, internal, internal, internal | internal + rum | public | ruminv_extract_tsvector | tsvector, internal, smallint, internal, internal, internal, internal | internal + rum | public | ruminv_tsquery_config | internal | void + rum | public | ruminv_tsvector_consistent | internal, smallint, tsvector, integer, internal, internal, internal, internal | boolean + rum | public | tsquery_to_distance_query | tsquery | rum_distance_query + seg | public | gseg_consistent | internal, seg, smallint, oid, internal | boolean + seg | public | gseg_penalty | internal, internal, internal | internal + seg | public | gseg_picksplit | internal, internal | internal + seg | public | gseg_same | seg, seg, internal | internal + seg | public | gseg_union | internal, internal | seg + seg | public | seg_center | seg | real + seg | public | seg_cmp | seg, seg | integer + seg | public | seg_contained | seg, seg | boolean + seg | public | seg_contains | seg, seg | boolean + seg | public | seg_different | seg, seg | boolean + seg | public | seg_ge | seg, seg | boolean + seg | public | seg_gt | seg, seg | boolean + seg | public | seg_in | cstring | seg + seg | public | seg_inter | seg, seg | seg + seg | public | seg_le | seg, seg | boolean + seg | public | seg_left | seg, seg | boolean + seg | public | seg_lower | seg | real + seg | public | seg_lt | seg, seg | boolean + seg | public | seg_out | seg | cstring + seg | public | seg_over_left | seg, seg | boolean + seg | public | seg_over_right | seg, seg | boolean + seg | public | seg_overlap | seg, seg | boolean + seg | public | seg_right | seg, seg | boolean + seg | public | seg_same | seg, seg | boolean + seg | public | seg_size | seg | real + seg | public | seg_union | seg, seg | seg + seg | public | seg_upper | seg | real + sslinfo | public | ssl_cipher | | text + sslinfo | public | ssl_client_cert_present | | boolean + sslinfo | public | ssl_client_dn | | text + sslinfo | public | ssl_client_dn_field | text | text + sslinfo | public | ssl_client_serial | | numeric + sslinfo | public | ssl_extension_info | OUT name text, OUT value text, OUT critical boolean | SETOF record + sslinfo | public | ssl_is_used | | boolean + sslinfo | public | ssl_issuer_dn | | text + sslinfo | public | ssl_issuer_field | text | text + sslinfo | public | ssl_version | | text + supabase_vault | vault | _crypto_aead_det_decrypt | message bytea, additional bytea, key_id bigint, context bytea, nonce bytea | bytea + supabase_vault | vault | _crypto_aead_det_encrypt | message bytea, additional bytea, key_id bigint, context bytea, nonce bytea | bytea + supabase_vault | vault | _crypto_aead_det_noncegen | | bytea + supabase_vault | vault | create_secret | new_secret text, new_name text, new_description text, new_key_id uuid | uuid + supabase_vault | vault | update_secret | secret_id uuid, new_secret text, new_name text, new_description text, new_key_id uuid | void + tablefunc | public | connectby | text, text, text, text, integer, text | SETOF record + tablefunc | public | connectby | text, text, text, text, text, integer, text | SETOF record + tablefunc | public | connectby | text, text, text, text, integer | SETOF record + tablefunc | public | connectby | text, text, text, text, text, integer | SETOF record + tablefunc | public | crosstab | text | SETOF record + tablefunc | public | crosstab | text, integer | SETOF record + tablefunc | public | crosstab | text, text | SETOF record + tablefunc | public | crosstab2 | text | SETOF tablefunc_crosstab_2 + tablefunc | public | crosstab3 | text | SETOF tablefunc_crosstab_3 + tablefunc | public | crosstab4 | text | SETOF tablefunc_crosstab_4 + tablefunc | public | normal_rand | integer, double precision, double precision | SETOF double precision + tcn | public | triggered_change_notification | | trigger + tsm_system_rows | public | system_rows | internal | tsm_handler + unaccent | public | unaccent | text | text + unaccent | public | unaccent | regdictionary, text | text + unaccent | public | unaccent_init | internal | internal + unaccent | public | unaccent_lexize | internal, internal, internal, internal | internal + uuid-ossp | extensions | uuid_generate_v1 | | uuid + uuid-ossp | extensions | uuid_generate_v1mc | | uuid + uuid-ossp | extensions | uuid_generate_v3 | namespace uuid, name text | uuid + uuid-ossp | extensions | uuid_generate_v4 | | uuid + uuid-ossp | extensions | uuid_generate_v5 | namespace uuid, name text | uuid + uuid-ossp | extensions | uuid_nil | | uuid + uuid-ossp | extensions | uuid_ns_dns | | uuid + uuid-ossp | extensions | uuid_ns_oid | | uuid + uuid-ossp | extensions | uuid_ns_url | | uuid + uuid-ossp | extensions | uuid_ns_x500 | | uuid + vector | public | array_to_halfvec | real[], integer, boolean | halfvec + vector | public | array_to_halfvec | integer[], integer, boolean | halfvec + vector | public | array_to_halfvec | numeric[], integer, boolean | halfvec + vector | public | array_to_halfvec | double precision[], integer, boolean | halfvec + vector | public | array_to_sparsevec | real[], integer, boolean | sparsevec + vector | public | array_to_sparsevec | integer[], integer, boolean | sparsevec + vector | public | array_to_sparsevec | numeric[], integer, boolean | sparsevec + vector | public | array_to_sparsevec | double precision[], integer, boolean | sparsevec + vector | public | array_to_vector | real[], integer, boolean | vector + vector | public | array_to_vector | integer[], integer, boolean | vector + vector | public | array_to_vector | numeric[], integer, boolean | vector + vector | public | array_to_vector | double precision[], integer, boolean | vector + vector | public | avg | vector | vector + vector | public | avg | halfvec | halfvec + vector | public | binary_quantize | vector | bit + vector | public | binary_quantize | halfvec | bit + vector | public | cosine_distance | vector, vector | double precision + vector | public | cosine_distance | halfvec, halfvec | double precision + vector | public | cosine_distance | sparsevec, sparsevec | double precision + vector | public | halfvec | halfvec, integer, boolean | halfvec + vector | public | halfvec_accum | double precision[], halfvec | double precision[] + vector | public | halfvec_add | halfvec, halfvec | halfvec + vector | public | halfvec_avg | double precision[] | halfvec + vector | public | halfvec_cmp | halfvec, halfvec | integer + vector | public | halfvec_combine | double precision[], double precision[] | double precision[] + vector | public | halfvec_concat | halfvec, halfvec | halfvec + vector | public | halfvec_eq | halfvec, halfvec | boolean + vector | public | halfvec_ge | halfvec, halfvec | boolean + vector | public | halfvec_gt | halfvec, halfvec | boolean + vector | public | halfvec_in | cstring, oid, integer | halfvec + vector | public | halfvec_l2_squared_distance | halfvec, halfvec | double precision + vector | public | halfvec_le | halfvec, halfvec | boolean + vector | public | halfvec_lt | halfvec, halfvec | boolean + vector | public | halfvec_mul | halfvec, halfvec | halfvec + vector | public | halfvec_ne | halfvec, halfvec | boolean + vector | public | halfvec_negative_inner_product | halfvec, halfvec | double precision + vector | public | halfvec_out | halfvec | cstring + vector | public | halfvec_recv | internal, oid, integer | halfvec + vector | public | halfvec_send | halfvec | bytea + vector | public | halfvec_spherical_distance | halfvec, halfvec | double precision + vector | public | halfvec_sub | halfvec, halfvec | halfvec + vector | public | halfvec_to_float4 | halfvec, integer, boolean | real[] + vector | public | halfvec_to_sparsevec | halfvec, integer, boolean | sparsevec + vector | public | halfvec_to_vector | halfvec, integer, boolean | vector + vector | public | halfvec_typmod_in | cstring[] | integer + vector | public | hamming_distance | bit, bit | double precision + vector | public | hnsw_bit_support | internal | internal + vector | public | hnsw_halfvec_support | internal | internal + vector | public | hnsw_sparsevec_support | internal | internal + vector | public | hnswhandler | internal | index_am_handler + vector | public | inner_product | vector, vector | double precision + vector | public | inner_product | halfvec, halfvec | double precision + vector | public | inner_product | sparsevec, sparsevec | double precision + vector | public | ivfflat_bit_support | internal | internal + vector | public | ivfflat_halfvec_support | internal | internal + vector | public | ivfflathandler | internal | index_am_handler + vector | public | jaccard_distance | bit, bit | double precision + vector | public | l1_distance | vector, vector | double precision + vector | public | l1_distance | halfvec, halfvec | double precision + vector | public | l1_distance | sparsevec, sparsevec | double precision + vector | public | l2_distance | vector, vector | double precision + vector | public | l2_distance | halfvec, halfvec | double precision + vector | public | l2_distance | sparsevec, sparsevec | double precision + vector | public | l2_norm | halfvec | double precision + vector | public | l2_norm | sparsevec | double precision + vector | public | l2_normalize | vector | vector + vector | public | l2_normalize | halfvec | halfvec + vector | public | l2_normalize | sparsevec | sparsevec + vector | public | sparsevec | sparsevec, integer, boolean | sparsevec + vector | public | sparsevec_cmp | sparsevec, sparsevec | integer + vector | public | sparsevec_eq | sparsevec, sparsevec | boolean + vector | public | sparsevec_ge | sparsevec, sparsevec | boolean + vector | public | sparsevec_gt | sparsevec, sparsevec | boolean + vector | public | sparsevec_in | cstring, oid, integer | sparsevec + vector | public | sparsevec_l2_squared_distance | sparsevec, sparsevec | double precision + vector | public | sparsevec_le | sparsevec, sparsevec | boolean + vector | public | sparsevec_lt | sparsevec, sparsevec | boolean + vector | public | sparsevec_ne | sparsevec, sparsevec | boolean + vector | public | sparsevec_negative_inner_product | sparsevec, sparsevec | double precision + vector | public | sparsevec_out | sparsevec | cstring + vector | public | sparsevec_recv | internal, oid, integer | sparsevec + vector | public | sparsevec_send | sparsevec | bytea + vector | public | sparsevec_to_halfvec | sparsevec, integer, boolean | halfvec + vector | public | sparsevec_to_vector | sparsevec, integer, boolean | vector + vector | public | sparsevec_typmod_in | cstring[] | integer + vector | public | subvector | halfvec, integer, integer | halfvec + vector | public | subvector | vector, integer, integer | vector + vector | public | sum | vector | vector + vector | public | sum | halfvec | halfvec + vector | public | vector | vector, integer, boolean | vector + vector | public | vector_accum | double precision[], vector | double precision[] + vector | public | vector_add | vector, vector | vector + vector | public | vector_avg | double precision[] | vector + vector | public | vector_cmp | vector, vector | integer + vector | public | vector_combine | double precision[], double precision[] | double precision[] + vector | public | vector_concat | vector, vector | vector + vector | public | vector_dims | vector | integer + vector | public | vector_dims | halfvec | integer + vector | public | vector_eq | vector, vector | boolean + vector | public | vector_ge | vector, vector | boolean + vector | public | vector_gt | vector, vector | boolean + vector | public | vector_in | cstring, oid, integer | vector + vector | public | vector_l2_squared_distance | vector, vector | double precision + vector | public | vector_le | vector, vector | boolean + vector | public | vector_lt | vector, vector | boolean + vector | public | vector_mul | vector, vector | vector + vector | public | vector_ne | vector, vector | boolean + vector | public | vector_negative_inner_product | vector, vector | double precision + vector | public | vector_norm | vector | double precision + vector | public | vector_out | vector | cstring + vector | public | vector_recv | internal, oid, integer | vector + vector | public | vector_send | vector | bytea + vector | public | vector_spherical_distance | vector, vector | double precision + vector | public | vector_sub | vector, vector | vector + vector | public | vector_to_float4 | vector, integer, boolean | real[] + vector | public | vector_to_halfvec | vector, integer, boolean | halfvec + vector | public | vector_to_sparsevec | vector, integer, boolean | sparsevec + vector | public | vector_typmod_in | cstring[] | integer + wrappers | public | airtable_fdw_handler | | fdw_handler + wrappers | public | airtable_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | airtable_fdw_validator | options text[], catalog oid | void + wrappers | public | auth0_fdw_handler | | fdw_handler + wrappers | public | auth0_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | auth0_fdw_validator | options text[], catalog oid | void + wrappers | public | big_query_fdw_handler | | fdw_handler + wrappers | public | big_query_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | big_query_fdw_validator | options text[], catalog oid | void + wrappers | public | click_house_fdw_handler | | fdw_handler + wrappers | public | click_house_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | click_house_fdw_validator | options text[], catalog oid | void + wrappers | public | cognito_fdw_handler | | fdw_handler + wrappers | public | cognito_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | cognito_fdw_validator | options text[], catalog oid | void + wrappers | public | firebase_fdw_handler | | fdw_handler + wrappers | public | firebase_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | firebase_fdw_validator | options text[], catalog oid | void + wrappers | public | hello_world_fdw_handler | | fdw_handler + wrappers | public | hello_world_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | hello_world_fdw_validator | options text[], catalog oid | void + wrappers | public | logflare_fdw_handler | | fdw_handler + wrappers | public | logflare_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | logflare_fdw_validator | options text[], catalog oid | void + wrappers | public | mssql_fdw_handler | | fdw_handler + wrappers | public | mssql_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | mssql_fdw_validator | options text[], catalog oid | void + wrappers | public | redis_fdw_handler | | fdw_handler + wrappers | public | redis_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | redis_fdw_validator | options text[], catalog oid | void + wrappers | public | s3_fdw_handler | | fdw_handler + wrappers | public | s3_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | s3_fdw_validator | options text[], catalog oid | void + wrappers | public | stripe_fdw_handler | | fdw_handler + wrappers | public | stripe_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | stripe_fdw_validator | options text[], catalog oid | void + wrappers | public | wasm_fdw_handler | | fdw_handler + wrappers | public | wasm_fdw_meta | | TABLE(name text, version text, author text, website text) + wrappers | public | wasm_fdw_validator | options text[], catalog oid | void + xml2 | public | xml_encode_special_chars | text | text + xml2 | public | xml_valid | text | boolean + xml2 | public | xpath_bool | text, text | boolean + xml2 | public | xpath_list | text, text | text + xml2 | public | xpath_list | text, text, text | text + xml2 | public | xpath_nodeset | text, text, text, text | text + xml2 | public | xpath_nodeset | text, text | text + xml2 | public | xpath_nodeset | text, text, text | text + xml2 | public | xpath_number | text, text | real + xml2 | public | xpath_string | text, text | text + xml2 | public | xpath_table | text, text, text, text, text | SETOF record + xml2 | public | xslt_process | text, text | text + xml2 | public | xslt_process | text, text, text | text +(4708 rows) + +/* + +Monitor extension public table/view/matview/index interface + +*/ +select + e.extname as extension_name, + n.nspname as schema_name, + pc.relname as entity_name, + pa.attname +from + pg_catalog.pg_class pc + join pg_catalog.pg_namespace n + on n.oid = pc.relnamespace + join pg_catalog.pg_depend d + on d.objid = pc.oid + join pg_catalog.pg_extension e + on e.oid = d.refobjid + left join pg_catalog.pg_attribute pa + on pa.attrelid = pc.oid + and pa.attnum > 0 + and not pa.attisdropped +where + d.deptype = 'e' + and pc.relkind in ('r', 'v', 'm', 'i') +order by + e.extname, + n.nspname, + pc.relname, + pa.attname; + extension_name | schema_name | entity_name | attname +------------------------------+-------------+-------------------------+------------------------ + address_standardizer_data_us | public | us_gaz | id + address_standardizer_data_us | public | us_gaz | is_custom + address_standardizer_data_us | public | us_gaz | seq + address_standardizer_data_us | public | us_gaz | stdword + address_standardizer_data_us | public | us_gaz | token + address_standardizer_data_us | public | us_gaz | word + address_standardizer_data_us | public | us_lex | id + address_standardizer_data_us | public | us_lex | is_custom + address_standardizer_data_us | public | us_lex | seq + address_standardizer_data_us | public | us_lex | stdword + address_standardizer_data_us | public | us_lex | token + address_standardizer_data_us | public | us_lex | word + address_standardizer_data_us | public | us_rules | id + address_standardizer_data_us | public | us_rules | is_custom + address_standardizer_data_us | public | us_rules | rule + hypopg | public | hypopg_hidden_indexes | am_name + hypopg | public | hypopg_hidden_indexes | index_name + hypopg | public | hypopg_hidden_indexes | indexrelid + hypopg | public | hypopg_hidden_indexes | is_hypo + hypopg | public | hypopg_hidden_indexes | schema_name + hypopg | public | hypopg_hidden_indexes | table_name + hypopg | public | hypopg_list_indexes | am_name + hypopg | public | hypopg_list_indexes | index_name + hypopg | public | hypopg_list_indexes | indexrelid + hypopg | public | hypopg_list_indexes | schema_name + hypopg | public | hypopg_list_indexes | table_name + pg_buffercache | public | pg_buffercache | bufferid + pg_buffercache | public | pg_buffercache | isdirty + pg_buffercache | public | pg_buffercache | pinning_backends + pg_buffercache | public | pg_buffercache | relblocknumber + pg_buffercache | public | pg_buffercache | reldatabase + pg_buffercache | public | pg_buffercache | relfilenode + pg_buffercache | public | pg_buffercache | relforknumber + pg_buffercache | public | pg_buffercache | reltablespace + pg_buffercache | public | pg_buffercache | usagecount + pg_net | net | _http_response | content + pg_net | net | _http_response | content_type + pg_net | net | _http_response | created + pg_net | net | _http_response | error_msg + pg_net | net | _http_response | headers + pg_net | net | _http_response | id + pg_net | net | _http_response | status_code + pg_net | net | _http_response | timed_out + pg_net | net | http_request_queue | body + pg_net | net | http_request_queue | headers + pg_net | net | http_request_queue | id + pg_net | net | http_request_queue | method + pg_net | net | http_request_queue | timeout_milliseconds + pg_net | net | http_request_queue | url + pg_repack | repack | primary_keys | indexrelid + pg_repack | repack | primary_keys | indrelid + pg_repack | repack | tables | alter_col_storage + pg_repack | repack | tables | ckey + pg_repack | repack | tables | ckid + pg_repack | repack | tables | copy_data + pg_repack | repack | tables | create_log + pg_repack | repack | tables | create_pktype + pg_repack | repack | tables | create_table + pg_repack | repack | tables | create_trigger + pg_repack | repack | tables | delete_log + pg_repack | repack | tables | drop_columns + pg_repack | repack | tables | enable_trigger + pg_repack | repack | tables | lock_table + pg_repack | repack | tables | pkid + pg_repack | repack | tables | relid + pg_repack | repack | tables | relname + pg_repack | repack | tables | reltoastidxid + pg_repack | repack | tables | reltoastrelid + pg_repack | repack | tables | schemaname + pg_repack | repack | tables | sql_delete + pg_repack | repack | tables | sql_insert + pg_repack | repack | tables | sql_peek + pg_repack | repack | tables | sql_pop + pg_repack | repack | tables | sql_update + pg_repack | repack | tables | tablespace_orig + pg_stat_monitor | public | pg_stat_monitor | application_name + pg_stat_monitor | public | pg_stat_monitor | bucket + pg_stat_monitor | public | pg_stat_monitor | bucket_done + pg_stat_monitor | public | pg_stat_monitor | bucket_start_time + pg_stat_monitor | public | pg_stat_monitor | calls + pg_stat_monitor | public | pg_stat_monitor | client_ip + pg_stat_monitor | public | pg_stat_monitor | cmd_type + pg_stat_monitor | public | pg_stat_monitor | cmd_type_text + pg_stat_monitor | public | pg_stat_monitor | comments + pg_stat_monitor | public | pg_stat_monitor | cpu_sys_time + pg_stat_monitor | public | pg_stat_monitor | cpu_user_time + pg_stat_monitor | public | pg_stat_monitor | datname + pg_stat_monitor | public | pg_stat_monitor | dbid + pg_stat_monitor | public | pg_stat_monitor | elevel + pg_stat_monitor | public | pg_stat_monitor | jit_deform_count + pg_stat_monitor | public | pg_stat_monitor | jit_deform_time + pg_stat_monitor | public | pg_stat_monitor | jit_emission_count + pg_stat_monitor | public | pg_stat_monitor | jit_emission_time + pg_stat_monitor | public | pg_stat_monitor | jit_functions + pg_stat_monitor | public | pg_stat_monitor | jit_generation_time + pg_stat_monitor | public | pg_stat_monitor | jit_inlining_count + pg_stat_monitor | public | pg_stat_monitor | jit_inlining_time + pg_stat_monitor | public | pg_stat_monitor | jit_optimization_count + pg_stat_monitor | public | pg_stat_monitor | jit_optimization_time + pg_stat_monitor | public | pg_stat_monitor | local_blk_read_time + pg_stat_monitor | public | pg_stat_monitor | local_blk_write_time + pg_stat_monitor | public | pg_stat_monitor | local_blks_dirtied + pg_stat_monitor | public | pg_stat_monitor | local_blks_hit + pg_stat_monitor | public | pg_stat_monitor | local_blks_read + pg_stat_monitor | public | pg_stat_monitor | local_blks_written + pg_stat_monitor | public | pg_stat_monitor | max_exec_time + pg_stat_monitor | public | pg_stat_monitor | max_plan_time + pg_stat_monitor | public | pg_stat_monitor | mean_exec_time + pg_stat_monitor | public | pg_stat_monitor | mean_plan_time + pg_stat_monitor | public | pg_stat_monitor | message + pg_stat_monitor | public | pg_stat_monitor | min_exec_time + pg_stat_monitor | public | pg_stat_monitor | min_plan_time + pg_stat_monitor | public | pg_stat_monitor | minmax_stats_since + pg_stat_monitor | public | pg_stat_monitor | pgsm_query_id + pg_stat_monitor | public | pg_stat_monitor | planid + pg_stat_monitor | public | pg_stat_monitor | plans + pg_stat_monitor | public | pg_stat_monitor | query + pg_stat_monitor | public | pg_stat_monitor | query_plan + pg_stat_monitor | public | pg_stat_monitor | queryid + pg_stat_monitor | public | pg_stat_monitor | relations + pg_stat_monitor | public | pg_stat_monitor | resp_calls + pg_stat_monitor | public | pg_stat_monitor | rows + pg_stat_monitor | public | pg_stat_monitor | shared_blk_read_time + pg_stat_monitor | public | pg_stat_monitor | shared_blk_write_time + pg_stat_monitor | public | pg_stat_monitor | shared_blks_dirtied + pg_stat_monitor | public | pg_stat_monitor | shared_blks_hit + pg_stat_monitor | public | pg_stat_monitor | shared_blks_read + pg_stat_monitor | public | pg_stat_monitor | shared_blks_written + pg_stat_monitor | public | pg_stat_monitor | sqlcode + pg_stat_monitor | public | pg_stat_monitor | stats_since + pg_stat_monitor | public | pg_stat_monitor | stddev_exec_time + pg_stat_monitor | public | pg_stat_monitor | stddev_plan_time + pg_stat_monitor | public | pg_stat_monitor | temp_blk_read_time + pg_stat_monitor | public | pg_stat_monitor | temp_blk_write_time + pg_stat_monitor | public | pg_stat_monitor | temp_blks_read + pg_stat_monitor | public | pg_stat_monitor | temp_blks_written + pg_stat_monitor | public | pg_stat_monitor | top_query + pg_stat_monitor | public | pg_stat_monitor | top_queryid + pg_stat_monitor | public | pg_stat_monitor | toplevel + pg_stat_monitor | public | pg_stat_monitor | total_exec_time + pg_stat_monitor | public | pg_stat_monitor | total_plan_time + pg_stat_monitor | public | pg_stat_monitor | userid + pg_stat_monitor | public | pg_stat_monitor | username + pg_stat_monitor | public | pg_stat_monitor | wal_bytes + pg_stat_monitor | public | pg_stat_monitor | wal_fpi + pg_stat_monitor | public | pg_stat_monitor | wal_records + pg_stat_statements | extensions | pg_stat_statements | calls + pg_stat_statements | extensions | pg_stat_statements | dbid + pg_stat_statements | extensions | pg_stat_statements | jit_deform_count + pg_stat_statements | extensions | pg_stat_statements | jit_deform_time + pg_stat_statements | extensions | pg_stat_statements | jit_emission_count + pg_stat_statements | extensions | pg_stat_statements | jit_emission_time + pg_stat_statements | extensions | pg_stat_statements | jit_functions + pg_stat_statements | extensions | pg_stat_statements | jit_generation_time + pg_stat_statements | extensions | pg_stat_statements | jit_inlining_count + pg_stat_statements | extensions | pg_stat_statements | jit_inlining_time + pg_stat_statements | extensions | pg_stat_statements | jit_optimization_count + pg_stat_statements | extensions | pg_stat_statements | jit_optimization_time + pg_stat_statements | extensions | pg_stat_statements | local_blk_read_time + pg_stat_statements | extensions | pg_stat_statements | local_blk_write_time + pg_stat_statements | extensions | pg_stat_statements | local_blks_dirtied + pg_stat_statements | extensions | pg_stat_statements | local_blks_hit + pg_stat_statements | extensions | pg_stat_statements | local_blks_read + pg_stat_statements | extensions | pg_stat_statements | local_blks_written + pg_stat_statements | extensions | pg_stat_statements | max_exec_time + pg_stat_statements | extensions | pg_stat_statements | max_plan_time + pg_stat_statements | extensions | pg_stat_statements | mean_exec_time + pg_stat_statements | extensions | pg_stat_statements | mean_plan_time + pg_stat_statements | extensions | pg_stat_statements | min_exec_time + pg_stat_statements | extensions | pg_stat_statements | min_plan_time + pg_stat_statements | extensions | pg_stat_statements | minmax_stats_since + pg_stat_statements | extensions | pg_stat_statements | plans + pg_stat_statements | extensions | pg_stat_statements | query + pg_stat_statements | extensions | pg_stat_statements | queryid + pg_stat_statements | extensions | pg_stat_statements | rows + pg_stat_statements | extensions | pg_stat_statements | shared_blk_read_time + pg_stat_statements | extensions | pg_stat_statements | shared_blk_write_time + pg_stat_statements | extensions | pg_stat_statements | shared_blks_dirtied + pg_stat_statements | extensions | pg_stat_statements | shared_blks_hit + pg_stat_statements | extensions | pg_stat_statements | shared_blks_read + pg_stat_statements | extensions | pg_stat_statements | shared_blks_written + pg_stat_statements | extensions | pg_stat_statements | stats_since + pg_stat_statements | extensions | pg_stat_statements | stddev_exec_time + pg_stat_statements | extensions | pg_stat_statements | stddev_plan_time + pg_stat_statements | extensions | pg_stat_statements | temp_blk_read_time + pg_stat_statements | extensions | pg_stat_statements | temp_blk_write_time + pg_stat_statements | extensions | pg_stat_statements | temp_blks_read + pg_stat_statements | extensions | pg_stat_statements | temp_blks_written + pg_stat_statements | extensions | pg_stat_statements | toplevel + pg_stat_statements | extensions | pg_stat_statements | total_exec_time + pg_stat_statements | extensions | pg_stat_statements | total_plan_time + pg_stat_statements | extensions | pg_stat_statements | userid + pg_stat_statements | extensions | pg_stat_statements | wal_bytes + pg_stat_statements | extensions | pg_stat_statements | wal_fpi + pg_stat_statements | extensions | pg_stat_statements | wal_records + pg_stat_statements | extensions | pg_stat_statements_info | dealloc + pg_stat_statements | extensions | pg_stat_statements_info | stats_reset + pg_tle | pgtle | feature_info | feature + pg_tle | pgtle | feature_info | obj_identity + pg_tle | pgtle | feature_info | proname + pg_tle | pgtle | feature_info | schema_name + pgmq | pgmq | a_foo | archived_at + pgmq | pgmq | a_foo | enqueued_at + pgmq | pgmq | a_foo | message + pgmq | pgmq | a_foo | msg_id + pgmq | pgmq | a_foo | read_ct + pgmq | pgmq | a_foo | vt + pgmq | pgmq | meta | created_at + pgmq | pgmq | meta | is_partitioned + pgmq | pgmq | meta | is_unlogged + pgmq | pgmq | meta | queue_name + pgmq | pgmq | q_foo | enqueued_at + pgmq | pgmq | q_foo | message + pgmq | pgmq | q_foo | msg_id + pgmq | pgmq | q_foo | read_ct + pgmq | pgmq | q_foo | vt + pgsodium | pgsodium | decrypted_key | associated_data + pgsodium | pgsodium | decrypted_key | comment + pgsodium | pgsodium | decrypted_key | created + pgsodium | pgsodium | decrypted_key | decrypted_raw_key + pgsodium | pgsodium | decrypted_key | expires + pgsodium | pgsodium | decrypted_key | id + pgsodium | pgsodium | decrypted_key | key_context + pgsodium | pgsodium | decrypted_key | key_id + pgsodium | pgsodium | decrypted_key | key_type + pgsodium | pgsodium | decrypted_key | name + pgsodium | pgsodium | decrypted_key | parent_key + pgsodium | pgsodium | decrypted_key | raw_key + pgsodium | pgsodium | decrypted_key | raw_key_nonce + pgsodium | pgsodium | decrypted_key | status + pgsodium | pgsodium | key | associated_data + pgsodium | pgsodium | key | comment + pgsodium | pgsodium | key | created + pgsodium | pgsodium | key | expires + pgsodium | pgsodium | key | id + pgsodium | pgsodium | key | key_context + pgsodium | pgsodium | key | key_id + pgsodium | pgsodium | key | key_type + pgsodium | pgsodium | key | name + pgsodium | pgsodium | key | parent_key + pgsodium | pgsodium | key | raw_key + pgsodium | pgsodium | key | raw_key_nonce + pgsodium | pgsodium | key | status + pgsodium | pgsodium | key | user_data + pgsodium | pgsodium | mask_columns | associated_columns + pgsodium | pgsodium | mask_columns | attname + pgsodium | pgsodium | mask_columns | attrelid + pgsodium | pgsodium | mask_columns | format_type + pgsodium | pgsodium | mask_columns | key_id + pgsodium | pgsodium | mask_columns | key_id_column + pgsodium | pgsodium | mask_columns | nonce_column + pgsodium | pgsodium | masking_rule | associated_columns + pgsodium | pgsodium | masking_rule | attname + pgsodium | pgsodium | masking_rule | attnum + pgsodium | pgsodium | masking_rule | attrelid + pgsodium | pgsodium | masking_rule | col_description + pgsodium | pgsodium | masking_rule | format_type + pgsodium | pgsodium | masking_rule | key_id + pgsodium | pgsodium | masking_rule | key_id_column + pgsodium | pgsodium | masking_rule | nonce_column + pgsodium | pgsodium | masking_rule | priority + pgsodium | pgsodium | masking_rule | relname + pgsodium | pgsodium | masking_rule | relnamespace + pgsodium | pgsodium | masking_rule | security_invoker + pgsodium | pgsodium | masking_rule | view_name + pgsodium | pgsodium | valid_key | associated_data + pgsodium | pgsodium | valid_key | created + pgsodium | pgsodium | valid_key | expires + pgsodium | pgsodium | valid_key | id + pgsodium | pgsodium | valid_key | key_context + pgsodium | pgsodium | valid_key | key_id + pgsodium | pgsodium | valid_key | key_type + pgsodium | pgsodium | valid_key | name + pgsodium | pgsodium | valid_key | status + pgtap | public | pg_all_foreign_keys | fk_columns + pgtap | public | pg_all_foreign_keys | fk_constraint_name + pgtap | public | pg_all_foreign_keys | fk_schema_name + pgtap | public | pg_all_foreign_keys | fk_table_name + pgtap | public | pg_all_foreign_keys | fk_table_oid + pgtap | public | pg_all_foreign_keys | is_deferrable + pgtap | public | pg_all_foreign_keys | is_deferred + pgtap | public | pg_all_foreign_keys | match_type + pgtap | public | pg_all_foreign_keys | on_delete + pgtap | public | pg_all_foreign_keys | on_update + pgtap | public | pg_all_foreign_keys | pk_columns + pgtap | public | pg_all_foreign_keys | pk_constraint_name + pgtap | public | pg_all_foreign_keys | pk_index_name + pgtap | public | pg_all_foreign_keys | pk_schema_name + pgtap | public | pg_all_foreign_keys | pk_table_name + pgtap | public | pg_all_foreign_keys | pk_table_oid + pgtap | public | tap_funky | args + pgtap | public | tap_funky | is_definer + pgtap | public | tap_funky | is_strict + pgtap | public | tap_funky | is_visible + pgtap | public | tap_funky | kind + pgtap | public | tap_funky | langoid + pgtap | public | tap_funky | name + pgtap | public | tap_funky | oid + pgtap | public | tap_funky | owner + pgtap | public | tap_funky | returns + pgtap | public | tap_funky | returns_set + pgtap | public | tap_funky | schema + pgtap | public | tap_funky | volatility + postgis | public | geography_columns | coord_dimension + postgis | public | geography_columns | f_geography_column + postgis | public | geography_columns | f_table_catalog + postgis | public | geography_columns | f_table_name + postgis | public | geography_columns | f_table_schema + postgis | public | geography_columns | srid + postgis | public | geography_columns | type + postgis | public | geometry_columns | coord_dimension + postgis | public | geometry_columns | f_geometry_column + postgis | public | geometry_columns | f_table_catalog + postgis | public | geometry_columns | f_table_name + postgis | public | geometry_columns | f_table_schema + postgis | public | geometry_columns | srid + postgis | public | geometry_columns | type + postgis | public | spatial_ref_sys | auth_name + postgis | public | spatial_ref_sys | auth_srid + postgis | public | spatial_ref_sys | proj4text + postgis | public | spatial_ref_sys | srid + postgis | public | spatial_ref_sys | srtext + postgis_raster | public | raster_columns | blocksize_x + postgis_raster | public | raster_columns | blocksize_y + postgis_raster | public | raster_columns | extent + postgis_raster | public | raster_columns | nodata_values + postgis_raster | public | raster_columns | num_bands + postgis_raster | public | raster_columns | out_db + postgis_raster | public | raster_columns | pixel_types + postgis_raster | public | raster_columns | r_raster_column + postgis_raster | public | raster_columns | r_table_catalog + postgis_raster | public | raster_columns | r_table_name + postgis_raster | public | raster_columns | r_table_schema + postgis_raster | public | raster_columns | regular_blocking + postgis_raster | public | raster_columns | same_alignment + postgis_raster | public | raster_columns | scale_x + postgis_raster | public | raster_columns | scale_y + postgis_raster | public | raster_columns | spatial_index + postgis_raster | public | raster_columns | srid + postgis_raster | public | raster_overviews | o_raster_column + postgis_raster | public | raster_overviews | o_table_catalog + postgis_raster | public | raster_overviews | o_table_name + postgis_raster | public | raster_overviews | o_table_schema + postgis_raster | public | raster_overviews | overview_factor + postgis_raster | public | raster_overviews | r_raster_column + postgis_raster | public | raster_overviews | r_table_catalog + postgis_raster | public | raster_overviews | r_table_name + postgis_raster | public | raster_overviews | r_table_schema + postgis_topology | topology | layer | child_id + postgis_topology | topology | layer | feature_column + postgis_topology | topology | layer | feature_type + postgis_topology | topology | layer | layer_id + postgis_topology | topology | layer | level + postgis_topology | topology | layer | schema_name + postgis_topology | topology | layer | table_name + postgis_topology | topology | layer | topology_id + postgis_topology | topology | topology | hasz + postgis_topology | topology | topology | id + postgis_topology | topology | topology | name + postgis_topology | topology | topology | precision + postgis_topology | topology | topology | srid + supabase_vault | vault | decrypted_secrets | created_at + supabase_vault | vault | decrypted_secrets | decrypted_secret + supabase_vault | vault | decrypted_secrets | description + supabase_vault | vault | decrypted_secrets | id + supabase_vault | vault | decrypted_secrets | key_id + supabase_vault | vault | decrypted_secrets | name + supabase_vault | vault | decrypted_secrets | nonce + supabase_vault | vault | decrypted_secrets | secret + supabase_vault | vault | decrypted_secrets | updated_at + supabase_vault | vault | secrets | created_at + supabase_vault | vault | secrets | description + supabase_vault | vault | secrets | id + supabase_vault | vault | secrets | key_id + supabase_vault | vault | secrets | name + supabase_vault | vault | secrets | nonce + supabase_vault | vault | secrets | secret + supabase_vault | vault | secrets | updated_at + wrappers | public | wrappers_fdw_stats | bytes_in + wrappers | public | wrappers_fdw_stats | bytes_out + wrappers | public | wrappers_fdw_stats | create_times + wrappers | public | wrappers_fdw_stats | created_at + wrappers | public | wrappers_fdw_stats | fdw_name + wrappers | public | wrappers_fdw_stats | metadata + wrappers | public | wrappers_fdw_stats | rows_in + wrappers | public | wrappers_fdw_stats | rows_out + wrappers | public | wrappers_fdw_stats | updated_at +(387 rows) + diff --git a/nix/tests/expected/z_orioledb-17_pg_stat_monitor.out b/nix/tests/expected/z_orioledb-17_pg_stat_monitor.out new file mode 100644 index 000000000..8b90c12fc --- /dev/null +++ b/nix/tests/expected/z_orioledb-17_pg_stat_monitor.out @@ -0,0 +1,10 @@ +select + * +from + pg_stat_monitor +where + false; + bucket | bucket_start_time | userid | username | dbid | datname | client_ip | pgsm_query_id | queryid | toplevel | top_queryid | query | comments | planid | query_plan | top_query | application_name | relations | cmd_type | cmd_type_text | elevel | sqlcode | message | calls | total_exec_time | min_exec_time | max_exec_time | mean_exec_time | stddev_exec_time | rows | shared_blks_hit | shared_blks_read | shared_blks_dirtied | shared_blks_written | local_blks_hit | local_blks_read | local_blks_dirtied | local_blks_written | temp_blks_read | temp_blks_written | shared_blk_read_time | shared_blk_write_time | local_blk_read_time | local_blk_write_time | temp_blk_read_time | temp_blk_write_time | resp_calls | cpu_user_time | cpu_sys_time | wal_records | wal_fpi | wal_bytes | bucket_done | plans | total_plan_time | min_plan_time | max_plan_time | mean_plan_time | stddev_plan_time | jit_functions | jit_generation_time | jit_inlining_count | jit_inlining_time | jit_optimization_count | jit_optimization_time | jit_emission_count | jit_emission_time | jit_deform_count | jit_deform_time | stats_since | minmax_stats_since +--------+-------------------+--------+----------+------+---------+-----------+---------------+---------+----------+-------------+-------+----------+--------+------------+-----------+------------------+-----------+----------+---------------+--------+---------+---------+-------+-----------------+---------------+---------------+----------------+------------------+------+-----------------+------------------+---------------------+---------------------+----------------+-----------------+--------------------+--------------------+----------------+-------------------+----------------------+-----------------------+---------------------+----------------------+--------------------+---------------------+------------+---------------+--------------+-------------+---------+-----------+-------------+-------+-----------------+---------------+---------------+----------------+------------------+---------------+---------------------+--------------------+-------------------+------------------------+-----------------------+--------------------+-------------------+------------------+-----------------+-------------+-------------------- +(0 rows) + diff --git a/nix/tests/expected/z_orioledb-17_pgvector.out b/nix/tests/expected/z_orioledb-17_pgvector.out new file mode 100644 index 000000000..2c1cb1007 --- /dev/null +++ b/nix/tests/expected/z_orioledb-17_pgvector.out @@ -0,0 +1,59 @@ +/* +This test excludes indexes shipped with pgvector because orioledb doesn't support them yet +*/ +create schema v; +create table v.items( + id serial primary key, + embedding vector(3), + half_embedding halfvec(3), + bit_embedding bit(3), + sparse_embedding sparsevec(3) +); +-- Populate some records +insert into v.items( + embedding, + half_embedding, + bit_embedding, + sparse_embedding +) +values + ('[1,2,3]', '[1,2,3]', '101', '{1:4}/3'), + ('[2,3,4]', '[2,3,4]', '010', '{1:7,3:0}/3'); +-- Test op types +select + * +from + v.items +order by + embedding <-> '[2,3,5]', + embedding <=> '[2,3,5]', + embedding <+> '[2,3,5]', + embedding <#> '[2,3,5]', + half_embedding <-> '[2,3,5]', + half_embedding <=> '[2,3,5]', + half_embedding <+> '[2,3,5]', + half_embedding <#> '[2,3,5]', + sparse_embedding <-> '{2:4,3:1}/3', + sparse_embedding <=> '{2:4,3:1}/3', + sparse_embedding <+> '{2:4,3:1}/3', + sparse_embedding <#> '{2:4,3:1}/3', + bit_embedding <~> '011'; + id | embedding | half_embedding | bit_embedding | sparse_embedding +----+-----------+----------------+---------------+------------------ + 2 | [2,3,4] | [2,3,4] | 010 | {1:7}/3 + 1 | [1,2,3] | [1,2,3] | 101 | {1:4}/3 +(2 rows) + +select + avg(embedding), + avg(half_embedding) +from + v.items; + avg | avg +---------------+--------------- + [1.5,2.5,3.5] | [1.5,2.5,3.5] +(1 row) + +-- Cleanup +drop schema v cascade; +NOTICE: drop cascades to table v.items diff --git a/nix/tests/migrations/data.sql b/nix/tests/migrations/data.sql new file mode 100644 index 000000000..36396e6ad --- /dev/null +++ b/nix/tests/migrations/data.sql @@ -0,0 +1,21 @@ +create table account( + id int primary key, + is_verified bool, + name text, + phone text +); + +insert into public.account(id, is_verified, name, phone) +values + (1, true, 'foo', '1111111111'), + (2, true, 'bar', null), + (3, false, 'baz', '33333333333'); + +select id as test_new_key_id from pgsodium.create_key(name:='test_new_key') \gset + +select vault.create_secret ( + 's3kr3t_k3y', 'a_name', 'this is the foo secret key') test_secret_id \gset + +select vault.create_secret ( + 's3kr3t_k3y_2', 'another_name', 'this is another foo key', + (select id from pgsodium.key where name = 'test_new_key')) test_secret_id_2 \gset diff --git a/nix/tests/migrations/pgmq.sql b/nix/tests/migrations/pgmq.sql new file mode 100644 index 000000000..d0121a269 --- /dev/null +++ b/nix/tests/migrations/pgmq.sql @@ -0,0 +1,12 @@ +select + pgmq.create('Foo'); + +select + * +from + pgmq.send( + queue_name:='Foo', + msg:='{"foo": "bar1"}' + ); + + diff --git a/nix/tests/postgresql.conf.in b/nix/tests/postgresql.conf.in new file mode 100644 index 000000000..e4f844d07 --- /dev/null +++ b/nix/tests/postgresql.conf.in @@ -0,0 +1,801 @@ +# ----------------------------- +# PostgreSQL configuration file + +# ----------------------------- +# +# This file consists of lines of the form: +# +# name = value +# +# (The "=" is optional.) Whitespace may be used. Comments are introduced with +# "#" anywhere on a line. The complete list of parameter names and allowed +# values can be found in the PostgreSQL documentation. +# +# The commented-out settings shown in this file represent the default values. +# Re-commenting a setting is NOT sufficient to revert it to the default value; +# you need to reload the server. +# +# This file is read on server startup and when the server receives a SIGHUP +# signal. If you edit the file on a running system, you have to SIGHUP the +# server for the changes to take effect, run "pg_ctl reload", or execute +# "SELECT pg_reload_conf()". Some parameters, which are marked below, +# require a server shutdown and restart to take effect. +# +# Any parameter can also be given as a command-line option to the server, e.g., +# "postgres -c log_connections=on". Some parameters can be changed at run time +# with the "SET" SQL command. +# +# Memory units: B = bytes Time units: us = microseconds +# kB = kilobytes ms = milliseconds +# MB = megabytes s = seconds +# GB = gigabytes min = minutes +# TB = terabytes h = hours +# d = days + + +#------------------------------------------------------------------------------ +# FILE LOCATIONS +#------------------------------------------------------------------------------ + +# The default values of these variables are driven from the -D command-line +# option or PGDATA environment variable, represented here as ConfigDir. + +#data_directory = 'ConfigDir' # use data in another directory + # (change requires restart) +#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file + # (change requires restart) +#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file + # (change requires restart) + +# If external_pid_file is not explicitly set, no extra PID file is written. +#external_pid_file = '' # write an extra PID file + # (change requires restart) + + +#------------------------------------------------------------------------------ +# CONNECTIONS AND AUTHENTICATION +#------------------------------------------------------------------------------ + +# - Connection Settings - + +listen_addresses = '*' # what IP address(es) to listen on; +#port = @PGSQL_DEFAULT_PORT@ # (change requires restart) +max_connections = 100 # (change requires restart) +#superuser_reserved_connections = 3 # (change requires restart) +unix_socket_directories = '/tmp' # comma-separated list of directories + # (change requires restart) +#unix_socket_group = '' # (change requires restart) +#unix_socket_permissions = 0777 # begin with 0 to use octal notation + # (change requires restart) +#bonjour = off # advertise server via Bonjour + # (change requires restart) +#bonjour_name = '' # defaults to the computer name + # (change requires restart) + +# - TCP settings - +# see "man tcp" for details + +#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; + # 0 selects the system default +#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; + # 0 selects the system default +#tcp_keepalives_count = 0 # TCP_KEEPCNT; + # 0 selects the system default +#tcp_user_timeout = 0 # TCP_USER_TIMEOUT, in milliseconds; + # 0 selects the system default + +#client_connection_check_interval = 0 # time between checks for client + # disconnection while running queries; + # 0 for never + +# - Authentication - + +#authentication_timeout = 1min # 1s-600s +#password_encryption = scram-sha-256 # scram-sha-256 or md5 +#db_user_namespace = off + +# GSSAPI using Kerberos +#krb_server_keyfile = 'FILE:${sysconfdir}/krb5.keytab' +#krb_caseins_users = off + +# - SSL - + +#ssl = off +#ssl_ca_file = '' +#ssl_cert_file = 'server.crt' +#ssl_crl_file = '' +#ssl_crl_dir = '' +#ssl_key_file = 'server.key' +#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers +#ssl_prefer_server_ciphers = on +#ssl_ecdh_curve = 'prime256v1' +#ssl_min_protocol_version = 'TLSv1.2' +#ssl_max_protocol_version = '' +#ssl_dh_params_file = '' +#ssl_passphrase_command = '' +#ssl_passphrase_command_supports_reload = off + + +#------------------------------------------------------------------------------ +# RESOURCE USAGE (except WAL) +#------------------------------------------------------------------------------ + +# - Memory - + +shared_buffers = 128MB # min 128kB + # (change requires restart) +#huge_pages = try # on, off, or try + # (change requires restart) +#huge_page_size = 0 # zero for system default + # (change requires restart) +#temp_buffers = 8MB # min 800kB +#max_prepared_transactions = 0 # zero disables the feature + # (change requires restart) +# Caution: it is not advisable to set max_prepared_transactions nonzero unless +# you actively intend to use prepared transactions. +#work_mem = 4MB # min 64kB +#hash_mem_multiplier = 1.0 # 1-1000.0 multiplier on hash table work_mem +#maintenance_work_mem = 64MB # min 1MB +#autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem +#logical_decoding_work_mem = 64MB # min 64kB +#max_stack_depth = 2MB # min 100kB +#shared_memory_type = mmap # the default is the first option + # supported by the operating system: + # mmap + # sysv + # windows + # (change requires restart) +dynamic_shared_memory_type = posix # the default is the first option + # supported by the operating system: + # posix + # sysv + # windows + # mmap + # (change requires restart) +#min_dynamic_shared_memory = 0MB # (change requires restart) + +# - Disk - + +#temp_file_limit = -1 # limits per-process temp file space + # in kilobytes, or -1 for no limit + +# - Kernel Resources - + +#max_files_per_process = 1000 # min 64 + # (change requires restart) + +# - Cost-Based Vacuum Delay - + +#vacuum_cost_delay = 0 # 0-100 milliseconds (0 disables) +#vacuum_cost_page_hit = 1 # 0-10000 credits +#vacuum_cost_page_miss = 2 # 0-10000 credits +#vacuum_cost_page_dirty = 20 # 0-10000 credits +#vacuum_cost_limit = 200 # 1-10000 credits + +# - Background Writer - + +#bgwriter_delay = 200ms # 10-10000ms between rounds +#bgwriter_lru_maxpages = 100 # max buffers written/round, 0 disables +#bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round +#bgwriter_flush_after = 512kB # measured in pages, 0 disables + +# - Asynchronous Behavior - + +#backend_flush_after = 0 # measured in pages, 0 disables +#effective_io_concurrency = 1 # 1-1000; 0 disables prefetching +#maintenance_io_concurrency = 10 # 1-1000; 0 disables prefetching +#max_worker_processes = 8 # (change requires restart) +#max_parallel_workers_per_gather = 2 # taken from max_parallel_workers +#max_parallel_maintenance_workers = 2 # taken from max_parallel_workers +#max_parallel_workers = 8 # maximum number of max_worker_processes that + # can be used in parallel operations +#parallel_leader_participation = on +#old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate + # (change requires restart) + + +#------------------------------------------------------------------------------ +# WRITE-AHEAD LOG +#------------------------------------------------------------------------------ + +# - Settings - + +wal_level = logical # minimal, replica, or logical + # (change requires restart) +#fsync = on # flush data to disk for crash safety + # (turning this off can cause + # unrecoverable data corruption) +#synchronous_commit = on # synchronization level; + # off, local, remote_write, remote_apply, or on +#wal_sync_method = fsync # the default is the first option + # supported by the operating system: + # open_datasync + # fdatasync (default on Linux and FreeBSD) + # fsync + # fsync_writethrough + # open_sync +#full_page_writes = on # recover from partial page writes +wal_log_hints = on # also do full page writes of non-critical updates + # (change requires restart) +#wal_compression = off # enable compression of full-page writes +#wal_init_zero = on # zero-fill new WAL files +#wal_recycle = on # recycle WAL files +#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers + # (change requires restart) +#wal_writer_delay = 200ms # 1-10000 milliseconds +#wal_writer_flush_after = 1MB # measured in pages, 0 disables +#wal_skip_threshold = 2MB + +#commit_delay = 0 # range 0-100000, in microseconds +#commit_siblings = 5 # range 1-1000 + +# - Checkpoints - + +#checkpoint_timeout = 5min # range 30s-1d +#checkpoint_completion_target = 0.9 # checkpoint target duration, 0.0 - 1.0 +#checkpoint_flush_after = 256kB # measured in pages, 0 disables +#checkpoint_warning = 30s # 0 disables +max_wal_size = 1GB +min_wal_size = 80MB + +# - Archiving - + +#archive_mode = off # enables archiving; off, on, or always + # (change requires restart) +#archive_command = '' # command to use to archive a logfile segment + # placeholders: %p = path of file to archive + # %f = file name only + # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' +#archive_timeout = 0 # force a logfile segment switch after this + # number of seconds; 0 disables + +# - Archive Recovery - + +# These are only used in recovery mode. + +#restore_command = '' # command to use to restore an archived logfile segment + # placeholders: %p = path of file to restore + # %f = file name only + # e.g. 'cp /mnt/server/archivedir/%f %p' +#archive_cleanup_command = '' # command to execute at every restartpoint +#recovery_end_command = '' # command to execute at completion of recovery + +# - Recovery Target - + +# Set these only when performing a targeted recovery. + +#recovery_target = '' # 'immediate' to end recovery as soon as a + # consistent state is reached + # (change requires restart) +#recovery_target_name = '' # the named restore point to which recovery will proceed + # (change requires restart) +#recovery_target_time = '' # the time stamp up to which recovery will proceed + # (change requires restart) +#recovery_target_xid = '' # the transaction ID up to which recovery will proceed + # (change requires restart) +#recovery_target_lsn = '' # the WAL LSN up to which recovery will proceed + # (change requires restart) +#recovery_target_inclusive = on # Specifies whether to stop: + # just after the specified recovery target (on) + # just before the recovery target (off) + # (change requires restart) +#recovery_target_timeline = 'latest' # 'current', 'latest', or timeline ID + # (change requires restart) +#recovery_target_action = 'pause' # 'pause', 'promote', 'shutdown' + # (change requires restart) + + +#------------------------------------------------------------------------------ +# REPLICATION +#------------------------------------------------------------------------------ + +# - Sending Servers - + +# Set these on the primary and on any standby that will send replication data. + +#max_wal_senders = 10 # max number of walsender processes + # (change requires restart) +#max_replication_slots = 10 # max number of replication slots + # (change requires restart) +#wal_keep_size = 0 # in megabytes; 0 disables +#max_slot_wal_keep_size = -1 # in megabytes; -1 disables +#wal_sender_timeout = 60s # in milliseconds; 0 disables +#track_commit_timestamp = off # collect timestamp of transaction commit + # (change requires restart) + +# - Primary Server - + +# These settings are ignored on a standby server. + +#synchronous_standby_names = '' # standby servers that provide sync rep + # method to choose sync standbys, number of sync standbys, + # and comma-separated list of application_name + # from standby(s); '*' = all +#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed + +# - Standby Servers - + +# These settings are ignored on a primary server. + +#primary_conninfo = '' # connection string to sending server +#primary_slot_name = '' # replication slot on sending server +#promote_trigger_file = '' # file name whose presence ends recovery +#hot_standby = on # "off" disallows queries during recovery + # (change requires restart) +#max_standby_archive_delay = 30s # max delay before canceling queries + # when reading WAL from archive; + # -1 allows indefinite delay +#max_standby_streaming_delay = 30s # max delay before canceling queries + # when reading streaming WAL; + # -1 allows indefinite delay +#wal_receiver_create_temp_slot = off # create temp slot if primary_slot_name + # is not set +#wal_receiver_status_interval = 10s # send replies at least this often + # 0 disables +#hot_standby_feedback = off # send info from standby to prevent + # query conflicts +#wal_receiver_timeout = 60s # time that receiver waits for + # communication from primary + # in milliseconds; 0 disables +#wal_retrieve_retry_interval = 5s # time to wait before retrying to + # retrieve WAL after a failed attempt +#recovery_min_apply_delay = 0 # minimum delay for applying changes during recovery + +# - Subscribers - + +# These settings are ignored on a publisher. + +#max_logical_replication_workers = 4 # taken from max_worker_processes + # (change requires restart) +#max_sync_workers_per_subscription = 2 # taken from max_logical_replication_workers + + +#------------------------------------------------------------------------------ +# QUERY TUNING +#------------------------------------------------------------------------------ + +# - Planner Method Configuration - + +#enable_async_append = on +#enable_bitmapscan = on +#enable_gathermerge = on +#enable_hashagg = on +#enable_hashjoin = on +#enable_incremental_sort = on +#enable_indexscan = on +#enable_indexonlyscan = on +#enable_material = on +#enable_memoize = on +#enable_mergejoin = on +#enable_nestloop = on +#enable_parallel_append = on +#enable_parallel_hash = on +#enable_partition_pruning = on +#enable_partitionwise_join = off +#enable_partitionwise_aggregate = off +#enable_seqscan = on +#enable_sort = on +#enable_tidscan = on + +# - Planner Cost Constants - + +#seq_page_cost = 1.0 # measured on an arbitrary scale +#random_page_cost = 4.0 # same scale as above +#cpu_tuple_cost = 0.01 # same scale as above +#cpu_index_tuple_cost = 0.005 # same scale as above +#cpu_operator_cost = 0.0025 # same scale as above +#parallel_setup_cost = 1000.0 # same scale as above +#parallel_tuple_cost = 0.1 # same scale as above +#min_parallel_table_scan_size = 8MB +#min_parallel_index_scan_size = 512kB +#effective_cache_size = 4GB + +#jit_above_cost = 100000 # perform JIT compilation if available + # and query more expensive than this; + # -1 disables +#jit_inline_above_cost = 500000 # inline small functions if query is + # more expensive than this; -1 disables +#jit_optimize_above_cost = 500000 # use expensive JIT optimizations if + # query is more expensive than this; + # -1 disables + +# - Genetic Query Optimizer - + +#geqo = on +#geqo_threshold = 12 +#geqo_effort = 5 # range 1-10 +#geqo_pool_size = 0 # selects default based on effort +#geqo_generations = 0 # selects default based on effort +#geqo_selection_bias = 2.0 # range 1.5-2.0 +#geqo_seed = 0.0 # range 0.0-1.0 + +# - Other Planner Options - + +#default_statistics_target = 100 # range 1-10000 +#constraint_exclusion = partition # on, off, or partition +#cursor_tuple_fraction = 0.1 # range 0.0-1.0 +#from_collapse_limit = 8 +#jit = on # allow JIT compilation +#join_collapse_limit = 8 # 1 disables collapsing of explicit + # JOIN clauses +#plan_cache_mode = auto # auto, force_generic_plan or + # force_custom_plan + + +#------------------------------------------------------------------------------ +# REPORTING AND LOGGING +#------------------------------------------------------------------------------ + +# - Where to Log - + +#log_destination = 'stderr' # Valid values are combinations of + # stderr, csvlog, syslog, and eventlog, + # depending on platform. csvlog + # requires logging_collector to be on. + +# This is used when logging to stderr: +#logging_collector = off # Enable capturing of stderr and csvlog + # into log files. Required to be on for + # csvlogs. + # (change requires restart) + +# These are only used if logging_collector is on: +#log_directory = 'log' # directory where log files are written, + # can be absolute or relative to PGDATA +#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, + # can include strftime() escapes +#log_file_mode = 0600 # creation mode for log files, + # begin with 0 to use octal notation +#log_rotation_age = 1d # Automatic rotation of logfiles will + # happen after that time. 0 disables. +#log_rotation_size = 10MB # Automatic rotation of logfiles will + # happen after that much log output. + # 0 disables. +#log_truncate_on_rotation = off # If on, an existing log file with the + # same name as the new log file will be + # truncated rather than appended to. + # But such truncation only occurs on + # time-driven rotation, not on restarts + # or size-driven rotation. Default is + # off, meaning append to existing files + # in all cases. + +# These are relevant when logging to syslog: +#syslog_facility = 'LOCAL0' +#syslog_ident = 'postgres' +#syslog_sequence_numbers = on +#syslog_split_messages = on + +# This is only relevant when logging to eventlog (Windows): +# (change requires restart) +#event_source = 'PostgreSQL' + +# - When to Log - + +#log_min_messages = warning # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # info + # notice + # warning + # error + # log + # fatal + # panic + +#log_min_error_statement = error # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # info + # notice + # warning + # error + # log + # fatal + # panic (effectively off) + +#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements + # and their durations, > 0 logs only + # statements running at least this number + # of milliseconds + +#log_min_duration_sample = -1 # -1 is disabled, 0 logs a sample of statements + # and their durations, > 0 logs only a sample of + # statements running at least this number + # of milliseconds; + # sample fraction is determined by log_statement_sample_rate + +#log_statement_sample_rate = 1.0 # fraction of logged statements exceeding + # log_min_duration_sample to be logged; + # 1.0 logs all such statements, 0.0 never logs + + +#log_transaction_sample_rate = 0.0 # fraction of transactions whose statements + # are logged regardless of their duration; 1.0 logs all + # statements from all transactions, 0.0 never logs + +# - What to Log - + +#debug_print_parse = off +#debug_print_rewritten = off +#debug_print_plan = off +#debug_pretty_print = on +#log_autovacuum_min_duration = -1 # log autovacuum activity; + # -1 disables, 0 logs all actions and + # their durations, > 0 logs only + # actions running at least this number + # of milliseconds. +#log_checkpoints = off +#log_connections = off +#log_disconnections = off +#log_duration = off +#log_error_verbosity = default # terse, default, or verbose messages +#log_hostname = off +#log_line_prefix = '%m [%p] ' # special values: + # %a = application name + # %u = user name + # %d = database name + # %r = remote host and port + # %h = remote host + # %b = backend type + # %p = process ID + # %P = process ID of parallel group leader + # %t = timestamp without milliseconds + # %m = timestamp with milliseconds + # %n = timestamp with milliseconds (as a Unix epoch) + # %Q = query ID (0 if none or not computed) + # %i = command tag + # %e = SQL state + # %c = session ID + # %l = session line number + # %s = session start timestamp + # %v = virtual transaction ID + # %x = transaction ID (0 if none) + # %q = stop here in non-session + # processes + # %% = '%' + # e.g. '<%u%%%d> ' +#log_lock_waits = off # log lock waits >= deadlock_timeout +#log_recovery_conflict_waits = off # log standby recovery conflict waits + # >= deadlock_timeout +#log_parameter_max_length = -1 # when logging statements, limit logged + # bind-parameter values to N bytes; + # -1 means print in full, 0 disables +#log_parameter_max_length_on_error = 0 # when logging an error, limit logged + # bind-parameter values to N bytes; + # -1 means print in full, 0 disables +#log_statement = 'none' # none, ddl, mod, all +#log_replication_commands = off +#log_temp_files = -1 # log temporary files equal or larger + # than the specified size in kilobytes; + # -1 disables, 0 logs all temp files +log_timezone = 'America/Chicago' + + +#------------------------------------------------------------------------------ +# PROCESS TITLE +#------------------------------------------------------------------------------ + +#cluster_name = '' # added to process titles if nonempty + # (change requires restart) +#update_process_title = on + + +#------------------------------------------------------------------------------ +# STATISTICS +#------------------------------------------------------------------------------ + +# - Query and Index Statistics Collector - + +#track_activities = on +#track_activity_query_size = 1024 # (change requires restart) +#track_counts = on +#track_io_timing = off +#track_wal_io_timing = off +#track_functions = none # none, pl, all +#stats_temp_directory = 'pg_stat_tmp' + + +# - Monitoring - + +#compute_query_id = auto +#log_statement_stats = off +#log_parser_stats = off +#log_planner_stats = off +#log_executor_stats = off + + +#------------------------------------------------------------------------------ +# AUTOVACUUM +#------------------------------------------------------------------------------ + +#autovacuum = on # Enable autovacuum subprocess? 'on' + # requires track_counts to also be on. +#autovacuum_max_workers = 3 # max number of autovacuum subprocesses + # (change requires restart) +#autovacuum_naptime = 1min # time between autovacuum runs +#autovacuum_vacuum_threshold = 50 # min number of row updates before + # vacuum +#autovacuum_vacuum_insert_threshold = 1000 # min number of row inserts + # before vacuum; -1 disables insert + # vacuums +#autovacuum_analyze_threshold = 50 # min number of row updates before + # analyze +#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum +#autovacuum_vacuum_insert_scale_factor = 0.2 # fraction of inserts over table + # size before insert vacuum +#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze +#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum + # (change requires restart) +#autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age + # before forced vacuum + # (change requires restart) +#autovacuum_vacuum_cost_delay = 2ms # default vacuum cost delay for + # autovacuum, in milliseconds; + # -1 means use vacuum_cost_delay +#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for + # autovacuum, -1 means use + # vacuum_cost_limit + + +#------------------------------------------------------------------------------ +# CLIENT CONNECTION DEFAULTS +#------------------------------------------------------------------------------ + +# - Statement Behavior - + +#client_min_messages = notice # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # log + # notice + # warning + # error +#search_path = '"$user", public' # schema names +#row_security = on +#default_table_access_method = 'heap' +#default_tablespace = '' # a tablespace name, '' uses the default +#default_toast_compression = 'pglz' # 'pglz' or 'lz4' +#temp_tablespaces = '' # a list of tablespace names, '' uses + # only default tablespace +#check_function_bodies = on +#default_transaction_isolation = 'read committed' +#default_transaction_read_only = off +#default_transaction_deferrable = off +#session_replication_role = 'origin' +#statement_timeout = 0 # in milliseconds, 0 is disabled +#lock_timeout = 0 # in milliseconds, 0 is disabled +#idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled +#idle_session_timeout = 0 # in milliseconds, 0 is disabled +#vacuum_freeze_table_age = 150000000 +#vacuum_freeze_min_age = 50000000 +#vacuum_failsafe_age = 1600000000 +#vacuum_multixact_freeze_table_age = 150000000 +#vacuum_multixact_freeze_min_age = 5000000 +#vacuum_multixact_failsafe_age = 1600000000 +#bytea_output = 'hex' # hex, escape +#xmlbinary = 'base64' +#xmloption = 'content' +#gin_pending_list_limit = 4MB + +# - Locale and Formatting - + +datestyle = 'iso, mdy' +#intervalstyle = 'postgres' +timezone = 'America/Chicago' +#timezone_abbreviations = 'Default' # Select the set of available time zone + # abbreviations. Currently, there are + # Default + # Australia (historical usage) + # India + # You can create your own file in + # share/timezonesets/. +#extra_float_digits = 1 # min -15, max 3; any value >0 actually + # selects precise output mode +#client_encoding = sql_ascii # actually, defaults to database + # encoding + +# These settings are initialized by initdb, but they can be changed. +lc_messages = 'C' # locale for system error message + # strings +lc_monetary = 'C' # locale for monetary formatting +lc_numeric = 'C' # locale for number formatting +lc_time = 'C' # locale for time formatting + +# default configuration for text search +default_text_search_config = 'pg_catalog.english' + +# - Shared Library Preloading - + +#local_preload_libraries = '' +#session_preload_libraries = '' +shared_preload_libraries = 'pg_stat_statements, pgaudit, plpgsql, plpgsql_check, pg_cron, pg_net, pgsodium, timescaledb, auto_explain, pg_tle, plan_filter, supabase_vault' # (change requires restart) +jit_provider = 'llvmjit' # JIT library to use + + +# - Other Defaults - + +#dynamic_library_path = '$libdir' +#gin_fuzzy_search_limit = 0 + + +#------------------------------------------------------------------------------ +# LOCK MANAGEMENT +#------------------------------------------------------------------------------ + +#deadlock_timeout = 1s +#max_locks_per_transaction = 64 # min 10 + # (change requires restart) +#max_pred_locks_per_transaction = 64 # min 10 + # (change requires restart) +#max_pred_locks_per_relation = -2 # negative values mean + # (max_pred_locks_per_transaction + # / -max_pred_locks_per_relation) - 1 +#max_pred_locks_per_page = 2 # min 0 + + +#------------------------------------------------------------------------------ +# VERSION AND PLATFORM COMPATIBILITY +#------------------------------------------------------------------------------ + +# - Previous PostgreSQL Versions - + +#array_nulls = on +#backslash_quote = safe_encoding # on, off, or safe_encoding +#escape_string_warning = on +#lo_compat_privileges = off +#quote_all_identifiers = off +#standard_conforming_strings = on +#synchronize_seqscans = on + +# - Other Platforms and Clients - + +#transform_null_equals = off + + +#------------------------------------------------------------------------------ +# ERROR HANDLING +#------------------------------------------------------------------------------ + +#exit_on_error = off # terminate session on any error? +#restart_after_crash = on # reinitialize after backend crash? +#data_sync_retry = off # retry or panic on failure to fsync + # data? + # (change requires restart) +#recovery_init_sync_method = fsync # fsync, syncfs (Linux 5.8+) + + +#------------------------------------------------------------------------------ +# CONFIG FILE INCLUDES +#------------------------------------------------------------------------------ + +# These options allow settings to be loaded from files other than the +# default postgresql.conf. Note that these are directives, not variable +# assignments, so they can usefully be given more than once. + +#include_dir = '...' # include files ending in '.conf' from + # a directory, e.g., 'conf.d' +#include_if_exists = '...' # include file only if it exists +#include = '...' # include file + + +#------------------------------------------------------------------------------ +# CUSTOMIZED OPTIONS +#------------------------------------------------------------------------------ + +# Add settings for extensions here + +pgsodium.getkey_script = '@PGSODIUM_GETKEY_SCRIPT@' +vault.getkey_script = '@PGSODIUM_GETKEY_SCRIPT@' + +auto_explain.log_min_duration = 10s +cron.database_name = 'postgres' diff --git a/nix/tests/prime.sql b/nix/tests/prime.sql new file mode 100644 index 000000000..84545145e --- /dev/null +++ b/nix/tests/prime.sql @@ -0,0 +1,95 @@ +-- disable notice messages becuase they differ between 15 and 17 +set client_min_messages = warning; +-- CREATE ROLE anon; +-- CREATE ROLE authenticated; +-- CREATE ROLE service_role; +create extension if not exists address_standardizer; +create extension if not exists address_standardizer_data_us; +create extension if not exists amcheck; +create extension if not exists autoinc; +create extension if not exists bloom; +create extension if not exists btree_gin; +create extension if not exists btree_gist; +create extension if not exists citext; +create extension if not exists cube; +create extension if not exists dblink; +create extension if not exists dict_int; +create extension if not exists dict_xsyn; +create extension if not exists earthdistance; +create extension if not exists file_fdw; +create extension if not exists fuzzystrmatch; +create extension if not exists http; +create extension if not exists hstore; +create extension if not exists hypopg; +create extension if not exists index_advisor; +create extension if not exists insert_username; +create extension if not exists intagg; +create extension if not exists intarray; +create extension if not exists isn; +create extension if not exists lo; +create extension if not exists ltree; +create extension if not exists moddatetime; +create extension if not exists pageinspect; +create extension if not exists pg_buffercache; + +/* +TODO: Does not enable locally mode +requires a change to postgresql.conf to set +cron.database_name = 'testing' +*/ +-- create extension if not exists pg_cron; + +create extension if not exists pg_net; +create extension if not exists pg_graphql; +create extension if not exists pg_freespacemap; +create extension if not exists pg_hashids; +create extension if not exists pg_prewarm; +create extension if not exists pgmq; +create extension if not exists pg_jsonschema; +create extension if not exists pg_repack; +create extension if not exists pg_stat_monitor; +create extension if not exists pg_stat_statements; +create extension if not exists pg_surgery; +create extension if not exists pg_tle; +create extension if not exists pg_trgm; +create extension if not exists pg_visibility; +create extension if not exists pg_walinspect; +create extension if not exists pgaudit; +create extension if not exists pgcrypto; +create extension if not exists pgtap; +do $$ +begin + if exists (select 1 from pg_available_extensions where name = 'pgjwt') then + if not exists (select 1 from pg_extension where extname = 'pgjwt') then + if current_setting('server_version_num')::int / 10000 = 15 then + create extension if not exists pgjwt; + end if; + end if; + end if; +end $$; +create extension if not exists pgroonga; +create extension if not exists pgroonga_database; +create extension if not exists pgsodium; +create extension if not exists pgrowlocks; +create extension if not exists pgstattuple; +create extension if not exists plpgsql_check; +create extension if not exists postgis; +create extension if not exists postgis_raster; +create extension if not exists postgis_sfcgal; +create extension if not exists postgis_topology; +create extension if not exists pgrouting; -- requires postgis +create extension if not exists postgres_fdw; +create extension if not exists rum; +create extension if not exists refint; +create extension if not exists seg; +create extension if not exists sslinfo; +create extension if not exists supabase_vault; +create extension if not exists tablefunc; +create extension if not exists tcn; +create extension if not exists tsm_system_rows; +-- create extension if not exists tsm_system_time; not supported in apache license +create extension if not exists unaccent; +create extension if not exists "uuid-ossp"; +create extension if not exists vector; +create extension if not exists wrappers; +create extension if not exists xml2; diff --git a/nix/tests/smoke/0000-hello-world.sql b/nix/tests/smoke/0000-hello-world.sql new file mode 100644 index 000000000..d6f002dec --- /dev/null +++ b/nix/tests/smoke/0000-hello-world.sql @@ -0,0 +1,10 @@ +-- Start transaction and plan the tests. +BEGIN; +SELECT plan(1); + +-- Run the tests. +SELECT pass( 'My test passed, w00t!' ); + +-- Finish the tests and clean up. +SELECT * FROM finish(); +ROLLBACK; diff --git a/nix/tests/smoke/0001-pg_graphql.sql b/nix/tests/smoke/0001-pg_graphql.sql new file mode 100644 index 000000000..80e3cb208 --- /dev/null +++ b/nix/tests/smoke/0001-pg_graphql.sql @@ -0,0 +1,59 @@ +-- Start transaction and plan the tests. +begin; + select plan(1); + + create extension if not exists pg_graphql; + + create table account( + id int primary key, + is_verified bool, + name text, + phone text + ); + + insert into public.account(id, is_verified, name, phone) + values + (1, true, 'foo', '1111111111'), + (2, true, 'bar', null), + (3, false, 'baz', '33333333333'); + + select is( + graphql.resolve($$ + { + accountCollection { + edges { + node { + id + } + } + } + } + $$), + '{ + "data": { + "accountCollection": { + "edges": [ + { + "node": { + "id": 1 + } + }, + { + "node": { + "id": 2 + } + }, + { + "node": { + "id": 3 + } + } + ] + } + } + }'::jsonb + ); + + + select * from finish(); +rollback; diff --git a/nix/tests/smoke/0002-supautils.sql b/nix/tests/smoke/0002-supautils.sql new file mode 100644 index 000000000..7a2160639 --- /dev/null +++ b/nix/tests/smoke/0002-supautils.sql @@ -0,0 +1,17 @@ +BEGIN; +SELECT plan(2); + +-- the setting doesn't exist when supautils is not loaded +SELECT throws_ok($$ + select current_setting('supautils.privileged_extensions', false) +$$); + +LOAD 'supautils'; + +-- now it does +SELECT ok( + current_setting('supautils.privileged_extensions', false) = '' +); + +SELECT * FROM finish(); +ROLLBACK; diff --git a/nix/tests/smoke/0003-pgsodium-vault.sql b/nix/tests/smoke/0003-pgsodium-vault.sql new file mode 100644 index 000000000..1c9cedf91 --- /dev/null +++ b/nix/tests/smoke/0003-pgsodium-vault.sql @@ -0,0 +1,40 @@ +BEGIN; + +select plan(3); + +select id as test_new_key_id from pgsodium.create_key(name:='test_new_key') \gset + +select vault.create_secret ( + 's3kr3t_k3y', 'a_name', 'this is the foo secret key') test_secret_id \gset + +select vault.create_secret ( + 's3kr3t_k3y_2', 'another_name', 'this is another foo key', + (select id from pgsodium.key where name = 'test_new_key')) test_secret_id_2 \gset + +SELECT results_eq( + $$ + SELECT decrypted_secret = 's3kr3t_k3y', description = 'this is the foo secret key' + FROM vault.decrypted_secrets WHERE name = 'a_name'; + $$, + $$VALUES (true, true)$$, + 'can select from masking view with custom key'); + +SELECT results_eq( + $$ + SELECT decrypted_secret = 's3kr3t_k3y_2', description = 'this is another foo key' + FROM vault.decrypted_secrets WHERE key_id = (select id from pgsodium.key where name = 'test_new_key'); + $$, + $$VALUES (true, true)$$, + 'can select from masking view'); + +SELECT lives_ok( + format($test$ + select vault.update_secret( + %L::uuid, new_name:='a_new_name', + new_secret:='new_s3kr3t_k3y', new_description:='this is the bar key') + $test$, :'test_secret_id'), + 'can update name, secret and description' + ); + +SELECT * FROM finish(); +ROLLBACK; diff --git a/nix/tests/smoke/0004-index_advisor.sql b/nix/tests/smoke/0004-index_advisor.sql new file mode 100644 index 000000000..53170f6a3 --- /dev/null +++ b/nix/tests/smoke/0004-index_advisor.sql @@ -0,0 +1,19 @@ +-- Start transaction and plan the tests. +begin; + select plan(1); + + create extension if not exists index_advisor; + + create table account( + id int primary key, + is_verified bool + ); + + select is( + (select count(1) from index_advisor('select id from public.account where is_verified;'))::int, + 1, + 'index_advisor returns 1 row' + ); + + select * from finish(); +rollback; diff --git a/nix/tests/smoke/0005-test_pgroonga_mecab.sql b/nix/tests/smoke/0005-test_pgroonga_mecab.sql new file mode 100644 index 000000000..7341d5f6f --- /dev/null +++ b/nix/tests/smoke/0005-test_pgroonga_mecab.sql @@ -0,0 +1,36 @@ +-- File: 0005-test_pgroonga_revised.sql + +begin; + -- Plan for 3 tests: extension, table, and index + select plan(3); + + -- Create the PGroonga extension + create extension if not exists pgroonga; + + -- -- Test 1: Check if PGroonga extension exists + select has_extension('pgroonga', 'The pgroonga extension should exist.'); + + -- Create the table + create table notes( + id integer primary key, + content text + ); + + -- Test 2: Check if the table was created + SELECT has_table('public', 'notes', 'The notes table should exist.'); + -- Create the PGroonga index + CREATE INDEX pgroonga_content_index + ON notes + USING pgroonga (content) + WITH (tokenizer='TokenMecab'); + + -- -- Test 3: Check if the index was created + SELECT has_index('public', 'notes', 'pgroonga_content_index', 'The pgroonga_content_index should exist.'); + + -- -- Cleanup (this won't affect the test results as they've already been checked) + DROP INDEX IF EXISTS pgroonga_content_index; + DROP TABLE IF EXISTS notes; + + -- Finish the test plan + select * from finish(); +rollback; \ No newline at end of file diff --git a/nix/tests/sql/auth.sql b/nix/tests/sql/auth.sql new file mode 100644 index 000000000..d0b27e480 --- /dev/null +++ b/nix/tests/sql/auth.sql @@ -0,0 +1,97 @@ +-- auth schema owner +select + n.nspname as schema_name, + r.rolname as owner +from + pg_namespace n +join + pg_roles r on n.nspowner = r.oid +where + n.nspname = 'auth'; + +-- auth schema tables with owners and rls policies +select + ns.nspname as schema_name, + c.relname as table_name, + r.rolname as owner, + c.relrowsecurity as rls_enabled, + string_agg(p.polname, ', ' order by p.polname) as rls_policies +from + pg_class c +join + pg_namespace ns on c.relnamespace = ns.oid +join + pg_roles r on c.relowner = r.oid +left join + pg_policy p on p.polrelid = c.oid +where + ns.nspname = 'auth' + and c.relkind = 'r' +group by + ns.nspname, c.relname, r.rolname, c.relrowsecurity +order by + c.relname; + +-- auth schema objects with roles privileges +select + ns.nspname as schema_name, + c.relname as table_name, + r.rolname as role_name, + a.privilege_type, + a.is_grantable +from + pg_class c +join + pg_namespace ns on c.relnamespace = ns.oid +cross join lateral + aclexplode(c.relacl) as a +join + pg_roles r on a.grantee = r.oid +where + ns.nspname = 'auth' + and c.relkind in ('r', 'v', 'm') + and a.privilege_type <> 'MAINTAIN' +order by + c.relname, + r.rolname, + a.privilege_type; + +-- auth indexes with owners +select + ns.nspname as table_schema, + t.relname as table_name, + i.relname as index_name, + r.rolname as index_owner +from + pg_class t +join + pg_namespace ns on t.relnamespace = ns.oid +join + pg_index idx on t.oid = idx.indrelid +join + pg_class i on idx.indexrelid = i.oid +join + pg_roles r on i.relowner = r.oid +where + ns.nspname = 'auth' +order by + t.relname, i.relname; + +-- auth schema functions with owners +select + n.nspname as schema_name, + p.proname as function_name, + r.rolname as owner +from + pg_proc p +join + pg_namespace n on p.pronamespace = n.oid +join + pg_roles r on p.proowner = r.oid +where + n.nspname = 'auth' +order by + p.proname; + +-- auth service schema migrations +select * from auth.schema_migrations; diff --git a/nix/tests/sql/evtrigs.sql b/nix/tests/sql/evtrigs.sql new file mode 100644 index 000000000..cfbb201aa --- /dev/null +++ b/nix/tests/sql/evtrigs.sql @@ -0,0 +1,12 @@ +select + e.evtname, + e.evtowner::regrole as evtowner, + n_func.nspname as evtfunction_schema, + e.evtfoid::regproc as evtfunction, + p.proowner::regrole as function_owner +from pg_event_trigger e +join pg_proc p + on e.evtfoid = p.oid +join pg_namespace n_func + on p.pronamespace = n_func.oid +where p.prorettype = 'event_trigger'::regtype; diff --git a/nix/tests/sql/extensions_schema.sql b/nix/tests/sql/extensions_schema.sql new file mode 100644 index 000000000..f3d0b3528 --- /dev/null +++ b/nix/tests/sql/extensions_schema.sql @@ -0,0 +1,15 @@ +-- all default extensions are installed in a schema "extensions" +-- we don't include the version as that will break often, we only care about +-- ensuring these extensions are present +select + e.extname as extension_name, + n.nspname as schema_name, + e.extowner::regrole as extension_owner +from + pg_extension e +join + pg_namespace n on e.extnamespace = n.oid +where + n.nspname = 'extensions' and e.extname != 'pgjwt' +order by + e.extname; diff --git a/nix/tests/sql/hypopg.sql b/nix/tests/sql/hypopg.sql new file mode 100644 index 000000000..6aabb6950 --- /dev/null +++ b/nix/tests/sql/hypopg.sql @@ -0,0 +1,13 @@ +create schema v; + +create table v.samp( + id int +); + +select 1 from hypopg_create_index($$ + create index on v.samp(id) +$$); + +drop schema v cascade; + + diff --git a/nix/tests/sql/index_advisor.sql b/nix/tests/sql/index_advisor.sql new file mode 100644 index 000000000..3911d6eb5 --- /dev/null +++ b/nix/tests/sql/index_advisor.sql @@ -0,0 +1,13 @@ +create schema v; + +create table v.book( + id int primary key, + title text not null +); + +select + index_statements, errors +from + index_advisor('select id from v.book where title = $1'); + +drop schema v cascade; diff --git a/nix/tests/sql/pg-safeupdate.sql b/nix/tests/sql/pg-safeupdate.sql new file mode 100644 index 000000000..790ec79fa --- /dev/null +++ b/nix/tests/sql/pg-safeupdate.sql @@ -0,0 +1,15 @@ +load 'safeupdate'; + +set safeupdate.enabled=1; + +create schema v; + +create table v.foo( + id int, + val text +); + +update v.foo + set val = 'bar'; + +drop schema v cascade; diff --git a/nix/tests/sql/pg_graphql.sql b/nix/tests/sql/pg_graphql.sql new file mode 100644 index 000000000..03f844d23 --- /dev/null +++ b/nix/tests/sql/pg_graphql.sql @@ -0,0 +1,219 @@ +begin; + comment on schema public is '@graphql({"inflect_names": true})'; + + create table account( + id serial primary key, + email varchar(255) not null, + priority int, + status text default 'active' + ); + + create table blog( + id serial primary key, + owner_id integer not null references account(id) + ); + comment on table blog is e'@graphql({"totalCount": {"enabled": true}})'; + + -- Make sure functions still work + create function _echo_email(account) + returns text + language sql + as $$ select $1.email $$; + + /* + Literals + */ + + select graphql.resolve($$ + mutation { + insertIntoAccountCollection(objects: [ + { email: "foo@barsley.com", priority: 1 }, + { email: "bar@foosworth.com" } + ]) { + affectedCount + records { + id + status + echoEmail + blogCollection { + totalCount + } + } + } + } + $$); + + select graphql.resolve($$ + mutation { + insertIntoBlogCollection(objects: [{ + ownerId: 1 + }]) { + records { + id + owner { + id + } + } + } + } + $$); + + + -- Override a default on status with null + select graphql.resolve($$ + mutation { + insertIntoAccountCollection(objects: [ + { email: "baz@baz.com", status: null }, + ]) { + affectedCount + records { + email + status + } + } + } + $$); + + + /* + Variables + */ + + select graphql.resolve($$ + mutation newAccount($emailAddress: String) { + xyz: insertIntoAccountCollection(objects: [ + { email: $emailAddress }, + { email: "other@email.com" } + ]) { + affectedCount + records { + id + email + } + } + } + $$, + variables := '{"emailAddress": "foo@bar.com"}'::jsonb + ); + + + -- Variable override of default with null results in null + select graphql.resolve($$ + mutation newAccount($status: String) { + xyz: insertIntoAccountCollection(objects: [ + { email: "1@email.com", status: $status} + ]) { + affectedCount + records { + email + status + } + } + } + $$, + variables := '{"status": null}'::jsonb + ); + + -- Skipping variable override of default results in default + select graphql.resolve($$ + mutation newAccount($status: String) { + xyz: insertIntoAccountCollection(objects: [ + { email: "x@y.com", status: $status}, + ]) { + affectedCount + records { + email + status + } + } + } + $$, + variables := '{}'::jsonb + ); + + + select graphql.resolve($$ + mutation newAccount($acc: AccountInsertInput!) { + insertIntoAccountCollection(objects: [$acc]) { + affectedCount + records { + id + email + } + } + } + $$, + variables := '{"acc": {"email": "bar@foo.com"}}'::jsonb + ); + + select graphql.resolve($$ + mutation newAccounts($acc: [AccountInsertInput!]!) { + insertIntoAccountCollection(objects: $accs) { + affectedCount + records { + id + email + } + } + } + $$, + variables := '{"accs": [{"email": "bar@foo.com"}]}'::jsonb + ); + + -- Single object coerces to a list + select graphql.resolve($$ + mutation { + insertIntoBlogCollection(objects: {ownerId: 1}) { + affectedCount + } + } + $$); + + + /* + Errors + */ + + -- Field does not exist + select graphql.resolve($$ + mutation createAccount($acc: AccountInsertInput) { + insertIntoAccountCollection(objects: [$acc]) { + affectedCount + records { + id + email + } + } + } + $$, + variables := '{"acc": {"doesNotExist": "other"}}'::jsonb + ); + + -- Wrong input type (list of string, not list of object) + select graphql.resolve($$ + mutation { + insertIntoBlogCollection(objects: ["not an object"]) { + affectedCount + } + } + $$); + + -- objects argument is missing + select graphql.resolve($$ + mutation { + insertIntoBlogCollection { + affectedCount + } + } + $$); + + -- Empty call + select graphql.resolve($$ + mutation { + insertIntoBlogCollection(objects: []) { + affectedCount + } + } + $$); + +rollback; diff --git a/nix/tests/sql/pg_hashids.sql b/nix/tests/sql/pg_hashids.sql new file mode 100644 index 000000000..1b82eeead --- /dev/null +++ b/nix/tests/sql/pg_hashids.sql @@ -0,0 +1,6 @@ +select id_encode(1001); -- Result: jNl +select id_encode(1234567, 'This is my salt'); -- Result: Pdzxp +select id_encode(1234567, 'This is my salt', 10); -- Result: PlRPdzxpR7 +select id_encode(1234567, 'This is my salt', 10, 'abcdefghijABCDxFGHIJ1234567890'); -- Result: 3GJ956J9B9 +select id_decode('PlRPdzxpR7', 'This is my salt', 10); -- Result: 1234567 +select id_decode('3GJ956J9B9', 'This is my salt', 10, 'abcdefghijABCDxFGHIJ1234567890'); -- Result: 1234567 diff --git a/nix/tests/sql/pg_jsonschema.sql b/nix/tests/sql/pg_jsonschema.sql new file mode 100644 index 000000000..f5d7c8c77 --- /dev/null +++ b/nix/tests/sql/pg_jsonschema.sql @@ -0,0 +1,68 @@ +begin; + +-- Test json_matches_schema +create table customer( + id serial primary key, + metadata json, + + check ( + json_matches_schema( + '{ + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string", + "maxLength": 16 + } + } + } + }', + metadata + ) + ) +); + +insert into customer(metadata) +values ('{"tags": ["vip", "darkmode-ui"]}'); + +-- Test jsonb_matches_schema +select + jsonb_matches_schema( + '{ + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string", + "maxLength": 16 + } + } + } + }', + '{"tags": ["vip", "darkmode-ui"]}'::jsonb +); + +-- Test jsonschema_is_valid +select + jsonschema_is_valid( + '{ + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string", + "maxLength": 16 + } + } + } + }'); + +-- Test invalid payload +insert into customer(metadata) +values ('{"tags": [1, 3]}'); + +rollback; diff --git a/nix/tests/sql/pg_net.sql b/nix/tests/sql/pg_net.sql new file mode 100644 index 000000000..bf44db5a3 --- /dev/null +++ b/nix/tests/sql/pg_net.sql @@ -0,0 +1,7 @@ +-- This is a very basic test because you can't get the value returned +-- by a pg_net request in the same transaction that created it; + +select + net.http_get ( + 'https://postman-echo.com/get?foo1=bar1&foo2=bar2' + ) as request_id; diff --git a/nix/tests/sql/pg_plan_filter.sql b/nix/tests/sql/pg_plan_filter.sql new file mode 100644 index 000000000..b49834d36 --- /dev/null +++ b/nix/tests/sql/pg_plan_filter.sql @@ -0,0 +1,22 @@ +begin; + load 'plan_filter'; + + create schema v; + + -- create a sample table + create table v.test_table ( + id serial primary key, + data text + ); + + -- insert some test data + insert into v.test_table (data) + values ('sample1'), ('sample2'), ('sample3'); + + set local plan_filter.statement_cost_limit = 0.001; + + select * from v.test_table; + +rollback; + + diff --git a/nix/tests/sql/pg_tle.sql b/nix/tests/sql/pg_tle.sql new file mode 100644 index 000000000..2f6d71a05 --- /dev/null +++ b/nix/tests/sql/pg_tle.sql @@ -0,0 +1,73 @@ +set client_min_messages = warning; + +select + pgtle.install_extension( + 'pg_distance', + '0.1', + 'Distance functions for two points', + $_pg_tle_$ + CREATE FUNCTION dist(x1 float8, y1 float8, x2 float8, y2 float8, norm int) + RETURNS float8 + AS $$ + SELECT (abs(x2 - x1) ^ norm + abs(y2 - y1) ^ norm) ^ (1::float8 / norm); + $$ LANGUAGE SQL; + + CREATE FUNCTION manhattan_dist(x1 float8, y1 float8, x2 float8, y2 float8) + RETURNS float8 + AS $$ + SELECT dist(x1, y1, x2, y2, 1); + $$ LANGUAGE SQL; + + CREATE FUNCTION euclidean_dist(x1 float8, y1 float8, x2 float8, y2 float8) + RETURNS float8 + AS $$ + SELECT dist(x1, y1, x2, y2, 2); + $$ LANGUAGE SQL; + $_pg_tle_$ + ); + +create extension pg_distance; + +select manhattan_dist(1, 1, 5, 5)::numeric(10,2); +select euclidean_dist(1, 1, 5, 5)::numeric(10,2); + +SELECT pgtle.install_update_path( + 'pg_distance', + '0.1', + '0.2', + $_pg_tle_$ + CREATE OR REPLACE FUNCTION dist(x1 float8, y1 float8, x2 float8, y2 float8, norm int) + RETURNS float8 + AS $$ + SELECT (abs(x2 - x1) ^ norm + abs(y2 - y1) ^ norm) ^ (1::float8 / norm); + $$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE; + + CREATE OR REPLACE FUNCTION manhattan_dist(x1 float8, y1 float8, x2 float8, y2 float8) + RETURNS float8 + AS $$ + SELECT dist(x1, y1, x2, y2, 1); + $$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE; + + CREATE OR REPLACE FUNCTION euclidean_dist(x1 float8, y1 float8, x2 float8, y2 float8) + RETURNS float8 + AS $$ + SELECT dist(x1, y1, x2, y2, 2); + $$ LANGUAGE SQL IMMUTABLE PARALLEL SAFE; + $_pg_tle_$ + ); + + +select + pgtle.set_default_version('pg_distance', '0.2'); + +alter extension pg_distance update; + +drop extension pg_distance; + +select + pgtle.uninstall_extension('pg_distance'); + +-- Restore original state if any of the above fails +drop extension pg_tle cascade; + +create extension pg_tle; diff --git a/nix/tests/sql/pgaudit.sql b/nix/tests/sql/pgaudit.sql new file mode 100644 index 000000000..c071c6e57 --- /dev/null +++ b/nix/tests/sql/pgaudit.sql @@ -0,0 +1,23 @@ +-- Note: there is no test that the logs were correctly output. Only checking for exceptions +set pgaudit.log = 'write, ddl'; +set pgaudit.log_relation = on; +set pgaudit.log_level = notice; + +create schema v; + +create table v.account( + id int, + name text, + password text, + description text +); + +insert into v.account (id, name, password, description) +values (1, 'user1', 'HASH1', 'blah, blah'); + +select + * +from + v.account; + +drop schema v cascade; diff --git a/nix/tests/sql/pgbouncer.sql b/nix/tests/sql/pgbouncer.sql new file mode 100644 index 000000000..e6b56cb6b --- /dev/null +++ b/nix/tests/sql/pgbouncer.sql @@ -0,0 +1,66 @@ +-- pgbouncer schema owner +select + n.nspname as schema_name, + r.rolname as owner +from + pg_namespace n +join + pg_roles r on n.nspowner = r.oid +where + n.nspname = 'pgbouncer'; + +-- pgbouncer schema functions with owners +select + n.nspname as schema_name, + p.proname as function_name, + r.rolname as owner +from + pg_proc p +join + pg_namespace n on p.pronamespace = n.oid +join + pg_roles r on p.proowner = r.oid +where + n.nspname = 'pgbouncer' +order by + p.proname; + +-- Tests role privileges on the pgbouncer objects +WITH schema_obj AS ( + SELECT oid, nspname + FROM pg_namespace + WHERE nspname = 'pgbouncer' +) +SELECT + s.nspname AS schema, + c.relname AS object_name, + acl.grantee::regrole::text AS grantee, + acl.privilege_type +FROM pg_class c +JOIN schema_obj s ON s.oid = c.relnamespace +CROSS JOIN LATERAL aclexplode(c.relacl) AS acl +WHERE c.relkind IN ('r', 'v', 'm', 'f', 'p') + AND acl.privilege_type <> 'MAINTAIN' +UNION ALL +SELECT + s.nspname AS schema, + p.proname AS object_name, + acl.grantee::regrole::text AS grantee, + acl.privilege_type +FROM pg_proc p +JOIN schema_obj s ON s.oid = p.pronamespace +CROSS JOIN LATERAL aclexplode(p.proacl) AS acl +ORDER BY object_name, grantee, privilege_type; + +-- Ensure that pgbouncer.get_auth() function does not return an expired password +create role test_expired_user_password with login password 'expired_password' valid until '2000-01-01 00:00:00+00'; +create role test_valid_user_password with login password 'valid_password' valid until '2100-01-01 00:00:00+00'; +-- Update the pg_authid catalog directly to replace with a known SCRAM hash +update pg_authid set rolpassword = 'SCRAM-SHA-256$4096:testsaltbase64$storedkeybase64$serverkeybase64' where rolname = 'test_valid_user_password'; + +select pgbouncer.get_auth('test_expired_user_password'); + +select pgbouncer.get_auth('test_valid_user_password'); + +drop role test_expired_user_password; +drop role test_valid_user_password; diff --git a/nix/tests/sql/pgmq.sql b/nix/tests/sql/pgmq.sql new file mode 100644 index 000000000..dffb108bf --- /dev/null +++ b/nix/tests/sql/pgmq.sql @@ -0,0 +1,103 @@ +-- Test the standard flow +select + pgmq.create('Foo'); + +select + * +from + pgmq.send( + queue_name:='Foo', + msg:='{"foo": "bar1"}' + ); + +-- Test queue is not case sensitive +select + * +from + pgmq.send( + queue_name:='foo', -- note: lowercase useage + msg:='{"foo": "bar2"}', + delay:=5 + ); + +select + msg_id, + read_ct, + message +from + pgmq.read( + queue_name:='Foo', + vt:=30, + qty:=2 + ); + +select + msg_id, + read_ct, + message +from + pgmq.pop('Foo'); + + +-- Archive message with msg_id=2. +select + pgmq.archive( + queue_name:='Foo', + msg_id:=2 + ); + + +select + pgmq.create('my_queue'); + +select + pgmq.send_batch( + queue_name:='my_queue', + msgs:=array['{"foo": "bar3"}','{"foo": "bar4"}','{"foo": "bar5"}']::jsonb[] +); + +select + pgmq.archive( + queue_name:='my_queue', + msg_ids:=array[3, 4, 5] + ); + +select + pgmq.delete('my_queue', 6); + + +select + pgmq.drop_queue('my_queue'); + +/* +-- Disabled until pg_partman goes back into the image +select + pgmq.create_partitioned( + 'my_partitioned_queue', + '5 seconds', + '10 seconds' +); +*/ + + +-- Make sure SQLI enabling characters are blocked +select pgmq.create('F--oo'); +select pgmq.create('F$oo'); +select pgmq.create($$F'oo$$); +\echo + +-- pgmq schema functions with owners (ownership is modified on ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql) +select + n.nspname as schema_name, + p.proname as function_name, + r.rolname as owner +from + pg_proc p +join + pg_namespace n on p.pronamespace = n.oid +join + pg_roles r on p.proowner = r.oid +where + n.nspname = 'pgmq' +order by + p.proname; diff --git a/nix/tests/sql/pgrouting.sql b/nix/tests/sql/pgrouting.sql new file mode 100644 index 000000000..e3af5621c --- /dev/null +++ b/nix/tests/sql/pgrouting.sql @@ -0,0 +1,27 @@ +create schema v; + +-- create the roads table +create table v.roads ( + id serial primary key, + source integer, + target integer, + cost double precision +); + +-- insert sample data into roads table +insert into v.roads (source, target, cost) values +(1, 2, 1.0), +(2, 3, 1.0), +(3, 4, 1.0), +(1, 3, 2.5), +(3, 5, 2.0); + +-- create a function to use pgRouting to find the shortest path +select * from pgr_dijkstra( + 'select id, source, target, cost from v.roads', + 1, -- start node + 4 -- end node +); + +drop schema v cascade; + diff --git a/nix/tests/sql/pgsodium.sql b/nix/tests/sql/pgsodium.sql new file mode 100644 index 000000000..cd3c3821c --- /dev/null +++ b/nix/tests/sql/pgsodium.sql @@ -0,0 +1,4 @@ +select + status +from + pgsodium.create_key(); diff --git a/nix/tests/sql/pgtap.sql b/nix/tests/sql/pgtap.sql new file mode 100644 index 000000000..b99976a25 --- /dev/null +++ b/nix/tests/sql/pgtap.sql @@ -0,0 +1,11 @@ +begin; + +select plan(1); + +-- Run the tests. +select pass( 'My test passed, w00t!' ); + +-- Finish the tests and clean up. +select * from finish(); + +rollback; diff --git a/nix/tests/sql/plpgsql-check.sql b/nix/tests/sql/plpgsql-check.sql new file mode 100644 index 000000000..d54d2c45e --- /dev/null +++ b/nix/tests/sql/plpgsql-check.sql @@ -0,0 +1,26 @@ +create schema v; + +create table v.t1( + a int, + b int +); + +create or replace function v.f1() + returns void + language plpgsql +as $$ +declare r record; +begin + for r in select * from v.t1 + loop + raise notice '%', r.c; -- there is bug - table t1 missing "c" column + end loop; +end; +$$; + +select * from v.f1(); + +-- use plpgsql_check_function to check the function for errors +select * from plpgsql_check_function('v.f1()'); + +drop schema v cascade; diff --git a/nix/tests/sql/postgis.sql b/nix/tests/sql/postgis.sql new file mode 100644 index 000000000..766844bc1 --- /dev/null +++ b/nix/tests/sql/postgis.sql @@ -0,0 +1,52 @@ +create schema v; + +-- create a table to store geographic points +create table v.places ( + id serial primary key, + name text, + geom geometry(point, 4326) -- using WGS 84 coordinate system +); + +-- insert some sample geographic points into the places table +insert into v.places (name, geom) +values + ('place_a', st_setsrid(st_makepoint(-73.9857, 40.7484), 4326)), -- latitude and longitude for a location + ('place_b', st_setsrid(st_makepoint(-74.0060, 40.7128), 4326)), -- another location + ('place_c', st_setsrid(st_makepoint(-73.9687, 40.7851), 4326)); -- yet another location + +-- calculate the distance between two points (in meters) +select + a.name as place_a, + b.name as place_b, + st_distance(a.geom::geography, b.geom::geography) as distance_meters +from + v.places a, + v.places b +where + a.name = 'place_a' + and b.name = 'place_b'; + +-- find all places within a 5km radius of 'place_a' +select + name, + st_distance( + geom::geography, + ( + select + geom + from + v.places + where + name = 'place_a' + )::geography) as distance_meters +from + v.places +where + st_dwithin( + geom::geography, + (select geom from v.places where name = 'place_a')::geography, + 5000 + ) + and name != 'place_a'; + +drop schema v cascade; diff --git a/nix/tests/sql/realtime.sql b/nix/tests/sql/realtime.sql new file mode 100644 index 000000000..28f13a5ed --- /dev/null +++ b/nix/tests/sql/realtime.sql @@ -0,0 +1,11 @@ +-- only a publication from supabase realtime is expected +SELECT + pubname AS publication_name, + pubowner::regrole AS owner, + puballtables, + pubinsert, + pubupdate, + pubdelete, + pubtruncate +FROM + pg_publication; diff --git a/nix/tests/sql/roles.sql b/nix/tests/sql/roles.sql new file mode 100644 index 000000000..9e68a171a --- /dev/null +++ b/nix/tests/sql/roles.sql @@ -0,0 +1,77 @@ +-- all roles and attributes +select + rolname, + rolcreaterole , + rolcanlogin , + rolsuper , + rolinherit , + rolcreatedb , + rolreplication , + rolconnlimit , + rolbypassrls , + rolvaliduntil +from pg_roles r +-- TODO: this exclusion is to maintain compat with pg17, we should cover it +where rolname not in ('pg_create_subscription', 'pg_maintain', 'pg_use_reserved_connections') +order by rolname; + +select + rolname, + rolconfig +from pg_roles r +-- TODO: this exclusion is to maintain compat with pg17, we should cover it +where rolname not in ('pg_create_subscription', 'pg_maintain', 'pg_use_reserved_connections') +order by rolname; + +-- all role memberships +select + r.rolname as member, + g.rolname as "member_of (can become)", + m.admin_option +from + pg_roles r +left join + pg_auth_members m on r.oid = m.member +left join + pg_roles g on m.roleid = g.oid +-- TODO: this exclusion is to maintain compat with pg17, we should cover it +where r.rolname not in ('pg_create_subscription', 'pg_maintain', 'pg_use_reserved_connections') +order by + r.rolname, g.rolname; + +-- Check all privileges of the roles on the schemas +select schema_name, privilege_type, grantee, default_for +from ( + -- ALTER DEFAULT privileges on schemas + select + n.nspname as schema_name, + a.privilege_type, + r.rolname as grantee, + d.defaclrole::regrole as default_for, + case when n.nspname = 'public' then 0 else 1 end as schema_order + from + pg_default_acl d + join + pg_namespace n on d.defaclnamespace = n.oid + cross join lateral aclexplode(d.defaclacl) as a + join + pg_roles r on a.grantee = r.oid + where + a.privilege_type != 'MAINTAIN' -- TODO: this is to maintain compat with pg17, we should cover it + union all + -- explicit grant usage and create on the schemas + select + n.nspname as schema_name, + a.privilege_type, + r.rolname as grantee, + n.nspowner::regrole as default_for, + case when n.nspname = 'public' then 0 else 1 end as schema_order + from + pg_namespace n + cross join lateral aclexplode(n.nspacl) as a + join + pg_roles r on a.grantee = r.oid + where + a.privilege_type in ('CREATE', 'USAGE') +) sub +order by schema_order, schema_name, privilege_type, grantee, default_for; diff --git a/nix/tests/sql/security.sql b/nix/tests/sql/security.sql new file mode 100644 index 000000000..fb72f0e69 --- /dev/null +++ b/nix/tests/sql/security.sql @@ -0,0 +1,9 @@ +-- get a list of security definer functions owned by supabase_admin +-- this list should be vetted to ensure the functions are safe to use as security definer +select + n.nspname, p.proname +from pg_catalog.pg_proc p + left join pg_catalog.pg_namespace n ON n.oid = p.pronamespace +where p.proowner = (select oid from pg_catalog.pg_roles where rolname = 'supabase_admin') + and p.prosecdef = true +order by 1,2; diff --git a/nix/tests/sql/storage.sql b/nix/tests/sql/storage.sql new file mode 100644 index 000000000..b9d80820f --- /dev/null +++ b/nix/tests/sql/storage.sql @@ -0,0 +1,97 @@ +-- storage schema owner +select + n.nspname as schema_name, + r.rolname as owner +from + pg_namespace n +join + pg_roles r on n.nspowner = r.oid +where + n.nspname = 'storage'; + +-- storage schema tables with owners and rls policies +select + ns.nspname as schema_name, + c.relname as table_name, + r.rolname as owner, + c.relrowsecurity as rls_enabled, + string_agg(p.polname, ', ' order by p.polname) as rls_policies +from + pg_class c +join + pg_namespace ns on c.relnamespace = ns.oid +join + pg_roles r on c.relowner = r.oid +left join + pg_policy p on p.polrelid = c.oid +where + ns.nspname = 'storage' + and c.relkind = 'r' +group by + ns.nspname, c.relname, r.rolname, c.relrowsecurity +order by + c.relname; + +-- storage schema objects with roles privileges +select + ns.nspname as schema_name, + c.relname as table_name, + r.rolname as role_name, + a.privilege_type, + a.is_grantable +from + pg_class c +join + pg_namespace ns on c.relnamespace = ns.oid +cross join lateral + aclexplode(c.relacl) as a +join + pg_roles r on a.grantee = r.oid +where + ns.nspname = 'storage' + and c.relkind in ('r', 'v', 'm') + and a.privilege_type <> 'MAINTAIN' +order by + c.relname, + r.rolname, + a.privilege_type; + +-- storage indexes with owners +select + ns.nspname as table_schema, + t.relname as table_name, + i.relname as index_name, + r.rolname as index_owner +from + pg_class t +join + pg_namespace ns on t.relnamespace = ns.oid +join + pg_index idx on t.oid = idx.indrelid +join + pg_class i on idx.indexrelid = i.oid +join + pg_roles r on i.relowner = r.oid +where + ns.nspname = 'storage' +order by + t.relname, i.relname; + +-- storage schema functions with owners +select + n.nspname as schema_name, + p.proname as function_name, + r.rolname as owner +from + pg_proc p +join + pg_namespace n on p.pronamespace = n.oid +join + pg_roles r on p.proowner = r.oid +where + n.nspname = 'storage' +order by + p.proname; + +-- storage service migrations +select * from storage.migrations ; diff --git a/nix/tests/sql/vault.sql b/nix/tests/sql/vault.sql new file mode 100644 index 000000000..81f4d22fb --- /dev/null +++ b/nix/tests/sql/vault.sql @@ -0,0 +1,53 @@ +-- Tests role privileges on the vault objects +-- INSERT and UPDATE privileges should not be present on the vault tables for postgres and service_role, only SELECT and DELETE +WITH schema_obj AS ( + SELECT oid, nspname + FROM pg_namespace + WHERE nspname = 'vault' +) +SELECT + s.nspname AS schema, + c.relname AS object_name, + acl.grantee::regrole::text AS grantee, + acl.privilege_type +FROM pg_class c +JOIN schema_obj s ON s.oid = c.relnamespace +CROSS JOIN LATERAL aclexplode(c.relacl) AS acl +WHERE c.relkind IN ('r', 'v', 'm', 'f', 'p') + AND acl.privilege_type <> 'MAINTAIN' +UNION ALL +SELECT + s.nspname AS schema, + p.proname AS object_name, + acl.grantee::regrole::text AS grantee, + acl.privilege_type +FROM pg_proc p +JOIN schema_obj s ON s.oid = p.pronamespace +CROSS JOIN LATERAL aclexplode(p.proacl) AS acl +ORDER BY object_name, grantee, privilege_type; + +-- vault indexes with owners +SELECT + ns.nspname AS schema, + t.relname AS table, + i.relname AS index_name, + r.rolname AS index_owner, + CASE + WHEN idx.indisunique THEN 'Unique' + ELSE 'Non Unique' + END AS index_type +FROM + pg_class t +JOIN + pg_namespace ns ON t.relnamespace = ns.oid +JOIN + pg_index idx ON t.oid = idx.indrelid +JOIN + pg_class i ON idx.indexrelid = i.oid +JOIN + pg_roles r ON i.relowner = r.oid +WHERE + ns.nspname = 'vault' +ORDER BY + t.relname, + i.relname; diff --git a/nix/tests/sql/wal2json.sql b/nix/tests/sql/wal2json.sql new file mode 100644 index 000000000..6ec4a6de9 --- /dev/null +++ b/nix/tests/sql/wal2json.sql @@ -0,0 +1,32 @@ +create schema v; + +create table v.foo( + id int primary key +); + +select + 1 +from + pg_create_logical_replication_slot('reg_test', 'wal2json', false); + +insert into v.foo(id) values (1); + +select + data +from + pg_logical_slot_get_changes( + 'reg_test', + null, + null, + 'include-pk', '1', + 'include-transaction', 'false', + 'include-timestamp', 'false', + 'include-type-oids', 'false', + 'format-version', '2', + 'actions', 'insert,update,delete' + ) x; + +select + pg_drop_replication_slot('reg_test'); + +drop schema v cascade; diff --git a/nix/tests/sql/z_15_ext_interface.sql b/nix/tests/sql/z_15_ext_interface.sql new file mode 100644 index 000000000..24ee03ea2 --- /dev/null +++ b/nix/tests/sql/z_15_ext_interface.sql @@ -0,0 +1,122 @@ +/* + +The purpose of this test is to monitor the SQL interface exposed +by Postgres extensions so we have to manually review/approve any difference +that emerge as versions change. + +*/ + + +/* + +List all extensions that are not enabled +If a new entry shows up in this list, that means a new extension has been +added and you should `create extension ...` to enable it in ./nix/tests/prime + +*/ +create extension if not exists adminpack; +create extension if not exists plv8; +create extension if not exists plcoffee; +create extension if not exists plls; +create extension if not exists old_snapshot; +create extension if not exists timescaledb; +create extension if not exists postgis_tiger_geocoder; + + +select + name +from + pg_available_extensions +where + installed_version is null +order by + name asc; + + +/* + +Monitor relocatability and config of each extension +- lesson learned from pg_cron + +*/ + +select + extname as extension_name, + extrelocatable as is_relocatable +from + pg_extension +order by + extname asc; + + +/* + +Monitor extension public function interface + +*/ + +select + e.extname as extension_name, + n.nspname as schema_name, + p.proname as function_name, + pg_catalog.pg_get_function_identity_arguments(p.oid) as argument_types, + pg_catalog.pg_get_function_result(p.oid) as return_type +from + pg_catalog.pg_proc p + join pg_catalog.pg_namespace n + on n.oid = p.pronamespace + join pg_catalog.pg_depend d + on d.objid = p.oid + join pg_catalog.pg_extension e + on e.oid = d.refobjid +where + d.deptype = 'e' + -- Filter out changes between pg15 and pg16 from extensions that ship with postgres + -- new in pg16 + and not (e.extname = 'fuzzystrmatch' and p.proname = 'daitch_mokotoff') + and not (e.extname = 'pageinspect' and p.proname = 'bt_multi_page_stats') + and not (e.extname = 'pg_buffercache' and p.proname = 'pg_buffercache_summary') + and not (e.extname = 'pg_buffercache' and p.proname = 'pg_buffercache_usage_counts') + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_block_info') + -- removed in pg16 + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_records_info_till_end_of_wal') + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_stats_till_end_of_wal') + -- changed in pg16 - output signature added a column + and not (e.extname = 'pageinspect' and p.proname = 'brin_page_items') +order by + e.extname, + n.nspname, + p.proname, + md5(pg_catalog.pg_get_function_identity_arguments(p.oid)); + +/* + +Monitor extension public table/view/matview/index interface + +*/ + +select + e.extname as extension_name, + n.nspname as schema_name, + pc.relname as entity_name, + pa.attname +from + pg_catalog.pg_class pc + join pg_catalog.pg_namespace n + on n.oid = pc.relnamespace + join pg_catalog.pg_depend d + on d.objid = pc.oid + join pg_catalog.pg_extension e + on e.oid = d.refobjid + left join pg_catalog.pg_attribute pa + on pa.attrelid = pc.oid + and pa.attnum > 0 + and not pa.attisdropped +where + d.deptype = 'e' + and pc.relkind in ('r', 'v', 'm', 'i') +order by + e.extname, + n.nspname, + pc.relname, + pa.attname; diff --git a/nix/tests/sql/z_15_pg_stat_monitor.sql b/nix/tests/sql/z_15_pg_stat_monitor.sql new file mode 100644 index 000000000..69d996be8 --- /dev/null +++ b/nix/tests/sql/z_15_pg_stat_monitor.sql @@ -0,0 +1,6 @@ +select + * +from + pg_stat_monitor +where + false; diff --git a/nix/tests/sql/z_15_pgjwt.sql b/nix/tests/sql/z_15_pgjwt.sql new file mode 100644 index 000000000..24179e7a0 --- /dev/null +++ b/nix/tests/sql/z_15_pgjwt.sql @@ -0,0 +1,13 @@ +select + sign( + payload := '{"sub":"1234567890","name":"John Doe","iat":1516239022}', + secret := 'secret', + algorithm := 'HS256' + ); + +select + verify( + token := 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiRm9vIn0.Q8hKjuadCEhnCPuqIj9bfLhTh_9QSxshTRsA5Aq4IuM', + secret := 'secret', + algorithm := 'HS256' + ); diff --git a/nix/tests/sql/z_15_pgroonga.sql b/nix/tests/sql/z_15_pgroonga.sql new file mode 100644 index 000000000..503f2665c --- /dev/null +++ b/nix/tests/sql/z_15_pgroonga.sql @@ -0,0 +1,48 @@ +create schema v; + +create table v.roon( + id serial primary key, + content text +); + + +with tokenizers as ( + select + x + from + jsonb_array_elements( + (select pgroonga_command('tokenizer_list'))::jsonb + ) x(val) + limit + 1 + offset + 1 -- first record is unrelated and not stable +) +select + t.x::jsonb ->> 'name' +from + jsonb_array_elements((select * from tokenizers)) t(x) +order by + t.x::jsonb ->> 'name'; + + +insert into v.roon (content) +values + ('Hello World'), + ('PostgreSQL with PGroonga is a thing'), + ('This is a full-text search test'), + ('PGroonga supports various languages'); + +-- Create default index +create index pgroonga_index on v.roon using pgroonga (content); + +-- Create mecab tokenizer index since we had a bug with this one once +create index pgroonga_index_mecab on v.roon using pgroonga (content) with (tokenizer='TokenMecab'); + +-- Run some queries to test the index +select * from v.roon where content &@~ 'Hello'; +select * from v.roon where content &@~ 'powerful'; +select * from v.roon where content &@~ 'supports'; + + +drop schema v cascade; diff --git a/nix/tests/sql/z_15_pgvector.sql b/nix/tests/sql/z_15_pgvector.sql new file mode 100644 index 000000000..f2de30572 --- /dev/null +++ b/nix/tests/sql/z_15_pgvector.sql @@ -0,0 +1,72 @@ +create schema v; + +create table v.items( + id serial primary key, + embedding vector(3), + half_embedding halfvec(3), + bit_embedding bit(3), + sparse_embedding sparsevec(3) +); + +-- vector ops +create index on v.items using hnsw (embedding vector_l2_ops); +create index on v.items using hnsw (embedding vector_cosine_ops); +create index on v.items using hnsw (embedding vector_l1_ops); +create index on v.items using ivfflat (embedding vector_l2_ops); +create index on v.items using ivfflat (embedding vector_cosine_ops); + +-- halfvec ops +create index on v.items using hnsw (half_embedding halfvec_l2_ops); +create index on v.items using hnsw (half_embedding halfvec_cosine_ops); +create index on v.items using hnsw (half_embedding halfvec_l1_ops); +create index on v.items using ivfflat (half_embedding halfvec_l2_ops); +create index on v.items using ivfflat (half_embedding halfvec_cosine_ops); + +-- sparsevec +create index on v.items using hnsw (sparse_embedding sparsevec_l2_ops); +create index on v.items using hnsw (sparse_embedding sparsevec_cosine_ops); +create index on v.items using hnsw (sparse_embedding sparsevec_l1_ops); + +-- bit ops +create index on v.items using hnsw (bit_embedding bit_hamming_ops); +create index on v.items using ivfflat (bit_embedding bit_hamming_ops); + +-- Populate some records +insert into v.items( + embedding, + half_embedding, + bit_embedding, + sparse_embedding +) +values + ('[1,2,3]', '[1,2,3]', '101', '{1:4}/3'), + ('[2,3,4]', '[2,3,4]', '010', '{1:7,3:0}/3'); + +-- Test op types +select + * +from + v.items +order by + embedding <-> '[2,3,5]', + embedding <=> '[2,3,5]', + embedding <+> '[2,3,5]', + embedding <#> '[2,3,5]', + half_embedding <-> '[2,3,5]', + half_embedding <=> '[2,3,5]', + half_embedding <+> '[2,3,5]', + half_embedding <#> '[2,3,5]', + sparse_embedding <-> '{2:4,3:1}/3', + sparse_embedding <=> '{2:4,3:1}/3', + sparse_embedding <+> '{2:4,3:1}/3', + sparse_embedding <#> '{2:4,3:1}/3', + bit_embedding <~> '011'; + +select + avg(embedding), + avg(half_embedding) +from + v.items; + +-- Cleanup +drop schema v cascade; diff --git a/nix/tests/sql/z_15_plv8.sql b/nix/tests/sql/z_15_plv8.sql new file mode 100644 index 000000000..044d69cf9 --- /dev/null +++ b/nix/tests/sql/z_15_plv8.sql @@ -0,0 +1,20 @@ +/* +This test is excluded from the Postgres 17 suite because it does not ship +with the Supabase PG17 image +*/ +create extension if not exists plv8; + +create schema v; + +-- create a function to perform some JavaScript operations +create function v.multiply_numbers(a integer, b integer) + returns integer + language plv8 +as $$ + return a * b; +$$; + +select + v.multiply_numbers(3, 4); + +drop schema v cascade; diff --git a/nix/tests/sql/z_15_rum.sql b/nix/tests/sql/z_15_rum.sql new file mode 100644 index 000000000..6ae945975 --- /dev/null +++ b/nix/tests/sql/z_15_rum.sql @@ -0,0 +1,40 @@ +/* +This extension is excluded from oriole-17 because it uses an unsupported index type +*/ +create schema v; + +create table v.test_rum( + t text, + a tsvector +); + +create trigger tsvectorupdate + before update or insert on v.test_rum + for each row + execute procedure + tsvector_update_trigger( + 'a', + 'pg_catalog.english', + 't' + ); + +insert into v.test_rum(t) +values + ('the situation is most beautiful'), + ('it is a beautiful'), + ('it looks like a beautiful place'); + +create index rumidx on v.test_rum using rum (a rum_tsvector_ops); + +select + t, + round(a <=> to_tsquery('english', 'beautiful | place')) as rank +from + v.test_rum +where + a @@ to_tsquery('english', 'beautiful | place') +order by + a <=> to_tsquery('english', 'beautiful | place'); + + +drop schema v cascade; diff --git a/nix/tests/sql/z_15_timescale.sql b/nix/tests/sql/z_15_timescale.sql new file mode 100644 index 000000000..fd29bb17c --- /dev/null +++ b/nix/tests/sql/z_15_timescale.sql @@ -0,0 +1,39 @@ +/* +This test is excluded from the Postgres 17 suite because it does not ship +with the Supabase PG17 image +*/ +create extension if not exists timescaledb; + +-- Confirm we're running the apache version +show timescaledb.license; + +-- Create schema v +create schema v; + +-- Create a table in the v schema +create table v.sensor_data ( + time timestamptz not null, + sensor_id int not null, + temperature double precision not null, + humidity double precision not null +); + +-- Convert the table to a hypertable +select create_hypertable('v.sensor_data', 'time'); + +-- Insert some data into the hypertable +insert into v.sensor_data (time, sensor_id, temperature, humidity) +values + ('2024-08-09', 1, 22.5, 60.2), + ('2024-08-08', 1, 23.0, 59.1), + ('2024-08-07', 2, 21.7, 63.3); + +-- Select data from the hypertable +select + * +from + v.sensor_data; + +-- Drop schema v and all its entities +drop schema v cascade; + diff --git a/nix/tests/sql/z_17_ext_interface.sql b/nix/tests/sql/z_17_ext_interface.sql new file mode 100644 index 000000000..a9d44c2ab --- /dev/null +++ b/nix/tests/sql/z_17_ext_interface.sql @@ -0,0 +1,114 @@ +/* + +The purpose of this test is to monitor the SQL interface exposed +by Postgres extensions so we have to manually review/approve any difference +that emerge as versions change. + +*/ + + +/* + +List all extensions that are not enabled +If a new entry shows up in this list, that means a new extension has been +added and you should `create extension ...` to enable it in ./nix/tests/prime + +*/ + +select + name +from + pg_available_extensions +where + installed_version is null +order by + name asc; + + +/* + +Monitor relocatability and config of each extension +- lesson learned from pg_cron + +*/ + +select + extname as extension_name, + extrelocatable as is_relocatable +from + pg_extension +order by + extname asc; + + +/* + +Monitor extension public function interface + +*/ + +select + e.extname as extension_name, + n.nspname as schema_name, + p.proname as function_name, + pg_catalog.pg_get_function_identity_arguments(p.oid) as argument_types, + pg_catalog.pg_get_function_result(p.oid) as return_type +from + pg_catalog.pg_proc p + join pg_catalog.pg_namespace n + on n.oid = p.pronamespace + join pg_catalog.pg_depend d + on d.objid = p.oid + join pg_catalog.pg_extension e + on e.oid = d.refobjid +where + d.deptype = 'e' + -- Filter out changes between pg15 and pg16 from extensions that ship with postgres + -- new in pg16 + and not (e.extname = 'fuzzystrmatch' and p.proname = 'daitch_mokotoff') + and not (e.extname = 'pageinspect' and p.proname = 'bt_multi_page_stats') + and not (e.extname = 'pg_buffercache' and p.proname = 'pg_buffercache_summary') + and not (e.extname = 'pg_buffercache' and p.proname = 'pg_buffercache_usage_counts') + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_block_info') + -- removed in pg16 + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_records_info_till_end_of_wal') + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_stats_till_end_of_wal') + -- changed in pg16 - output signature added a column + and not (e.extname = 'pageinspect' and p.proname = 'brin_page_items') +order by + e.extname, + n.nspname, + p.proname, + md5(pg_catalog.pg_get_function_identity_arguments(p.oid)); + +/* + +Monitor extension public table/view/matview/index interface + +*/ + +select + e.extname as extension_name, + n.nspname as schema_name, + pc.relname as entity_name, + pa.attname +from + pg_catalog.pg_class pc + join pg_catalog.pg_namespace n + on n.oid = pc.relnamespace + join pg_catalog.pg_depend d + on d.objid = pc.oid + join pg_catalog.pg_extension e + on e.oid = d.refobjid + left join pg_catalog.pg_attribute pa + on pa.attrelid = pc.oid + and pa.attnum > 0 + and not pa.attisdropped +where + d.deptype = 'e' + and pc.relkind in ('r', 'v', 'm', 'i') +order by + e.extname, + n.nspname, + pc.relname, + pa.attname; diff --git a/nix/tests/sql/z_17_pg_stat_monitor.sql b/nix/tests/sql/z_17_pg_stat_monitor.sql new file mode 100644 index 000000000..69d996be8 --- /dev/null +++ b/nix/tests/sql/z_17_pg_stat_monitor.sql @@ -0,0 +1,6 @@ +select + * +from + pg_stat_monitor +where + false; diff --git a/nix/tests/sql/z_17_pgvector.sql b/nix/tests/sql/z_17_pgvector.sql new file mode 100644 index 000000000..c90219ca5 --- /dev/null +++ b/nix/tests/sql/z_17_pgvector.sql @@ -0,0 +1,52 @@ +/* +This test excludes indexes shipped with pgvector because orioledb doesn't support them yet +*/ +create schema v; + +create table v.items( + id serial primary key, + embedding vector(3), + half_embedding halfvec(3), + bit_embedding bit(3), + sparse_embedding sparsevec(3) +); + +-- Populate some records +insert into v.items( + embedding, + half_embedding, + bit_embedding, + sparse_embedding +) +values + ('[1,2,3]', '[1,2,3]', '101', '{1:4}/3'), + ('[2,3,4]', '[2,3,4]', '010', '{1:7,3:0}/3'); + +-- Test op types +select + * +from + v.items +order by + embedding <-> '[2,3,5]', + embedding <=> '[2,3,5]', + embedding <+> '[2,3,5]', + embedding <#> '[2,3,5]', + half_embedding <-> '[2,3,5]', + half_embedding <=> '[2,3,5]', + half_embedding <+> '[2,3,5]', + half_embedding <#> '[2,3,5]', + sparse_embedding <-> '{2:4,3:1}/3', + sparse_embedding <=> '{2:4,3:1}/3', + sparse_embedding <+> '{2:4,3:1}/3', + sparse_embedding <#> '{2:4,3:1}/3', + bit_embedding <~> '011'; + +select + avg(embedding), + avg(half_embedding) +from + v.items; + +-- Cleanup +drop schema v cascade; diff --git a/nix/tests/sql/z_orioledb-17_ext_interface.sql b/nix/tests/sql/z_orioledb-17_ext_interface.sql new file mode 100644 index 000000000..a9d44c2ab --- /dev/null +++ b/nix/tests/sql/z_orioledb-17_ext_interface.sql @@ -0,0 +1,114 @@ +/* + +The purpose of this test is to monitor the SQL interface exposed +by Postgres extensions so we have to manually review/approve any difference +that emerge as versions change. + +*/ + + +/* + +List all extensions that are not enabled +If a new entry shows up in this list, that means a new extension has been +added and you should `create extension ...` to enable it in ./nix/tests/prime + +*/ + +select + name +from + pg_available_extensions +where + installed_version is null +order by + name asc; + + +/* + +Monitor relocatability and config of each extension +- lesson learned from pg_cron + +*/ + +select + extname as extension_name, + extrelocatable as is_relocatable +from + pg_extension +order by + extname asc; + + +/* + +Monitor extension public function interface + +*/ + +select + e.extname as extension_name, + n.nspname as schema_name, + p.proname as function_name, + pg_catalog.pg_get_function_identity_arguments(p.oid) as argument_types, + pg_catalog.pg_get_function_result(p.oid) as return_type +from + pg_catalog.pg_proc p + join pg_catalog.pg_namespace n + on n.oid = p.pronamespace + join pg_catalog.pg_depend d + on d.objid = p.oid + join pg_catalog.pg_extension e + on e.oid = d.refobjid +where + d.deptype = 'e' + -- Filter out changes between pg15 and pg16 from extensions that ship with postgres + -- new in pg16 + and not (e.extname = 'fuzzystrmatch' and p.proname = 'daitch_mokotoff') + and not (e.extname = 'pageinspect' and p.proname = 'bt_multi_page_stats') + and not (e.extname = 'pg_buffercache' and p.proname = 'pg_buffercache_summary') + and not (e.extname = 'pg_buffercache' and p.proname = 'pg_buffercache_usage_counts') + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_block_info') + -- removed in pg16 + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_records_info_till_end_of_wal') + and not (e.extname = 'pg_walinspect' and p.proname = 'pg_get_wal_stats_till_end_of_wal') + -- changed in pg16 - output signature added a column + and not (e.extname = 'pageinspect' and p.proname = 'brin_page_items') +order by + e.extname, + n.nspname, + p.proname, + md5(pg_catalog.pg_get_function_identity_arguments(p.oid)); + +/* + +Monitor extension public table/view/matview/index interface + +*/ + +select + e.extname as extension_name, + n.nspname as schema_name, + pc.relname as entity_name, + pa.attname +from + pg_catalog.pg_class pc + join pg_catalog.pg_namespace n + on n.oid = pc.relnamespace + join pg_catalog.pg_depend d + on d.objid = pc.oid + join pg_catalog.pg_extension e + on e.oid = d.refobjid + left join pg_catalog.pg_attribute pa + on pa.attrelid = pc.oid + and pa.attnum > 0 + and not pa.attisdropped +where + d.deptype = 'e' + and pc.relkind in ('r', 'v', 'm', 'i') +order by + e.extname, + n.nspname, + pc.relname, + pa.attname; diff --git a/nix/tests/sql/z_orioledb-17_pg_stat_monitor.sql b/nix/tests/sql/z_orioledb-17_pg_stat_monitor.sql new file mode 100644 index 000000000..69d996be8 --- /dev/null +++ b/nix/tests/sql/z_orioledb-17_pg_stat_monitor.sql @@ -0,0 +1,6 @@ +select + * +from + pg_stat_monitor +where + false; diff --git a/nix/tests/sql/z_orioledb-17_pgvector.sql b/nix/tests/sql/z_orioledb-17_pgvector.sql new file mode 100644 index 000000000..c90219ca5 --- /dev/null +++ b/nix/tests/sql/z_orioledb-17_pgvector.sql @@ -0,0 +1,52 @@ +/* +This test excludes indexes shipped with pgvector because orioledb doesn't support them yet +*/ +create schema v; + +create table v.items( + id serial primary key, + embedding vector(3), + half_embedding halfvec(3), + bit_embedding bit(3), + sparse_embedding sparsevec(3) +); + +-- Populate some records +insert into v.items( + embedding, + half_embedding, + bit_embedding, + sparse_embedding +) +values + ('[1,2,3]', '[1,2,3]', '101', '{1:4}/3'), + ('[2,3,4]', '[2,3,4]', '010', '{1:7,3:0}/3'); + +-- Test op types +select + * +from + v.items +order by + embedding <-> '[2,3,5]', + embedding <=> '[2,3,5]', + embedding <+> '[2,3,5]', + embedding <#> '[2,3,5]', + half_embedding <-> '[2,3,5]', + half_embedding <=> '[2,3,5]', + half_embedding <+> '[2,3,5]', + half_embedding <#> '[2,3,5]', + sparse_embedding <-> '{2:4,3:1}/3', + sparse_embedding <=> '{2:4,3:1}/3', + sparse_embedding <+> '{2:4,3:1}/3', + sparse_embedding <#> '{2:4,3:1}/3', + bit_embedding <~> '011'; + +select + avg(embedding), + avg(half_embedding) +from + v.items; + +-- Cleanup +drop schema v cascade; diff --git a/nix/tests/util/pgsodium_getkey.sh b/nix/tests/util/pgsodium_getkey.sh new file mode 100755 index 000000000..7044d0f04 --- /dev/null +++ b/nix/tests/util/pgsodium_getkey.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -euo pipefail + +KEY_FILE="${1:-/tmp/pgsodium.key}" + +if [[ ! -f "$KEY_FILE" ]]; then + head -c 32 /dev/urandom | od -A n -t x1 | tr -d ' \n' > "$KEY_FILE" +fi +cat $KEY_FILE diff --git a/nix/tests/util/pgsodium_getkey_arb.sh b/nix/tests/util/pgsodium_getkey_arb.sh new file mode 100755 index 000000000..446dbba2f --- /dev/null +++ b/nix/tests/util/pgsodium_getkey_arb.sh @@ -0,0 +1 @@ +echo -n 8359dafbba5c05568799c1c24eb6c2fbff497654bc6aa5e9a791c666768875a1 \ No newline at end of file diff --git a/nix/tools/README.md b/nix/tools/README.md new file mode 100644 index 000000000..2606a57ee --- /dev/null +++ b/nix/tools/README.md @@ -0,0 +1,2 @@ +This directory just contains tools, but you can't run them directly. For the +sake of robustness, you should use `nix run` on this repository to do so. diff --git a/nix/tools/dbmate-tool.sh.in b/nix/tools/dbmate-tool.sh.in new file mode 100644 index 000000000..8fa266fce --- /dev/null +++ b/nix/tools/dbmate-tool.sh.in @@ -0,0 +1,293 @@ +#!/usr/bin/env bash +# shellcheck shell=bash + +[ ! -z "$DEBUG" ] && set -x + +# Default values +PSQL_VERSION="ALL" +PORTNO="@PGSQL_DEFAULT_PORT@" +PGSQL_SUPERUSER="@PGSQL_SUPERUSER@" +PGPASSWORD="${PGPASSWORD:-postgres}" +PGSQL_USER="postgres" +FLAKE_URL="github:supabase/postgres" +MIGRATIONS_DIR="@MIGRATIONS_DIR@" +CURRENT_SYSTEM="@CURRENT_SYSTEM@" +ANSIBLE_VARS="@ANSIBLE_VARS@" +PGBOUNCER_AUTH_SCHEMA_SQL=@PGBOUNCER_AUTH_SCHEMA_SQL@ +STAT_EXTENSION_SQL=@STAT_EXTENSION_SQL@ + +# Start PostgreSQL using nix +start_postgres() { + DATDIR=$(mktemp -d) + echo "Starting PostgreSQL in directory: $DATDIR" # Create the DATDIR if it doesn't exist + nix run "$FLAKE_URL#start-server" -- "$PSQL_VERSION" --skip-migrations --daemonize --datdir "$DATDIR" + echo "PostgreSQL started." +} + +# Cleanup function +cleanup() { + echo "Cleaning up..." + + # Check if PostgreSQL processes exist + if pgrep -f "postgres" >/dev/null; then + echo "Stopping PostgreSQL gracefully..." + + # Use pg_ctl to stop PostgreSQL + pg_ctl -D "$DATDIR" stop + + # Wait a bit for graceful shutdown + sleep 5 + + # Check if processes are still running + if pgrep -f "postgres" >/dev/null; then + echo "Warning: Some PostgreSQL processes could not be stopped gracefully." + fi + else + echo "PostgreSQL is not running, skipping stop." + fi + + # Always exit successfully, log any remaining processes + if pgrep -f "postgres" >/dev/null; then + echo "Warning: Some PostgreSQL processes could not be cleaned up:" + pgrep -f "postgres" + else + echo "Cleanup completed successfully" + fi +} + + +# Function to display help +print_help() { + echo "Usage: nix run .#dbmate-tool -- [options]" + echo + echo "Options:" + echo " -v, --version [15|17|orioledb-17|all] Specify the PostgreSQL version to use (required defaults to --version all)" + echo " -p, --port PORT Specify the port number to use (default: 5435)" + echo " -h, --help Show this help message" + echo " -f, --flake-url URL Specify the flake URL to use (default: github:supabase/postgres)" + echo "Description:" + echo " Runs 'dbmate up' against a locally running the version of database you specify. Or 'all' to run against all versions." + echo " NOTE: To create a migration, you must run 'nix develop' and then 'dbmate new ' to create a new migration file." + echo + echo "Examples:" + echo " nix run .#dbmate-tool" + echo " nix run .#dbmate-tool -- --version 15" + echo " nix run .#dbmate-tool -- --version 16 --port 5433" + echo " nix run .#dbmate-tool -- --version 16 --port 5433 --flake-url github:supabase/postgres/" +} + +# Parse arguments +while [[ "$#" -gt 0 ]]; do + case "$1" in + -v|--version) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + PSQL_VERSION="$2" + shift 2 + else + echo "Error: --version requires an argument (15, 16, or orioledb-17)" + exit 1 + fi + ;; + -u|--user) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + PGSQL_USER="$2" + shift 2 + else + echo "Error: --user requires an argument" + exit 1 + fi + ;; + -f|--flake-url) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + FLAKE_URL="$2" + shift 2 + else + echo "Error: --flake-url requires an argument" + exit 1 + fi + ;; + -p|--port) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + PORTNO="$2" + shift 2 + else + echo "Error: --port requires an argument" + exit 1 + fi + ;; + -h|--help) + print_help + exit 0 + ;; + *) + echo "Unknown option: $1" + print_help + exit 1 + ;; + esac +done + +# Function to wait for PostgreSQL to be ready +wait_for_postgres() { + local max_attempts=30 # Increased significantly + local attempt=1 + + # Give PostgreSQL a moment to actually start the process + sleep 2 + + while [ $attempt -le $max_attempts ]; do + "${PSQLBIN}/pg_isready" -h localhost -p "$PORTNO" -U "$PGSQL_SUPERUSER" -d postgres + local status=$? + + if [ $status -eq 0 ]; then + echo "PostgreSQL is ready!" + return 0 + fi + echo "Waiting for PostgreSQL to start (attempt $attempt/$max_attempts)..." + sleep 2 + attempt=$((attempt + 1)) + done + + echo "PostgreSQL failed to start after $max_attempts attempts" + return 1 +} + +check_orioledb_ready() { + local max_attempts=30 + local attempt=1 + + while [ $attempt -le $max_attempts ]; do + if "${PSQLBIN}/psql" -v ON_ERROR_STOP=1 -U "$PGSQL_SUPERUSER" -p "$PORTNO" -h localhost -d postgres -c "SELECT * FROM pg_am WHERE amname = 'orioledb'" | grep -q orioledb; then + echo "Orioledb extension is ready!" + return 0 + fi + echo "Waiting for orioledb to be ready (attempt $attempt/$max_attempts)..." + sleep 2 + attempt=$((attempt + 1)) + done + + echo "Orioledb failed to initialize after $max_attempts attempts" + return 1 +} + +perform_dump() { + local max_attempts=3 + local attempt=1 + + while [ $attempt -le $max_attempts ]; do + echo "Attempting pg_dump (attempt $attempt/$max_attempts)" + + if "${PSQLBIN}/pg_dump" -h localhost -p "$PORTNO" -U "$PGSQL_SUPERUSER" -d postgres --schema-only --no-owner --no-privileges > "./db/schema.sql"; then + return 0 + fi + + echo "Dump attempt $attempt failed, waiting before retry..." + sleep 5 + attempt=$((attempt + 1)) + done + + echo "All dump attempts failed" + return 1 +} + +migrate_version() { + echo "PSQL_VERSION: $PSQL_VERSION" + #pkill -f "postgres" || true # Ensure PostgreSQL is stopped before starting + PSQLBIN=$(nix build --no-link "$FLAKE_URL#psql_$PSQL_VERSION/bin" --json | jq -r '.[].outputs.out + "/bin"') + echo "Using PostgreSQL version $PSQL_VERSION from $PSQLBIN" + + # Start PostgreSQL + start_postgres + echo "Waiting for PostgreSQL to be ready..." + + # Wait for PostgreSQL to be ready to accept connections + if ! wait_for_postgres; then + echo "Failed to connect to PostgreSQL server" + cleanup + exit 1 + fi + + if [ "$PSQL_VERSION" = "orioledb-17" ]; then + if ! check_orioledb_ready; then + echo "Failed to initialize orioledb extension" + exit 1 + fi + fi + + echo "PostgreSQL server is ready" + + # Configure PostgreSQL roles and permissions + if ! "${PSQLBIN}/psql" -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U "$PGSQL_SUPERUSER" -p "$PORTNO" -h localhost -d postgres <<-EOSQL +create role postgres superuser login password '$PGPASSWORD'; +alter database postgres owner to postgres; +EOSQL + then + echo "Failed to configure PostgreSQL roles and permissions" + exit 1 + fi + "${PSQLBIN}/psql" -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U postgres -p "$PORTNO" -h localhost -d postgres -f "$PGBOUNCER_AUTH_SCHEMA_SQL" + "${PSQLBIN}/psql" -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U postgres -p "$PORTNO" -h localhost -d postgres -f "$STAT_EXTENSION_SQL" + + # Set db url to run dbmate + export DATABASE_URL="postgres://$PGSQL_USER:$PGPASSWORD@localhost:$PORTNO/postgres?sslmode=disable" + # Export path so dbmate can find correct psql and pg_dump + export PATH="$PSQLBIN:$PATH" + # Run init scripts + if ! dbmate --migrations-dir "$MIGRATIONS_DIR/init-scripts" up; then + echo "Error: Initial migration failed" + exit 1 + fi + + # Password update command + if ! "${PSQLBIN}/psql" -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U postgres -p "$PORTNO" -h localhost -c "ALTER USER supabase_admin WITH PASSWORD '$PGPASSWORD'"; then + echo "Error: Failed to update supabase_admin password" + exit 1 + fi + + # Set up database URL + export DATABASE_URL="postgres://$PGSQL_SUPERUSER:$PGPASSWORD@localhost:$PORTNO/postgres?sslmode=disable" + # Run migrations + if ! dbmate --migrations-dir "$MIGRATIONS_DIR/migrations" up; then + echo "Error: Final migration failed" + exit 1 + fi + + echo "Running dbmate dump with $PSQLBIN" + perform_dump + + echo "CURRENT_SYSTEM: $CURRENT_SYSTEM" + if [ -f "./db/schema.sql" ]; then + trim_schema + cp "./db/schema.sql" "./migrations/schema-$PSQL_VERSION.sql" + echo "Schema file moved to ./migrations/schema-$PSQL_VERSION.sql" + echo "PSQLBIN is $PSQLBIN" + else + echo "Warning: schema.sql file not found in ./db directory" + exit 1 + fi + + # If we get here, all commands succeeded + echo "PostgreSQL migration completed successfully" + echo "Check migrations are idempotent" + for sql in ./migrations/db/migrations/*.sql; do + echo "$0: running $sql" + "${PSQLBIN}/psql" -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U "$PGSQL_SUPERUSER" -p "$PORTNO" -h localhost -d postgres -f "$sql" || { + echo "Failed to execute $sql" + exit 1 + } + done +} + +if [ "$PSQL_VERSION" == "all" ]; then + VERSIONS=$(yq '.postgres_major[]' "$ANSIBLE_VARS" | tr -d '"') + echo "$VERSIONS" | while read -r version; do + PSQL_VERSION="$version" + echo "Migrating to PostgreSQL version $PSQL_VERSION" + migrate_version + cleanup + done +else + echo "Migrating to PostgreSQL version $PSQL_VERSION" + migrate_version + cleanup +fi diff --git a/nix/tools/local-infra-bootstrap.sh.in b/nix/tools/local-infra-bootstrap.sh.in new file mode 100644 index 000000000..f1f8b752e --- /dev/null +++ b/nix/tools/local-infra-bootstrap.sh.in @@ -0,0 +1,407 @@ +#!/usr/bin/env bash +# shellcheck shell=bash + +[ ! -z "$DEBUG" ] && set -x + +# Colors +GREEN='\033[0;32m' +RED='\033[0;31m' +NC='\033[0m' # No Color +BOLD='\033[1m' + +INFRA_REPO_DIR="" +SUPABASE_REPO="" +SETUP_FLAG=false +NODE_VERSION="20" # Default Node.js version + +print_help() { + echo "Usage: nix run .#local-infra-bootstrap -- [options]" + echo + echo "Options:" + echo " -h, --help Show this help message" + echo " -s, --setup Setup the local infrastructure for development NOTE: Requires --infrastructure-repo and --supabase-repo" + echo " --infrastructure-repo Full path to infrastructure repository directory" + echo " --supabase-repo Full path to Supabase repository directory" + echo " --aws-yubikey-setup Install AWS CLI tools with YubiKey support" + echo " --aws-yubikey-setup-no-key Install AWS CLI tools without YubiKey" + echo " --node-version Specify Node.js version to install/use (default: $NODE_VERSION)" + echo + echo "Description:" + echo " Bootstrap the local infrastructure for development." + echo " This tool wraps homebrew and other tools to install the necessary dependencies." + echo + echo "Examples:" + echo " nix run .#local-infra-bootstrap -- --setup --infrastructure-repo /path/to/infrastructure --supabase-repo /path/to/supabase" + echo " nix run .#local-infra-bootstrap -- --aws-yubikey-setup" + echo " nix run .#local-infra-bootstrap -- --setup --node-version 18" +} + +check_brew() { + if command -v brew >/dev/null 2>&1; then + echo "Homebrew is installed." + echo "Version: $(brew --version)" + else + echo "Homebrew is not installed." + echo "To install Homebrew, run the following command:" + echo + echo '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"' + echo + echo "After installation, you may need to add Homebrew to your PATH:" + echo + echo "For Intel Macs:" + echo 'echo '\''eval "$(/usr/local/bin/brew shellenv)"'\'' >> ~/.zprofile' + echo 'eval "$(/usr/local/bin/brew shellenv)"' + echo + echo "For Apple Silicon Macs (M1/M2/M3):" + echo 'echo '\''eval "$(/opt/homebrew/bin/brew shellenv)"'\'' >> ~/.zprofile' + echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' + exit 1 + fi +} + +check_and_setup_node() { + echo -e "\n${BOLD}Checking Node.js installation...${NC}" + + # Check if the specified node version is installed + if ! brew list "node@$NODE_VERSION" &>/dev/null; then + echo "Node.js $NODE_VERSION is not installed. Installing..." + brew install "node@$NODE_VERSION" + fi + + # Unlink any existing node version + brew unlink node@* 2>/dev/null || true + + # Link the desired version with overwrite + echo "Linking Node.js $NODE_VERSION..." + brew link --overwrite --force "node@$NODE_VERSION" + + # Verify installation + if ! command -v node &>/dev/null; then + echo -e "${RED}❌ Failed to install Node.js $NODE_VERSION${NC}" + return 1 + fi + + current_version=$(node -v | cut -d 'v' -f2 | cut -d '.' -f1) + if [ "$current_version" = "$NODE_VERSION" ]; then + echo -e "${GREEN}✅ Node.js $NODE_VERSION is now active${NC}" + return 0 + else + echo -e "${RED}❌ Failed to switch to Node.js $NODE_VERSION${NC}" + return 1 + fi +} + +configure_ngrok() { + echo -e "\n${BOLD}Configuring ngrok settings...${NC}" + + if [ -z "$INFRA_REPO_DIR" ]; then + echo -e "${RED}Error: Infrastructure repository directory not specified${NC}" + return 1 + fi + + local env_file="$INFRA_REPO_DIR/.local.env" + mkdir -p "$INFRA_REPO_DIR" + + read -p "Enter your ngrok static domain (example.ngrok-free.app): " static_domain + read -p "Enter your ngrok auth token: " auth_token + + if [[ -z "$static_domain" || -z "$auth_token" ]]; then + echo -e "${RED}Error: Both static domain and auth token are required${NC}" + return 1 + fi + + cat > "$env_file" << EOF +EXTERNAL_SUPABASE_API_URL=http://${static_domain} +NGROK_AUTHTOKEN=${auth_token} +NGROK_STATIC_DOMAIN=${static_domain} +WARP_ALWAYS_ENABLED=true +SUPABASE_PATH=${SUPABASE_REPO} +EOF + + echo -e "${GREEN}✅ ngrok configuration saved to ${env_file}${NC}" +} + +check_app() { + local brew_name=$1 + local check_command=$2 + + echo "Checking $brew_name..." + + # Special case for OrbStack + if [ "$brew_name" = "orbstack" ]; then + if [ -d "/Applications/OrbStack.app" ]; then + echo "✅ $brew_name is installed" + return 0 + else + echo "❌ $brew_name is not installed" + return 1 + fi + fi + + # Standard command check + if command -v "$check_command" >/dev/null 2>&1; then + echo "✅ $brew_name is installed" + return 0 + else + echo "❌ $brew_name is not installed" + return 1 + fi +} + +install_app() { + local app=$1 + echo "Installing $app..." + + case "$app" in + "orbstack") + brew install --cask "$app" + if [ -d "/Applications/OrbStack.app" ]; then + echo "✅ OrbStack installed successfully" + echo "⚠️ Important: Please open OrbStack.app to complete the setup" + return 0 + fi + ;; + "aws-vault") + brew install --cask "$app" + # Give the system a moment to complete the linking + sleep 1 + if [ -f "/opt/homebrew/bin/aws-vault" ] || [ -f "/usr/local/bin/aws-vault" ]; then + echo "✅ aws-vault installed successfully" + return 0 + fi + ;; + "awscli") + brew install "$app" + # Reload shell environment to ensure AWS CLI is in PATH + eval "$(/opt/homebrew/bin/brew shellenv)" + if command -v aws >/dev/null 2>&1; then + echo "✅ $app installed successfully" + return 0 + fi + ;; + "dbmate"|*) + brew install "$app" + if command -v "$app" >/dev/null 2>&1; then + echo "✅ $app installed successfully" + return 0 + fi + ;; + esac + + echo "❌ Failed to install $app" + return 1 +} + +check_corepack_pnpm() { + echo -e "\nChecking Corepack PNPM setup..." + + # First check if pnpm binary exists in common locations + if [ -f "$(which pnpm 2>/dev/null)" ]; then + # Try to get version without executing pnpm + echo -e "${GREEN}✅ PNPM is enabled${NC}" + return 0 + else + echo -e "${RED}❌ PNPM is not installed${NC}" + return 1 + fi +} + +enable_corepack_pnpm() { + local pnpm_checked=false + + if [ "$pnpm_checked" = false ]; then + if ! check_corepack_pnpm; then + read -p "Would you like to enable PNPM through Corepack? (y/n) " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Running corepack enable pnpm..." + # Remove existing symlinks if present + sudo rm -f /opt/homebrew/bin/pnpm /opt/homebrew/bin/pnpx + if NODE_OPTIONS="" corepack enable pnpm; then + echo -e "${GREEN}✅ Successfully enabled PNPM through Corepack${NC}" + pnpm_checked=true + return 0 + else + echo -e "${RED}❌ Failed to enable PNPM through Corepack${NC}" + pnpm_checked=true + return 1 + fi + else + echo -e "\n${BOLD}Skipping PNPM setup...${NC}" + pnpm_checked=true + return 0 + fi + else + pnpm_checked=true + return 0 + fi + fi + return 0 +} + +install_prerequisites() { + echo -e "\n${BOLD}Checking Prerequisites ...${NC}" + echo + + # Define apps and their check commands + local apps=("awscli" "dbmate" "orbstack" "corepack" "aws-vault" "tmux" "tmuxp" "ngrok") + local commands=("aws" "dbmate" "orbstack" "corepack" "aws-vault" "tmux" "tmuxp" "ngrok") + local pnpm_checked=false + + # Check each app and prompt for installation if missing + for i in "${!apps[@]}"; do + local brew_name="${apps[$i]}" + local check_command="${commands[$i]}" + + check_app "$brew_name" "$check_command" + if [ $? -eq 1 ]; then + read -p "Would you like to install $brew_name? (y/n) " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + case "$brew_name" in + "tmux"|"tmuxp") + echo "Installing $brew_name..." + brew install "$brew_name" + if command -v "$brew_name" >/dev/null 2>&1; then + echo -e "${GREEN}✅ $brew_name installed successfully${NC}" + else + echo -e "${RED}❌ Failed to install $brew_name${NC}" + fi + ;; + *) + install_app "$brew_name" + ;; + esac + + # If we just installed corepack, check and enable pnpm + if [ "$brew_name" = "corepack" ] && [ "$pnpm_checked" = false ]; then + NODE_OPTIONS="" enable_corepack_pnpm + pnpm_checked=true + fi + else + echo -e "\n${BOLD}Skipping installation of $brew_name ...${NC}" + fi + elif [ "$brew_name" = "corepack" ] && [ "$pnpm_checked" = false ]; then + # If corepack is already installed, check pnpm once + NODE_OPTIONS="" enable_corepack_pnpm + pnpm_checked=true + fi + echo + done + if command -v ngrok >/dev/null 2>&1; then + configure_ngrok + fi + echo -e "\n${BOLD}Prerequisites Check Complete ${NC}" +} + +# AWS YubiKey Setup Function - Only installs required tools +install_aws_tools() { + echo -e "\n${BOLD}Installing required AWS CLI tools...${NC}" + + # Check and install AWS CLI + if ! command -v aws >/dev/null 2>&1; then + brew install awscli + echo -e "✅ AWS CLI installed" + else + echo -e "✅ AWS CLI already installed" + fi + + # Check and install AWS Vault + if ! command -v aws-vault >/dev/null 2>&1; then + brew install homebrew/cask/aws-vault + echo -e "✅ AWS Vault installed" + else + echo -e "✅ AWS Vault already installed" + fi + + if [[ "$1" != "--no-yubikey" ]]; then + # Check and install YubiKey Manager + if ! command -v ykman >/dev/null 2>&1; then + brew install ykman + echo -e "✅ YubiKey Manager installed" + else + echo -e "✅ YubiKey Manager already installed" + fi + fi + + echo -e "\n${BOLD}✅ AWS CLI tools installation complete${NC}" + echo -e "Please follow the AWS CLI MFA+YubiKey setup documentation for next steps." +} + +while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) + print_help + exit 0 + ;; + -s|--setup) + SETUP_FLAG=true + shift + ;; + --node-version) + if [ -n "$2" ]; then + NODE_VERSION="$2" + shift 2 + else + echo "Error: --node-version requires a version number" + exit 1 + fi + ;; + --infrastructure-repo) + if [ -n "$2" ]; then + INFRA_REPO_DIR="$2" + shift 2 + else + echo "Error: --infrastructure-repo requires a path argument" + exit 1 + fi + ;; + --supabase-repo) + if [ -n "$2" ]; then + SUPABASE_REPO="$2" + shift 2 + else + echo "Error: --supabase-repo requires a path argument" + exit 1 + fi + ;; + --aws-yubikey-setup) + check_brew + install_aws_tools + shift + ;; + --aws-yubikey-setup-no-key) + check_brew + install_aws_tools "--no-yubikey" + shift + ;; + *) + echo "Unknown argument: $1" + print_help + exit 1 + ;; + esac +done + +# Validate setup requirements +if [ "$SETUP_FLAG" = true ]; then + if [ -z "$INFRA_REPO_DIR" ]; then + echo -e "${RED}Error: --infrastructure-repo is required when using --setup${NC}" + print_help + exit 1 + fi + if [ -z "$SUPABASE_REPO" ]; then + echo -e "${RED}Error: --supabase-repo is required when using --setup${NC}" + print_help + exit 1 + fi + check_brew + check_and_setup_node + install_prerequisites +fi + +# If no arguments provided, show help +if [ "$SETUP_FLAG" = false ] && [ -z "$INFRA_REPO_DIR" ]; then + print_help + exit 0 +fi \ No newline at end of file diff --git a/nix/tools/migrate-tool.sh.in b/nix/tools/migrate-tool.sh.in new file mode 100644 index 000000000..10239ed80 --- /dev/null +++ b/nix/tools/migrate-tool.sh.in @@ -0,0 +1,123 @@ +#!/usr/bin/env bash + +[ ! -z "$DEBUG" ] && set -x + +# first argument is the old version; a path 15 or 16 +if [[ $1 == /nix/store* ]]; then + if [ ! -L "$1/receipt.json" ] || [ ! -e "$1/receipt.json" ]; then + echo "ERROR: $1 does not look like a valid Postgres install" + exit 1 + fi + OLDVER="$1" +elif [ "$1" == "15" ]; then + PSQL15=@PSQL15_BINDIR@ + OLDVER="$PSQL15" +elif [ "$1" == "16" ]; then + PSQL16=@PSQL16_BINDIR@ + OLDVER="$PSQL16" +else + echo "Please provide a valid Postgres version (15 or 16), or a /nix/store path" + exit 1 +fi + +# second argument is the new version; 15 or 16 +if [[ $2 == /nix/store* ]]; then + if [ ! -L "$2/receipt.json" ] || [ ! -e "$2/receipt.json" ]; then + echo "ERROR: $1 does not look like a valid Postgres install" + exit 1 + fi + NEWVER="$2" +elif [ "$2" == "15" ]; then + PSQL15=@PSQL15_BINDIR@ + NEWVER="$PSQL15" +elif [ "$2" == "16" ]; then + PSQL16=@PSQL16_BINDIR@ + NEWVER="$PSQL16" + echo "NEWVER IS $NEWVER" +else + echo "Please provide a valid Postgres version (15 or 16), or a /nix/store path" + exit 1 +fi + +# thid argument is the upgrade method: either pg_dumpall or pg_ugprade +if [ "$3" != "pg_dumpall" ] && [ "$3" != "pg_upgrade" ]; then + echo "Please provide a valid upgrade method (pg_dumpall or pg_upgrade)" + exit 1 +fi +UPGRADE_METHOD="$3" + +echo "Old server build: PSQL $1" +echo "New server build: PSQL $2" +echo "Upgrade method: $UPGRADE_METHOD" + +PORTNO="${2:-@PGSQL_DEFAULT_PORT@}" +DATDIR=$(mktemp -d) +NEWDAT=$(mktemp -d) +mkdir -p "$DATDIR" "$NEWDAT" + +echo "NOTE: using temporary directory $DATDIR for PSQL $1 data, which will not be removed" +echo "NOTE: you are free to re-use this data directory at will" +echo + +$OLDVER/bin/initdb -D "$DATDIR" --locale=C --username=supabase_admin +$NEWVER/bin/initdb -D "$NEWDAT" --locale=C --username=supabase_admin + +# NOTE (aseipp): we need to patch postgresql.conf to have the right pgsodium_getkey script +PSQL_CONF_FILE=@PSQL_CONF_FILE@ +PGSODIUM_GETKEY_SCRIPT=@PGSODIUM_GETKEY@ +echo "NOTE: patching postgresql.conf files" +for x in "$DATDIR" "$NEWDAT"; do + sed \ + "s#@PGSODIUM_GETKEY_SCRIPT@#$PGSODIUM_GETKEY_SCRIPT#g" \ + $PSQL_CONF_FILE > "$x/postgresql.conf" +done + +echo "NOTE: Starting first server (v${1}) to load data into the system" +$OLDVER/bin/pg_ctl start -D "$DATDIR" + +PRIMING_SCRIPT=@PRIMING_SCRIPT@ +MIGRATION_DATA=@MIGRATION_DATA@ + +$OLDVER/bin/psql -h localhost -d postgres -Xf "$PRIMING_SCRIPT" +$OLDVER/bin/psql -h localhost -d postgres -Xf "$MIGRATION_DATA" + +if [ "$UPGRADE_METHOD" == "pg_upgrade" ]; then + echo "NOTE: Stopping old server (v${1}) to prepare for migration" + $OLDVER/bin/pg_ctl stop -D "$DATDIR" + + echo "NOTE: Migrating old data $DATDIR to $NEWDAT using pg_upgrade" + + export PGDATAOLD="$DATDIR" + export PGDATANEW="$NEWDAT" + export PGBINOLD="$OLDVER/bin" + export PGBINNEW="$NEWVER/bin" + + if ! $NEWVER/bin/pg_upgrade --check; then + echo "ERROR: pg_upgrade check failed" + exit 1 + fi + + echo "NOTE: pg_upgrade check passed, proceeding with migration" + $NEWVER/bin/pg_upgrade + rm -f delete_old_cluster.sh # we don't need this + exit 0 +fi + +if [ "$UPGRADE_METHOD" == "pg_dumpall" ]; then + SQLDAT="$DATDIR/dump.sql" + echo "NOTE: Exporting data via pg_dumpall ($SQLDAT)" + $NEWVER/bin/pg_dumpall -h localhost > "$SQLDAT" + + echo "NOTE: Stopping old server (v${1}) to prepare for migration" + $OLDVER/bin/pg_ctl stop -D "$DATDIR" + + echo "NOTE: Starting second server (v${2}) to load data into the system" + $NEWVER/bin/pg_ctl start -D "$NEWDAT" + + echo "NOTE: Loading data into new server (v${2}) via 'cat | psql'" + cat "$SQLDAT" | $NEWVER/bin/psql -h localhost -d postgres + + printf "\n\n\n\n" + echo "NOTE: Done, check logs. Stopping the server; new database is located at $NEWDAT" + $NEWVER/bin/pg_ctl stop -D "$NEWDAT" +fi diff --git a/nix/tools/postgresql_schema.sql b/nix/tools/postgresql_schema.sql new file mode 100644 index 000000000..4547ab239 --- /dev/null +++ b/nix/tools/postgresql_schema.sql @@ -0,0 +1,11 @@ +ALTER DATABASE postgres SET "app.settings.jwt_secret" TO 'my_jwt_secret_which_is_not_so_secret'; +ALTER DATABASE postgres SET "app.settings.jwt_exp" TO 3600; +ALTER USER supabase_admin WITH PASSWORD 'postgres'; +ALTER USER postgres WITH PASSWORD 'postgres'; +ALTER USER authenticator WITH PASSWORD 'postgres'; +ALTER USER pgbouncer WITH PASSWORD 'postgres'; +ALTER USER supabase_auth_admin WITH PASSWORD 'postgres'; +ALTER USER supabase_storage_admin WITH PASSWORD 'postgres'; +ALTER USER supabase_replication_admin WITH PASSWORD 'postgres'; +ALTER ROLE supabase_read_only_user WITH PASSWORD 'postgres'; +ALTER ROLE supabase_admin SET search_path TO "$user",public,auth,extensions; diff --git a/nix/tools/run-client.sh.in b/nix/tools/run-client.sh.in new file mode 100644 index 000000000..6acb4d6c0 --- /dev/null +++ b/nix/tools/run-client.sh.in @@ -0,0 +1,107 @@ +#!/usr/bin/env bash +# shellcheck shell=bash + +[ ! -z "$DEBUG" ] && set -x + +# Default values +PSQL_VERSION="15" +PORTNO="@PGSQL_DEFAULT_PORT@" +PSQL_USER="postgres" + +# Function to display help +print_help() { + echo "Usage: nix run .#start-client -- [options]" + echo + echo "Options:" + echo " -v, --version [15|16|orioledb-16] Specify the PostgreSQL version to use (required)" + echo " -u, --user USER Specify the user/role to use (default: postgres)" + echo " -h, --help Show this help message" + echo + echo "Description:" + echo " Starts an interactive 'psql' session connecting to a Postgres database started with the" + echo " 'nix run .#start-server' command. If a migration file is not provided, the client" + echo " initializes the database with the default migrations for a new Supabase project." + echo " If a migrations file is provided, default migrations are skipped" + echo " If no migration file is provided, it runs the default Supabase migrations." + echo + echo "Examples:" + echo " nix run .#start-client" + echo " nix run .#start-client -- --version 15" + echo " nix run .#start-client -- --version 16 --port 5433" + echo " nix run .#start-client -- --version 16 --user supabase_admin" +} + +# Parse arguments +while [[ "$#" -gt 0 ]]; do + case "$1" in + -v|--version) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + PSQL_VERSION="$2" + shift 2 + else + echo "Error: --version requires an argument (15, 16, or orioledb-16)" + exit 1 + fi + ;; + -u|--user) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + PSQL_USER="$2" + shift 2 + else + echo "Error: --user requires an argument" + exit 1 + fi + ;; + -p|--port) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + PORTNO="$2" + shift 2 + else + echo "Error: --port requires an argument" + exit 1 + fi + ;; + -h|--help) + print_help + exit 0 + ;; + *) + echo "Unknown option: $1" + print_help + exit 1 + ;; + esac +done + +# Check if version is provided +if [[ -z "$PSQL_VERSION" ]]; then + echo "Error: PostgreSQL version is required." + print_help + exit 1 +fi + +# Determine PostgreSQL version +if [ "$PSQL_VERSION" == "15" ]; then + echo "Starting client for PSQL 15" + PSQL15=@PSQL15_BINDIR@ + BINDIR="$PSQL15" +elif [ "$PSQL_VERSION" == "17" ]; then + echo "Starting client for PSQL 17" + PSQL17=@PSQL17_BINDIR@ + BINDIR="$PSQL17" +elif [ "$PSQL_VERSION" == "orioledb-17" ]; then + echo "Starting client for PSQL ORIOLEDB 17" + PSQLORIOLEDB17=@PSQLORIOLEDB17_BINDIR@ + BINDIR="$PSQLORIOLEDB17" +else + echo "Please provide a valid Postgres version (15, 17, or orioledb-17)" + exit 1 +fi + +#vars for migration.sh +export PATH=$BINDIR/bin:$PATH +export POSTGRES_DB=postgres +export POSTGRES_HOST=localhost + +# Start interactive psql session +exec psql -U "$PSQL_USER" -p "$PORTNO" -h localhost postgres diff --git a/nix/tools/run-replica.sh.in b/nix/tools/run-replica.sh.in new file mode 100644 index 000000000..e2096b17a --- /dev/null +++ b/nix/tools/run-replica.sh.in @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# shellcheck shell=bash + +[ ! -z "$DEBUG" ] && set -x + +# first argument should be '15' or '16' for the version +if [ "$1" == "15" ]; then + echo "Starting server for PSQL 15" + PSQL15=@PSQL15_BINDIR@ + BINDIR="$PSQL15" +elif [ "$1" == "16" ]; then + echo "Starting server for PSQL 16" + PSQL16=@PSQL16_BINDIR@ + BINDIR="$PSQL16" +elif [ "$1" == "orioledb-16" ]; then + echo "Starting server for PSQL ORIOLEDB 16" + PSQLORIOLEDB16=@PSQLORIOLEDB16_BINDIR@ + BINDIR="$PSQLORIOLEDB16" +else + echo "Please provide a valid Postgres version (15, 16 or orioledb-16)" + exit 1 +fi + +export PATH=$BINDIR/bin:$PATH + +PGSQL_SUPERUSER=@PGSQL_SUPERUSER@ +MASTER_PORTNO="$2" +REPLICA_PORTNO="$3" +REPLICA_SLOT="replica_$RANDOM" +DATDIR=$(mktemp -d) +mkdir -p "$DATDIR" + +echo "NOTE: runing pg_basebackup for server on port $MASTER_PORTNO" +echo "NOTE: using replica slot $REPLICA_SLOT" + +pg_basebackup -p "$MASTER_PORTNO" -h localhost -U "${PGSQL_SUPERUSER}" -X stream -C -S "$REPLICA_SLOT" -v -R -D "$DATDIR" + +echo "NOTE: using port $REPLICA_PORTNO for replica" +echo "NOTE: using temporary directory $DATDIR for data, which will not be removed" +echo "NOTE: you are free to re-use this data directory at will" +echo + +exec postgres -p "$REPLICA_PORTNO" -D "$DATDIR" -k /tmp diff --git a/nix/tools/run-restore.sh.in b/nix/tools/run-restore.sh.in new file mode 100644 index 000000000..33fa70c3a --- /dev/null +++ b/nix/tools/run-restore.sh.in @@ -0,0 +1,121 @@ +#!/usr/bin/env bash +# shellcheck shell=bash + +set -euo pipefail + +# Function to display help message +show_help() { + echo "Usage: nix run .#pg-restore -- [OPTIONS]" + echo + echo "Run pg_restore with the specified parameters." + echo + echo "Options:" + echo " --version PostgreSQL version (currently only 15 is supported)" + echo " --dbname Name of the database to restore to" + echo " --host Host of the database server" + echo " --user Database user to connect as" + echo " --file Path to the file to restore from (absolute or relative to current directory)" + echo " --port Port number (default: 5432)" + echo " -h, --help Show this help message and exit" + echo "Example:" + echo "nix run .#pg-restore -- --version 15 --dbname postgres --host localhost --user postgres --port 5435 --file my.dump" +} + +# Initialize variables +PG_VERSION="" +DBNAME="" +DBHOST="" +DBUSER="" +RESTORE_FILE="" +PORT="5432" + +# Parse command line arguments +while [[ $# -gt 0 ]]; do + case $1 in + --version) + PG_VERSION="$2" + shift 2 + ;; + --dbname) + DBNAME="$2" + shift 2 + ;; + --host) + DBHOST="$2" + shift 2 + ;; + --user) + DBUSER="$2" + shift 2 + ;; + --file) + RESTORE_FILE="$2" + shift 2 + ;; + --port) + PORT="$2" + shift 2 + ;; + -h|--help) + show_help + exit 0 + ;; + *) + echo "Unknown option: $1" + show_help + exit 1 + ;; + esac +done + +# Check if all required arguments are provided +if [ -z "$PG_VERSION" ] || [ -z "$DBNAME" ] || [ -z "$DBHOST" ] || [ -z "$DBUSER" ] || [ -z "$RESTORE_FILE" ]; then + echo "Error: Missing required arguments." + show_help + exit 1 +fi + +if [ "$PG_VERSION" == "15" ]; then + echo "Starting restore for PSQL 15" + PSQL15=@PSQL15_BINDIR@ + PSQL_BINDIR="$PSQL15" +else + echo "Error: Please provide a valid Postgres version (currently only 15 is supported)" + show_help + exit 1 +fi + +# Convert RESTORE_FILE to an absolute path if it's relative +if [[ "$RESTORE_FILE" != /* ]]; then + RESTORE_FILE="$(pwd)/$RESTORE_FILE" +fi + +# Check if the file exists +if [ ! -f "$RESTORE_FILE" ]; then + echo "Error: Restore file '$RESTORE_FILE' does not exist." + exit 1 +fi + +echo "Using restore file: $RESTORE_FILE" + +# Run pg_restore and capture its exit status +"$PSQL_BINDIR/bin/pg_restore" \ + -h "$DBHOST" \ + -p "$PORT" \ + -U "$DBUSER" \ + -d "$DBNAME" \ + -v \ + --no-owner \ + --no-acl \ + "$RESTORE_FILE" + +RESTORE_STATUS=$? + +# Check the exit status of pg_restore +if [ $RESTORE_STATUS -eq 0 ]; then + echo "Restore completed successfully." + exit 0 +else + echo "Restore failed with exit code $RESTORE_STATUS." + exit $RESTORE_STATUS +fi \ No newline at end of file diff --git a/nix/tools/run-server.sh.in b/nix/tools/run-server.sh.in new file mode 100644 index 000000000..227e1b7be --- /dev/null +++ b/nix/tools/run-server.sh.in @@ -0,0 +1,369 @@ +#!@SHELL_PATH@ +# shellcheck shell=bash +[ ! -z "$DEBUG" ] && set -x + +# Default values +SKIP_MIGRATIONS=false +PSQL_USER="postgres" +MIGRATION_FILE="" +DAEMONIZE=false +GETKEY_SCRIPT="" + +# Function to display help +print_help() { + echo "Usage: start-postgres-server [options] VERSION [PORT]" + echo + echo "Options:" + echo " --skip-migrations Skip running migrations and SQL statements" + echo " --migration-file FILE Provide a custom migration script" + echo " --user USER Specify the user/role to use (default: postgres)" + echo " --getkey-script SCRIPT Provide a custom path to the PGSODIUM_GETKEY_SCRIPT" + echo " -h, --help Show this help message" + echo + echo "VERSION must be one of: 15, orioledb-17" + echo "PORT is optional (default: @PGSQL_DEFAULT_PORT@)" +} + +start_postgres() { + local mode=$1 + local LOG_DIR="${DATDIR}_logs" + mkdir -p "$LOG_DIR" + local LOG_FILE="$LOG_DIR/postgres.log" + touch "$LOG_FILE" + if [ "$mode" = "daemon" ]; then + # Start the server + pg_ctl start -D "$DATDIR" -l "$LOG_FILE" \ + -o "--config-file=$DATDIR/postgresql.conf -p $PORTNO -k $DATDIR/tmp" + + # Give it a moment to write logs + sleep 1 + + # Check server status and logs + if ! pg_ctl status -D "$DATDIR"; then + echo "PostgreSQL failed to start. Full logs:" + cat "$LOG_FILE" + # You might also want to see the postmaster.pid if it exists + if [ -f "$DATDIR/postmaster.pid" ]; then + echo "postmaster.pid contents:" + cat "$DATDIR/postmaster.pid" + fi + return 1 + fi + else + # Foreground mode + exec postgres --config-file="$DATDIR/postgresql.conf" -p "$PORTNO" -D "$DATDIR" -k "/tmp" -F + fi +} + +stop_postgres() { + if [ "$DAEMONIZE" = true ]; then + echo "PostgreSQL is running in daemon mode. Please stop it using pg_ctl." + else + pg_ctl stop -D "$DATDIR" -m fast + fi +} + +trap 'stop_postgres' SIGINT SIGTERM + +# Parse arguments +while [[ "$#" -gt 0 ]]; do + case "$1" in + --skip-migrations) + SKIP_MIGRATIONS=true + shift + ;; + --migration-file) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + MIGRATION_FILE="$2" + shift 2 + else + echo "Error: --migration-file requires a filename" + exit 1 + fi + ;; + --user) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + PSQL_USER="$2" + shift 2 + else + echo "Error: --user requires an argument" + exit 1 + fi + ;; + --getkey-script) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + GETKEY_SCRIPT="$2" + shift 2 + else + echo "Error: --getkey-script requires a script path" + exit 1 + fi + ;; + --daemonize) + DAEMONIZE=true + shift + ;; + -h|--help) + print_help + exit 0 + ;; + --datdir) + if [[ -n "$2" && ! "$2" =~ ^- ]]; then + DATDIR="$2" + shift 2 + else + echo "Error: --datadir requires a directory path" + exit 1 + fi + ;; + *) + if [[ "$1" =~ ^- ]]; then + echo "Unknown option: $1" + print_help + exit 1 + elif [[ -z "$VERSION" ]]; then + VERSION="$1" + shift + elif [[ -z "$PORTNO" ]]; then + PORTNO="$1" + shift + else + echo "Error: Unexpected argument: $1" + print_help + exit 1 + fi + ;; + esac +done +if [[ -n "${GETKEY_SCRIPT:-}" ]]; then + export PGSODIUM_GETKEY_SCRIPT="$GETKEY_SCRIPT" +else + PGSODIUM_GETKEY_SCRIPT="${PGSODIUM_GETKEY_SCRIPT:-@PGSODIUM_GETKEY@}" +fi +# Verify version and set binary directory +if [ "$VERSION" == "15" ]; then + echo "Starting server for PSQL 15" + PSQL15=@PSQL15_BINDIR@ + BINDIR="$PSQL15" +elif [ "$VERSION" == "17" ]; then + echo "Starting server for PSQL 17" + PSQL17=@PSQL17_BINDIR@ + BINDIR="$PSQL17" +elif [ "$VERSION" == "orioledb-17" ]; then + echo "Starting server for PSQL ORIOLEDB 17" + PSQLORIOLEDB17=@PSQLORIOLEDB17_BINDIR@ + BINDIR="$PSQLORIOLEDB17" +else + echo "Please provide a valid Postgres version (15, 17, orioledb-17)" + exit 1 +fi + +# Set environment variables and paths +export PATH=$BINDIR/bin:$PATH +PGSQL_SUPERUSER=@PGSQL_SUPERUSER@ +PSQL_CONF_FILE=@PSQL_CONF_FILE@ +PORTNO="${PORTNO:-@PGSQL_DEFAULT_PORT@}" +SUPAUTILS_CONFIG_FILE=@SUPAUTILS_CONF_FILE@ +LOGGING_CONFIG_FILE=@LOGGING_CONF_FILE@ +READREPL_CONFIG_FILE=@READREPL_CONF_FILE@ +PG_HBA_FILE=@PG_HBA@ +PG_IDENT_FILE=@PG_IDENT@ +EXTENSION_CUSTOM_SCRIPTS=@EXTENSION_CUSTOM_SCRIPTS_DIR@ +GROONGA=@GROONGA_DIR@ +MIGRATIONS_DIR=@MIGRATIONS_DIR@ +POSTGRESQL_SCHEMA_SQL=@POSTGRESQL_SCHEMA_SQL@ +PGBOUNCER_AUTH_SCHEMA_SQL=@PGBOUNCER_AUTH_SCHEMA_SQL@ +STAT_EXTENSION_SQL=@STAT_EXTENSION_SQL@ +MECAB_LIB=@MECAB_LIB@ + +# Setup directories and locale settings +if [[ -z "$DATDIR" ]]; then + DATDIR=$(mktemp -d) +fi +LOCALE_ARCHIVE=@LOCALES@ +CURRENT_SYSTEM=@CURRENT_SYSTEM@ + +# Set locale environment +export LOCALE_ARCHIVE +export LANG=en_US.UTF-8 +export LANGUAGE=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 +export LC_CTYPE=en_US.UTF-8 +export KEY_FILE="$DATDIR/pgsodium.key" +echo "KEY_FILE: $KEY_FILE" +echo "KEY_FILE contents:" +cat "$KEY_FILE" + +echo "PGSODIUM_GETKEY_SCRIPT: $PGSODIUM_GETKEY_SCRIPT" +echo "NOTE: using port $PORTNO for server" +echo "NOTE: using temporary directory $DATDIR for data" +echo "NOTE: you are free to re-use this data directory at will" + +# Initialize database +if [ "$VERSION" = "orioledb-17" ]; then + initdb -D "$DATDIR" \ + --allow-group-access \ + --username="$PGSQL_SUPERUSER" \ + --locale-provider=icu \ + --encoding=UTF-8 \ + --icu-locale=en_US.UTF-8 +else + initdb -U "$PGSQL_SUPERUSER" -D "$DATDIR" +fi + +# Copy configuration files +echo "NOTE: patching postgresql.conf files" +cp "$PG_HBA_FILE" "$DATDIR/pg_hba.conf" +cp "$PG_IDENT_FILE" "$DATDIR/pg_ident.conf" +cp "$READREPL_CONFIG_FILE" "$DATDIR/read-replica.conf" +mkdir -p "$DATDIR/extension-custom-scripts" +cp -r "$EXTENSION_CUSTOM_SCRIPTS"/* "$DATDIR/extension-custom-scripts" + +# Configure supautils +sed "s|supautils.privileged_extensions_custom_scripts_path = '/etc/postgresql-custom/extension-custom-scripts'|supautils.privileged_extensions_custom_scripts_path = '$DATDIR/extension-custom-scripts'|" "$SUPAUTILS_CONFIG_FILE" > "$DATDIR/supautils.conf" + +# Configure PostgreSQL +sed -e "1i\\ +include = '$DATDIR/supautils.conf'" \ +-e "\$a\\ +pgsodium.getkey_script = '$PGSODIUM_GETKEY_SCRIPT'" \ +-e "\$a\\ +vault.getkey_script = '$PGSODIUM_GETKEY_SCRIPT'" \ +-e "s|data_directory = '/var/lib/postgresql/data'|data_directory = '$DATDIR'|" \ +-e "s|hba_file = '/etc/postgresql/pg_hba.conf'|hba_file = '$DATDIR/pg_hba.conf'|" \ +-e "s|ident_file = '/etc/postgresql/pg_ident.conf'|ident_file = '$DATDIR/pg_ident.conf'|" \ +-e "s|include = '/etc/postgresql/logging.conf'|#&|" \ +-e "s|include = '/etc/postgresql-custom/read-replica.conf'|include = '$DATDIR/read-replica.conf'|" \ +-e "\$a\\ +session_preload_libraries = 'supautils'" \ +"$PSQL_CONF_FILE" > "$DATDIR/postgresql.conf" + +# Function to configure OrioleDB specific settings +orioledb_config_items() { + if [[ "$1" = "orioledb-17" && "$CURRENT_SYSTEM" != "aarch64-darwin" ]]; then + # Remove items from postgresql.conf + echo "non-macos oriole conf" + sed -i 's/ timescaledb,//g;' "$DATDIR/postgresql.conf" + sed -i 's/db_user_namespace = off/#db_user_namespace = off/g;' "$DATDIR/postgresql.conf" + sed -i 's/ timescaledb,//g; s/ plv8,//g; s/ pgjwt,//g;' "$DATDIR/supautils.conf" + sed -i 's/\(shared_preload_libraries.*\)'\''\(.*\)$/\1, orioledb'\''\2/' "$DATDIR/postgresql.conf" + echo "default_table_access_method = 'orioledb'" >> "$DATDIR/postgresql.conf" + elif [[ "$1" = "orioledb-17" && "$CURRENT_SYSTEM" = "aarch64-darwin" ]]; then + # macOS specific configuration + echo "macOS detected, applying macOS specific configuration" + ls -la "$DATDIR" + + # Use perl instead of sed for macOS + perl -pi -e 's/ timescaledb,//g' "$DATDIR/postgresql.conf" + perl -pi -e 's/db_user_namespace = off/#db_user_namespace = off/g' "$DATDIR/postgresql.conf" + + perl -pi -e 's/ timescaledb,//g' "$DATDIR/supautils.conf" + perl -pi -e 's/ plv8,//g' "$DATDIR/supautils.conf" + perl -pi -e 's/ pgjwt,//g' "$DATDIR/supautils.conf" + perl -pi -e 's/(shared_preload_libraries\s*=\s*'\''.*?)'\''/\1, orioledb'\''/' "$DATDIR/postgresql.conf" + + echo "default_table_access_method = 'orioledb'" >> "$DATDIR/postgresql.conf" + elif [[ "$VERSION" == "17" && "$CURRENT_SYSTEM" != "aarch64-darwin" ]]; then + echo "non-macos pg 17 conf" + sed -i 's/ timescaledb,//g;' "$DATDIR/postgresql.conf" + sed -i 's/db_user_namespace = off/#db_user_namespace = off/g;' "$DATDIR/postgresql.conf" + sed -i 's/ timescaledb,//g; s/ plv8,//g; s/ pgjwt,//g;' "$DATDIR/supautils.conf" + elif [[ "$VERSION" == "17" && "$CURRENT_SYSTEM" = "aarch64-darwin" ]]; then + perl -pi -e 's/db_user_namespace = off/#db_user_namespace = off/g;' "$DATDIR/postgresql.conf" + perl -pi -e 's/ timescaledb,//g' "$DATDIR/postgresql.conf" + perl -pi -e 's/ timescaledb,//g' "$DATDIR/supautils.conf" + perl -pi -e 's/ plv8,//g;' "$DATDIR/supautils.conf" + perl -pi -e 's/ pgjwt,//g;' "$DATDIR/supautils.conf" + fi +} + +# Apply OrioleDB configuration if needed +orioledb_config_items "$VERSION" +# Configure Groonga +export GRN_PLUGINS_DIR=$GROONGA/lib/groonga/plugins + +# Start postgres +mkdir -p "$DATDIR/tmp" +chmod 1777 "$DATDIR/tmp" +start_postgres "daemon" + +# Wait for PostgreSQL to start +for i in {1..60}; do + if pg_isready -h localhost -p "$PORTNO" -q; then + echo "PostgreSQL is ready" + break + fi + sleep 1 + if [ $i -eq 60 ]; then + echo "PostgreSQL failed to start" + 'stop_postgres' 1 + fi +done + +# Create orioledb extension if needed +if [ "$VERSION" = "orioledb-17" ]; then + psql -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U "$PGSQL_SUPERUSER" -p "$PORTNO" -h localhost -d postgres -c "CREATE EXTENSION IF NOT EXISTS orioledb;" +fi + +# Skip migrations if requested +if [ "$SKIP_MIGRATIONS" = false ]; then + # Create postgres role and set ownership + if ! psql -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U "$PGSQL_SUPERUSER" -p "$PORTNO" -h localhost -d postgres <<-EOSQL + create role postgres superuser login password '$PGPASSWORD'; + alter database postgres owner to postgres; +EOSQL + then + 'stop_postgres' 1 + fi + + if [ -n "$MIGRATION_FILE" ]; then + echo "Running user-provided migration file $MIGRATION_FILE" + if ! psql -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U "$PGSQL_SUPERUSER" -p "$PORTNO" -h localhost -f "$MIGRATION_FILE" postgres; then + 'stop_postgres' 1 + fi + else + # Run default init scripts + for sql in "$MIGRATIONS_DIR"/init-scripts/*.sql; do + echo "Running $sql" + if ! psql -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U "$PSQL_USER" -p "$PORTNO" -h localhost -f "$sql" postgres; then + 'stop_postgres' 1 + fi + done + + # Set superuser password + if ! psql -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U "$PSQL_USER" -p "$PORTNO" -h localhost -c "ALTER USER supabase_admin WITH PASSWORD '$PGPASSWORD'"; then + 'stop_postgres' 1 + fi + + # Run additional schema files + if ! psql -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U "$PSQL_USER" -p "$PORTNO" -h localhost -d postgres -f "$PGBOUNCER_AUTH_SCHEMA_SQL"; then + 'stop_postgres' 1 + fi + if ! psql -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U "$PSQL_USER" -p "$PORTNO" -h localhost -d postgres -f "$STAT_EXTENSION_SQL"; then + 'stop_postgres' 1 + fi + + # Run migrations as superuser + for sql in "$MIGRATIONS_DIR"/migrations/*.sql; do + echo "Running $sql" + if ! psql -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U "$PGSQL_SUPERUSER" -p "$PORTNO" -h localhost -f "$sql" postgres; then + 'stop_postgres' 1 + fi + done + + # Run PostgreSQL schema + if ! psql -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U "$PGSQL_SUPERUSER" -p "$PORTNO" -h localhost -f "$POSTGRESQL_SCHEMA_SQL" postgres; then + 'stop_postgres' 1 + fi + fi +fi +echo "Shutting down PostgreSQL..." + +stop_postgres + +# Step 4: Restart PostgreSQL in the foreground (with log output visible) or as a daemon +if [ "$DAEMONIZE" = true ]; then + start_postgres "daemon" +else + start_postgres "foreground" +fi diff --git a/nix/tools/sync-exts-versions.sh.in b/nix/tools/sync-exts-versions.sh.in new file mode 100644 index 000000000..1b120e988 --- /dev/null +++ b/nix/tools/sync-exts-versions.sh.in @@ -0,0 +1,282 @@ +#!/usr/bin/env bash +# shellcheck shell=bash + +[ ! -z "$DEBUG" ] && set -x + +#pass in env vars supplied by nix +yq=@YQ@ +jq=@JQ@ +editor=@NIX_EDITOR@ +ansible_vars=$($yq '.' $PWD/ansible/vars.yml) +prefetchurl=@NIXPREFETCHURL@ +_nix=@NIX@ +fetch_source_url() { + local source_url=${1//\"/} # Remove double quotes + source_url=${source_url//\'/} # Remove single quotes + + # Check if the source URL is provided + if [ -z "$source_url" ]; then + echo "Usage: fetch_nix_url " + return 1 + fi + + echo "$source_url" + + # Run nix-prefetch-url command + local initial_hash=$($prefetchurl --type sha256 "$source_url" --unpack | cut -d ' ' -f 2) + #once we can bump up nix version, we can use nix hash convert --hash-algo sha256 + local final_hash=$($_nix hash to-sri --type sha256 $initial_hash) + echo "$final_hash" +} + +sync_version() { + + local package_name=$1 + local version="\"$2\"" + local hash="\"$3\"" + + + # Update the version and hash in the Nix expression + $editor $PWD/nix/ext/$package_name.nix version --inplace -v "$version" + $editor $PWD/nix/ext/$package_name.nix src.hash --inplace -v $hash +} + +run_sync() { + local varname=$1 + local package_name=$2 + + version=$(echo $ansible_vars | $jq -r '.'$varname'') + echo "$key: $version" + url=$($_nix eval .#psql_15/exts/$package_name.src.url) + hash=$(fetch_source_url $url | tail -n 1) + $(sync_version $package_name $version $hash) + echo "synced $package_name to version $version with hash $hash" + + +} + +#for use where nix uses fetchurl +# instead of fetchFromGithub +fetchurl_source_url() { + local source_url=${1//\"/} # Remove double quotes + source_url=${source_url//\'/} # Remove single quotes + + # Check if the source URL is provided + if [ -z "$source_url" ]; then + echo "Usage: fetch_nix_url " + return 1 + fi + + echo "$source_url" + + # Run nix-prefetch-url command + local initial_hash=$($prefetchurl --type sha256 "$source_url" | cut -d ' ' -f 2) + #once we can bump up nix version, we can use nix hash convert --hash-algo sha256 + local final_hash=$($_nix hash to-sri --type sha256 $initial_hash) + echo "$final_hash" +} + +sync_version_fetchurl() { + + local package_name=$1 + local version="\"$2\"" + local hash="\"$3\"" + + + # Update the version and hash in the Nix expression + $editor $PWD/nix/ext/$package_name.nix version --inplace -v "$version" + $editor $PWD/nix/ext/$package_name.nix src.sha256 --inplace -v $hash +} + + +run_sync_fetchurl() { + local varname=$1 + local package_name=$2 + + version=$(echo $ansible_vars | $jq -r '.'$varname'') + echo "$key: $version" + url=$($_nix eval .#psql_15/exts/$package_name.src.url) + hash=$(fetchurl_source_url $url | tail -n 1) + $(sync_version_fetchurl $package_name $version $hash) + echo "synced $package_name to version $version with hash $hash" + + +} + +#for use on derivations that use cargoHash +update_cargo_vendor_hash() { + local package_name=$1 + $editor $PWD/nix/ext/$package_name.nix cargoHash --inplace -v "" + output=$($_nix build .#psql_15/exts/$package_name 2>&1) + + # Check if the command exited with an error + if [ $? -ne 0 ]; then + # Extract the hash value after "got: " + hash_value_scraped=$(echo "$output" | grep "got:" | awk '{for (i=1; i<=NF; i++) if ($i ~ /^sha/) print $i}') + hash_value="\"$hash_value_scraped\"" + # Continue using the captured hash value + $editor $PWD/nix/ext/$package_name.nix cargoHash --inplace -v $hash_value + echo "Updated cargoHash for $package_name to $hash_value" + else + echo "$package_name builds successfully, moving on..." + fi +} + +#iterate values in ansible vars, case statement +# to match ansible var to package name +keys=$(echo "$ansible_vars" | $jq -r 'keys[]') + +for key in $keys; do + case $key in + "pg_hashids_release") + varname="pg_hashids_release" + package_name="pg_hashids" + run_sync $varname $package_name + ;; + "hypopg_release") + varname="hypopg_release" + package_name="hypopg" + run_sync $varname $package_name + ;; + "pg_graphql_release") + varname="pg_graphql_release" + package_name="pg_graphql" + run_sync $varname $package_name + update_cargo_vendor_hash $package_name + ;; + "pg_cron_release") + varname="pg_cron_release" + package_name="pg_cron" + run_sync $varname $package_name + ;; + "pgsql_http_release") + varname="pgsql_http_release" + package_name="pgsql-http" + run_sync $varname $package_name + ;; + "pg_jsonschema_release") + varname="pg_jsonschema_release" + package_name="pg_jsonschema" + run_sync $varname $package_name + update_cargo_vendor_hash $package_name + ;; + "pg_net_release") + varname="pg_net_release" + package_name="pg_net" + run_sync $varname $package_name + ;; + "pg_plan_filter_release") + varname="pg_plan_filter_release" + package_name="pg_plan_filter" + run_sync $varname $package_name + ;; + "pg_safeupdate_release") + varname="pg_safeupdate_release" + package_name="pg-safeupdate" + run_sync $varname $package_name + ;; + "pgsodium_release") + varname="pgsodium_release" + package_name="pgsodium" + run_sync $varname $package_name + ;; + "pg_repack_release") + varname="pg_repack_release" + package_name="pg_repack" + run_sync $varname $package_name + ;; + "pgrouting_release") + varname="pgrouting_release" + package_name="pgrouting" + run_sync $varname $package_name + ;; + "ptap_release") + varname="pgtap_release" + package_name="pgtap" + run_sync $varname $package_name + ;; + "pg_stat_monitor_release") + varname="pg_stat_monitor_release" + package_name="pg_stat_monitor" + run_sync $varname $package_name + ;; + "pg_tle_release") + varname="pg_tle_release" + package_name="pg_tle" + run_sync $varname $package_name + ;; + "pgaudit_release") + varname="pgaudit_release" + package_name="pgaudit" + run_sync $varname $package_name + ;; + "plpgsql_check_release") + varname="plpgsql_check_release" + package_name="plpgsql-check" + run_sync $varname $package_name + ;; + "pgvector_release") + varname="pgvector_release" + package_name="pgvector" + run_sync $varname $package_name + ;; + "pgjwt_release") + varname="pgjwt_release" + package_name="pgjwt" + run_sync $varname $package_name + ;; + "plv8_release") + varname="plv8_release" + package_name="plv8" + run_sync $varname $package_name + ;; + "postgis_release") + varname="postgis_release" + package_name="postgis" + run_sync_fetchurl $varname $package_name + ;; + "pgroonga_release") + varname="pgroonga_release" + package_name="pgroonga" + run_sync_fetchurl $varname $package_name + ;; + "rum_release") + varname="rum_release" + package_name="rum" + run_sync $varname $package_name + ;; + "timescaledb_release") + varname="timescaledb_release" + package_name="timescaledb" + run_sync $varname $package_name + ;; + "supautils_release") + varname="supautils_release" + package_name="supautils" + run_sync $varname $package_name + ;; + "vault_release") + varname="vault_release" + package_name="vault" + run_sync $varname $package_name + ;; + "wal2json_release") + varname="wal2json_release" + package_name="wal2json" + run_sync $varname $package_name + ;; + *) + ;; + esac +done + +# url=$($_nix eval .#psql_16/exts/pgvector.src.url) + +# fetch_nix_url "$url" + +#res=$editor /home/sam/postgres/nix/ext/pgvector.nix src +#echo $res +# url=$($_nix eval .#psql_16/exts/pgvector.src.url) +# #echo $url +# hash=$(fetch_source_url $url | tail -n 1) +# echo "$hash" diff --git a/nix/tools/update_readme.nu b/nix/tools/update_readme.nu new file mode 100755 index 000000000..bfb46ab0a --- /dev/null +++ b/nix/tools/update_readme.nu @@ -0,0 +1,212 @@ +#!/usr/bin/env nu + +# Load required data +def load_flake [] { + nix flake show --json --all-systems | from json +} + +def find_index [list: list, value: any] { + let enumerated = ($list | enumerate) + let found = ($enumerated | where item == $value | first) + if ($found | is-empty) { + -1 + } else { + $found.index + } +} + +def get_systems [flake_json] { + $flake_json | get packages | columns +} + +def get_postgres_versions [flake_json] { + let packages = ($flake_json | get packages | get aarch64-linux) + + # Get available versions from postgresql packages + let available_versions = ($packages + | columns + | where {|col| + # Match exact postgresql_ or postgresql_orioledb- + $col =~ "^postgresql_\\d+$" or $col =~ "^postgresql_orioledb-\\d+$" + } + | each {|pkg_name| + let is_orioledb = ($pkg_name =~ "orioledb") + let pkg_info = ($packages | get $pkg_name) + let version = if $is_orioledb { + $pkg_info.name | str replace "postgresql-" "" | split row "_" | first # Get "17" from "postgresql-17_5" + } else { + $pkg_info.name | str replace "postgresql-" "" | split row "." | first # Get "15" from "postgresql-15.8" + } + { + version: $version, + is_orioledb: $is_orioledb, + name: $pkg_info.name + } + } + ) + + $available_versions | uniq | sort-by version +} + +def get_src_url [pkg_attr] { + let result = (do { nix eval $".#($pkg_attr).src.url" } | complete) + if $result.exit_code == 0 { + $result.stdout | str trim | str replace -a '"' '' # Remove all quotes + } else { + null + } +} + +def get_extension_info [flake_json, pg_info] { + let major_version = ($pg_info.version | split row "." | first) + let version_prefix = if $pg_info.is_orioledb { + "psql_orioledb-" + $major_version + "/exts/" + } else { + "psql_" + $major_version + "/exts/" + } + + print $"Looking for extensions with prefix: ($version_prefix)" + + let sys_packages = ($flake_json | get packages | get aarch64-linux) + let ext_names = ($sys_packages + | columns + | where {|col| $col =~ $"^($version_prefix)"} + ) + print $"Found extensions: ($ext_names | str join ', ')" + + let all_exts = ($ext_names | each {|ext_name| + let ext_info = ($sys_packages | get $ext_name) + let name = ($ext_name | str replace $version_prefix "") + let version = if $name == "orioledb" { + $ext_info.name # Use name directly for orioledb + } else if ($ext_info.name | str contains "-") { + $ext_info.name | split row "-" | last + } else { + $ext_info.name + } + let src_url = (get_src_url $ext_name) + { + name: $name, + version: $version, + description: $ext_info.description, + url: $src_url + } + }) + + $all_exts | sort-by name +} + +def create_version_link [pg_info] { + if $pg_info.is_orioledb { + let display = $"orioledb-($pg_info.name)" + let url = "https://github.com/orioledb/orioledb" + $"- ✅ Postgres [($display)]\(($url)\)" + } else { + let major_version = ($pg_info.version | split row "." | first) + let url = $"https://www.postgresql.org/docs/($major_version)/index.html" + $"- ✅ Postgres [($pg_info.name)]\(($url)\)" # Use full version number + } +} + +def create_ext_table [extensions, pg_info] { + let header_version = if $pg_info.is_orioledb { + $"orioledb-($pg_info.version)" # Add orioledb prefix for orioledb versions + } else { + $pg_info.version + } + + let header = [ + "", # blank line for spacing + $"### PostgreSQL ($header_version) Extensions", + "| Extension | Version | Description |", + "| ------------- | :-------------: | ------------- |" + ] + + let rows = ($extensions | each {|ext| + let name = $ext.name + let version = $ext.version + let desc = $ext.description + let url = $ext.url # Get URL from extension info + + $"| [($name)]\(($url)\) | [($version)]\(($url)\) | ($desc) |" + }) + + $header | append $rows +} + +def update_readme [] { + let flake_json = (load_flake) + let readme_path = ([$env.PWD "README.md"] | path join) + let readme = (open $readme_path | lines) + let pg_versions = (get_postgres_versions $flake_json) + + # Find section indices + let features_start = ($readme | where $it =~ "^## Primary Features" | first) + let features_end = ($readme | where $it =~ "^## Extensions" | first) + let features_start_idx = (find_index $readme $features_start) + let features_end_idx = (find_index $readme $features_end) + + if $features_start_idx == -1 or $features_end_idx == -1 { + error make {msg: "Could not find Features sections"} + } + + # Update Primary Features section + let features_content = [ + ($pg_versions | each {|version| create_version_link $version} | str join "\n") + "- ✅ Ubuntu 20.04 (Focal Fossa)." + "- ✅ [wal_level](https://www.postgresql.org/docs/current/runtime-config-wal.html) = logical and [max_replication_slots](https://www.postgresql.org/docs/current/runtime-config-replication.html) = 5. Ready for replication." + "- ✅ [Large Systems Extensions](https://github.com/aws/aws-graviton-getting-started#building-for-graviton-and-graviton2). Enabled for ARM images." + ] + + # Find extension section indices + let ext_start = ($readme | where $it =~ "^## Extensions" | first) + let ext_start_idx = (find_index $readme $ext_start) + + # Find next section after Extensions or use end of file + let next_section_idx = ($readme + | enumerate + | where {|it| $it.index > $ext_start_idx and ($it.item =~ "^## ")} + | first + | get index + | default ($readme | length) + ) + + if $ext_start_idx == -1 { + error make {msg: "Could not find Extensions section"} + } + + # Create extension sections content + let ext_sections_content = ($pg_versions | each {|version| + let extensions = (get_extension_info $flake_json $version) + create_ext_table $extensions $version + } | flatten) + + # Combine sections, removing duplicate headers + let before_features = ($readme + | range (0)..($features_start_idx) + | where {|line| not ($line =~ "^## Primary Features")} + ) + let features_header = ($readme | get $features_start_idx) + let between_sections = ($readme + | range ($features_end_idx)..($ext_start_idx) + | where {|line| + not ($line =~ "^## Primary Features" or $line =~ "^## Extensions") + } + ) + let ext_header = ($readme | get $ext_start_idx) + let after_ext = ($readme | range ($next_section_idx)..($readme | length)) + + let output = ($before_features + | append $features_header + | append $features_content + | append $between_sections + | append $ext_header + | append $ext_sections_content + | append $after_ext + | str join "\n") + + $output | save --force $readme_path +} + +# Main execution +update_readme diff --git a/nix/wal-g.nix b/nix/wal-g.nix new file mode 100644 index 000000000..0e29fd272 --- /dev/null +++ b/nix/wal-g.nix @@ -0,0 +1,82 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, brotli +, libsodium +, installShellFiles +, +}: + +let + walGCommon = { version, vendorHash, sha256, majorVersion }: + buildGoModule rec { + pname = "wal-g-${majorVersion}"; + inherit version; + + src = fetchFromGitHub { + owner = "wal-g"; + repo = "wal-g"; + rev = "v${version}"; + inherit sha256; + }; + + inherit vendorHash; + + nativeBuildInputs = [ installShellFiles ]; + + buildInputs = [ + brotli + libsodium + ]; + + subPackages = [ "main/pg" ]; + + tags = [ + "brotli" + "libsodium" + ]; + + ldflags = [ + "-s" + "-w" + "-X github.com/wal-g/wal-g/cmd/pg.walgVersion=${version}" + "-X github.com/wal-g/wal-g/cmd/pg.gitRevision=${src.rev}" + ]; + + postInstall = '' + mv $out/bin/pg $out/bin/wal-g-${majorVersion} + + # Create version-specific completions + mkdir -p $out/share/bash-completion/completions + $out/bin/wal-g-${majorVersion} completion bash > $out/share/bash-completion/completions/wal-g-${majorVersion} + + mkdir -p $out/share/zsh/site-functions + $out/bin/wal-g-${majorVersion} completion zsh > $out/share/zsh/site-functions/_wal-g-${majorVersion} + + ''; + + meta = with lib; { + homepage = "https://github.com/wal-g/wal-g"; + license = licenses.asl20; + description = "Archival restoration tool for PostgreSQL"; + mainProgram = "wal-g-${majorVersion}"; + }; + }; +in +{ + # wal-g v2.0.1 + wal-g-2 = walGCommon { + version = "2.0.1"; + sha256 = "sha256-5mwA55aAHwEFabGZ6c3pi8NLcYofvoe4bb/cFj7NWok="; + vendorHash = "sha256-BbQuY6r30AkxlCZjY8JizaOrqEBdv7rIQet9KQwYB/g="; + majorVersion = "2"; + }; + + # wal-g v3.0.5 + wal-g-3 = walGCommon { + version = "3.0.5"; + sha256 = "sha256-wVr0L2ZXMuEo6tc2ajNzPinVQ8ZVzNOSoaHZ4oFsA+U="; + vendorHash = "sha256-YDLAmRfDl9TgbabXj/1rxVQ052NZDg3IagXVTe5i9dw="; + majorVersion = "3"; + }; +} diff --git a/qemu-arm64-nix.pkr.hcl b/qemu-arm64-nix.pkr.hcl new file mode 100644 index 000000000..192796205 --- /dev/null +++ b/qemu-arm64-nix.pkr.hcl @@ -0,0 +1,137 @@ +variable "ansible_arguments" { + type = string + default = "--skip-tags install-postgrest,install-pgbouncer,install-supabase-internal" +} + +variable "environment" { + type = string + default = "prod" +} + +variable "git_sha" { + type = string +} + +locals { + creator = "packer" +} + +variable "postgres-version" { + type = string + default = "" +} + +variable "postgres-major-version" { + type = string + default = "" +} + +variable "git-head-version" { + type = string + default = "unknown" +} + +variable "packer-execution-id" { + type = string + default = "unknown" +} + +packer { + required_plugins { + amazon = { + source = "github.com/hashicorp/amazon" + version = "~> 1" + } + qemu = { + version = "~> 1.0" + source = "github.com/hashicorp/qemu" + } + } +} + +source "null" "dependencies" { + communicator = "none" +} + +build { + name = "cloudimg.deps" + sources = ["source.null.dependencies"] + + provisioner "shell-local" { + inline = [ + "cp /usr/share/AAVMF/AAVMF_VARS.fd AAVMF_VARS.fd", + "cloud-localds seeds-cloudimg.iso user-data-cloudimg meta-data" + ] + inline_shebang = "/bin/bash -e" + } +} + +source "qemu" "cloudimg" { + boot_wait = "2s" + cpus = 8 + disk_image = true + disk_size = "15G" + format = "qcow2" + headless = true + http_directory = "http" + iso_checksum = "file:https://cloud-images.ubuntu.com/focal/current/SHA256SUMS" + iso_url = "https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-arm64.img" + memory = 40000 + qemu_binary = "qemu-system-aarch64" + qemuargs = [ + ["-machine", "virt,gic-version=3"], + ["-cpu", "host"], + ["-device", "virtio-gpu-pci"], + ["-drive", "if=pflash,format=raw,id=ovmf_code,readonly=on,file=/usr/share/AAVMF/AAVMF_CODE.fd"], + ["-drive", "if=pflash,format=raw,id=ovmf_vars,file=AAVMF_VARS.fd"], + ["-drive", "file=output-cloudimg/packer-cloudimg,format=qcow2"], + ["-drive", "file=seeds-cloudimg.iso,format=raw"], + ["--enable-kvm"] + ] + shutdown_command = "sudo -S shutdown -P now" + ssh_handshake_attempts = 500 + ssh_password = "ubuntu" + ssh_timeout = "1h" + ssh_username = "ubuntu" + ssh_wait_timeout = "1h" + use_backing_file = false + accelerator = "kvm" +} + +build { + name = "cloudimg.image" + sources = ["source.qemu.cloudimg"] + + # Copy ansible playbook + provisioner "shell" { + inline = ["mkdir /tmp/ansible-playbook"] + } + + provisioner "file" { + source = "ansible" + destination = "/tmp/ansible-playbook" + } + + provisioner "file" { + source = "scripts" + destination = "/tmp/ansible-playbook" + } + + provisioner "file" { + source = "migrations" + destination = "/tmp" + } + + provisioner "shell" { + environment_vars = [ + "POSTGRES_MAJOR_VERSION=${var.postgres-major-version}", + "POSTGRES_SUPABASE_VERSION=${var.postgres-version}", + "GIT_SHA=${var.git_sha}" + ] + use_env_var_file = true + script = "ebssurrogate/scripts/qemu-bootstrap-nix.sh" + execute_command = "sudo -S sh -c '. {{.EnvVarFile}} && cd /tmp/ansible-playbook && {{.Path}}'" + start_retry_timeout = "5m" + skip_clean = true + } +} diff --git a/qemu_artifact.md b/qemu_artifact.md new file mode 100644 index 000000000..847a1c8c2 --- /dev/null +++ b/qemu_artifact.md @@ -0,0 +1,52 @@ +# QEMU artifact + +We build a container image that contains a QEMU qcow2 disk image. Container images are a convenient mechanism to ship the disk image to the nodes where they're needed. + +Given the size of the image, the first VM using it on a node might take a while to come up, while the image is being pulled down. The image can be pre-fetched to avoid this; we might also switch to other deployment mechanisms in the future. + +### Build process + +The current AMI process involves a few steps: + +1. nix package is build and published using GHA (`.github/workflows/nix-build.yml`) + - this builds Postgres along with the PG extensions we use. +2. "stage1" build (`amazon-arm64-nix.pkr.hcl`, invoked via `.github/workflows/ami-release-nix.yml`) + - uses an upstream Ubuntu image to initialize the AMI + - installs and configures the majority of the software that gets shipped as part of the AMI (e.g. gotrue, postgrest, ...) +3. "stage2" build (`stage2-nix-psql.pkr.hcl`, invoked via `.github/workflows/ami-release-nix.yml`) + - uses the image published from (2) + - installs and configures the software that is build and published using nix in (1) + - cleans up build dependencies etc + +The QEMU artifact process collapses (2) and (3): + +a. nix package is build and published using GHA (`.github/workflows/nix-build.yml`) +b. packer build (`qemu-arm64-nix.pkr.hcl`) + - uses an upstream Ubuntu live image as the base + - performs the work that was performed as part of the "stage1" and "stage2" builds + - this work is executed using `ebssurrogate/scripts/qemu-bootstrap-nix.sh` + +While the AMI build uses the EBS Surrogate Packer builder to create a minimal boot environment that it then adds things to, the QEMU build merely adds things to the Ubuntu Cloud Image. As such, it's likely possible to make something more minimal with a bit more work, but this was deemed unnecessary for now. Collapsing Stage1 and Stage2 was done in the interest of iteration speed, as executing them together is much faster than saving an artifact off stage1, booting another VM off it, and then executing stage2. + +## Publish image for later use + +Following `make init alpine-image`, the generated VM image should be bundled as a container image with the name: `supabase-postgres-test` . Publish the built docker image to a registry of your choosing, and use the published image with e.g. KubeVirt. + +## Iterating on image + +For faster iteration, it's more convenient to build the image on an ubuntu bare-metal node that's part of the EKS cluster you're using. Build the image in the `k8s.io` namespace in order for it to be available for immediate use on that node. + +### Dependencies note + +Installing `docker.io` on an EKS node might interfere with the k8s setup of the node. You can instead install `nerdctl` and `buildkit`: + +```bash +curl -L -O https://github.com/containerd/nerdctl/releases/download/v2.0.0/nerdctl-2.0.0-linux-arm64.tar.gz +tar -xzf nerdctl-2.0.0-linux-arm64.tar.gz +mv ./nerdctl /usr/local/bin/ +curl -O -L https://github.com/moby/buildkit/releases/download/v0.17.1/buildkit-v0.17.1.linux-arm64.tar.gz +tar -xzf buildkit-v0.17.1.linux-arm64.tar.gz +mv bin/* /usr/local/bin/ +``` + +You'll need to run buildkit: `buildkitd` diff --git a/scripts/90-cleanup-qemu.sh b/scripts/90-cleanup-qemu.sh new file mode 100644 index 000000000..d6c6ade05 --- /dev/null +++ b/scripts/90-cleanup-qemu.sh @@ -0,0 +1,65 @@ +#!/bin/bash + +# DigitalOcean Marketplace Image Validation Tool +# © 2021 DigitalOcean LLC. +# This code is licensed under Apache 2.0 license (see LICENSE.md for details) + +set -o errexit + +# Ensure /tmp exists and has the proper permissions before +# checking for security updates +# https://github.com/digitalocean/marketplace-partners/issues/94 +if [[ ! -d /tmp ]]; then + mkdir /tmp +fi +chmod 1777 /tmp + +if [ -n "$(command -v yum)" ]; then + yum update -y + yum clean all +elif [ -n "$(command -v apt-get)" ]; then + # Cleanup more packages + apt-get -y remove --purge \ + automake \ + autoconf \ + autotools-dev \ + cmake-data \ + cpp-8 \ + cpp-9 \ + cpp-10 \ + gcc-8 \ + gcc-9 \ + gcc-10 \ + git \ + git-man \ + ansible \ + libicu-dev \ + libcgal-dev \ + libgcc-9-dev \ + libgcc-8-dev \ + ansible \ + snapd + + add-apt-repository --yes --remove ppa:ansible/ansible + + source /etc/os-release + apt-get -y remove --purge linux-headers-5.11.0-1021-aws + + apt-get -y update + apt-get -y upgrade + apt-get -y autoremove + apt-get -y autoclean +fi +rm -rf /tmp/* /var/tmp/* +history -c +cat /dev/null > /root/.bash_history +unset HISTFILE +find /var/log -mtime -1 -type f -exec truncate -s 0 {} \; +rm -rf /var/log/*.gz /var/log/*.[0-9] /var/log/*-???????? +rm -rf /var/lib/cloud/instances/* +rm -f /root/.ssh/authorized_keys /etc/ssh/*key* +touch /etc/ssh/revoked_keys +chmod 600 /etc/ssh/revoked_keys + +cat /dev/null > /var/log/lastlog +cat /dev/null > /var/log/wtmp diff --git a/scripts/90-cleanup.sh b/scripts/90-cleanup.sh index 57e118621..f2e19686d 100644 --- a/scripts/90-cleanup.sh +++ b/scripts/90-cleanup.sh @@ -36,12 +36,13 @@ elif [ -n "$(command -v apt-get)" ]; then libicu-dev \ libcgal-dev \ libgcc-9-dev \ - libgcc-8-dev + libgcc-8-dev \ + ansible + + add-apt-repository --yes --remove ppa:ansible/ansible source /etc/os-release - if [ "${UBUNTU_CODENAME}" != "bionic" ]; then - apt-get -y remove --purge linux-headers-5.11.0-1021-aws - fi + apt-get -y remove --purge linux-headers-5.11.0-1021-aws apt-get -y update apt-get -y upgrade diff --git a/scripts/nix-provision.sh b/scripts/nix-provision.sh new file mode 100644 index 000000000..6515ecae9 --- /dev/null +++ b/scripts/nix-provision.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash +# shellcheck shell=bash + +set -o errexit +set -o pipefail +set -o xtrace + +function install_packages { + # Setup Ansible on host VM + sudo apt-get update && sudo apt-get install -y software-properties-common + + # Manually add GPG key with explicit keyserver + sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 93C4A3FD7BB9C367 + + # Add repository and install + sudo add-apt-repository --yes ppa:ansible/ansible + sudo apt-get update + sudo apt-get install -y ansible + + ansible-galaxy collection install community.general +} + + + +function install_nix() { + sudo su -c "curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm \ + --extra-conf \"substituters = https://cache.nixos.org https://nix-postgres-artifacts.s3.amazonaws.com\" \ + --extra-conf \"trusted-public-keys = nix-postgres-artifacts:dGZlQOvKcNEjvT7QEAJbcV6b6uk7VF/hWMjhYleiaLI=% cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=\" " -s /bin/bash root + . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh + +} + + +function execute_stage2_playbook { + echo "POSTGRES_MAJOR_VERSION: ${POSTGRES_MAJOR_VERSION}" + echo "GIT_SHA: ${GIT_SHA}" + sudo tee /etc/ansible/ansible.cfg < str: - inspect_results = docker_client.api.inspect_container(container.name) - return inspect_results["State"]["Health"]["Status"] - - while True: - health = get_health(container) - if health == "healthy": - break - sleep(1) - - # return a testinfra connection to the container - yield testinfra.get_host("docker://" + cast(str, container.name)) - - # at the end of the test suite, destroy the container - container.remove(v=True, force=True) - - -def test_postgrest_is_running(host): - postgrest = host.supervisor("services:postgrest") - assert postgrest.is_running - - -def test_postgrest_responds_to_requests(): - res = requests.get( - "http://localhost:8000/rest/v1/", - headers={ - "apikey": all_in_one_envs["ANON_KEY"], - "authorization": f"Bearer {all_in_one_envs['ANON_KEY']}", - }, - ) - assert res.ok - - -def test_postgrest_can_connect_to_db(): - res = requests.get( - "http://localhost:8000/rest/v1/buckets", - headers={ - "apikey": all_in_one_envs["SERVICE_ROLE_KEY"], - "authorization": f"Bearer {all_in_one_envs['SERVICE_ROLE_KEY']}", - "accept-profile": "storage", - }, - ) - assert res.ok diff --git a/testinfra/test_ami.py b/testinfra/test_ami_nix.py similarity index 50% rename from testinfra/test_ami.py rename to testinfra/test_ami_nix.py index 9b2c4486d..1975818d6 100644 --- a/testinfra/test_ami.py +++ b/testinfra/test_ami_nix.py @@ -1,13 +1,26 @@ import base64 import boto3 import gzip +import logging +import os import pytest import requests -import testinfra +import socket from ec2instanceconnectcli.EC2InstanceConnectLogger import EC2InstanceConnectLogger from ec2instanceconnectcli.EC2InstanceConnectKey import EC2InstanceConnectKey from time import sleep +import subprocess +import paramiko +# if GITHUB_RUN_ID is not set, use a default value that includes the user and hostname +RUN_ID = os.environ.get( + "GITHUB_RUN_ID", + "unknown-ci-run-" + + os.environ.get("USER", "unknown-user") + + "@" + + socket.gethostname(), +) +AMI_NAME = os.environ.get("AMI_NAME") postgresql_schema_sql_content = """ ALTER DATABASE postgres SET "app.settings.jwt_secret" TO 'my_jwt_secret_which_is_not_so_secret'; ALTER DATABASE postgres SET "app.settings.jwt_exp" TO 3600; @@ -59,6 +72,10 @@ name: gotrue url: 'http://localhost:9122/metrics' labels_to_attach: [{name: supabase_project_ref, value: aaaaaaaaaaaaaaaaaaaa}, {name: service_type, value: gotrue}] + - + name: postgrest + url: 'http://localhost:3001/metrics' + labels_to_attach: [{name: supabase_project_ref, value: aaaaaaaaaaaaaaaaaaaa}, {name: service_type, value: postgrest}] monitoring: disk_usage: enabled: true @@ -98,7 +115,7 @@ openapi-mode = "ignore-privileges" db-use-legacy-gucs = true admin-server-port = 3001 -server-host = "localhost" +server-host = "*6" db-pool-acquisition-timeout = 10 max-rows = 1000 db-extra-search-path = "public, extensions" @@ -146,6 +163,58 @@ }} """ +logger = logging.getLogger("ami-tests") +handler = logging.StreamHandler() +formatter = logging.Formatter("%(asctime)s %(name)-12s %(levelname)-8s %(message)s") +handler.setFormatter(formatter) +logger.addHandler(handler) +logger.setLevel(logging.DEBUG) + + +def get_ssh_connection(instance_ip, ssh_identity_file, max_retries=10): + """Create and return a single SSH connection that can be reused.""" + for attempt in range(max_retries): + try: + # Create SSH client + ssh = paramiko.SSHClient() + ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) + + # Connect with our working parameters + ssh.connect( + hostname=instance_ip, + username='ubuntu', + key_filename=ssh_identity_file, + timeout=10, + banner_timeout=10 + ) + + # Test the connection + stdin, stdout, stderr = ssh.exec_command('echo "SSH test"') + if stdout.channel.recv_exit_status() == 0 and "SSH test" in stdout.read().decode(): + logger.info("SSH connection established successfully") + return ssh + else: + raise Exception("SSH test command failed") + + except Exception as e: + if attempt == max_retries - 1: + raise + logger.warning( + f"Ssh connection failed, retrying: {attempt + 1}/{max_retries} failed, retrying ..." + ) + sleep(5) + + +def run_ssh_command(ssh, command): + """Run a command over the established SSH connection.""" + stdin, stdout, stderr = ssh.exec_command(command) + exit_code = stdout.channel.recv_exit_status() + return { + 'succeeded': exit_code == 0, + 'stdout': stdout.read().decode(), + 'stderr': stderr.read().decode() + } + # scope='session' uses the same container for all the tests; # scope='function' uses a new container per test function. @@ -154,7 +223,7 @@ def host(): ec2 = boto3.resource("ec2", region_name="ap-southeast-1") images = list( ec2.images.filter( - Filters=[{"Name": "name", "Values": ["supabase-postgres-ci-ami-test"]}] + Filters=[{"Name": "name", "Values": [AMI_NAME]}], ) ) assert len(images) == 1 @@ -185,9 +254,12 @@ def gzip_then_base64_encode(s: str) -> str: MinCount=1, MaxCount=1, ImageId=image.id, - SecurityGroups=[ - "supabase-postgres-security-group", - "pgbouncer-security-group", + NetworkInterfaces=[ + { + "DeviceIndex": 0, + "AssociatePublicIpAddress": True, + "Groups": ["sg-0a883ca614ebfbae0", "sg-014d326be5a1627dc"], + } ], UserData=f"""#cloud-config hostname: db-aaaaaaaaaaaaaaaaaaaa @@ -204,20 +276,25 @@ def gzip_then_base64_encode(s: str) -> str: - 'sudo echo \"pgbouncer\" \"postgres\" >> /etc/pgbouncer/userlist.txt' - 'cd /tmp && aws s3 cp --region ap-southeast-1 s3://init-scripts-staging/project/init.sh .' - 'bash init.sh "staging"' + - 'touch /var/lib/init-complete' - 'rm -rf /tmp/*' """, TagSpecifications=[ { "ResourceType": "instance", - "Tags": [{"Key": "Name", "Value": "ci-ami-test"}], + "Tags": [ + {"Key": "Name", "Value": "ci-ami-test-nix"}, + {"Key": "creator", "Value": "testinfra-ci"}, + {"Key": "testinfra-run-id", "Value": RUN_ID}, + ], } ], ) )[0] instance.wait_until_running() - logger = EC2InstanceConnectLogger(debug=False) - temp_key = EC2InstanceConnectKey(logger.get_logger()) + ec2logger = EC2InstanceConnectLogger(debug=False) + temp_key = EC2InstanceConnectKey(ec2logger.get_logger()) ec2ic = boto3.client("ec2-instance-connect", region_name="ap-southeast-1") response = ec2ic.send_ssh_public_key( InstanceId=instance.id, @@ -226,67 +303,95 @@ def gzip_then_base64_encode(s: str) -> str: ) assert response["Success"] - # instance doesn't have public ip yet - instance.reload() + # Wait for instance to have public IP + while not instance.public_ip_address: + logger.warning("waiting for ip to be available") + sleep(5) + instance.reload() - host = testinfra.get_host( - # paramiko is an ssh backend - f"paramiko://ubuntu@{instance.public_ip_address}", - ssh_identity_file=temp_key.get_priv_key_file(), + # Create single SSH connection + ssh = get_ssh_connection( + instance.public_ip_address, + temp_key.get_priv_key_file(), ) - def is_healthy(host) -> bool: - cmd = host.run("pg_isready -U postgres") - if cmd.failed is True: - return False + # Check PostgreSQL data directory + logger.info("Checking PostgreSQL data directory...") + result = run_ssh_command(ssh, "ls -la /var/lib/postgresql") + if result['succeeded']: + logger.info("PostgreSQL data directory contents:\n" + result['stdout']) + else: + logger.warning("Failed to list PostgreSQL data directory: " + result['stderr']) - cmd = host.run(f"curl http://localhost:8085/health -H 'apikey: {supabase_admin_key}'") - if cmd.failed is True: - return False + # Wait for init.sh to complete + logger.info("Waiting for init.sh to complete...") + max_attempts = 60 # 5 minutes + attempt = 0 + while attempt < max_attempts: + try: + result = run_ssh_command(ssh, "test -f /var/lib/init-complete") + if result['succeeded']: + logger.info("init.sh has completed") + break + except Exception as e: + logger.warning(f"Error checking init.sh status: {str(e)}") + + attempt += 1 + logger.warning(f"Waiting for init.sh to complete (attempt {attempt}/{max_attempts})") + sleep(5) - cmd = host.run("curl http://localhost:3001/ready") - if cmd.failed is True: - return False + if attempt >= max_attempts: + logger.error("init.sh failed to complete within the timeout period") + instance.terminate() + raise TimeoutError("init.sh failed to complete within the timeout period") - cmd = host.run("curl http://localhost:8081/health") - if cmd.failed is True: - return False + def is_healthy(ssh) -> bool: + health_checks = [ + ("postgres", "sudo -u postgres /usr/bin/pg_isready -U postgres"), + ("adminapi", f"curl -sf -k --connect-timeout 30 --max-time 60 https://localhost:8085/health -H 'apikey: {supabase_admin_key}'"), + ("postgrest", "curl -sf --connect-timeout 30 --max-time 60 http://localhost:3001/ready"), + ("gotrue", "curl -sf --connect-timeout 30 --max-time 60 http://localhost:8081/health"), + ("kong", "sudo kong health"), + ("fail2ban", "sudo fail2ban-client status"), + ] - cmd = host.run("sudo kong health") - if cmd.failed is True: - return False - - cmd = host.run("printf \\\\0 > '/dev/tcp/localhost/6543'") - if cmd.failed is True: - return False - - cmd = host.run("sudo fail2ban-client status") - if cmd.failed is True: - return False + for service, command in health_checks: + try: + result = run_ssh_command(ssh, command) + if not result['succeeded']: + logger.warning(f"{service} not ready") + return False + except Exception: + logger.warning(f"Connection failed during {service} check") + return False return True while True: - if is_healthy(host): + if is_healthy(ssh): break - print("waiting until healthy") sleep(1) - # return a testinfra connection to the instance - yield host + # Return both the SSH connection and instance IP for use in tests + yield { + 'ssh': ssh, + 'ip': instance.public_ip_address + } # at the end of the test suite, destroy the instance instance.terminate() def test_postgrest_is_running(host): - postgrest = host.service("postgrest") - assert postgrest.is_running + """Check if postgrest service is running using our SSH connection.""" + result = run_ssh_command(host['ssh'], "systemctl is-active postgrest") + assert result['succeeded'] and result['stdout'].strip() == 'active', "PostgREST service is not running" def test_postgrest_responds_to_requests(host): + """Test if PostgREST responds to requests.""" res = requests.get( - f"http://{host.backend.get_hostname()}/rest/v1/", + f"http://{host['ip']}/rest/v1/", headers={ "apikey": anon_key, "authorization": f"Bearer {anon_key}", @@ -296,8 +401,9 @@ def test_postgrest_responds_to_requests(host): def test_postgrest_can_connect_to_db(host): + """Test if PostgREST can connect to the database.""" res = requests.get( - f"http://{host.backend.get_hostname()}/rest/v1/buckets", + f"http://{host['ip']}/rest/v1/buckets", headers={ "apikey": service_role_key, "authorization": f"Bearer {service_role_key}", @@ -305,3 +411,99 @@ def test_postgrest_can_connect_to_db(host): }, ) assert res.ok + + +def test_postgrest_starting_apikey_query_parameter_is_removed(host): + """Test if PostgREST removes apikey query parameter at start.""" + res = requests.get( + f"http://{host['ip']}/rest/v1/buckets", + headers={ + "accept-profile": "storage", + }, + params={ + "apikey": service_role_key, + "id": "eq.absent", + "name": "eq.absent", + }, + ) + assert res.ok + + +def test_postgrest_middle_apikey_query_parameter_is_removed(host): + """Test if PostgREST removes apikey query parameter in middle.""" + res = requests.get( + f"http://{host['ip']}/rest/v1/buckets", + headers={ + "accept-profile": "storage", + }, + params={ + "id": "eq.absent", + "apikey": service_role_key, + "name": "eq.absent", + }, + ) + assert res.ok + + +def test_postgrest_ending_apikey_query_parameter_is_removed(host): + """Test if PostgREST removes apikey query parameter at end.""" + res = requests.get( + f"http://{host['ip']}/rest/v1/buckets", + headers={ + "accept-profile": "storage", + }, + params={ + "id": "eq.absent", + "name": "eq.absent", + "apikey": service_role_key, + }, + ) + assert res.ok + + +def test_postgrest_starting_empty_key_query_parameter_is_removed(host): + """Test if PostgREST removes empty key query parameter at start.""" + res = requests.get( + f"http://{host['ip']}/rest/v1/buckets", + headers={ + "accept-profile": "storage", + }, + params={ + "": "empty_key", + "id": "eq.absent", + "apikey": service_role_key, + }, + ) + assert res.ok + + +def test_postgrest_middle_empty_key_query_parameter_is_removed(host): + """Test if PostgREST removes empty key query parameter in middle.""" + res = requests.get( + f"http://{host['ip']}/rest/v1/buckets", + headers={ + "accept-profile": "storage", + }, + params={ + "apikey": service_role_key, + "": "empty_key", + "id": "eq.absent", + }, + ) + assert res.ok + + +def test_postgrest_ending_empty_key_query_parameter_is_removed(host): + """Test if PostgREST removes empty key query parameter at end.""" + res = requests.get( + f"http://{host['ip']}/rest/v1/buckets", + headers={ + "accept-profile": "storage", + }, + params={ + "id": "eq.absent", + "apikey": service_role_key, + "": "empty_key", + }, + ) + assert res.ok diff --git a/tests/pg_upgrade/.env b/tests/pg_upgrade/.env new file mode 100644 index 000000000..505503f11 --- /dev/null +++ b/tests/pg_upgrade/.env @@ -0,0 +1,6 @@ +POSTGRES_PASSWORD=postgres +POSTGRES_HOST=/var/run/postgresql +POSTGRES_INITDB_ARGS=--lc-ctype=C.UTF-8 +PG_MAJOR_VERSION=15 +IS_CI=true +SCRIPT_DIR=/tmp/upgrade diff --git a/tests/pg_upgrade/.gitignore b/tests/pg_upgrade/.gitignore new file mode 100644 index 000000000..c8ff8c372 --- /dev/null +++ b/tests/pg_upgrade/.gitignore @@ -0,0 +1,4 @@ +# excluding these since running debug.sh will download the files locally +pg_upgrade_bin*.tar.gz +pg_upgrade_scripts*.tar.gz +pg_upgrade_scripts/ diff --git a/tests/pg_upgrade/debug.sh b/tests/pg_upgrade/debug.sh new file mode 100755 index 000000000..b05d8941d --- /dev/null +++ b/tests/pg_upgrade/debug.sh @@ -0,0 +1,80 @@ +#!/bin/bash + +set -eEuo pipefail + +export PGPASSWORD=postgres +export PGUSER=supabase_admin +export PGHOST=localhost +export PGDATABASE=postgres + +ARTIFACTS_BUCKET_NAME=${1:-} +if [ -z "$ARTIFACTS_BUCKET_NAME" ]; then + echo "Usage: $0 [INITIAL_PG_VERSION]" + exit 1 +fi + +INITIAL_PG_VERSION=${2:-15.1.1.60} +LATEST_PG_VERSION=$(sed -e 's/postgres-version = "\(.*\)"/\1/g' ../../common.vars.pkr.hcl) + +LATEST_VERSION_SCRIPTS="scripts/pg_upgrade_scripts-${LATEST_PG_VERSION}.tar.gz" +LATEST_VERSION_BIN="scripts/pg_upgrade_bin-${LATEST_PG_VERSION}.tar.gz" + +if [ ! -f "$LATEST_VERSION_SCRIPTS" ]; then + aws s3 cp "s3://${ARTIFACTS_BUCKET_NAME}/upgrades/postgres/supabase-postgres-${LATEST_PG_VERSION}/pg_upgrade_scripts.tar.gz" "$LATEST_VERSION_SCRIPTS" +fi + +if [ ! -f "$LATEST_VERSION_BIN" ]; then + aws s3 cp "s3://${ARTIFACTS_BUCKET_NAME}/upgrades/postgres/supabase-postgres-${LATEST_PG_VERSION}/20.04.tar.gz" "$LATEST_VERSION_BIN" +fi + +rm -rf scripts/pg_upgrade_scripts +cp "$LATEST_VERSION_SCRIPTS" scripts/pg_upgrade_scripts.tar.gz +cp "$LATEST_VERSION_BIN" scripts/pg_upgrade_bin.tar.gz + +docker rm -f pg_upgrade_test || true + +docker run -t --name pg_upgrade_test --env-file .env \ + -v "$(pwd)/scripts:/tmp/upgrade" \ + --entrypoint /tmp/upgrade/entrypoint.sh -d \ + -p 5432:5432 \ + "supabase/postgres:${INITIAL_PG_VERSION}" + +sleep 3 +while ! docker exec -it pg_upgrade_test bash -c "pg_isready"; do + echo "Waiting for postgres to start..." + sleep 1 +done + +echo "Running migrations" +docker cp ../../migrations/db/migrations "pg_upgrade_test:/docker-entrypoint-initdb.d/" +docker exec -it pg_upgrade_test bash -c '/docker-entrypoint-initdb.d/migrate.sh > /tmp/migrate.log 2>&1; exit $?' +if [ $? -ne 0 ]; then + echo "Running migrations failed. Exiting." + exit 1 +fi + +echo "Running tests" +pg_prove "../../migrations/tests/test.sql" +psql -f "./tests/97-enable-extensions.sql" +psql -f "./tests/98-data-fixtures.sql" +psql -f "./tests/99-fixtures.sql" + +echo "Initiating pg_upgrade" +docker exec -it pg_upgrade_test bash -c '/tmp/upgrade/pg_upgrade_scripts/initiate.sh "$PG_MAJOR_VERSION"; exit $?' +if [ $? -ne 0 ]; then + echo "Initiating pg_upgrade failed. Exiting." + exit 1 +fi + +sleep 3 +echo "Completing pg_upgrade" +docker exec -it pg_upgrade_test bash -c 'rm -f /tmp/pg-upgrade-status; /tmp/upgrade/pg_upgrade_scripts/complete.sh; exit $?' +if [ $? -ne 0 ]; then + echo "Completing pg_upgrade failed. Exiting." + exit 1 +fi + +pg_prove tests/01-schema.sql +pg_prove tests/02-data.sql +pg_prove tests/03-settings.sql + diff --git a/tests/pg_upgrade/scripts/entrypoint.sh b/tests/pg_upgrade/scripts/entrypoint.sh new file mode 100755 index 000000000..d9d80acd9 --- /dev/null +++ b/tests/pg_upgrade/scripts/entrypoint.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -e + +SCRIPT_DIR=$(dirname -- "$0";) + +ls -la "$SCRIPT_DIR" + +tar -xzf "${SCRIPT_DIR}/pg_upgrade_scripts.tar.gz" -C "${SCRIPT_DIR}" + +mkdir -p /tmp/persistent +cp "$SCRIPT_DIR/pg_upgrade_bin.tar.gz" /tmp/persistent + +export PATH="$(pg_config --bindir):$PATH" + +sed -i "s/|--version//g" /usr/local/bin/docker-entrypoint.sh +/usr/local/bin/docker-entrypoint.sh postgres --version || true + +su postgres -c "$(pg_config --bindir)/pg_ctl start -o '-c config_file=/etc/postgresql/postgresql.conf' -l /tmp/postgres.log" + +RECEIVED_EXIT_SIGNAL=false +trap 'RECEIVED_EXIT_SIGNAL=true' SIGINT SIGTERM SIGUSR1 +while ! ((RECEIVED_EXIT_SIGNAL)); do + sleep 5 +done diff --git a/tests/pg_upgrade/tests/01-schema.sql b/tests/pg_upgrade/tests/01-schema.sql new file mode 100644 index 000000000..3cf3a83dd --- /dev/null +++ b/tests/pg_upgrade/tests/01-schema.sql @@ -0,0 +1,26 @@ +CREATE EXTENSION IF NOT EXISTS pgtap; + +BEGIN; +SELECT plan(15); + +select has_schema('public'); +select has_schema('auth'); +select has_schema('storage'); +select has_schema('realtime'); +select has_schema('pgsodium'); +select has_schema('vault'); +select has_schema('extensions'); + +SELECT has_enum('public', 'continents', 'Enum continents should exist'); + +SELECT has_table('public', 'countries', 'Table countries should exist'); +SELECT has_column('public', 'countries', 'id', 'Column id should exist'); +SELECT has_column('public', 'countries', 'name', 'Column name should exist'); +SELECT has_column('public', 'countries', 'iso2', 'Column iso2 should exist'); +SELECT has_column('public', 'countries', 'iso3', 'Column iso3 should exist'); +SELECT has_column('public', 'countries', 'continent', 'Column continent should exist'); + +SELECT has_materialized_view('public', 'european_countries', 'Materialized view european_countries should exist'); + +SELECT * FROM finish(); +ROLLBACK; diff --git a/tests/pg_upgrade/tests/02-data.sql b/tests/pg_upgrade/tests/02-data.sql new file mode 100644 index 000000000..d83e34632 --- /dev/null +++ b/tests/pg_upgrade/tests/02-data.sql @@ -0,0 +1,27 @@ +CREATE EXTENSION IF NOT EXISTS pgtap; + +BEGIN; +SELECT plan(4); + +SELECT results_eq( + 'SELECT count(*)::int FROM public.countries', + ARRAY[ 249 ] +); + +SELECT results_eq( + 'SELECT count(*)::int FROM public.countries where continent = ''Europe''', + ARRAY[ 45 ] +); + +SELECT results_eq( + 'SELECT count(*)::int FROM public.european_countries', + ARRAY[ 45 ] +); + +SELECT results_eq( + 'SELECT count(*) FROM public.countries where continent = ''Europe''', + 'SELECT count(*) FROM public.european_countries' +); + +SELECT * FROM finish(); +ROLLBACK; diff --git a/tests/pg_upgrade/tests/03-settings.sql b/tests/pg_upgrade/tests/03-settings.sql new file mode 100644 index 000000000..32fc71a43 --- /dev/null +++ b/tests/pg_upgrade/tests/03-settings.sql @@ -0,0 +1,17 @@ +CREATE EXTENSION IF NOT EXISTS pgtap; + +BEGIN; +SELECT plan(2); + +SELECT results_eq( + 'SELECT setting FROM pg_settings where name = ''jit''', + ARRAY[ 'off' ] +); + +select results_eq( + 'SELECT setting FROM pg_settings WHERE name = ''password_encryption''', + ARRAY[ 'scram-sha-256' ] +); + +SELECT * FROM finish(); +ROLLBACK; diff --git a/tests/pg_upgrade/tests/97-enable-extensions.sql b/tests/pg_upgrade/tests/97-enable-extensions.sql new file mode 100644 index 000000000..34c730bb0 --- /dev/null +++ b/tests/pg_upgrade/tests/97-enable-extensions.sql @@ -0,0 +1,10 @@ +do $$ +declare + ext record; +begin + for ext in (select * from pg_available_extensions where name not in (select extname from pg_extension) order by name) + loop + execute 'create extension if not exists ' || ext.name || ' cascade'; + end loop; +end; +$$; diff --git a/tests/pg_upgrade/tests/98-data-fixtures.sql b/tests/pg_upgrade/tests/98-data-fixtures.sql new file mode 100644 index 000000000..1a675e2e6 --- /dev/null +++ b/tests/pg_upgrade/tests/98-data-fixtures.sql @@ -0,0 +1,273 @@ +create type public.continents as enum ( + 'Africa', + 'Antarctica', + 'Asia', + 'Europe', + 'Oceania', + 'North America', + 'South America' +); +create table public.countries ( + id bigint generated by default as identity primary key, + name text, + iso2 text not null, + iso3 text, + local_name text, + continent continents +); +comment on table countries is 'Full list of countries.'; +comment on column countries.name is 'Full country name.'; +comment on column countries.iso2 is 'ISO 3166-1 alpha-2 code.'; +comment on column countries.iso3 is 'ISO 3166-1 alpha-3 code.'; +comment on column countries.local_name is 'Local variation of the name.'; +insert into public.countries (name,iso2,iso3,local_name,continent) values + ('Bonaire, Sint Eustatius and Saba','BQ','BES',null,null), + ('Curaçao','CW','CUW',null,null), + ('Guernsey','GG','GGY',null,null), + ('Isle of Man','IM','IMN',null,null), + ('Jersey','JE','JEY',null,null), + ('Åland Islands','AX','ALA',null,null), + ('Montenegro','ME','MNE',null,null), + ('Saint Barthélemy','BL','BLM',null,null), + ('Saint Martin (French part)','MF','MAF',null,null), + ('Serbia','RS','SRB',null,null), + ('Sint Maarten (Dutch part)','SX','SXM',null,null), + ('South Sudan','SS','SSD',null,null), + ('Timor-Leste','TL','TLS',null,null), + ('American Samoa','as','ASM','Amerika Samoa','Oceania'), + ('Andorra','AD','AND','Andorra','Europe'), + ('Angola','AO','AGO','Angola','Africa'), + ('Anguilla','AI','AIA','Anguilla','North America'), + ('Antarctica','AQ','ATA','','Antarctica'), + ('Antigua and Barbuda','AG','ATG','Antigua and Barbuda','North America'), + ('Argentina','AR','ARG','Argentina','South America'), + ('Armenia','AM','ARM','Hajastan','Asia'), + ('Aruba','AW','ABW','Aruba','North America'), + ('Australia','AU','AUS','Australia','Oceania'), + ('Austria','AT','AUT','Österreich','Europe'), + ('Azerbaijan','AZ','AZE','Azerbaijan','Asia'), + ('Bahamas','BS','BHS','The Bahamas','North America'), + ('Bahrain','BH','BHR','Al-Bahrayn','Asia'), + ('Bangladesh','BD','BGD','Bangladesh','Asia'), + ('Barbados','BB','BRB','Barbados','North America'), + ('Belarus','BY','BLR','Belarus','Europe'), + ('Belgium','BE','BEL','Belgium/Belgique','Europe'), + ('Belize','BZ','BLZ','Belize','North America'), + ('Benin','BJ','BEN','Benin','Africa'), + ('Bermuda','BM','BMU','Bermuda','North America'), + ('Bhutan','BT','BTN','Druk-Yul','Asia'), + ('Bolivia','BO','BOL','Bolivia','South America'), + ('Bosnia and Herzegovina','BA','BIH','Bosna i Hercegovina','Europe'), + ('Botswana','BW','BWA','Botswana','Africa'), + ('Bouvet Island','BV','BVT','Bouvet Island','Antarctica'), + ('Brazil','BR','BRA','Brasil','South America'), + ('British Indian Ocean Territory','IO','IOT','British Indian Ocean Territory','Africa'), + ('Brunei Darussalam','BN','BRN','Brunei Darussalam','Asia'), + ('Bulgaria','BG','BGR','Balgarija','Europe'), + ('Burkina Faso','BF','BFA','Burkina Faso','Africa'), + ('Burundi','BI','BDI','Burundi/Uburundi','Africa'), + ('Cambodia','KH','KHM','Cambodia','Asia'), + ('Cameroon','CM','CMR','Cameroun/Cameroon','Africa'), + ('Canada','CA','CAN','Canada','North America'), + ('Cape Verde','CV','CPV','Cabo Verde','Africa'), + ('Cayman Islands','KY','CYM','Cayman Islands','North America'), + ('Central African Republic','CF','CAF','Centrafrique','Africa'), + ('Chad','TD','TCD','Tchad/Tshad','Africa'), + ('Chile','CL','CHL','Chile','South America'), + ('China','CN','CHN','Zhongquo','Asia'), + ('Christmas Island','CX','CXR','Christmas Island','Oceania'), + ('Cocos (Keeling) Islands','CC','CCK','Cocos (Keeling) Islands','Oceania'), + ('Colombia','CO','COL','Colombia','South America'), + ('Comoros','KM','COM','Komori/Comores','Africa'), + ('Congo','CG','COG','Congo','Africa'), + ('Congo, the Democratic Republic of the','CD','COD','Republique Democratique du Congo','Africa'), + ('Cook Islands','CK','COK','The Cook Islands','Oceania'), + ('Costa Rica','CR','CRI','Costa Rica','North America'), + ('Cote DIvoire','CI','CIV','Côte dIvoire','Africa'), + ('Croatia','HR','HRV','Hrvatska','Europe'), + ('Cuba','CU','CUB','Cuba','North America'), + ('Cyprus','CY','CYP','Cyprus','Asia'), + ('Czech Republic','CZ','CZE','Czech','Europe'), + ('Denmark','DK','DNK','Danmark','Europe'), + ('Djibouti','DJ','DJI','Djibouti/Jibuti','Africa'), + ('Dominica','DM','DMA','Dominica','North America'), + ('Dominican Republic','DO','DOM','Republica Dominicana','North America'), + ('Ecuador','EC','ECU','Ecuador','South America'), + ('Egypt','EG','EGY','Misr','Africa'), + ('El Salvador','SV','SLV','El Salvador','North America'), + ('Equatorial Guinea','GQ','GNQ','Guinea Ecuatorial','Africa'), + ('Eritrea','ER','ERI','Ertra','Africa'), + ('Estonia','EE','EST','Eesti','Europe'), + ('Ethiopia','ET','ETH','Yeityopiya','Africa'), + ('Falkland Islands (Malvinas)','FK','FLK','Falkland Islands','South America'), + ('Faroe Islands','FO','FRO','Faroe Islands','Europe'), + ('Fiji','FJ','FJI','Fiji Islands','Oceania'), + ('Finland','FI','FIN','Suomi','Europe'), + ('France','FR','FRA','France','Europe'), + ('French Guiana','GF','GUF','Guyane francaise','South America'), + ('French Polynesia','PF','PYF','Polynésie française','Oceania'), + ('French Southern Territories','TF','ATF','Terres australes françaises','Antarctica'), + ('Gabon','GA','GAB','Le Gabon','Africa'), + ('Gambia','GM','GMB','The Gambia','Africa'), + ('Georgia','GE','GEO','Sakartvelo','Asia'), + ('Germany','DE','DEU','Deutschland','Europe'), + ('Ghana','GH','GHA','Ghana','Africa'), + ('Gibraltar','GI','GIB','Gibraltar','Europe'), + ('Greece','GR','GRC','Greece','Europe'), + ('Greenland','GL','GRL','Kalaallit Nunaat','North America'), + ('Grenada','GD','GRD','Grenada','North America'), + ('Guadeloupe','GP','GLP','Guadeloupe','North America'), + ('Guam','GU','GUM','Guam','Oceania'), + ('Guatemala','GT','GTM','Guatemala','North America'), + ('Guinea','GN','GIN','Guinea','Africa'), + ('Guinea-Bissau','GW','GNB','Guinea-Bissau','Africa'), + ('Guyana','GY','GUY','Guyana','South America'), + ('Haiti','HT','HTI','Haiti/Dayti','North America'), + ('Heard Island and Mcdonald Islands','HM','HMD','Heard and McDonald Islands','Antarctica'), + ('Holy See (Vatican City State)','VA','VAT','Santa Sede/Città del Vaticano','Europe'), + ('Honduras','HN','HND','Honduras','North America'), + ('Hong Kong','HK','HKG','Xianggang/Hong Kong','Asia'), + ('Hungary','HU','HUN','Hungary','Europe'), + ('Iceland','IS','ISL','Iceland','Europe'), + ('India','IN','IND','Bharat/India','Asia'), + ('Indonesia','ID','IDN','Indonesia','Asia'), + ('Iran, Islamic Republic of','IR','IRN','Iran','Asia'), + ('Iraq','IQ','IRQ','Al-Irāq','Asia'), + ('Ireland','IE','IRL','Ireland','Europe'), + ('Israel','IL','ISR','Yisrael','Asia'), + ('Italy','IT','ITA','Italia','Europe'), + ('Jamaica','JM','JAM','Jamaica','North America'), + ('Japan','JP','JPN','Nihon/Nippon','Asia'), + ('Jordan','JO','JOR','Al-Urdunn','Asia'), + ('Kazakhstan','KZ','KAZ','Qazaqstan','Asia'), + ('Kenya','KE','KEN','Kenya','Africa'), + ('Kiribati','KI','KIR','Kiribati','Oceania'), + ('Korea, Democratic People''s Republic of','KP','PRK','Choson Minjujuui Inmin Konghwaguk (Bukhan)','Asia'), + ('Korea, Republic of','KR','KOR','Taehan-minguk (Namhan)','Asia'), + ('Kuwait','KW','KWT','Al-Kuwayt','Asia'), + ('Kyrgyzstan','KG','KGZ','Kyrgyzstan','Asia'), + ('Lao People''s Democratic Republic','LA','LAO','Lao','Asia'), + ('Latvia','LV','LVA','Latvija','Europe'), + ('Lebanon','LB','LBN','Lubnan','Asia'), + ('Lesotho','LS','LSO','Lesotho','Africa'), + ('Liberia','LR','LBR','Liberia','Africa'), + ('Libya','LY','LBY','Libiya','Africa'), + ('Liechtenstein','LI','LIE','Liechtenstein','Europe'), + ('Lithuania','LT','LTU','Lietuva','Europe'), + ('Luxembourg','LU','LUX','Luxembourg','Europe'), + ('Macao','MO','MAC','Macau/Aomen','Asia'), + ('Macedonia, the Former Yugoslav Republic of','MK','MKD','Makedonija','Europe'), + ('Madagascar','MG','MDG','Madagasikara/Madagascar','Africa'), + ('Malawi','MW','MWI','Malawi','Africa'), + ('Malaysia','MY','MYS','Malaysia','Asia'), + ('Maldives','MV','MDV','Dhivehi Raajje/Maldives','Asia'), + ('Mali','ML','MLI','Mali','Africa'), + ('Malta','MT','MLT','Malta','Europe'), + ('Marshall Islands','MH','MHL','Marshall Islands/Majol','Oceania'), + ('Martinique','MQ','MTQ','Martinique','North America'), + ('Mauritania','MR','MRT','Muritaniya/Mauritanie','Africa'), + ('Mauritius','MU','MUS','Mauritius','Africa'), + ('Mayotte','YT','MYT','Mayotte','Africa'), + ('Mexico','MX','MEX','Mexico','North America'), + ('Micronesia, Federated States of','FM','FSM','Micronesia','Oceania'), + ('Moldova, Republic of','MD','MDA','Moldova','Europe'), + ('Monaco','MC','MCO','Monaco','Europe'), + ('Mongolia','MN','MNG','Mongol Uls','Asia'), + ('Albania','AL','ALB','Republika e Shqipërisë','Europe'), + ('Montserrat','MS','MSR','Montserrat','North America'), + ('Morocco','MA','MAR','Al-Maghrib','Africa'), + ('Mozambique','MZ','MOZ','Mozambique','Africa'), + ('Myanmar','MM','MMR','Myanma Pye','Asia'), + ('Namibia','NA','NAM','Namibia','Africa'), + ('Nauru','NR','NRU','Naoero/Nauru','Oceania'), + ('Nepal','NP','NPL','Nepal','Asia'), + ('Netherlands','NL','NLD','Nederland','Europe'), + ('New Caledonia','NC','NCL','Nouvelle-Calédonie','Oceania'), + ('New Zealand','NZ','NZL','New Zealand/Aotearoa','Oceania'), + ('Nicaragua','NI','NIC','Nicaragua','North America'), + ('Niger','NE','NER','Niger','Africa'), + ('Nigeria','NG','NGA','Nigeria','Africa'), + ('Niue','NU','NIU','Niue','Oceania'), + ('Norfolk Island','NF','NFK','Norfolk Island','Oceania'), + ('Northern Mariana Islands','MP','MNP','Northern Mariana Islands','Oceania'), + ('Norway','NO','NOR','Norge','Europe'), + ('Oman','OM','OMN','Oman','Asia'), + ('Pakistan','PK','PAK','Pakistan','Asia'), + ('Palau','PW','PLW','Belau/Palau','Oceania'), + ('Palestine, State of','PS','PSE','Filastin','Asia'), + ('Panama','PA','PAN','República de Panamá','North America'), + ('Papua New Guinea','PG','PNG','Papua New Guinea/Papua Niugini','Oceania'), + ('Paraguay','PY','PRY','Paraguay','South America'), + ('Peru','PE','PER','Perú/Piruw','South America'), + ('Philippines','PH','PHL','Pilipinas','Asia'), + ('Pitcairn','PN','PCN','Pitcairn','Oceania'), + ('Poland','PL','POL','Polska','Europe'), + ('Portugal','PT','PRT','Portugal','Europe'), + ('Puerto Rico','PR','PRI','Puerto Rico','North America'), + ('Qatar','QA','QAT','Qatar','Asia'), + ('Reunion','RE','REU','Reunion','Africa'), + ('Romania','RO','ROM','Romania','Europe'), + ('Russian Federation','RU','RUS','Rossija','Europe'), + ('Rwanda','RW','RWA','Rwanda/Urwanda','Africa'), + ('Saint Helena, Ascension and Tristan da Cunha','SH','SHN','Saint Helena','Africa'), + ('Saint Kitts and Nevis','KN','KNA','Saint Kitts and Nevis','North America'), + ('Saint Lucia','LC','LCA','Saint Lucia','North America'), + ('Saint Pierre and Miquelon','PM','SPM','Saint-Pierre-et-Miquelon','North America'), + ('Saint Vincent and the Grenadines','VC','VCT','Saint Vincent and the Grenadines','North America'), + ('Samoa','WS','WSM','Samoa','Oceania'), + ('San Marino','SM','SMR','San Marino','Europe'), + ('Sao Tome and Principe','ST','STP','São Tomé e Príncipe','Africa'), + ('Saudi Arabia','SA','SAU','Al-Mamlaka al-Arabiya as-Saudiya','Asia'), + ('Senegal','SN','SEN','Sénégal/Sounougal','Africa'), + ('Seychelles','SC','SYC','Sesel/Seychelles','Africa'), + ('Sierra Leone','SL','SLE','Sierra Leone','Africa'), + ('Singapore','SG','SGP','Singapore/Singapura/Xinjiapo/Singapur','Asia'), + ('Slovakia','SK','SVK','Slovensko','Europe'), + ('Slovenia','SI','SVN','Slovenija','Europe'), + ('Solomon Islands','SB','SLB','Solomon Islands','Oceania'), + ('Somalia','SO','SOM','Soomaaliya','Africa'), + ('South Africa','ZA','ZAF','South Africa','Africa'), + ('South Georgia and the South Sandwich Islands','GS','SGS','South Georgia and the South Sandwich Islands','Antarctica'), + ('Spain','ES','ESP','España','Europe'), + ('Sri Lanka','LK','LKA','Sri Lanka/Ilankai','Asia'), + ('Sudan','SD','SDN','As-Sudan','Africa'), + ('Suriname','SR','SUR','Suriname','South America'), + ('Svalbard and Jan Mayen','SJ','SJM','Svalbard og Jan Mayen','Europe'), + ('Swaziland','SZ','SWZ','kaNgwane','Africa'), + ('Sweden','SE','SWE','Sverige','Europe'), + ('Switzerland','CH','CHE','Schweiz/Suisse/Svizzera/Svizra','Europe'), + ('Syrian Arab Republic','SY','SYR','Suriya','Asia'), + ('Taiwan (Province of China)','TW','TWN','Tai-wan','Asia'), + ('Tajikistan','TJ','TJK','Tajikistan','Asia'), + ('Tanzania, United Republic of','TZ','TZA','Tanzania','Africa'), + ('Thailand','TH','THA','Prathet Thai','Asia'), + ('Togo','TG','TGO','Togo','Africa'), + ('Tokelau','TK','TKL','Tokelau','Oceania'), + ('Tonga','TO','TON','Tonga','Oceania'), + ('Trinidad and Tobago','TT','TTO','Trinidad and Tobago','North America'), + ('Tunisia','TN','TUN','Tunis/Tunisie','Africa'), + ('Turkey','TR','TUR','Türkiye','Asia'), + ('Turkmenistan','TM','TKM','Türkmenistan','Asia'), + ('Turks and Caicos Islands','TC','TCA','The Turks and Caicos Islands','North America'), + ('Tuvalu','TV','TUV','Tuvalu','Oceania'), + ('Uganda','UG','UGA','Uganda','Africa'), + ('Ukraine','UA','UKR','Ukrajina','Europe'), + ('United Arab Emirates','AE','ARE','Al-Amirat al-Arabiya al-Muttahida','Asia'), + ('United Kingdom','GB','GBR','United Kingdom','Europe'), + ('United States','US','USA','United States','North America'), + ('United States Minor Outlying Islands','UM','UMI','United States Minor Outlying Islands','Oceania'), + ('Uruguay','UY','URY','Uruguay','South America'), + ('Uzbekistan','UZ','UZB','Uzbekiston','Asia'), + ('Vanuatu','VU','VUT','Vanuatu','Oceania'), + ('Venezuela','VE','VEN','Venezuela','South America'), + ('Viet Nam','VN','VNM','Viet Nam','Asia'), + ('Virgin Islands (British)','VG','VGB','British Virgin Islands','North America'), + ('Virgin Islands (U.S.)','VI','VIR','Virgin Islands of the United States','North America'), + ('Wallis and Futuna','WF','WLF','Wallis-et-Futuna','Oceania'), + ('Western Sahara','EH','ESH','As-Sahrawiya','Africa'), + ('Yemen','YE','YEM','Al-Yaman','Asia'), + ('Zambia','ZM','ZMB','Zambia','Africa'), + ('Zimbabwe','ZW','ZWE','Zimbabwe','Africa'), + ('Afghanistan','AF','AFG','Afganistan/Afqanestan','Asia'), + ('Algeria','DZ','DZA','Al-Jazair/Algerie','Africa'); + \ No newline at end of file diff --git a/tests/pg_upgrade/tests/99-fixtures.sql b/tests/pg_upgrade/tests/99-fixtures.sql new file mode 100644 index 000000000..2b93d459a --- /dev/null +++ b/tests/pg_upgrade/tests/99-fixtures.sql @@ -0,0 +1,12 @@ +-- enable JIT to ensure the upgrade process disables it +alter system set jit = on; +alter system set password_encryption = 'md5'; +select pg_reload_conf(); + +-- create materialized view +create materialized view public.european_countries as + select * from public.countries where continent = 'Europe' +with no data; +refresh materialized view public.european_countries; + +select count(*) from public.european_countries; diff --git a/user-data-cloudimg b/user-data-cloudimg new file mode 100644 index 000000000..9a74d237a --- /dev/null +++ b/user-data-cloudimg @@ -0,0 +1,16 @@ +#cloud-config +users: + - name: root + lock_passwd: false + ssh_redirect_user: true + hashed_passwd: "$6$canonical.$0zWaW71A9ke9ASsaOcFTdQ2tx1gSmLxMPrsH0rF0Yb.2AEKNPV1lrF94n6YuPJmnUy2K2/JSDtxuiBDey6Lpa/" + - name: ubuntu + lock_passwd: false + hashed_passwd: "$6$canonical.$0zWaW71A9ke9ASsaOcFTdQ2tx1gSmLxMPrsH0rF0Yb.2AEKNPV1lrF94n6YuPJmnUy2K2/JSDtxuiBDey6Lpa/" + ssh_redired_user: false + sudo: "ALL=(ALL) NOPASSWD:ALL" + shell: /usr/bin/bash + groups: [adm, audio, cdrom, dialout, dip, floppy, lxd, netdev, plugdev, sudo, video] +ssh_pwauth: True +disable_root: false +preserve_hostname: true