synonym

Поиск
Список
Период
Сортировка
Искать

synonym

От:
DBA <s.borse@direction.biz>
Дата:
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


Re: synonym

От:
"Medi Montaseri" <montaseri@gmail.com>
Дата:
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



Re: synonym

От:
Bruce Momjian <bruce@momjian.us>
Дата:
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. +
FAQ