RE: Truncation of object names

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: "'Christopher Kings-Lynne'" <chriskl(at)familyhealth(dot)com(dot)au>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Truncation of object names
Date: 2001-04-17 02:51:42
Message-ID: 01C0C6C7.CE93D400.mascarm@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The ability to place database objects into a logical partitioning of
data. For example, in Oracle, each user creates tables, views,
sequences, synonyms, and snapshots in their own schema. So if I were
to create a table called 'Employees', I could query it as:

SELECT * FROM employees;

But another user would have to query it as:

SELECT * FROM mascarm.employees;

A common case for this is to logically divide schema by departments.
You could do that now in PostgreSQL in the form of multiple
databases, but you couldn't query across them. For example, you might
have an "Accounting" schema, and an "Inventory" schema.
Occassionally, the accountants need to join tables from accounting
w/inventory. The inventory people (or the dba) would then grant
appropriate privileges for the accountants to do that, but the
accounts would have to fully qualify their queries:

SELECT * FROM inventory.orders;

So, if you want a logical division that also contain some shared
tables, views, or sequences (and hopefully snapshots, some day), in
Oracle, you can create public synonyms for the shared objects:

CREATE PUBLIC SYNONYM employees FOR mascarm.employees;

Now, anyone can query this table as:

SELECT * FROM employees;

Its a namespace thing, basically.

Hope that helps,

Mike Mascari
mascarm(at)mascari(dot)com

-----Original Message-----
From: Christopher Kings-Lynne [SMTP:chriskl(at)familyhealth(dot)com(dot)au]
Sent: Monday, April 16, 2001 10:17 PM
To: pgsql-hackers(at)postgresql(dot)org
Subject: RE: [HACKERS] Truncation of object names

Call me thick as two planks, but when you guys constantly refer to
'schema
support' in PostgreSQL, what exactly are you referring to?

Chris

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Hii 2001-04-17 04:13:05 JDBC Select Performance
Previous Message bpalmer 2001-04-17 02:31:58 broken web server?