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 Tue, 14 Jun 2005 20:22:52 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Good point... I think many DDL statements need fixing in that case:<br>
<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
schema.<br>
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
schema.<br>
ij&gt; <b>create synonym</b> syn1 for session.permTable;<br>
ERROR XCL51: The requested function can not reference tables in SESSION
schema.<br>
ij&gt; <b>create index </b>indSession on session.permTable (i);&nbsp;&nbsp;
&lt;============ Works correctly.<br>
0 rows inserted/updated/deleted<br>
<br>
I seem to have changed from the correct way to check in original
submitted patch to incorrect way in the last "cleanup"...&nbsp;<span
 class="moz-smiley-s2"><span> :-( </span></span><br>
<br>
Satheesh<br>
<br>
Daniel John Debrunner wrote:<br>
<blockquote cite="mid42AEE918.9080202@debrunners.com" type="cite">
  <pre wrap="">Satheesh Bandaram (JIRA) wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">    [ <a class="moz-txt-link-freetext" href="http://issues.apache.org/jira/browse/DERBY-347?page=comments#action_12313495">http://issues.apache.org/jira/browse/DERBY-347?page=comments#action_12313495</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.
    </pre>
  </blockquote>
  <pre wrap=""><!---->[snip]
  </pre>
  <blockquote type="cite">
    <pre wrap="">  *  A synonym can't be defined on a temporary table. (SQLSTATE XCL51)
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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.

Dan.





  </pre>
</blockquote>
</body>
</html>


Mime
View raw message