pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: deepthi@granwill.com
Cc: pgsql-jdbc@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: Calling a table in another database from plpgsql
Date: Wed, 05 Jan 2005 08:48:15 -0500
Message-ID: <41DBF01F.3090703@fastcrypt.com> (raw)
In-Reply-To: <1104895845.41db5f6504e44@www.granwill.com>
References: <1104895845.41db5f6504e44@www.granwill.com>

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




view thread (4+ messages)  latest in thread

Message-ID: <41DBF01F.3090703@fastcrypt.com>
Permalink:  ../41DBF01F.3090703@fastcrypt.com/
Also on:    postgresql.org/message-id/41DBF01F.3090703@fastcrypt.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pg@fastcrypt.com, deepthi@granwill.com, pgsql-jdbc@postgresql.org
  Subject: Re: Calling a table in another database from plpgsql
  In-Reply-To: <41DBF01F.3090703@fastcrypt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox