Обсуждение: Postgre connect on Postgre
Hi All
How I can connect a postgre database on another postgre database, and manipulate the datas on both database?
Thanks!!
How I can connect a postgre database on another postgre database, and manipulate the datas on both database?
Thanks!!
On Aug 26, 2008, at 7:10 PM, Anderson dos Santos Donda wrote: > How I can connect a postgre database on another postgre database, > and manipulate the datas on both database? There is a module in contrib just for such a purpose: http://www.postgresql.org/docs/8.3/interactive/dblink.html
Thanks man!!
I'll study this module!!
I'll study this module!!
On Tue, Aug 26, 2008 at 11:19 PM, Christophe <xof@thebuild.com> wrote:
There is a module in contrib just for such a purpose:
On Aug 26, 2008, at 7:10 PM, Anderson dos Santos Donda wrote:How I can connect a postgre database on another postgre database, and manipulate the datas on both database?
http://www.postgresql.org/docs/8.3/interactive/dblink.html
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
I traced a bug in our application down to this basic operation: set timezone to 'US/Eastern'; select '11/02/2008'::timestamptz, '12:10'::time, '11/02/2008'::timestamptz + '12:10'::time; I have a date and a time stored separately and I want to combine them, and use them in some timezone-aware calculations. When I add the time 12:10 to the date 11/2/08, I expect the timestamp "11/2/08 12:10" but instead, I get "11/2/08 11:10". It's probably not coincidence that daylight saving time rolls back one hour on the morning of 11/2. Still, I would have expected the above behavior when adding an interval to a timestamp, but not a time. Is the time being cast to an interval before the add? Is there a better way to combine a date with a time and get a timestamptz ? (the values are stored in the database, and are not literals as in my example)
Adam Rich <adam.r@sbcglobal.net> writes: > I traced a bug in our application down to this basic operation: > set timezone to 'US/Eastern'; > select '11/02/2008'::timestamptz, '12:10'::time, > '11/02/2008'::timestamptz + '12:10'::time; > I have a date and a time stored separately and I want to combine them, > and use them in some timezone-aware calculations. When I add the time > 12:10 to the date 11/2/08, I expect the timestamp "11/2/08 12:10" but > instead, I get "11/2/08 11:10". I don't see why that surprises you in the least. '11/02/2008'::timestamptz means 11/02/2008 00:00 local time, and (given US DST rules) 11/2/08 11:10 is what the time will be 12 hours and 10 minutes later. If you want non-DST-aware timekeeping, use timestamp without time zone. > Still, I would have expected the above behavior > when adding an interval to a timestamp, but not a time. How could a time work differently from an interval in this context? regards, tom lane
Hi, Anderson dos Santos Donda wrote: > Thanks man!! > > I'll study this module!! You should also be aware that sometimes instead of connecting two separate databases via dblink or similar, two schemas in one database can be used instead. It really depends on what you are really doing if there are even more solutions (like slony for example). Regards Tino PS: the database likes to be called Postgresql or Postgres :-) > On Tue, Aug 26, 2008 at 11:19 PM, Christophe <xof@thebuild.com > <mailto:xof@thebuild.com>> wrote: > > > On Aug 26, 2008, at 7:10 PM, Anderson dos Santos Donda wrote: > > How I can connect a postgre database on another postgre > database, and manipulate the datas on both database? > > > There is a module in contrib just for such a purpose: > > http://www.postgresql.org/docs/8.3/interactive/dblink.html > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org > <mailto:pgsql-general@postgresql.org>) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > >
Вложения
If you are using functions take a look at plProxy. We created it after finding out that dblink wasn't good enough for us in oltp environments. There are also some security issues related to dblink that should be given serious consideration.
As for replication SkyTools and Londiste are alternatives to Slony. SkyTools should provide less management headaches.
http://kaiv.wordpress.com/2007/09/02/postgresql-cluster-partitioning-with-plproxy-part-ii/
regards
Asko
As for replication SkyTools and Londiste are alternatives to Slony. SkyTools should provide less management headaches.
http://kaiv.wordpress.com/2007/09/02/postgresql-cluster-partitioning-with-plproxy-part-ii/
regards
Asko
On Wed, Aug 27, 2008 at 8:09 AM, Tino Wildenhain <tino@wildenhain.de> wrote:
Hi,
Anderson dos Santos Donda wrote:You should also be aware that sometimes instead ofThanks man!!
I'll study this module!!
connecting two separate databases via dblink or similar,
two schemas in one database can be used instead.
It really depends on what you are really doing if
there are even more solutions (like slony for example).
Regards
Tino
PS: the database likes to be called Postgresql or Postgres :-)On Tue, Aug 26, 2008 at 11:19 PM, Christophe <xof@thebuild.com <mailto:xof@thebuild.com>> wrote:<mailto:pgsql-general@postgresql.org>)
On Aug 26, 2008, at 7:10 PM, Anderson dos Santos Donda wrote:
How I can connect a postgre database on another postgre
database, and manipulate the datas on both database?
There is a module in contrib just for such a purpose:
http://www.postgresql.org/docs/8.3/interactive/dblink.html
-- Sent via pgsql-general mailing list (pgsql-general@postgresql.org