[Info-ingres] duplicate entries in iirelation (2/2)
From
Paul White@21:1/5 to
All on Tue Apr 27 11:25:57 2021
[continued from previous message]
├────────────────────────────────┼────────────────────┼─────────────────────────┼────
─────────┤
│sbradfor │tmp_cur_pricelist │2021_04_20 05:13:31 GMT │ 382408│
│sbradfor │tmp_cur_pricelist │2021_04_20 05:13:46 GMT │ 382414│
└────────────────────────────────┴────────────────────┴─────────────────────────┴────
─────────┘
(2 rows)
continue
* drop table tmp_cur_pricelist;\g
Executing . . .
continue
* commit\g
Executing . . .
continue
* select table_owner, varchar( table_name,20) tab, create_date, table_reltid from iitables where table_owner= 'sbradfor'\g
Executing . . .
┌────────────────────────────────┬────────────────────┬─────────────────────────┬────
─────────┐
│table_owner │tab │create_date │table_reltid │
├────────────────────────────────┼────────────────────┼─────────────────────────┼────
─────────┤
│sbradfor │tmp_cur_pricelist │2021_04_20 05:13:46 GMT │ 382414│
└────────────────────────────────┴────────────────────┴─────────────────────────┴────
─────────┘
(1 row)
continue
* drop table tmp_cur_pricelist;\g
Executing . . .
continue
* commit\g
Executing . . .
continue
* select table_owner, varchar( table_name,20) tab, create_date, table_reltid from iitables where table_owner= 'sbradfor'\g
Executing . . .
┌────────────────────────────────┬────────────────────┬─────────────────────────┬────
─────────┐
│table_owner │tab │create_date │table_reltid │
├────────────────────────────────┼────────────────────┼─────────────────────────┼────
─────────┤ └────────────────────────────────┴────────────────────┴─────────────────────────┴────
─────────┘
(0 rows)
continue
* \q
Your SQL statement(s) have been committed.
</pre>
</div>
<div class="moz-forward-container">In my test case I can generate
several duplicated instances. I can alter the table structure and
insert data. HELP TABLE returns an error.<br>
</div>
<div class="moz-forward-container"><br>
</div>
<div class="moz-forward-container"><font face="monospace">[ingres@ckrs_linux
20210422]$ sql pw123<br>
INGRES TERMINAL MONITOR Copyright 2019 Actian Corporation<br>
Ingres Linux Version II 11.1.0 (a64.lnx/100) login<br>
Tue Apr 27 11:05:56 2021<br>
Enter \g to execute commands, "help help\g" for general help,<br>
"help tm\g" for terminal monitor help, \q to quit<br>
<br>
continue<br>
* select varchar(table_name,10), varchar(table_owner,10),
count(*)<br>
* from iitables<br>
* group by table_name, table_owner<br>
* having count(*) > 1;\g<br>
Executing . . .<br>
<br>
<br>
┌──────────┬──────────┬─────────────┐<br>
│col1 │col2 │col3 │<br>
├──────────┼──────────┼─────────────┤<br>
│pw1 │user4 │ 2│<br>
│pw1 │user9 │ 2│<br>
└──────────┴──────────┴─────────────┘<br>
(2 rows)<br>
continue<br>
* \q<br>
Your SQL statement(s) have been committed.<br>
<br>
Ingres Version II 11.1.0 (a64.lnx/100) logout<br>
Tue Apr 27 11:06:10 2021</font></div>
<div class="moz-forward-container"><font face="monospace"><br>
</font></div>
<div class="moz-forward-container"><font face="monospace">[ingres@ckrs_linux
20210422]$ sql pw123 -uuser4<br>
INGRES TERMINAL MONITOR Copyright 2019 Actian Corporation<br>
Ingres Linux Version II 11.1.0 (a64.lnx/100) login<br>
Tue Apr 27 11:06:19 2021<br>
Enter \g to execute commands, "help help\g" for general help,<br>
"help tm\g" for terminal monitor help, \q to quit<br>
<br>
continue<br>
* help table pw1\g<br>
Executing . . .<br>
<br>
<br>
Sorry, Error(s) occurred obtaining Help from system catalogs<br>
on object 'pw1'.<br>
You may not have permissions to access this object.<br>
<br>
continue<br>
* alter table pw1 add column fred varchar(10)\g<br>
Executing . . .<br>
<br>
continue<br>
* commit\g<br>
Executing . . .<br>
<br>
continue<br>
* select table_owner, varchar( table_name,20) tab,
varchar(column_name,20) col from iicolumns where table_owner=
'user4'\g<br>
Executing . . .<br>
<br>
<br> ┌────────────────────────────────┬────────────────────┬────────────────────┐<br>
│table_owner │tab
│col │<br> ├────────────────────────────────┼────────────────────┼────────────────────┤<br>
│user4 │pw1
│cust_code │<br>
│user4 │pw1
│catlog_code │<br>
│user4 │pw1
│price │<br>
│user4 │pw1
│disc_percent │<br>
│user4 │pw1
│fred │<br>
│user4 │pw1
│cust_code │<br>
│user4 │pw1
│catlog_code │<br>
│user4 │pw1
│price │<br>
│user4 │pw1
│disc_percent │<br> └────────────────────────────────┴────────────────────┴────────────────────┘<br>
(9 rows)<br>
continue<br>
</font><font face="monospace">* continue</font><br>
</div>
<div class="moz-forward-container"><font face="monospace">* insert
into pw1 values ('cust','cat',123.45, 67.89)\g<br>
Executing . . .<br>
<br>
E_US0AD7 INSERT: number of target columns must equal the number
of<br>
specified values.<br>
(Tue Apr 27 11:12:23 2021)<br>
<br>
continue<br>
* insert into pw1 values ('cust','cat',123.45, 67.89,'fred')\g<br>
Executing . . .<br>
<br>
(1 row)<br>
continue<br>
* select * from pw1\g<br>
Executing . . .<br>
<br>
<br>
┌─────────┬────────────┬───────────┬────────────┬──────────┐<br>
│cust_code│catlog_code │price │disc_percent│fred │<br>
├─────────┼────────────┼───────────┼────────────┼──────────┤<br>
│SIDWILV0 │OLIVEOILP │ 82.000│ 0.000│ │<br>
│SIDWILV0 │UCO │ 0.000│ 0.000│ │<br>
│SIDWILV0 │XLFRY │ 2.500│ 0.000│ │<br>
│SIDWILV0 │XLFRYBAX15BB│ 37.500│ 0.000│ │<br>
│cust │cat │ 123.450│ 67.890│fred │<br>
└─────────┴────────────┴───────────┴────────────┴──────────┘<br>
(5 rows)<br>
continue<br>
*</font></div>
<div class="moz-forward-container"><font face="monospace">* drop
table pw1\g<br>
Executing . . .<br>
<br>
continue<br>
* select * from pw1\g<br>
Executing . . .<br>
<br>
<br>
┌─────────┬────────────┬───────────┬────────────┐<br>
│cust_code│catlog_code │price │disc_percent│<br>
├─────────┼────────────┼───────────┼────────────┤<br>
│SIDWILV0 │OLIVEOILP │ 82.000│ 0.000│<br>
│SIDWILV0 │UCO │ 0.000│ 0.000│<br>
│SIDWILV0 │XLFRY │ 2.500│ 0.000│<br>
│SIDWILV0 │XLFRYBAX15BB│ 37.500│ 0.000│<br>
└─────────┴────────────┴───────────┴────────────┘<br>
(4 rows)<br>
continue<br>
<br>
</font></div>
<div class="moz-forward-container"><br>
</div>
<div class="moz-forward-container"><br>
</div>
</body>
</html>
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)