pg-safeupdate: init at 1.2
safeupdate is a simple extension to PostgreSQL that raises an error if UPDATE and DELETE are executed without specifying conditions.
This commit is contained in:
parent
804e5e18e9
commit
e1f3167d6d
27
pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix
Normal file
27
pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{ stdenv, fetchFromGitHub, postgresql }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "pg-safeupdate";
|
||||||
|
version = "1.2";
|
||||||
|
|
||||||
|
buildInputs = [ postgresql ];
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "eradman";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "010m57jcv5v8pyfm1cqs3a306y750lvnvla9m5d98v5vdx3349jg";
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin # for buildEnv, see https://github.com/NixOS/nixpkgs/issues/22653
|
||||||
|
install -D safeupdate.so -t $out/lib
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A simple extension to PostgreSQL that requires criteria for UPDATE and DELETE";
|
||||||
|
homepage = "https://github.com/eradman/pg-safeupdate";
|
||||||
|
platforms = postgresql.meta.platforms;
|
||||||
|
license = licenses.postgresql;
|
||||||
|
};
|
||||||
|
}
|
@ -46,4 +46,6 @@ self: super: {
|
|||||||
pgrouting = super.callPackage ./ext/pgrouting.nix { };
|
pgrouting = super.callPackage ./ext/pgrouting.nix { };
|
||||||
|
|
||||||
pg_partman = super.callPackage ./ext/pg_partman.nix { };
|
pg_partman = super.callPackage ./ext/pg_partman.nix { };
|
||||||
|
|
||||||
|
pg_safeupdate = super.callPackage ./ext/pg_safeupdate.nix { };
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user