
diff -r 2cd2860c8fb3 -r b0bbfff8eca1 prototyp/prototyp.sql
--- a/prototyp/prototyp.sql	Mon Sep 01 15:56:05 2014 +0200
+++ b/prototyp/prototyp.sql	Mon Sep 01 16:04:59 2014 +0200
@@ -63,18 +63,18 @@
 
 -- user groups: --------------------------------------------------------------
 
-DROP VIEW IF EXISTS user_group;
-DROP FUNCTION IF EXISTS user_group();
-DROP TYPE IF EXISTS unix_sql_api_user_group;
+DROP VIEW IF EXISTS groups;
+DROP FUNCTION IF EXISTS groups();
+DROP TYPE IF EXISTS unix_sql_api_groups;
 
-CREATE TYPE unix_sql_api_user_group AS (
+CREATE TYPE unix_sql_api_groups AS (
 	id INTEGER,
 	name VARCHAR,
 	members VARCHAR[]
 );
 
-CREATE OR REPLACE FUNCTION user_group()
-RETURNS SETOF unix_sql_api_user_group AS $$
+CREATE OR REPLACE FUNCTION groups()
+RETURNS SETOF unix_sql_api_groups AS $$
 	use strict;
 	use warnings;
 	
@@ -91,7 +91,8 @@
 	return undef;
 $$ LANGUAGE plperlu;
 
-CREATE OR REPLACE VIEW user_group AS
-	SELECT * FROM user_group()
+CREATE OR REPLACE VIEW groups AS
+	SELECT * FROM groups()
 ;
+COMMENT ON COLUMN groups.members IS 'does not contain users for who have this group as primary one';
 




