#1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Location
    London, England
    Posts
    14
    Rep Power
    0

    Question Querying accross databases


    Hi,

    Does anyone know how to write queries to tables in other database intances in postgres? For examlpe if I have two DB instances set up, called "MyDB" and "HisDB" I might want to, I may want to run an SQL in "MyDB" that selects data from a table in "HisDB".

    Having consulted the docs it is unclear weather this is actually supported? Any clues? Thanks

    NICK
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    1
    Rep Power
    0

    Thumbs down Not easy...


    Hi,
    unfortuneatly the PostgreSQL does'nt support heteregenous queries among databases.
    In the TODO-List the developer team called it an "exotic feature".
    What a nonsense.

    It was the only cause not to choose the DB for our projects.
    I think many people think so.

    Your only chance is to use another DB (MySQL, Sybase 11.0.3,

    AFAIK Interbase doesn't support het. queries, too.

    Otherwise you have to form adequate queries in your client application (PHP,C,Java,...)

    Regards
  4. #3
  5. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Location
    London, England
    Posts
    14
    Rep Power
    0

    Wink And the reason is...


    Hey, thanks for the reply.

    I found this info in the end from a couple of different forum sites and yes, it is a bit of a problem.

    The problem seems to stem from the fact that each database has it's own set of system meta-tables, unlike SQL server or Oracle which stores them all in one table set, making applying roll-back rules and triggers much easier to manage when executing transactions accross databases.

    Never Mind!!

    NICK

IMN logo majestic logo threadwatch logo seochat tools logo