pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Medi Montaseri <montaseri@gmail.com>
To: s.borse@direction.biz
Cc: pgsql-admin@postgresql.org
Subject: Re: synonym
Date: Thu, 13 Dec 2007 23:50:13 -0800
Message-ID: <8078a1730712132350n4ebc2cd3n5824387ad208cc85@mail.gmail.com> (raw)
In-Reply-To: <1197614389.10019.2.camel@DSS-052.dsslp>
References: <1197614389.10019.2.camel@DSS-052.dsslp>

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
>
>
>

view thread (3+ messages)  latest in thread

Message-ID: <8078a1730712132350n4ebc2cd3n5824387ad208cc85@mail.gmail.com>
Permalink:  ../8078a1730712132350n4ebc2cd3n5824387ad208cc85@mail.gmail.com/
Also on:    postgresql.org/message-id/8078a1730712132350n4ebc2cd3n5824387ad208cc85@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: montaseri@gmail.com, s.borse@direction.biz
  Subject: Re: synonym
  In-Reply-To: <8078a1730712132350n4ebc2cd3n5824387ad208cc85@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox