Received: from portal.inducola.com.br (inducola.creativenet.com.br [200.215.116.226]) by postgresql.org (8.11.3/8.11.4) with SMTP id f9L01tP63540 for ; Sat, 20 Oct 2001 20:02:10 -0400 (EDT) (envelope-from douglas@inducola.com.br) Received: (qmail 5950 invoked by uid 99); 20 Oct 2001 21:23:33 -0000 Received: from unknown (HELO inducola.com.br) (douglas@200.215.116.122) by portal.inducola.com.br with SMTP; 20 Oct 2001 21:23:33 -0000 Message-ID: <3BD2129F.7D200D01@inducola.com.br> Date: Sat, 20 Oct 2001 22:11:11 -0200 From: Douglas Rafael da Silva Reply-To: douglas@inducola.com.br Organization: Daune Produtos Industriais Ltda X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.16 i686) X-Accept-Language: pt-BR, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org CC: Andre Schnabel Subject: Re: Diferent databases on same query... Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200110/320 X-Sequence-Number: 5273 >> Hi, >> >> I'd like to do a query where can be possible I access tables from >> diferent databases on the same query. >> On MySQL, I do: >> >> SELECT People1.PersID, People1.Name, Result1.Value, Result1.Date FROM >> Database1.People1, Database2.Result1 WHERE ... >> >> I think on ORACLE works like as: >> >> SELECT People1.PersID, People1.Name, Result1.Value, Result1.Date FROM >> People1@Database1, Result1@Database2 WHERE ... >> >> But Who I can to do this on Postgresql ? >> > >You CANNOT do that with PostgreSQL. >But why do you want to do that? IMHO it's a rather bas design to hold data >in different places, if you need to select them in one query. >Is there a real reason to hold the tables in different databases? > >Andre Hi, Andre ! Maybe yes, maybe not. I have 6 companies of the same group, little but they are like as, and they share the main database. But there are data that are specific of each one. The design of tables is the same for all them. So, on mysql I had on diferent databases. Thus, on the same query, I select the name of employee, the truck and invoice of the specific company. Two companies have server separated. How can I do to do distribute database server with postgres ? You have a suggestion ? Thank you, Douglas.