[Greater-commits] r284 - in trunk/GREAT-ER-DB/impl/postgresql: . test/PostgreSQL
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Jun 27 15:06:12 CEST 2011
Author: aheinecke
Date: 2011-06-27 15:06:11 +0200 (Mon, 27 Jun 2011)
New Revision: 284
Modified:
trunk/GREAT-ER-DB/impl/postgresql/datypes_pg.h
trunk/GREAT-ER-DB/impl/postgresql/gdagreater_pg.pgc
trunk/GREAT-ER-DB/impl/postgresql/test/PostgreSQL/create_db_objects.sql
Log:
Change temp_sess_db_sid from char * to long since it is supposed to
contain a object id in postgres
Modified: trunk/GREAT-ER-DB/impl/postgresql/datypes_pg.h
===================================================================
--- trunk/GREAT-ER-DB/impl/postgresql/datypes_pg.h 2011-06-27 13:05:19 UTC (rev 283)
+++ trunk/GREAT-ER-DB/impl/postgresql/datypes_pg.h 2011-06-27 13:06:11 UTC (rev 284)
@@ -319,7 +319,7 @@
int privs;
char is_temp_sess [ 2];
long temp_sess_src_id;
- char temp_sess_db_sid [256];
+ long temp_sess_db_sid;
char remark [2001];
struct DA_S_sess *next_element;
} DA_T_sess;
Modified: trunk/GREAT-ER-DB/impl/postgresql/gdagreater_pg.pgc
===================================================================
--- trunk/GREAT-ER-DB/impl/postgresql/gdagreater_pg.pgc 2011-06-27 13:05:19 UTC (rev 283)
+++ trunk/GREAT-ER-DB/impl/postgresql/gdagreater_pg.pgc 2011-06-27 13:06:11 UTC (rev 284)
@@ -11737,7 +11737,7 @@
long privs;
char is_temp_sess [ 2];
long temp_sess_src_id;
- char temp_sess_db_sid [256];
+ long temp_sess_db_sid;
char remark [2001];
} h_sess;
@@ -11860,6 +11860,7 @@
if (h_ind_sess.sess_disch_id == -1) h_sess.sess_disch_id = -1;
if (h_ind_sess.privs == -1) h_sess.privs = 1;
if (h_ind_sess.temp_sess_src_id == -1) h_sess.temp_sess_src_id = -1;
+ if (h_ind_sess.temp_sess_db_sid == -1) h_sess.temp_sess_db_sid = -1;
if (h_ind_sess.name == -1) strcpy(h_sess.name, "");
if (h_ind_sess.user_id == -1) strcpy(h_sess.user_id, "");
@@ -11867,7 +11868,6 @@
if (h_ind_sess.mod_date == -1) strcpy(h_sess.mod_date, "");
if (h_ind_sess.status == -1) strcpy(h_sess.status, "");
if (h_ind_sess.is_temp_sess == -1) strcpy(h_sess.is_temp_sess, "N");
- if (h_ind_sess.temp_sess_db_sid == -1) strcpy(h_sess.temp_sess_db_sid, "");
if (h_ind_sess.remark == -1) strcpy(h_sess.remark, "");
/* copy result into temp. buffer */
@@ -11881,6 +11881,7 @@
v_sess_buf.sess_disch_id = h_sess.sess_disch_id;
v_sess_buf.privs = h_sess.privs;
v_sess_buf.temp_sess_src_id = h_sess.temp_sess_src_id;
+ v_sess_buf.temp_sess_db_sid = h_sess.temp_sess_db_sid;
strcpy(v_sess_buf.name , h_sess.name);
strcpy(v_sess_buf.user_id , h_sess.user_id);
@@ -11888,7 +11889,6 @@
strcpy(v_sess_buf.mod_date , h_sess.mod_date);
strcpy(v_sess_buf.status , h_sess.status);
strcpy(v_sess_buf.is_temp_sess, h_sess.is_temp_sess);
- strcpy(v_sess_buf.temp_sess_db_sid, h_sess.temp_sess_db_sid);
strcpy(v_sess_buf.remark , h_sess.remark);
v_sess_buf.next_element = NULL;
@@ -12045,7 +12045,7 @@
long privs;
char is_temp_sess [ 2];
long temp_sess_src_id;
- char temp_sess_db_sid [256];
+ long temp_sess_db_sid;
char remark [2001];
} h_sess;
@@ -12133,12 +12133,12 @@
h_sess.privs = vp_sess->privs;
h_sess.temp_sess_src_id = vp_sess->temp_sess_src_id;
+ h_sess.temp_sess_db_sid = vp_sess->temp_sess_db_sid;
strcpy(h_sess.name , vp_sess->name);
strcpy(h_sess.user_id , vg_db_user_info.user_id);
strcpy(h_sess.status , vp_sess->status);
strcpy(h_sess.is_temp_sess, vp_sess->is_temp_sess);
- strcpy(h_sess.temp_sess_db_sid, vp_sess->temp_sess_db_sid);
strcpy(h_sess.remark , vp_sess->remark);
@@ -12284,7 +12284,7 @@
long privs;
char is_temp_sess [ 2];
long temp_sess_src_id;
- char temp_sess_db_sid [256];
+ long temp_sess_db_sid;
char remark [2001];
} h_sess;
@@ -12362,6 +12362,7 @@
h_sess.sess_disch_id = vp_sess->sess_disch_id;
h_sess.privs = vp_sess->privs;
h_sess.temp_sess_src_id = vp_sess->temp_sess_src_id;
+ h_sess.temp_sess_db_sid = vp_sess->temp_sess_db_sid;
strcpy(h_sess.name , vp_sess->name);
strcpy(h_sess.user_id , vp_sess->user_id);
@@ -12369,7 +12370,6 @@
strcpy(h_sess.mod_date , vp_sess->mod_date);
strcpy(h_sess.status , vp_sess->status);
strcpy(h_sess.is_temp_sess, vp_sess->is_temp_sess);
- strcpy(h_sess.temp_sess_db_sid, vp_sess->temp_sess_db_sid);
strcpy(h_sess.remark , vp_sess->remark);
strcpy(h_con_name, db_con->con_name);
@@ -12821,7 +12821,7 @@
long privs;
char is_temp_sess [ 2];
long temp_sess_src_id;
- char temp_sess_db_sid [256];
+ long temp_sess_db_sid;
char remark [2001];
} h_sess;
@@ -12939,6 +12939,7 @@
if (h_ind_sess.sess_disch_id == -1) h_sess.sess_disch_id = -1;
if (h_ind_sess.privs == -1) h_sess.privs = 1;
if (h_ind_sess.temp_sess_src_id == -1) h_sess.temp_sess_src_id = -1;
+ if (h_ind_sess.temp_sess_db_sid == -1) h_sess.temp_sess_db_sid = -1;
if (h_ind_sess.name == -1) strcpy(h_sess.name, "");
if (h_ind_sess.user_id == -1) strcpy(h_sess.user_id, "");
@@ -12946,7 +12947,6 @@
if (h_ind_sess.mod_date == -1) strcpy(h_sess.mod_date, "");
if (h_ind_sess.status == -1) strcpy(h_sess.status, "");
if (h_ind_sess.is_temp_sess == -1) strcpy(h_sess.is_temp_sess, "N");
- if (h_ind_sess.temp_sess_db_sid == -1) strcpy(h_sess.temp_sess_db_sid,"");
if (h_ind_sess.remark == -1) strcpy(h_sess.remark, "");
/* copy result into temp. buffer */
@@ -12960,6 +12960,7 @@
v_sess_buf.sess_disch_id = h_sess.sess_disch_id;
v_sess_buf.privs = h_sess.privs;
v_sess_buf.temp_sess_src_id = h_sess.temp_sess_src_id;
+ v_sess_buf.temp_sess_db_sid = h_sess.temp_sess_db_sid;
strcpy(v_sess_buf.name , h_sess.name);
strcpy(v_sess_buf.user_id , h_sess.user_id);
@@ -12967,7 +12968,6 @@
strcpy(v_sess_buf.mod_date , h_sess.mod_date);
strcpy(v_sess_buf.status , h_sess.status);
strcpy(v_sess_buf.is_temp_sess, h_sess.is_temp_sess);
- strcpy(v_sess_buf.temp_sess_db_sid, h_sess.temp_sess_db_sid);
strcpy(v_sess_buf.remark , h_sess.remark);
v_sess_buf.next_element = NULL;
@@ -13305,7 +13305,7 @@
:h_sess_id_src,
:h_sess.remark);
- EXEC SQL SELECT OID INTO :h_sess.temp_sess_db_sid FROM SESS_TAB WHERE SESS_ID = :h_sess_id_new;
+ EXEC SQL SELECT SESS_ID INTO :h_sess.temp_sess_db_sid FROM SESS_TAB WHERE SESS_ID = :h_sess_id_new;
EXEC SQL UPDATE SESS_TAB SET TEMP_SESS_DB_SID = :h_sess.temp_sess_db_sid
WHERE SESS_ID = :h_sess_id_new ;
@@ -13418,7 +13418,7 @@
long privs;
char is_temp_sess [ 2];
long temp_sess_src_id;
- char temp_sess_db_sid [256];
+ long temp_sess_db_sid;
char remark [2001];
} h_sess;
@@ -13506,6 +13506,7 @@
if (h_ind_sess.sess_disch_id == -1) h_sess.sess_disch_id = -1;
if (h_ind_sess.privs == -1) h_sess.privs = 1;
if (h_ind_sess.temp_sess_src_id == -1) h_sess.temp_sess_src_id = -1;
+ if (h_ind_sess.temp_sess_db_sid == -1) h_sess.temp_sess_db_sid = -1;
if (h_ind_sess.name == -1) strcpy(h_sess.name, "");
if (h_ind_sess.user_id == -1) strcpy(h_sess.user_id, "");
@@ -13513,7 +13514,6 @@
if (h_ind_sess.mod_date == -1) strcpy(h_sess.mod_date, "");
if (h_ind_sess.status == -1) strcpy(h_sess.status, "");
if (h_ind_sess.is_temp_sess == -1) strcpy(h_sess.is_temp_sess, "N");
- if (h_ind_sess.temp_sess_db_sid == -1) strcpy(h_sess.temp_sess_db_sid,"");
if (h_ind_sess.remark == -1) strcpy(h_sess.remark, "");
/* copy result into temp. buffer */
@@ -13527,6 +13527,7 @@
v_sess_buf.sess_disch_id = h_sess.sess_disch_id;
v_sess_buf.privs = h_sess.privs;
v_sess_buf.temp_sess_src_id = h_sess.temp_sess_src_id;
+ v_sess_buf.temp_sess_db_sid = h_sess.temp_sess_db_sid;
strcpy(v_sess_buf.name , h_sess.name);
strcpy(v_sess_buf.user_id , h_sess.user_id);
@@ -13534,7 +13535,6 @@
strcpy(v_sess_buf.mod_date , h_sess.mod_date);
strcpy(v_sess_buf.status , h_sess.status);
strcpy(v_sess_buf.is_temp_sess, h_sess.is_temp_sess);
- strcpy(v_sess_buf.temp_sess_db_sid, h_sess.temp_sess_db_sid);
strcpy(v_sess_buf.remark , h_sess.remark);
v_sess_buf.next_element = NULL;
@@ -13574,7 +13574,7 @@
SET MOD_DATE = to_timestamp(:h_sess.mod_date, :h_fmt_date),
IS_TEMP_SESS = 'N',
TEMP_SESS_SRC_ID = -1,
- TEMP_SESS_DB_SID = NULL
+ TEMP_SESS_DB_SID = 0
WHERE SESS_ID = :h_sess_id_qry;
}
Modified: trunk/GREAT-ER-DB/impl/postgresql/test/PostgreSQL/create_db_objects.sql
===================================================================
--- trunk/GREAT-ER-DB/impl/postgresql/test/PostgreSQL/create_db_objects.sql 2011-06-27 13:05:19 UTC (rev 283)
+++ trunk/GREAT-ER-DB/impl/postgresql/test/PostgreSQL/create_db_objects.sql 2011-06-27 13:06:11 UTC (rev 284)
@@ -862,7 +862,7 @@
PRIVS NUMERIC (1) NOT NULL,
IS_TEMP_SESS VARCHAR (1) NOT NULL,
TEMP_SESS_SRC_ID NUMERIC (26) ,
- TEMP_SESS_DB_SID OID ,
+ TEMP_SESS_DB_SID NUMERIC (26) ,
REMARK VARCHAR (2000) ,
SESS_DISCH_ID NUMERIC (26) ,
CONSTRAINT SESS_U1_IDX
More information about the Greater-commits
mailing list