X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id AAC21475A8D for ; Wed, 16 Apr 2003 03:54:39 -0400 (EDT) Received: from web40511.mail.yahoo.com (web40511.mail.yahoo.com [66.218.78.128]) by postgresql.org (Postfix) with SMTP id 67E27475458 for ; Wed, 16 Apr 2003 03:54:06 -0400 (EDT) Message-ID: <20030416075407.45063.qmail@web40511.mail.yahoo.com> Received: from [80.19.150.242] by web40511.mail.yahoo.com via HTTP; Wed, 16 Apr 2003 09:54:07 CEST Date: Wed, 16 Apr 2003 09:54:07 +0200 (CEST) From: =?iso-8859-1?q?friedrich=20nietzsche?= Subject: Re: connecting to a differnt DB in PL/pgSQL To: pgsql-sql@postgresql.org In-Reply-To: <200304141416.08254.franco@akyasociados.com.ar> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, hits=-9.8 required=5.0 tests=BAYES_01,IN_REP_TO autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/250 X-Sequence-Number: 12951 Avevo gia' risolto il come farlo, ma grazie lo stesso Ciao Danilo --- Franco Bruno Borghesi ha scritto: > you should install dblink as Tomasz said. To do > that: >=20 > cd ...../postgresql-7.3.2/contrib/dblink > gmake > gmake install >=20 > then you enter into psql to create the functions: > \i dblink.psql >=20 > then you try (change the params): >=20 > SELECT=20 > *=20 > FROM=20 > dblink('host=3Dlocalhost port=3D5432 dbname=3Dfranco > user=3Dadmin password=3D1234',=20 > 'SELECT id, name FROM people')=20 > AS (id INTEGER, people TEXT); >=20 > If you skip the values host, port, ..., the defaults > will be used. > If it works in psql, it should work inside a > function. >=20 >=20 >=20 >=20 ______________________________________________________________________ Yahoo! Cellulari: loghi, suonerie, picture message per il tuo telefonino http://it.yahoo.com/mail_it/foot/?http://it.mobile.yahoo.com/index2002.html