473,396 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Accessing tables from different databases

Hi all,
I want to access a table-1 of database-1 from
database-2. Is it possible in pgsql. If so,
is it possible to define a foreign key constraint
for a column in table-2 in database-2 which
references to a column in table-1 in database-1.
TIA

regards,
Deepa K.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 11 '05 #1
4 3996
K. Deepa wrote:
Hi all,
I want to access a table-1 of database-1 from
database-2. Is it possible in pgsql. If so,
Yes. You need to use dblink contrib module for that.
is it possible to define a foreign key constraint
for a column in table-2 in database-2 which
references to a column in table-1 in database-1.


I am afraid that's not possible.

Shridhar
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 11 '05 #2
Look at contrib/dblink.

Regards.

Fernando.
En un mensaje anterior, K. Deepa escribió:
Hi all,
I want to access a table-1 of database-1 from
database-2. Is it possible in pgsql. If so,
is it possible to define a foreign key constraint
for a column in table-2 in database-2 which
references to a column in table-1 in database-1.
TIA


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 12 '05 #3
Fernando Schapachnik <fe******@mecon.gov.ar> writes:
En un mensaje anterior, K. Deepa escribió:
I want to access a table-1 of database-1 from
database-2. Is it possible in pgsql. If so,
Look at contrib/dblink.


Also consider the possibility of using multiple schemas in a single
database, rather than a multi-database installation.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #4
Hello,

You can acces others db via dblink. You will find it in contrib.
You can't use dblink for define f.k. :-(

regars
Pavel

Hi all,
I want to access a table-1 of database-1 from
database-2. Is it possible in pgsql. If so,
is it possible to define a foreign key constraint
for a column in table-2 in database-2 which
references to a column in table-1 in database-1.
TIA

regards,
Deepa K.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kenneth Fosse | last post by:
Hi. I'm currently working on a project which involves the creation of a web page which reports selected data to customers from two back-end systems. I use ASP script language on IIS, the server...
10
by: Andrea M. Segovia | last post by:
Hello, I am a newbie to Oracle databases.... We have a visualization front-end tool connected to an Oracle back-end database on a Tru64 UNIX server. We also have clients with MS access...
3
by: John Baker | last post by:
Hi: I just ran an Access application on someone elses system (With Access 2002). I made some changes (on his system) and then copied the program (data and program are still on the same file)...
3
by: prodirect | last post by:
Hi all, I hope someone can help me. I've recently created a database and wanted to put it up on an ftp sight so that multiple people could access the same tables at the same time from different...
1
by: Prakash RudraRaju | last post by:
Hi, I have recently migrated MSAccess Tables (nearly 120) to MySQL. To test successful migration I want to compare all tables. I have linked MySQL tables through ODBC connection. I want to...
2
by: James Zhuo | last post by:
Accessing Items in a Collection works with the as suggested by Kevin and Chris (thx) But when i tried to use the same technic with databinding within the aspx file, it doesn't seem to work. This...
2
by: Debbie Carter | last post by:
I have a few questions about databases. I would like to load only certain records into a datagrid. For an example, with a list of customers I want to only load the customers from California so in...
7
by: recumbent4sale | last post by:
I work in a non-profit where people are quite computer illiterate and have always created new files every year. I know that making new tables/db's is usually a bad idea, particularly for saving...
3
by: Matt | last post by:
Using ASP and Access is it possible for me to update recordsets in two different tables from data collection in one page? Basically, I need user input on 1 page that contains multiple form field...
4
by: Noy B | last post by:
Hi, I have developed a small application that is using a MSAccess DB. the problem is that it was developed on a machine where the application and the DB are both located. now it needs to be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.