Re: table synonyms
От | Jim C. Nasby |
---|---|
Тема | Re: table synonyms |
Дата | |
Msg-id | 20050523002814.GA44623@decibel.org обсуждение исходный текст |
Ответ на | table synonyms ("Jayme Jeffman Filho" <jjeffman@cpovo.net>) |
Список | pgsql-general |
On Sun, May 22, 2005 at 03:28:22PM -0300, jjeffman@cpovo.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@decibel.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?"
В списке pgsql-general по дате отправления: