Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 437F32E362D for ; Fri, 14 Dec 2007 03:50:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 34483-06 for ; Fri, 14 Dec 2007 03:50:26 -0400 (AST) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.190]) by postgresql.org (Postfix) with ESMTP id B25D92E35BE for ; Fri, 14 Dec 2007 03:50:27 -0400 (AST) Received: by mu-out-0910.google.com with SMTP id i10so1662296mue.3 for ; Thu, 13 Dec 2007 23:50:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=3MB2u5oz3uoncxSXvVGX3s+asFbeHgsoreML4/vlsBc=; b=RH9GJ135EoDGh4act2DS4C3Oycxp3FdpDyVL068rEIsrQOuW308RfsGoJfqxUF8vWiOMBYKgmVQZE1bjOTS/rzuP7vQ4BJW/RcQOOwaYMfPBLKyMlZNF6yjVuZPsdJMqB0/npQolFf4Rrgjaini/MjPaRt5aX9nKaLFOlD3pRNw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=u/NcNz0qooB5wBV47bdkL1ZxwzGfw+EmS/j10V64ge0ezjTkF8sTcVLUFx4sVJtzFGDqhdrcn9vQZZebqpZFntpaGQ3NKoMrc5L+HvxPnSOKJ0EfBtGfzcQgNyFmTNcfzEixQyzMV7Mc8lcTMWnDFptdt/8uF9GxSGq/GaXzYPs= Received: by 10.65.225.7 with SMTP id c7mr6833233qbr.1.1197618613697; Thu, 13 Dec 2007 23:50:13 -0800 (PST) Received: by 10.64.242.15 with HTTP; Thu, 13 Dec 2007 23:50:13 -0800 (PST) Message-ID: <8078a1730712132350n4ebc2cd3n5824387ad208cc85@mail.gmail.com> Date: Thu, 13 Dec 2007 23:50:13 -0800 From: "Medi Montaseri" To: s.borse@direction.biz Subject: Re: synonym Cc: pgsql-admin@postgresql.org In-Reply-To: <1197614389.10019.2.camel@DSS-052.dsslp> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_70_7261087.1197618613691" References: <1197614389.10019.2.camel@DSS-052.dsslp> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/102 X-Sequence-Number: 27619 ------=_Part_70_7261087.1197618613691 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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++. Cheers Medi On Dec 13, 2007 10:39 PM, DBA wrote: > Hi, > > Is it possible to create synonym in postgresql? > > I am getting error while creating synonym. > > ERROR: syntax error at or near "synonym" at character 8 > > > > Thanks & Regards, > Suresh > > > ------=_Part_70_7261087.1197618613691 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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++.

Cheers
Medi

On Dec 13, 2007 10:39 PM, DBA <s.borse@direction.biz > wrote:
Hi,

Is it possible to create synonym in postgresql?

I am getting error while creating synonym.

ERROR:  syntax error at or near "synonym" at character 8



Thanks & Regards,
Suresh



------=_Part_70_7261087.1197618613691--