Re: [SQL] Calling a table residing in another database from Plpgsql

2005-01-09 Thread CoL
hi,
[EMAIL PROTECTED] wrote, On 1/5/2005 06:13:
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"
try to set up dblink. Read the README.dblink file, Installation: part.
Use dblink_connect to connect, then you can query with dblink()
read the docs befor you try to use it.
PS: or better use schemas, not different databases.
C.
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [SQL] Calling a table residing in another database from Plpgsql

2005-01-05 Thread Joe Conway
[EMAIL PROTECTED] wrote:
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"
Have you installed the dblink functions into your database? See 
README.dblink.

Joe
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [SQL] Calling a table residing in another database from Plpgsql

2005-01-05 Thread Kretschmer Andreas
am  Tue, dem 04.01.2005, um 21:13:46 -0800 mailte [EMAIL PROTECTED] folgendes:
> 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:

You must run the dblink.sql, not only download.


Regards, Andreas
-- 
Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau-
fenden Pinguins aus artgerechter Freilandhaltung.   Er ist garantiert frei
von Micro$oft'schen Viren. (#97922 http://counter.li.org) GPG 7F4584DA
Was, Sie wissen nicht, wo Kaufbach ist? Hier: N 51.05082°, E 13.56889° ;-)

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [SQL] Calling a table residing in another database from Plpgsql

2005-01-04 Thread Kenneth Gonsalves
On Wednesday 05 January 2005 10:43 am, [EMAIL PROTECTED] 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.

shouldnt you be using schemas instead?

kg

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


[SQL] Calling a table residing in another database from Plpgsql

2005-01-04 Thread deepthi
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 4: Don't 'kill -9' the postmaster