Thread: Multiple databases

Multiple databases

From
"Sumaya"
Date:
Hi,
 
I am converting sql code from sql server to postgresql.  Data is currently being retrieved from multiple databases, how do I do this using postgresql.  I have tried using eg. select * from datbasename.tablename but this does not work.  Any ideas?
 
Thanks,
Sumaya

Re: Multiple databases

From
"A. Kretschmer"
Date:
am  Wed, dem 16.04.2008, um  8:59:46 +0200 mailte Sumaya folgendes:
> Hi,
>  
> I am converting sql code from sql server to postgresql.  Data is currently
> being retrieved from multiple databases, how do I do this using postgresql.  I
> have tried using eg. select * from datbasename.tablename but this does not
> work.  Any ideas?

You can use multiple databases, but you can't work across multiple
databases. PostgreSQL offers schemas, you can use them.

http://www.postgresql.org/docs/current/static/ddl-schemas.html


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net


Re: Multiple databases

From
Gerardo Herzig
Date:
Sumaya wrote:

>Hi,
>
>I am converting sql code from sql server to postgresql.  Data is currently being retrieved from multiple databases,
howdo I do this using postgresql.  I have tried using eg. select * from datbasename.tablename but this does not work.
Anyideas?
 
>
>Thanks,
>Sumaya
>  
>
Are you saying that you want a particular function stored in say 
database A to be able to retrieve some data from dabatase X?
If that so, you may take a look to the dblink contrib package.

Gerardo