Thread: ERROR: Cross-database references are not implemented

ERROR: Cross-database references are not implemented

From
Theo Galanakis
Date:
<p><font face="Arial" size="2">How do I explicidly create a cross-database reference?</font><p><font face="Arial"
size="2">Mindyou these databases are on the same server.</font><p><font face="Arial" size="2">In MSSQL you could do
thatthrough enterprise manager.</font><p><font face="Arial" size="2">Any help would be
appreciated.</font><table><tr><tdbgcolor="#ffffff"><font
color="#000000">______________________________________________________________________<br/>This email, including
attachments,is intended only for the addressee<br />and may be confidential, privileged and subject to copyright. If
you<br/>have received this email in error, please advise the sender and delete<br />it. If you are not the intended
recipientof this email, you must not<br />use, copy or disclose its content to anyone. You must not copy or <br
/>communicateto others content that is confidential or subject to <br />copyright, unless you have the consent of the
contentowner.<br /></font></td></tr></table> 

Re: ERROR: Cross-database references are not implemented

From
Joe Conway
Date:
Theo Galanakis wrote:
> How do I explicidly create a cross-database reference?
> 
> Mind you these databases are on the same server.
> 
> In MSSQL you could do that through enterprise manager.
> 
> Any help would be appreciated.

You cannot do cross database references per se, but you can use schemas, 
which roughly behave like individual databases do in MSSQL. See:
http://www.postgresql.org/docs/7.4/static/ddl-schemas.html

If you really need cross-database queries, see contrib/dblink (which 
would also work across servers), but it isn't as flexible as using schemas.

HTH,

Joe