X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C88433A40A8 for ; Wed, 5 Jan 2005 13:48:58 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 85338-08 for ; Wed, 5 Jan 2005 13:48:18 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 78CD63A41A9 for ; Wed, 5 Jan 2005 13:48:20 +0000 (GMT) Received: (qmail 16546 invoked from network); 5 Jan 2005 13:47:52 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 5 Jan 2005 13:47:52 -0000 Message-ID: <41DBF01F.3090703@fastcrypt.com> Date: Wed, 05 Jan 2005 08:48:15 -0500 From: Dave Cramer Reply-To: pg@fastcrypt.com Organization: Postgres International User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: deepthi@granwill.com Cc: pgsql-jdbc@postgresql.org, pgsql-sql@postgresql.org Subject: Re: Calling a table in another database from plpgsql References: <1104895845.41db5f6504e44@www.granwill.com> In-Reply-To: <1104895845.41db5f6504e44@www.granwill.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/19 X-Sequence-Number: 11899 Kris is correct, this is a jdbc list, however to satisfy your curiosity, you can't access data from another database. Dave deepthi@granwill.com wrote: >Hi, > >I have function called test1() in database 1. I need to input the value from >this function into another table which is in database2. > >How can i achieve this task in plpgsql. I went through some documentation and >found out that it is possible through dblink. > >I infact downloaded the dblink package in contrib folder. But still when i tried >to use dblink in the following manner: > >SELECT * from dblink('host=192.168.0.50 dbname=AK1 user=akteam','Select userid >from user_reg') as t (userid integer); > >I am getting an error as "ERROR: function dblink("unknown", "unknown") does not >exist" > >Is dblink the only way of connecting the databases and if so what is the exact >step by step procedure to be follwed to download dblink and use it to connect >databases. > >Thanks in advance, >Regards, >deepthi > > > > > > > > >---------------------------(end of broadcast)--------------------------- >TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > > > > -- Dave Cramer http://www.postgresintl.com 519 939 0336 ICQ#14675561