How to query two postgres databases (with a single query) when the databases are within the same postgres...
This question already has an answer here:
Joining Results from Two Separate Databases
7 answers
Possible to perform cross-database queries with postgres?
6 answers
Cross Database Query in PostgreSQL [duplicate]
1 answer
For example, assuming that table A
is in database example
and table B
is in database postgres
, how to perform the following query on the two tables?:
SELECT
A.date,
A.name,
B.date,
B.name
FROM A
INNER JOIN B ON A.name = B.name;
postgresql
marked as duplicate by a_horse_with_no_name
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 14 '18 at 6:35
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Joining Results from Two Separate Databases
7 answers
Possible to perform cross-database queries with postgres?
6 answers
Cross Database Query in PostgreSQL [duplicate]
1 answer
For example, assuming that table A
is in database example
and table B
is in database postgres
, how to perform the following query on the two tables?:
SELECT
A.date,
A.name,
B.date,
B.name
FROM A
INNER JOIN B ON A.name = B.name;
postgresql
marked as duplicate by a_horse_with_no_name
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 14 '18 at 6:35
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Your previous answer was correct, the linked question is about two databases which are located on different postgres servers, whereas your answer was for two databases in the same postgres server
– Greg
Nov 14 '18 at 2:48
Yes syntax correct but it cannot produce becauseforeign key
cannot connect to other database..Postgresql
cannot do Query joining onAcross Database
..
– dwir182
Nov 14 '18 at 2:54
@Greg: it doesn't matter if the database are on the same server or different servers. In both cases you would use a foreign data wrapper: stackoverflow.com/a/36904631
– a_horse_with_no_name
Nov 14 '18 at 6:35
add a comment |
This question already has an answer here:
Joining Results from Two Separate Databases
7 answers
Possible to perform cross-database queries with postgres?
6 answers
Cross Database Query in PostgreSQL [duplicate]
1 answer
For example, assuming that table A
is in database example
and table B
is in database postgres
, how to perform the following query on the two tables?:
SELECT
A.date,
A.name,
B.date,
B.name
FROM A
INNER JOIN B ON A.name = B.name;
postgresql
This question already has an answer here:
Joining Results from Two Separate Databases
7 answers
Possible to perform cross-database queries with postgres?
6 answers
Cross Database Query in PostgreSQL [duplicate]
1 answer
For example, assuming that table A
is in database example
and table B
is in database postgres
, how to perform the following query on the two tables?:
SELECT
A.date,
A.name,
B.date,
B.name
FROM A
INNER JOIN B ON A.name = B.name;
This question already has an answer here:
Joining Results from Two Separate Databases
7 answers
Possible to perform cross-database queries with postgres?
6 answers
Cross Database Query in PostgreSQL [duplicate]
1 answer
postgresql
postgresql
asked Nov 14 '18 at 0:28
GregGreg
1,87041843
1,87041843
marked as duplicate by a_horse_with_no_name
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 14 '18 at 6:35
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by a_horse_with_no_name
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 14 '18 at 6:35
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Your previous answer was correct, the linked question is about two databases which are located on different postgres servers, whereas your answer was for two databases in the same postgres server
– Greg
Nov 14 '18 at 2:48
Yes syntax correct but it cannot produce becauseforeign key
cannot connect to other database..Postgresql
cannot do Query joining onAcross Database
..
– dwir182
Nov 14 '18 at 2:54
@Greg: it doesn't matter if the database are on the same server or different servers. In both cases you would use a foreign data wrapper: stackoverflow.com/a/36904631
– a_horse_with_no_name
Nov 14 '18 at 6:35
add a comment |
Your previous answer was correct, the linked question is about two databases which are located on different postgres servers, whereas your answer was for two databases in the same postgres server
– Greg
Nov 14 '18 at 2:48
Yes syntax correct but it cannot produce becauseforeign key
cannot connect to other database..Postgresql
cannot do Query joining onAcross Database
..
– dwir182
Nov 14 '18 at 2:54
@Greg: it doesn't matter if the database are on the same server or different servers. In both cases you would use a foreign data wrapper: stackoverflow.com/a/36904631
– a_horse_with_no_name
Nov 14 '18 at 6:35
Your previous answer was correct, the linked question is about two databases which are located on different postgres servers, whereas your answer was for two databases in the same postgres server
– Greg
Nov 14 '18 at 2:48
Your previous answer was correct, the linked question is about two databases which are located on different postgres servers, whereas your answer was for two databases in the same postgres server
– Greg
Nov 14 '18 at 2:48
Yes syntax correct but it cannot produce because
foreign key
cannot connect to other database.. Postgresql
cannot do Query joining on Across Database
..– dwir182
Nov 14 '18 at 2:54
Yes syntax correct but it cannot produce because
foreign key
cannot connect to other database.. Postgresql
cannot do Query joining on Across Database
..– dwir182
Nov 14 '18 at 2:54
@Greg: it doesn't matter if the database are on the same server or different servers. In both cases you would use a foreign data wrapper: stackoverflow.com/a/36904631
– a_horse_with_no_name
Nov 14 '18 at 6:35
@Greg: it doesn't matter if the database are on the same server or different servers. In both cases you would use a foreign data wrapper: stackoverflow.com/a/36904631
– a_horse_with_no_name
Nov 14 '18 at 6:35
add a comment |
0
active
oldest
votes
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Your previous answer was correct, the linked question is about two databases which are located on different postgres servers, whereas your answer was for two databases in the same postgres server
– Greg
Nov 14 '18 at 2:48
Yes syntax correct but it cannot produce because
foreign key
cannot connect to other database..Postgresql
cannot do Query joining onAcross Database
..– dwir182
Nov 14 '18 at 2:54
@Greg: it doesn't matter if the database are on the same server or different servers. In both cases you would use a foreign data wrapper: stackoverflow.com/a/36904631
– a_horse_with_no_name
Nov 14 '18 at 6:35