Re: Using tables in other PostGreSQL database

From: "Pettis, Barry" <Barry(dot)Pettis(at)atmel(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Using tables in other PostGreSQL database
Date: 2008-03-31 11:20:56
Message-ID: C6471264338047459F18230B4F871DA00115CEA0@csomb01.corp.atmel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Wow seems like this post took on a life of it's own. All I wanted to do
was to be able to use a table that someone else has all ready created.
Seems like somewhere someone mentioned a DBA ( which I'm assuming to be
"Database Administrator" ) well as far as I know we don't have one
though I wish we did.

The basis of my question comes from the fact that I currently use
"Multiple" access databases. Each database contains 1 piece of
information ( information that on it's own has no relationship to other
data ), but information in other databases will use items from it in it.
Hence in MSAccess I "LINK" the tables in. Which I know is nothing more
than a connection.

I wish I could say that I knew with certainty what schemas are or 2PC
is. Would be nice if I had exposure to other databases as well. I'm
sure that I'd have the same questions about MSft's SQL server.

But I thank the forum here for all the input.

Regards,
Barry Pettis

CSO Atmel Corp
Project Tech

-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Daniel Verite
Sent: Monday, March 31, 2008 3:36 AM
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Using tables in other PostGreSQL database

Scott Marlowe wrote:

> > > Even in Oracle you don't have cross db queries.
> >
> > On the contrary you do. You can refer to objects in another
database by
> > OBJECT_NAME(at)DBLINK_NAME, very useful to mix local and remote data
in no
> > time. DBLINK_NAME represents a connection to another database.
> > What you don't have is OTHERDB.OBJECT_NAME to refer to a different
> > database within the same instance, because there is only one
database
> > in an Oracle instance.
>
> What you are talking about are cross schema references, not cross db.

No I'm definitively referring to cross db, not cross schema.
See this piece from Oracle documentation:
http://download.oracle.com/docs/cd/B14117_01/server.101/b10759/sql_elem
ents009.htm#i27761

> Oracle instances can have > 1 database, it's just not that common. I
> know this because we had an internal instance at the last company I
> worked at that had 2 databases in it, each with their own schemas.
Or
> maybe they somehow had two instances of oracle running on the same
> box.

CREATE DATABASE is to Oracle what initdb is to PG, it's something you
do once per instance. So no, an Oracle instance doesn't have >1
databases, just like a PG instance doesn't have >1 data directories.

Regards,

--
Daniel
PostgreSQL-powered mail user agent and storage:
http://www.manitou-mail.org

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Roberts, Jon 2008-03-31 12:21:54 Re: postgreSQL multithreading
Previous Message Ivan Sergio Borgonovo 2008-03-31 10:56:34 round() and cast to numeric