[SQL] Calling a table in another database from plpgsql
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 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[SQL] Calling a table residing in another database from Plpgsql
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
[SQL]
Hi, I have a database which has been set to encoding UTF-8. I have a table in this database in which i store the details of all the registered users. I am using PL/PGSQL and using one function i am entering the values into the database. There is one column for entering the passwords of all registered users. I want to store these passwords in an encrypted manner in the table. Can i encrypt the password in the stored procedure and will i not loose any data by entering the passwords in an encrytped manner. Thanks in advance, Regards, deepthi ---(end of broadcast)--- TIP 8: explain analyze is your friend