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

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

Union Question

От
Shaun McCloud
Дата:
<div class="WordSection1"><p class="MsoNormal">Hello,<p class="MsoNormal"> <p class="MsoNormal">I need to union three
PostgreSQLtables and this won’t be a problem but the tables are on different servers.  Basically, I have an
administrativeserver that needs the tables viewable in a web administrator and three query servers that log the needed
datalocally.  Is there a way I can do this without using Slony-I to replicate the data to the administrative server?<p
class="MsoNormal"> <pclass="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Shaun McCloud
-Software Testing Analyst</span></b><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif""><br
/></span></b><b><spanstyle="font-size:10.0pt;font-family:"Arial","sans-serif"">GeoComm Inc.</span></b><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""><br/> 601 W. Saint Germain St., Saint Cloud, MN 56301<br
/></span><b><spanstyle="font-size:10.0pt;font-family:"Arial","sans-serif"">Office:</span></b><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">320.240.0040 </span><b><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">Fax:</span></b><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">320.240.2389 </span><b><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">TollFree:</span></b><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">888.436.2666<br /></span><b><i><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">clickhere to visit </span></i></b><span
style="font-size:10.0pt;font-family:"Arial","sans-serif""><ahref="http://www.geo-comm.com/"><b><i><span
style="color:black;text-decoration:none">www.geo-comm.com</span></i></b></a></span><span
style="font-size:12.0pt;font-family:"TimesNew Roman","serif""></span><p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span
style="font-size:10.0pt;font-family:"Arial","sans-serif"">MicrosoftCertified Desktop Support Technician
(MCDST)</span></b><b><spanstyle="font-size:10.0pt;font-family:"Arial","sans-serif""></span></b><p
class="MsoNormal"><i><spanstyle="font-family:"Verdana","sans-serif";color:black"> </span></i><p
class="MsoNormal"><i><spanstyle="font-size:10.0pt;font-family:"Verdana","sans-serif";color:black">Do or do not, there
isno try.</span></i><p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Verdana","sans-serif";color:black">     -Yoda</span><p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><spanstyle="font-size:12.0pt;font-family:"Times New
Roman","serif""> </span><pclass="MsoNormal"> </div> 

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