Add random pg stuff
authorPeter Palfrader <peter@palfrader.org>
Thu, 25 Jun 2009 18:23:44 +0000 (20:23 +0200)
committerPeter Palfrader <peter@palfrader.org>
Thu, 25 Jun 2009 18:23:44 +0000 (20:23 +0200)
input/howto/postgres.creole [new file with mode: 0644]
input/index.mdwn

diff --git a/input/howto/postgres.creole b/input/howto/postgres.creole
new file mode 100644 (file)
index 0000000..35677e3
--- /dev/null
@@ -0,0 +1,26 @@
+== User/permission stuff with pg ==
+
+{{{
+revoke ALL on DATABASE "XXX" from public;
+
+grant CONNECT, CREATE, TEMPORARY on DATABASE "XXX" to "YYY";
+grant CONNECT on DATABASE "XXX" to public;
+grant TEMPORARY on DATABASE "XXX" to guest;
+
+REVOKE ALL ON SCHEMA public from public;
+GRANT USAGE ON SCHEMA public TO public;
+GRANT ALL ON SCHEMA public TO "YYY";
+
+\dn+
+\dp+
+
+select * from pg_database ;
+
+
+
+sudo -u postgres psql "XXX" << EOF
+CREATE LANGUAGE plpgsql;
+EOF
+
+sudo -u postgres psql "XXX" < /usr/share/postgresql/8.3/contrib/debversion.sql
+}}}
index b760dea..9bcee35 100644 (file)
@@ -34,6 +34,7 @@ VCS repositories for ud-ldap and all our other stuff can be found at
 * [[howto/iscsi]]: How to setup a new iscsi initiator
 * [[howto/export-iscsi]]: How to export new iscsi LUNs
 * [[howto/install-kvm]]: How to setup a new kvm domain without going through d-i etc.
+* [[howto/postgres]]: Random postgres stuff
 
 ## misc