Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZxCwR-0000N6-Ib for pgsql-php@arkaria.postgresql.org; Fri, 13 Nov 2015 11:54:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZxCwQ-00022S-Ru for pgsql-php@arkaria.postgresql.org; Fri, 13 Nov 2015 11:54:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZxCwQ-00022D-AW for pgsql-php@postgresql.org; Fri, 13 Nov 2015 11:54:54 +0000 Received: from teladesign.vm.bytemark.co.uk ([89.16.172.204]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZxCwN-0004SN-Sz for pgsql-php@postgresql.org; Fri, 13 Nov 2015 11:54:53 +0000 Received: from [93.107.231.214] (helo=[127.0.0.1]) by teladesign.vm.bytemark.co.uk with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1ZxCwL-0006GG-JF; Fri, 13 Nov 2015 11:54:49 +0000 Reply-To: rod@iol.ie Subject: Re: How to Create a table in another database References: <5644F4DB.9010702@googlemail.com> To: Archana K N , itb348@gmail.com, guillaume@lelarge.info, PostgreSQLPHP PostgreSQLPHP From: Raymond O'Donnell Message-ID: <5645CF81.9020601@iol.ie> Date: Fri, 13 Nov 2015 11:54:41 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-php Precedence: bulk Sender: pgsql-php-owner@postgresql.org 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@iol.ie -- Sent via pgsql-php mailing list (pgsql-php@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-php