pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
synonym
3+ messages / 3 participants
[nested] [flat]

* synonym
@ 2007-12-14 06:39 DBA <s.borse@direction.biz>
  2007-12-14 07:50 ` Re: synonym Medi Montaseri <montaseri@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: DBA @ 2007-12-14 06:39 UTC (permalink / raw)
  To: pgsql-admin

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 

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: synonym
  2007-12-14 06:39 synonym DBA <s.borse@direction.biz>
@ 2007-12-14 07:50 ` Medi Montaseri <montaseri@gmail.com>
  2007-12-17 02:10   ` Re: synonym Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Medi Montaseri @ 2007-12-14 07:50 UTC (permalink / raw)
  To: s.borse@direction.biz; +Cc: pgsql-admin

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

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: synonym
  2007-12-14 06:39 synonym DBA <s.borse@direction.biz>
  2007-12-14 07:50 ` Re: synonym Medi Montaseri <montaseri@gmail.com>
@ 2007-12-17 02:10   ` Bruce Momjian <bruce@momjian.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Bruce Momjian @ 2007-12-17 02:10 UTC (permalink / raw)
  To: Medi Montaseri <montaseri@gmail.com>; +Cc: s.borse@direction.biz; pgsql-admin

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  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://postgres.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2007-12-17 02:10 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-12-14 06:39 synonym DBA <s.borse@direction.biz>
2007-12-14 07:50 ` Medi Montaseri <montaseri@gmail.com>
2007-12-17 02:10   ` Bruce Momjian <bruce@momjian.us>

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