RE: Questions about Synonyms - Again - Mailing list pgsql-general

From Michael Ansley
Subject RE: Questions about Synonyms - Again
Date
Msg-id 7F124BC48D56D411812500D0B747251480F3A2@FILESERVER002
Whole thread Raw
In response to Questions about Synonyms - Again  (Colin Taylor <Colin_Taylor@PortaSystemsDev.com>)
List pgsql-general

Oracle's synonyms have uses which extend from that.  To wit, we use, in our production model, three different schemas.  The BATCH schema has the high throughput tables, the ONLINE schema has the reference data tables (lower throughput), and the REPORT schema has only some configuration tables.  However, each schema can see the tables defined in the other schemas without having to explicitly reference the schema, i.e.: if you were connected to the REPORT schema, and wanted to to select from a table called ORG you would have to:

select * from ONLINE.ORG;

If there was a public synonym (or a private synonym in the REPORT schema) for ORG, then, if you were connected to the REPORT schema, you could just:

select * from ORG;

Postgres has no concept of schemas, but it might be useful to do the same thing between different databases, i.e.: the schemas are implemented by PG databases.  Then you could select across databases.  Exactly why you would want to do this is another story, which I'm not going to go into.  I'm sure that there are administrators  and db designers out there who could provide more reasons than I could.  I'm just a lowly developer.

Cheers...

MikeA



-----Original Message-----
From: Colin Taylor [mailto:Colin_Taylor@PortaSystemsDev.com]
Sent: 19 January 2001 15:53
To: 'Peter Eisentraut'
Cc: Pgsql Mailing List (E-mail)
Subject: RE: [GENERAL] Questions about Synonyms - Again

I am comparing it to Oracle's public synonyms, where you can use different
names for things.
For example, table "THIS_IS_A_VERY_BYG_NAME" could be accessed using a
smaller name, example "TIAVBN".

> -----Original Message-----
> From: Peter Eisentraut [mailto:peter_e@gmx.net]
> Sent: Friday, January 19, 2001 3:56 PM
> To: Colin Taylor
> Cc: Pgsql Mailing List (E-mail)
> Subject: Re: [GENERAL] Questions about Synonyms - Again
>
>
> Colin Taylor writes:
>
> > Are Synonyms supported on Postgresql?
>
> There is nothing in PostgreSQL that's called a "synonym" per
> se, so you
> have to describe what you mean by it.
>
> --
> Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/
>

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
Nick West - Global Infrastructure Manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

pgsql-general by date:

Previous
From: "Gordan Bobic"
Date:
Subject: RegisterSharedInvalid?
Next
From: Bruce Momjian
Date:
Subject: Re: Questions about Synonyms - Again