[Lugge] Re: psql

  • From: Arnaudo Massimo <marnaudo@xxxxxxxxx>
  • To: lugge <lugge@xxxxxxxxxxxxx>
  • Date: Tue, 12 Nov 2002 23:03:13 +0100

* Giorgio Andreoletti <giorgio.andreoletti@xxxxxxxxxxxxxx> [venerdì 08 novembre 
2002, alle 09:52]:
> già che mi sembra che siamo in tanti a dilettarci di DB : secondo voi è 
> possibile fare delle query incrociando i dati presenti in tabelle su
> db diversi ?
> 

Ciao,
dalla m-list di Postgres trovo ed invio:

On Sat, Nov 09, 2002 at 17:51:40 +0100,
  LR <lr-NOSPAM-@xxxxxxx> wrote:
  > Hi,
  >
  > When I'm connected to a postgreSQL db ( e.g. myDB ), how could I
  > execute
  > "select * from myTable;" in an other db (e.g. myOtherDB).
  >
  > In other words, what is the postgreSQL equivalent of the MS SQL
  > Server
  > statement "USE myOtherDB SELECT * FROM myTable" ?

  Stock postgresql doesn't support cross database queries.
  There is a contrib package which does.

  In the example you gave, you were combining information from two
  databases.
  If it is the case that your application will be combining data from
  the
  two databases, then you can open a separate connection to each
  database
  and use the appropiate connection for your queries.

Massimo  
-- 
E impari che puoi davvero sopportare,
che sei davvero forte,
e che vali davvero.
---             ---
HomePage:       http://spazioinwind.iol.it/arnaudo
LinuxGroup:     http://www.lugge.net
========----------
 
 Prima di scrivere in m-list per favore leggi il regolamento
 http://www.lugge.net/soci/manifesto.htm#list

 Archivio delle e-mail postate in lista
 //www.freelists.org/archives/lugge/

 Modifica dell'account su freelists
 //www.freelists.org/cgi-bin/lsg2.cgi 

----------========

 Orari di apertura della sede e come arrivarci:
 http://www.lugge.net/soci/sede.htm
 


 

Other related posts: