Re: table synonyms

From: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
To: jjeffman(at)cpovo(dot)net
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: table synonyms
Date: 2005-05-23 00:28:14
Message-ID: 20050523002814.GA44623@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, May 22, 2005 at 03:28:22PM -0300, jjeffman(at)cpovo(dot)net wrote:
> Of course! Maybe I am mixing users and schemas, because in Oracle they
> are the same, the schema has the name of the user which is the owner of
> the database tables and objects.
>
> So the problem can be described as follows :
>
> 1. Let be Ent01 an enterprise, and Ent02 a different one.
> 2. At Ent01 the database schema has the name "SCH01" and at Ent02 the
> database schema has the name "FOO" .
> 3. The same application must run in booth enterprises, and all the
> database queries and table names are the same, just the schemas has
> different names.
> 4. The application can run using a database user other then the tables
> owner, so the queries must be written using the coplete format
> (schema.table.column) .
>
> Using Oracle I can set up synonyms for the tables and by pass the format
> above, or I can use a macro substitution (ODAC components) to use the
> correct schema name, setting it at runtime.

In PostgreSQL, you can get roughly the same behavior using search_path.
http://lnk.nu/postgresql.org/2r2.html

> By the way what "FWIW" stands for ?

For What It's Worth.
--
Jim C. Nasby, Database Consultant decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sim Zacks 2005-05-23 07:39:09 Re: double quotes inside VBA string ?
Previous Message Panos Tsapralis 2005-05-22 23:13:05 Binary installation RPM's from Mandrake 10.1.