In my "hard-core" Oracle days, we've used Oracle synonyms merely for 
importing all objects from the de facto "main" schema in the "public" name 
space. Interestingly, unlike H2 (or PostgreSQL), for instance, Oracle 
doesn't have a "default" PUBLIC schema. While SQL Server allows for 
overriding the default schema for every user / login, Oracle's notion of 
default schema is tied to the user name.

But Oracle does have a syntax for creating "public" synonyms:
http://docs.oracle.com/cd/E16655_01/server.121/e17209/statements_7001.htm#SQLRF54350

Besides, every now and then, synonyms were an awesome way of globally 
"hiding" db links.

Synonyms are supported also in at least any of these databases:

- IBM DB2: 
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2z9.doc.sqlref%2Fsrc%2Ftpc%2Fdb2z_sql_createsynonym.htm
- IBM Informix: 
http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.sqls.doc/sqls272.htm
- MS SQL Server: http://technet.microsoft.com/en-US/library/ms177544.aspx

So, long story short, I think that synonyms would be a nice to 
have feature in H2 for

- Increased database compatibility
- Improved support for H2's LINKED TABLEs

Of course, you'll still need to gauge cost / effect of this feature.

Cheers
Lukas

Am Freitag, 13. Dezember 2013 21:03:58 UTC+1 schrieb Thomas Mueller:
>
> Hi,
>
> Thanks for the patch! However, I'm not quite sure if it makes sense to add 
> this feature to H2. I have never heard about the "synonym" feature, and I 
> have never heard anybody asking for this feature. I don't know of a 
> database that supports it except for Oracle. Not even PostgreSQL supports 
> it I think:
>
> http://www.postgresql.org/message-id/[email protected]
>
> It does not make sense to add "the kitchen sink" to H2. Supporting each 
> feature binds resources (documentation, support, bugfixes, tests, 
> complexity in the source code,...). I'm not convinces this feature is 
> useful.
>
> But of course we can leave this issue open, with "patch available". We 
> currently don't have this status, but I can add it.
>
> What do others think about it?
>
> Regards,
> Thomas
>
>
>
> On Thu, Dec 12, 2013 at 11:10 PM, Sudeep Ambekar 
> <[email protected]<javascript:>> 
> wrote:
> >
> > Hi,
> >
> > I have submitted a patch for Issue 533, can you please review the same?
> > The patch is attached to the issue.
> >
> > Let me know if any changes are required.
> >
> > Regards,
> > Sudeep Ambekar
> >
> > --
> > You received this message because you are subscribed to the Google 
> Groups "H2 Database" group.
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to [email protected] <javascript:>.
> > To post to this group, send email to [email protected]<javascript:>
> .
> > Visit this group at http://groups.google.com/group/h2-database.
> > For more options, visit https://groups.google.com/groups/opt_out.
>  

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to