Changeset: ab051f11cac2 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ab051f11cac2
Modified Files:
clients/odbc/driver/SQLTablePrivileges.c
Branch: Aug2011
Log Message:
Small fixes to SQLTablePrivileges.
We need to return _SYSTEM in certain cases, and we should use PUBLIC
instead of public.
diffs (29 lines):
diff --git a/clients/odbc/driver/SQLTablePrivileges.c
b/clients/odbc/driver/SQLTablePrivileges.c
--- a/clients/odbc/driver/SQLTablePrivileges.c
+++ b/clients/odbc/driver/SQLTablePrivileges.c
@@ -90,8 +90,14 @@ SQLTablePrivileges_(ODBCStmt *stmt,
" cast(NULL as varchar(128)) as \"table_cat\","
" \"s\".\"name\" as \"table_schem\","
" \"t\".\"name\" as \"table_name\","
- " \"g\".\"name\" as \"grantor\","
- " \"a\".\"name\" as \"grantee\","
+ " case \"a\".\"id\""
+ " when \"s\".\"owner\" then '_SYSTEM'"
+ " else \"g\".\"name\""
+ " end as \"grantor\","
+ " case \"a\".\"name\""
+ " when 'public' then 'PUBLIC'"
+ " else \"a\".\"name\""
+ " end as \"grantee\","
" case \"p\".\"privileges\""
" when 1 then 'SELECT'"
" when 2 then 'UPDATE'"
@@ -103,7 +109,7 @@ SQLTablePrivileges_(ODBCStmt *stmt,
" case \"p\".\"grantable\""
" when 1 then 'YES'"
" when 0 then 'NO'"
- " end as \"grantable\" "
+ " end as \"is_grantable\" "
"from \"sys\".\"schemas\" \"s\","
" \"sys\".\"_tables\" \"t\","
" \"sys\".\"auths\" \"a\","
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list