New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pg-safeupdate: init at 1.2 #62907
pg-safeupdate: init at 1.2 #62907
Conversation
@marsam Hey! 😃 . Could I get you interested in reviewing this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the heads up. I left a pair of comments. Besides that, LGTM
owner = "eradman"; | ||
repo = pname; | ||
rev = "${pname}-${version}"; | ||
sha256 = "010m57jcv5v8pyfm1cqs3a306y750lvnvla9m5d98v5vdx3349jg"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting a different hash 0v4mf013a25fz8p2rw4vh0c9q6m1zddvm05grpawrwkaw33hjh7a
description = "A simple extension to PostgreSQL that requires criteria for UPDATE and DELETE"; | ||
homepage = https://github.com/eradman/pg-safeupdate; | ||
maintainers = [ maintainers.steve-chavez ]; | ||
platforms = platforms.linux; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
platforms = platforms.linux; | |
platforms = postgresql.meta.platforms; |
|
||
meta = with stdenv.lib; { | ||
description = "A simple extension to PostgreSQL that requires criteria for UPDATE and DELETE"; | ||
homepage = https://github.com/eradman/pg-safeupdate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick
homepage = https://github.com/eradman/pg-safeupdate; | |
homepage = "https://github.com/eradman/pg-safeupdate"; |
@marsam Thank you. All corrections done! |
@@ -44,4 +44,6 @@ self: super: { | |||
pgrouting = super.callPackage ./ext/pgrouting.nix { }; | |||
|
|||
pg_partman = super.callPackage ./ext/pg_partman.nix { }; | |||
|
|||
pg-safeupdate = super.callPackage ./ext/pg-safeupdate.nix { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename this as pg_safeupdate
to match the naming scheme of all the other extensions here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. The extension name has that dash(pg-safeupdate
) so I left it like that but I don't see a problem with changing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thoughtpolice Renaming done!
src = fetchFromGitHub { | ||
owner = "eradman"; | ||
repo = pname; | ||
rev = "${pname}-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like upstream was retagged, can you update it with the new hash?
rev = "${pname}-${version}"; | |
rev = version; |
and before merge it, would you mind squashing the commits?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marsam Done!
safeupdate is a simple extension to PostgreSQL that raises an error if UPDATE and DELETE are executed without specifying conditions.
2c430b0
to
fe12861
Compare
@GrahamcOfBorg build postgresql.pkgs.pg_safeupdate |
Thanks a lot! |
@thoughtpolice @marsam Thank you guys! |
Motivation for this change
pg-safeupdate is a simple extension to PostgreSQL that raises an error if UPDATE and DELETE are executed without specifying conditions.
To test this works you can do:
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)