Fix SQL so it actually loads (best guess on correctness)
Update package deps to modern versions

Could make network-uri dep more flexible, but too lazy for the moment.
Successfully building with templatepg 2c2e582