Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2010
    Posts
    4

    Unanswered: Join in tables in different databases

    Hi All,
    I have two tables named a and b in public schema of two different databases like
    lportal.public.a
    and
    lportal.public.b
    How can I have a join between the two tables?

  2. #2
    Join Date
    Oct 2010
    Posts
    4
    Sorry, I wrote it incorrectly.
    The two tables are like
    lportal.public.a
    and
    xyz.public.b

  3. #3
    Join Date
    Feb 2009
    Posts
    29
    Hi Dirshah,

    PostgreSQL does not allow you to query / 'talk' between different databases.

    Each Database is a self-contained system, with the only common information being Roles across Databases.

    As such, you can't join DatabaseA.public.TableA to DatabaseB.public.TableB.

    However, have you considered:
    DatabaseA.SchemaA.TableA to DatabaseA.SchemaB.TableB. In that situation, you could join the two tables.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •