Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 4FABA476617 for ; Wed, 3 Jul 2002 18:40:47 -0400 (EDT) Mailbox-Line: From pgman@candle.pha.pa.us Wed Jul 3 18:40:47 2002 Received: from candle.pha.pa.us (216-55-132-35.dsl.san-diego.abac.net [216.55.132.35]) by postgresql.org (Postfix) with ESMTP id 2D762476676 for ; Wed, 3 Jul 2002 16:22:09 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g63KM4A02548; Wed, 3 Jul 2002 16:22:04 -0400 (EDT) From: Bruce Momjian Message-Id: <200207032022.g63KM4A02548@candle.pha.pa.us> Subject: Re: Selecting data from a table created in another database... In-Reply-To: To: Ligia Pimentel Date: Wed, 3 Jul 2002 16:22:04 -0400 (EDT) Cc: pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, hits=-3.4 required=5.0 tests=IN_REP_TO version=2.30 X-Spam-Level: X-Archive-Number: 200207/33 X-Sequence-Number: 8412 Ligia Pimentel wrote: > I don't know if this can be done... > > In MSSQL Server I can access a table created in another database (on the > same server, of course) by using the following syntaxis... > > select * from databasename..tablename where condition; > > Can I do this in postgres? > > I'm using version 7.2 on a redhat server... Sorry, you can't do cross-db queries with PostgreSQL. Take a look at /contrib/dblink as an option. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026