Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id DFCD4475DDA for ; Wed, 1 May 2002 23:17:05 -0400 (EDT) Received: from temp.joelburton.com (unknown [209.190.238.101]) by postgresql.org (Postfix) with ESMTP id 4BA21475D09 for ; Wed, 1 May 2002 23:17:04 -0400 (EDT) Received: from joeltf0d13cyyp (unknown [209.190.238.100]) by temp.joelburton.com (Postfix) with SMTP id 4BC832BA2A; Wed, 1 May 2002 23:20:44 -0400 (EDT) From: "Joel Burton" To: , Subject: Re: CREATE VIEW question... Date: Wed, 1 May 2002 23:17:08 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: <4590508.1020282786645.JavaMail.ngmail@mx09.arcor-online.net> X-Archive-Number: 200205/8 X-Sequence-Number: 7644 At present, you cannot access data from another database, either with a VIEW, or any other SQL statement. You either want to: merge the two databases or dump/restore the needed table to db2. In PG 7.3 (still in development), namespaces have been added. While this technically won't fix cross-database access, it will provide an excellent solution to many tables in a database, and will provide an effective solution to problems like this. In the contrib/ directory (or using the contrib RPM, if that's your style), you'll find "dblink", which provides a working but hackish way to access other databases, but I'm not sure that it is ready for prime time. HTH. Sorry for the bad news. Joel BURTON | joel@joelburton.com | joelburton.com | aim: wjoelburton Knowledge Management & Technology Consultant > -----Original Message----- > From: pgsql-sql-owner@postgresql.org > [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of j.konzack@arcor.de > Sent: Wednesday, May 01, 2002 3:53 PM > To: pgsql-sql@postgresql.org > Subject: [SQL] CREATE VIEW question... > > > Hello there... > > I have two databases, called db1 an db2. Database db1 contains a table > called memberlist. > Now I will create a view, called members, in database db2 (containig data > from table memberlist) with the following query: > > CREATE VIEW members AS SELECT * FROM db1.memberlist; > > ->>> this error is displayed: ERROR; parser: error at or near "." > > How can I create a view in one database with data from a second/different > database? > > Jan Konzack > > > ----------------------------------------------------------------------- > Riester-Rente - Kassieren Sie das Geld vom Staat: > Zum Förderungsrechner! http://www.arcor.de/home/redir.php/riesterrente > ----------------------------------------------------------------------- > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html >