Skip site navigation (1) Skip section navigation (2)

How To Connect to another Database inside a plpgsql function

From: Gezeala 'Eyah' Bacuño II <gezeala25(at)yahoo(dot)com>
To: pgsql-php(at)postgresql(dot)org
Subject: How To Connect to another Database inside a plpgsql function
Date: 2004-02-13 08:56:55
Message-ID: 20040213085655.67695.qmail@web41408.mail.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-php
Hi Guys!
 
I have 2 database namely "DB1" and "DB2".
 
In DB1 I created a plgpsql function fnTest().
 
My problem is inside fnTest() I need to check some tables in DB2! I've no idea how to do this. Usually when I make a function I only access tables/views/functions in the same database. I really don't know if this is possible.
 
BTW, I googled my problem but did not see any topics on this.
 
Need your expertise on this one guys...TIA!



Marie Gezeala M. Bacuño II 
IS Department
Muramoto Audio-Visual Phils., Inc.
MEPZ1, Lapu-Lapu City, Cebu, Philippines 6015


The person with the ultimate cachinnation possesses, thereby, the optimal cachinnation.




---------------------------------
  Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now

Responses

pgsql-php by date

Next:From: Mark GibsonDate: 2004-02-13 09:30:55
Subject: Re: How To Connect to another Database inside a plpgsql function
Previous:From: Michael HannaDate: 2004-02-12 17:50:57
Subject: Re: Can't connect to 7.4 DB

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group