Re: [GENERAL] Sharing data between databases

2011-05-12 Thread Craig Ringer
On 05/13/2011 11:38 AM, Tim Uckun wrote: That's an interesting idea. Since I am building this app from scratch I suppose I could create different schemas for different applications instead of using different databases. I wonder how rails and active record can deal with that. I'll take a look and

Re: [GENERAL] Sharing data between databases

2011-05-12 Thread John R Pierce
On 05/12/11 8:38 PM, Tim Uckun wrote: I sometimes think it'd be nice if Pg offered the ability to translate schema to "databases", so it runs with a single database and multiple schema, and you "connect" to a schema, MySQL style. It'd help people who want to use multiple databases on a machine an

Re: [GENERAL] Sharing data between databases

2011-05-12 Thread Tim Uckun
> > I sometimes think it'd be nice if Pg offered the ability to translate schema > to "databases", so it runs with a single database and multiple schema, and > you "connect" to a schema, MySQL style. It'd help people who want to use > multiple databases on a machine and query between them, though o

Re: [GENERAL] Sharing data between databases

2011-05-12 Thread Craig Ringer
On 05/12/2011 12:04 PM, Tim Uckun wrote: or carefully structure your dblink joins so they can perform efficiently, possibly using temp tables as a sort of materialized view. According to the documents unless you are writing procedural code with cursors when you touch the dblink view it will pul

Re: [GENERAL] Sharing data between databases

2011-05-11 Thread John R Pierce
On 05/11/11 9:04 PM, Tim Uckun wrote: or carefully structure your dblink joins so they can perform efficiently, > possibly using temp tables as a sort of materialized view. According to the documents unless you are writing procedural code with cursors when you touch the dblink view it will pull

Re: [GENERAL] Sharing data between databases

2011-05-11 Thread Tim Uckun
> or carefully structure your dblink joins so they can perform efficiently, > possibly using temp tables as a sort of materialized view. According to the documents unless you are writing procedural code with cursors when you touch the dblink view it will pull the entire table/recordset over. > >

Re: [GENERAL] Sharing data between databases

2011-05-11 Thread John R Pierce
On 05/11/11 8:10 PM, Tim Uckun wrote: That's disappointing. I guess I'll have to look towards a replication solution. or carefully structure your dblink joins so they can perform efficiently, possibly using temp tables as a sort of materialized view. thats really all that the fancier datab

Re: [GENERAL] Sharing data between databases

2011-05-11 Thread Tim Uckun
That's disappointing. I guess I'll have to look towards a replication solution. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Sharing data between databases

2011-05-11 Thread Craig Ringer
On 05/12/2011 08:48 AM, Tim Uckun wrote: What is the preferred way to share tables between databases? I read about dblink but it doesn't seem optimal because it needs to pull in the entire query every time the view is referenced so it might be highly inefficient if I am trying to join a dblinked

[GENERAL] Sharing data between databases

2011-05-11 Thread Tim Uckun
What is the preferred way to share tables between databases? I read about dblink but it doesn't seem optimal because it needs to pull in the entire query every time the view is referenced so it might be highly inefficient if I am trying to join a dblinked table with a "local" table. Cheers. --