Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 4A1B01337B49 for ; Wed, 8 Dec 2010 06:49:08 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 48933-04 for ; Wed, 8 Dec 2010 10:49:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd-17937.dedibox.fr (sd-17937.dedibox.fr [88.191.100.74]) by mail.postgresql.org (Postfix) with ESMTP id 8D2E31337B88 for ; Wed, 8 Dec 2010 06:49:00 -0400 (AST) Received: from [192.168.51.27] (unknown [217.111.66.10]) by sd-17937.dedibox.fr (Postfix) with ESMTPA id 975AC3B8F5; Wed, 8 Dec 2010 11:49:00 +0100 (CET) Message-ID: <4CFF629B.7030602@lelarge.info> Date: Wed, 08 Dec 2010 11:48:59 +0100 From: Guillaume Lelarge User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); fr; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Manasi Save CC: "pgsql-admin@postgresql.org" Subject: Re: Create database/table using postgresql stored function References: <20101208050427.ryccuyjfp9asowkk@mail.artificialmachines.com> In-Reply-To: <20101208050427.ryccuyjfp9asowkk@mail.artificialmachines.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.13 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_SORBS_WEB=0.77 X-Spam-Level: X-Archive-Number: 201012/56 X-Sequence-Number: 36285 Le 08/12/2010 11:04, Manasi Save a écrit : > Also I want to query multiple databases from stored functions from one > central database. > for ex := > > CREATE OR REPLACE FUNCTION test () RETURNS AS > $BODY$ > > SELECT * FROM db2.volume > ORDER BY db2.volume.volumeID > > $BODY$ > LANGUAGE sql STABLE > COST 100 > ROWS 1000;' > > I have implemented this thing in mysql but I am not really sure is it > possible in postgresql. Nope, you can't use the same kind of queries. You need to install dblink or PL/proxy to get that kind of capacity. -- Guillaume http://www.postgresql.fr http://dalibo.com