From s.borse@direction.biz Fri Dec 14 06:41:41 2007 Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 1752C2E32C0 for ; Fri, 14 Dec 2007 02:41:41 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 95384-10 for ; Fri, 14 Dec 2007 02:41:21 -0400 (AST) Received: from ns1.aaaonlinux.net (NS1.AAAONLINUX.net [70.84.189.18]) by postgresql.org (Postfix) with ESMTP id C50652E2DCE for ; Fri, 14 Dec 2007 02:41:34 -0400 (AST) Received: (qmail 15741 invoked by uid 508); 14 Dec 2007 06:44:56 -0000 Received: from unknown (HELO direction.biz) (59.163.21.147) by ns1.aaaonlinux.net with SMTP; 14 Dec 2007 06:44:55 -0000 Received: from DSS-052.dsslp ([172.16.2.20]) by direction.biz (direction.biz) (MDaemon PRO v9.0.0) with ESMTP id md50001401885.msg for ; Fri, 14 Dec 2007 12:10:27 +0530 Subject: synonym From: DBA Reply-To: s.borse@direction.biz To: pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary="=-aF2sv2S1AxsdMjKWVuZV" Organization: DSS Date: Fri, 14 Dec 2007 12:09:49 +0530 Message-Id: <1197614389.10019.2.camel@DSS-052.dsslp> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 (2.6.0-1) X-Spam-Processed: direction.biz, Fri, 14 Dec 2007 12:10:27 +0530 (not processed: spam filter heuristic analysis disabled) X-MDRemoteIP: 172.16.2.20 X-Return-Path: s.borse@direction.biz X-MDaemon-Deliver-To: pgsql-admin@postgresql.org X-MDAV-Processed: direction.biz, Fri, 14 Dec 2007 12:10:28 +0530 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.403 tagged_above=0 required=5 tests=AWL=0.401, BAYES_50=0.001, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200712/101 X-Sequence-Number: 27618 --=-aF2sv2S1AxsdMjKWVuZV Content-Type: text/plain Content-Transfer-Encoding: 7bit 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 --=-aF2sv2S1AxsdMjKWVuZV Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit 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


--=-aF2sv2S1AxsdMjKWVuZV-- From montaseri@gmail.com Fri Dec 14 07:50:31 2007 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-- From bruce@momjian.us Mon Dec 17 02:10:44 2007 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. +