[Greater-commits] r415 - trunk/GREAT-ER-DB/impl/postgresql
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jul 12 16:11:14 CEST 2011
Author: bricks
Date: 2011-07-12 16:11:13 +0200 (Tue, 12 Jul 2011)
New Revision: 415
Modified:
trunk/GREAT-ER-DB/impl/postgresql/gdagreater_pg.pgc
Log:
Receive standard role from PHRASE_TAB
Modified: trunk/GREAT-ER-DB/impl/postgresql/gdagreater_pg.pgc
===================================================================
--- trunk/GREAT-ER-DB/impl/postgresql/gdagreater_pg.pgc 2011-07-12 14:05:37 UTC (rev 414)
+++ trunk/GREAT-ER-DB/impl/postgresql/gdagreater_pg.pgc 2011-07-12 14:11:13 UTC (rev 415)
@@ -9896,7 +9896,9 @@
char h_fmt_date[30];
char h_fmt_date2[30];
- char h_grant_statement[200];
+ char h_grant_statement[500];
+ long h_phrase_grp_id;
+ char h_role_name[256];
EXEC SQL END DECLARE SECTION;
@@ -9995,8 +9997,16 @@
PQfinish(connection);
errln = 20;
+ h_phrase_grp_id = DA_PHRASE_GRP_ID_ROLE;
+
+ EXEC SQL SELECT VALUE_PT
+ INTO :h_role_name
+ FROM PHRASE_TAB
+ WHERE PHRASE_GRP_ID = :h_phrase_grp_id;
+
sprintf (h_grant_statement, "GRANT ALL ON LARGE OBJECT %d TO %s",
- h_file_obj, DA_STANDARD_ROLE);
+ h_file_obj, h_role_name);
+ errln = 25;
EXEC SQL EXECUTE IMMEDIATE :h_grant_statement;
}
More information about the Greater-commits
mailing list