Re: Create database/table using postgresql stored function

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Manasi Save <manasi(dot)save(at)artificialmachines(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Create database/table using postgresql stored function
Date: 2010-12-08 10:48:59
Message-ID: 4CFF629B.7030602@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message c k 2010-12-08 13:35:11 Asynchronous query execution
Previous Message Guillaume Lelarge 2010-12-08 10:47:31 Re: Create database/table using postgresql stored function