Thread: Cross-database queries
I am porting our applications from SQL SERVER, ORACLE and DB2 to PostgreSQL. I have just read that PostgreSQL does NOT support cross-database queries. Please, please, please tell me this is incorrect. I.e - I need to do something like: SELECT data1, data2 FROM customerdb.a a, masterdb.b b WHERE a.ref = b.ref Can anyone confirm this is the case. Andy ahm@exel.co.uk
On Fri, 19 Oct 2001, Andy Hallam wrote: > I am porting our applications from SQL SERVER, ORACLE and DB2 to PostgreSQL. > > I have just read that PostgreSQL does NOT support cross-database queries. Nope, it doesn't. However, you can simulate this in your client application by having two database connections open and making two queries and then processing both sets of data. There was talk about having schema support in PostgreSQL at time. In fact, I think it is listed as 'Urgent' in the TODO list as part of the replication support (http://postgresql.cokernet.com/docs/todo.html) -- Brett http://www.chapelperilous.net/ ------------------------------------------------------------------------ You can fool all the people all of the time if the advertising is right and the budget is big enough. -- Joseph E. Levine