db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: [jira] Commented: (DERBY-347) Document SYNONYM support
Date Thu, 16 Jun 2005 02:43:57 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
Do you remember the reasoning for this? Guess we should add synonyms to
the list, with triggers and views.<br>
Mamta Satoor wrote:<br>
<blockquote cite="midd9619e4a05061421332c47fee2@mail.gmail.com"
  <div>Hi Satheesh,</div>
  <div>The behavior you are noticing with views and triggers is the
documented behavior. </div>
  <div>"DECLARE GLOBAL TEMPORARY TABLE statement is documented at </div>
At the </div>
  <div>bottom of the page, there is&nbsp;a section called "Restrictions
Specific to Derby"</div>
  <div>and it says following for views and triggers.</div>
  <p><span>Derby</span> does not support the following on temporary
    <li>index support </li>
    <li><strong>triggers and views on SESSION schema tables (including
physical tables and temporary tables) </strong></li>
  <div>If&nbsp;we choose to not support&nbsp;SYNONYMS on&nbsp;temporary
table, that we
should add it </div>
  <div>the list. If we choose not to support SYNONYMS on any SESSION
schema table,</div>
  <div>then we should add it to the list&nbsp;alongwith triggers and views
  <div>Also, the reason the index creation passed is that it was
created on a permanent</div>
  <div>table in SESSION schema. If it was attempted on a temporary
table, you would</div>
  <div>have gotten an exception (which is inline with the
documentation, where we say</div>
  <div>that there is no index support on temporary tables).</div>
  <div><span class="gmail_quote">On 6/14/05, <b
 class="gmail_sendername">Satheesh Bandaram</b> &lt;<a
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left:
point... I think many DDL statements need fixing in that case:<br>
ij&gt; create table session.permTable ( i int);<br>
0 rows inserted/updated/deleted<br>
ij&gt; <b>create view </b>view1 as select * from session.permTable;<br>
ERROR XCL51: The requested function can not reference tables in SESSION
ij&gt; <b>create trigger </b>trig1 after insert on session.permTable
for each row mode db2<br>
sql insert into t1 values (1);<br>
ERROR XCL51: The requested function can not reference tables in SESSION
ij&gt; <b>create synonym</b> syn1 for session.permTable;<br>
ERROR XCL51: The requested function can not reference tables in SESSION
ij&gt; <b>create index </b>indSession on session.permTable (i);&nbsp;&nbsp;
&lt;============ Works correctly.<br>
0 rows inserted/updated/deleted
I seem to have changed from the correct way to check in original
submitted patch to incorrect way in the last "cleanup"...&nbsp;<span><span>
:-( </span></span><br>
    <span class="sg"><br>
    <div><span class="e" id="q_1047c868b2fb4e51_2"><br>
Daniel John Debrunner wrote:<br>
    <blockquote cite="http://mid42AEE918.9080202@debrunners.com"
      <pre>Satheesh Bandaram (JIRA) wrote:

      <blockquote type="cite">
        <pre>    [ <a
 onclick="return top.js.OpenExtLink(window,event,this)"
</a> ] 

Satheesh Bandaram commented on DERBY-347:

The patch looks good, though I would add more description to the CREATE SYNONYM section. Can
we also add the following information?

  *  A synonym can be defined for a table/view that doesn't exists at the synonym creation
time. If it doesn't exists, a warning (SQLSTATE 01522) is raised. The referenced object must
be present when a synonym is used in a DML statement.
      <blockquote type="cite">
        <pre>  *  A synonym can't be defined on a temporary table. (SQLSTATE XCL51)
      <pre>Is the temp table restriction a DDL time (CREATE SYNONYM) failure or a
runtime (when the SYNONYM is used in a statement)?

Because error XCL51 doesn't exactly match what you describe. XCL51
indicates the operation cannot reference a table in the SESSION schema,
which is where temp tables are defined but that schema can also support
normal tables.



View raw message