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: [PATCH] Synonym support in Derby.
Date Thu, 02 Jun 2005 01:15:15 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">
Could this possibly lead to dead-locks? If someone is trying to create
a table and another trying to create a synonym could possibly block
each other. I have a feeling you have a better way to do this, so what
is it?<br>
<br>
Satheesh<br>
<blockquote cite="mid429E5B84.7040003@Sourcery.Org" type="cite">Well, I
currently check if a table of same name is present before
allowing a synonym to be created. Same the other way. Not good? <span
 class="moz-smiley-s7"><span> :-\&nbsp; </span></span><br>
  <br>
Satheesh<br>
  <br>
Daniel John Debrunner wrote:<br>
  <blockquote cite="mid429E56F9.40105@debrunners.com" type="cite">
    <pre wrap="">Satheesh Bandaram wrote:

  </pre>
    <blockquote type="cite">
      <pre wrap="">I almost submitted a patch using option 1, like I said I would. I
have
added a SynonymAliasInfo to hold target of a synonym, which is
schemaName.tableName. I think this schemaName needs to be stored as a
name, instead of an ID so that the synonym stays valid even after
droping and recreating the target schema.
    </pre>
    </blockquote>
    <pre wrap=""><!---->
That seems like correct behaviour.

  </pre>
    <blockquote type="cite">
      <pre wrap="">Yes, the namespace for SYNONYM is the same for tables and views.
You
can't create a synonym if a table of that name already exists.
    </pre>
    </blockquote>
    <pre wrap=""><!---->
An explanation of how this is enforced would be good, another approach
would be to introduce a new table type in SYSTABLES, and then the
uniqueness would be handled by the existing code. Maybe you are doing
that already. I guess I should wait for the patch. :-)

Dan.



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


Mime
View raw message