Re: Using tables in other PostGreSQL database - Mailing list pgsql-general

From Pettis, Barry
Subject Re: Using tables in other PostGreSQL database
Date
Msg-id C6471264338047459F18230B4F871DA0010E9BA9@csomb01.corp.atmel.com
Whole thread Raw
In response to Re: Using tables in other PostGreSQL database  (Richard Huxton <dev@archonet.com>)
Responses Re: Using tables in other PostGreSQL database  (Jorge Godoy <jgodoy@gmail.com>)
List pgsql-general
An addon????  Being self schooled in databases to me this seems to be a
kludge.  If you work in a large company environment the odds that
someone somewhere is all ready storing or collecting data that you need
( by this I mean base data ) could probably be pretty high.  So why, if
PostGre is so old/established, is the ability to share information
between databases have to be done through an add on.

So let me give an example to help clarify.
1.  I work in a manufacturing environment
2.  Our product can have 150 to 450 different / unique process steps
3.  We have a description of each process step
4.  So with a product we can look at it's flow and see the descriptions
of each step

Now say person A pulls this information on a daily basis and then
summarizes the product manufacturing information and creates a table
that has say the total number of process modules ( aka group of steps ),
the total number of steps, the total number of a particular type of
step.

Now let's say that another person NEEDS that very information in a query
or table in their own database.  Are you saying that each person needs
to generate this.  To me the sharing of information seems to be so basic
that within a said postgre server, that as along as you have access to a
said database you should be able to say use the data stored here.  And
that that ability should be a rudimentary ability not an addon.

Reason why I don't' have ability to install addon's onto the database.

Regards,
Barry Pettis
-----Original Message-----
From: Richard Huxton [mailto:dev@archonet.com]
Sent: Thursday, March 27, 2008 3:45 AM
To: Pettis, Barry
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Using tables in other PostGreSQL database

Pettis, Barry wrote:
> Now this PostGreSQL "server" has many databases in it.  Some of which
I
> have access to.  I don't want to reinvent the wheel ( so to speak ) by
> having to replicate the table in my database.  Then having to create
> routines that will extract from A to replicate in B.  How do I
reference
> a table in another database?

There is an add-on in contrib/ called "dblink" that lets you connect to
a remote database. There's also a dbilink project that uses Perl.

> Also to respond in the thread... Do I just reply to the message?

Reply-All is the default on the pg lists.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: "Pettis, Barry"
Date:
Subject: Re: Using tables in other PostGreSQL database
Next
From: Alvaro Herrera
Date:
Subject: Re: Survey: renaming/removing script binaries (createdb, createuser...)