Обсуждение: Union Question

Поиск
Список
Период
Сортировка

Union Question

От
Shaun McCloud
Дата:

Hello,

 

I need to union three PostgreSQL tables and this won’t be a problem but the tables are on different servers.  Basically, I have an administrative server that needs the tables viewable in a web administrator and three query servers that log the needed data locally.  Is there a way I can do this without using Slony-I to replicate the data to the administrative server?

 

Shaun McCloud - Software Testing Analyst
GeoComm Inc.
601 W. Saint Germain St., Saint Cloud, MN 56301
Office: 320.240.0040 Fax: 320.240.2389 Toll Free: 888.436.2666
click here to visit www.geo-comm.com

Microsoft Certified Desktop Support Technician (MCDST)

 

Do or do not, there is no try.

      -Yoda

 

 

Re: Union Question

От
Shaun McCloud
Дата:

I’m trying that, but I am getting an error that says “ERROR:  function dblink_connect(unknown, unknown) does not exist”

 

Shaun McCloud - Software Testing Analyst
GeoComm Inc.
601 W. Saint Germain St., Saint Cloud, MN 56301
Office: 320.240.0040 Fax: 320.240.2389 Toll Free: 888.436.2666
click here to visit www.geo-comm.com

Microsoft Certified Desktop Support Technician (MCDST)

 

Do or do not, there is no try.

      -Yoda

 

 

From: Plugge, Joe R. [mailto:JRPlugge@west.com]
Sent: Friday, December 03, 2010 10:58
To: Shaun McCloud; pgsql-sql@postgresql.org
Subject: RE: Union Question

 

You may want to try dblink.

 

http://www.postgresql.org/docs/current/static/dblink.html

 

 

From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Shaun McCloud
Sent: Friday, December 03, 2010 10:51 AM
To: pgsql-sql@postgresql.org
Subject: [SQL] Union Question

 

Hello,

 

I need to union three PostgreSQL tables and this won’t be a problem but the tables are on different servers.  Basically, I have an administrative server that needs the tables viewable in a web administrator and three query servers that log the needed data locally.  Is there a way I can do this without using Slony-I to replicate the data to the administrative server?

 

Shaun McCloud - Software Testing Analyst
GeoComm Inc.

601 W. Saint Germain St., Saint Cloud, MN 56301
Office: 320.240.0040 Fax: 320.240.2389 Toll Free: 888.436.2666
click here to visit www.geo-comm.com

Microsoft Certified Desktop Support Technician (MCDST)

 

Do or do not, there is no try.

      -Yoda

 

 

Re: Union Question

От
"Plugge, Joe R."
Дата:

You may want to try dblink.

 

http://www.postgresql.org/docs/current/static/dblink.html

 

 

From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Shaun McCloud
Sent: Friday, December 03, 2010 10:51 AM
To: pgsql-sql@postgresql.org
Subject: [SQL] Union Question

 

Hello,

 

I need to union three PostgreSQL tables and this won’t be a problem but the tables are on different servers.  Basically, I have an administrative server that needs the tables viewable in a web administrator and three query servers that log the needed data locally.  Is there a way I can do this without using Slony-I to replicate the data to the administrative server?

 

Shaun McCloud - Software Testing Analyst
GeoComm Inc.

601 W. Saint Germain St., Saint Cloud, MN 56301
Office: 320.240.0040 Fax: 320.240.2389 Toll Free: 888.436.2666
click here to visit www.geo-comm.com

Microsoft Certified Desktop Support Technician (MCDST)

 

Do or do not, there is no try.

      -Yoda

 

 

Re: Union Question

От
Christophe Pettus
Дата:
On Dec 3, 2010, at 9:04 AM, Shaun McCloud wrote:

> I’m trying that, but I am getting an error that says “ERROR:  function dblink_connect(unknown, unknown) does not
exist”

dblink is a contrib module, and needs to be installed before use:
http://www.postgresql.org/docs/9.0/interactive/dblink.html

--
-- Christophe Pettus  xof@thebuild.com



Re: Union Question

От
Shaun McCloud
Дата:
That would be nice to see in the documentation for dblink

Shaun McCloud - Software Testing Analyst
GeoComm Inc.
601 W. Saint Germain St., Saint Cloud, MN 56301
Office: 320.240.0040 Fax: 320.240.2389 Toll Free: 888.436.2666
click here to visit www.geo-comm.com
Microsoft Certified Desktop Support Technician (MCDST)

Do or do not, there is no try.     -Yoda



-----Original Message-----
From: Christophe Pettus [mailto:xof@thebuild.com]
Sent: Friday, December 03, 2010 11:08
To: Shaun McCloud
Cc: Plugge, Joe R.; pgsql-sql@postgresql.org
Subject: Re: [SQL] Union Question


On Dec 3, 2010, at 9:04 AM, Shaun McCloud wrote:

> I'm trying that, but I am getting an error that says "ERROR:  function dblink_connect(unknown, unknown) does not
exist"

dblink is a contrib module, and needs to be installed before use:
http://www.postgresql.org/docs/9.0/interactive/dblink.html

--
-- Christophe Pettus  xof@thebuild.com



Re: Union Question

От
Christophe Pettus
Дата:
On Dec 3, 2010, at 9:08 AM, Shaun McCloud wrote:

> That would be nice to see in the documentation for dblink

It's true of all contrib modules; that's mentioned at the start of the contrib section:
http://www.postgresql.org/docs/9.0/interactive/contrib.html
--
-- Christophe Pettus  xof@thebuild.com



Re: Union Question

От
Shaun McCloud
Дата:
Ah, ok.  My bad for not reading good enough.

Shaun McCloud - Software Testing Analyst
GeoComm Inc.
601 W. Saint Germain St., Saint Cloud, MN 56301
Office: 320.240.0040 Fax: 320.240.2389 Toll Free: 888.436.2666
click here to visit www.geo-comm.com
Microsoft Certified Desktop Support Technician (MCDST)

Do or do not, there is no try.     -Yoda



-----Original Message-----
From: Christophe Pettus [mailto:xof@thebuild.com]
Sent: Friday, December 03, 2010 11:27
To: Shaun McCloud
Cc: Plugge, Joe R.; pgsql-sql@postgresql.org
Subject: Re: [SQL] Union Question


On Dec 3, 2010, at 9:08 AM, Shaun McCloud wrote:

> That would be nice to see in the documentation for dblink

It's true of all contrib modules; that's mentioned at the start of the contrib section:
http://www.postgresql.org/docs/9.0/interactive/contrib.html
--
-- Christophe Pettus  xof@thebuild.com



Re: Union Question

От
Jasen Betts
Дата:
On 2010-12-03, Shaun McCloud <smccloud@geo-comm.com> wrote:
> --_000_7742DD496427B743BC8B7BBF6D380BA0A2F114EXCHANGE10geocomm_
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
>
> Hello,
>
> I need to union three PostgreSQL tables and this won't be a problem but the=
>  tables are on different servers.  Basically, I have an administrative serv=
> er that needs the tables viewable in a web administrator and three query se=
> rvers that log the needed data locally.  Is there a way I can do this witho=
> ut using Slony-I to replicate the data to the administrative server?

modify the web adminsitrator to connect to the three servers and do the
union itself.

-- 
⚂⚃ 100% natural


Re: Union Question

От
bricklen
Дата:
On Fri, Dec 3, 2010 at 8:58 AM, Plugge, Joe R. <JRPlugge@west.com> wrote:
> Hello,
>
> I need to union three PostgreSQL tables and this won’t be a problem but the
> tables are on different servers.  Basically, I have an administrative server
> that needs the tables viewable in a web administrator and three query
> servers that log the needed data locally.  Is there a way I can do this
> without using Slony-I to replicate the data to the administrative server?

PL/Proxy might fit the bill also.

http://pgfoundry.org/projects/plproxy/
http://wiki.postgresql.org/wiki/PL/Proxy