Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 4EEC62E304D for ; Sun, 16 Dec 2007 22:10:44 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 16926-04 for ; Sun, 16 Dec 2007 22:10:31 -0400 (AST) Received: from momjian.us (momjian.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id 5A79D2E2D51 for ; Sun, 16 Dec 2007 22:10:31 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id lBH2AUJ11224; Sun, 16 Dec 2007 21:10:30 -0500 (EST) From: Bruce Momjian Message-Id: <200712170210.lBH2AUJ11224@momjian.us> Subject: Re: synonym In-Reply-To: <8078a1730712132350n4ebc2cd3n5824387ad208cc85@mail.gmail.com> To: Medi Montaseri Date: Sun, 16 Dec 2007 21:10:30 -0500 (EST) CC: s.borse@direction.biz, pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/134 X-Sequence-Number: 27651 Medi Montaseri wrote: > PostgreSQL does not support SYNOSYM or ALIAS. Synonym is a non SQL 2003 > feature implemented by Microsoft SQL 2005 (I think). While it does provide > an interesting abstraction, but due to lack of relational integrity, it can > be considered a risk. > > That is, you can create a synonym, advertise it to you programmers, the code > is written around it, including stored procedures, then one day the backend > of this synonym (or link or pointer) is changed/deleted/etc leading to a run > time error. I don't even think a prepare would catch that. > > It is the same trap as the symbolic links in unix and null pointers in > C/C++. It is on the TODO: * Add support for public SYNONYMs http://archives.postgresql.org/pgsql-hackers/2006-03/msg00519.php -- Bruce Momjian http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +