On 13/11/2015 05:35, Archana K N wrote: > Here the underlined queries are for /db2. /I need to create function > in the second database since first database contain data that is not for > public access. So from second database I call the *db1.retriev *and it > uses necessary data from *db1 *and result is saved as a table in second > database. Actual function has more parameters and result may contain > many rows , for that I want to create table in */db2/*. Have you considered using two separate schemas within the same database? You can set permissions on them so that one is for public access and the other isn't; it would be far easier than messing with two databases. Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@xxxxxx -- Sent via pgsql-php mailing list (pgsql-php@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-php