diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2022-06-10 19:14:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-10 19:14:22 -0500 |
commit | 1305f60eef7e1041087ecd0351f87692f522cae4 (patch) | |
tree | d91574f990b1aff7b1b82861fff63c27cb8cb21b /pkgs/servers/sql | |
parent | b03082ac7986809ae792dbf1c592ecd45c513ec8 (diff) | |
parent | fdbfdc443cf902b5e8f0e4a3ec7c0aa1c5063026 (diff) |
Merge pull request #177192 from 1000101/pg_hint_plan
postgresqlPackages.pg_hint_plan: init at 14-1.4.0
Diffstat (limited to 'pkgs/servers/sql')
-rw-r--r-- | pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix | 32 | ||||
-rw-r--r-- | pkgs/servers/sql/postgresql/packages.nix | 2 |
2 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix b/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix new file mode 100644 index 0000000000000..25d27fcdfcbe8 --- /dev/null +++ b/pkgs/servers/sql/postgresql/ext/pg_hint_plan.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, fetchFromGitHub, postgresql }: + +stdenv.mkDerivation rec { + pname = "pg_hint_plan"; + version = "14-1.4.0"; + + src = fetchFromGitHub { + owner = "ossc-db"; + repo = pname; + rev = "REL${builtins.replaceStrings ["-" "."] ["_" "_"] version}"; + sha256 = "sha256-2hYDn/69264x2lMRVIp/I5chjocL6UqIw5ry1qdRcDM="; + }; + + buildInputs = [ postgresql ]; + + installPhase = '' + mkdir -p $out/{lib,share/postgresql/extension} + + cp *.so $out/lib + cp *.sql $out/share/postgresql/extension + cp *.control $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "Extension to tweak PostgreSQL execution plans using so-called 'hints' in SQL comments"; + homepage = "https://github.com/ossc-db/pg_hint_plan"; + maintainers = with maintainers; [ _1000101 ]; + platforms = postgresql.meta.platforms; + license = licenses.bsd3; + broken = versionOlder postgresql.version "14"; + }; +} diff --git a/pkgs/servers/sql/postgresql/packages.nix b/pkgs/servers/sql/postgresql/packages.nix index 775dee206edf7..5bbede9ddfc44 100644 --- a/pkgs/servers/sql/postgresql/packages.nix +++ b/pkgs/servers/sql/postgresql/packages.nix @@ -14,6 +14,8 @@ self: super: { pg_ed25519 = super.callPackage ./ext/pg_ed25519.nix { }; + pg_hint_plan = super.callPackage ./ext/pg_hint_plan.nix { }; + pg_rational = super.callPackage ./ext/pg_rational.nix { }; pg_repack = super.callPackage ./ext/pg_repack.nix { }; |