pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: Select between two databases
4+ messages / 3 participants
[nested] [flat]

* Re: Select between two databases
@ 2000-09-24 15:18  Fredrick Bartlett <palmtreefrb@earthlink.net>
  parent: Indraneel Majumdar <indraneel@www.cdfd.org.in>
  1 sibling, 1 reply; 4+ messages in thread

From: Fredrick Bartlett @ 2000-09-24 15:18 UTC (permalink / raw)
  To: Indraneel Majumdar <indraneel@www.cdfd.org.in>; +Cc: pgsql-sql

Not sure if same can be accomplished with different servers.
Try the following for database's on one server,  use alias & dot notation...

select a1.colA1 from
myDatabase1.tableA1 a1
where a1.A2 in (select b1.colB1 from myDatabase2.tableB1 b1)

Indraneel Majumdar wrote:

> Hi,
>
> Does any one know how I may select between two databases running on same
> machine or on different machines eg.
>
> select colA1 from tableA1 where colA2 in (select colB1 from tableB1);
>
> here tableA1 and tableB1 are in different databases. The two databases
> might be under the same postmaster or on different machines under
> different postmasters. How do I query both simultaneously? Is it possible?
>
> Thanks,
> Indraneel
>
> /************************************************************************.
> # Indraneel Majumdar                  ¡  E-mail: indraneel@123india.com  #
> # Bioinformatics Unit (EMBNET node),  ¡  URL: http://scorpius.iwarp.com  #
> # Centre for DNA Fingerprinting and Diagnostics,                         #
> # Hyderabad, India - 500076                                              #
> `************************************************************************/




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Select between two databases
@ 2000-09-24 19:46  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: Indraneel Majumdar <indraneel@www.cdfd.org.in>
  1 sibling, 0 replies; 4+ messages in thread

From: Stephan Szabo @ 2000-09-24 19:46 UTC (permalink / raw)
  To: Indraneel Majumdar <indraneel@www.cdfd.org.in>; +Cc: pgsql-sql

On Sun, 24 Sep 2000, Indraneel Majumdar wrote:

> Does any one know how I may select between two databases running on same
> machine or on different machines eg.
> 
> select colA1 from tableA1 where colA2 in (select colB1 from tableB1);
> 
> here tableA1 and tableB1 are in different databases. The two databases
> might be under the same postmaster or on different machines under
> different postmasters. How do I query both simultaneously? Is it possible?

Currently postgres databases may not be spanned in queries.




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Select between two databases
@ 2000-09-25 00:37  Indraneel Majumdar <indraneel@www.cdfd.org.in>
  0 siblings, 2 replies; 4+ messages in thread

From: Indraneel Majumdar @ 2000-09-25 00:37 UTC (permalink / raw)
  To: pgsql-sql

Hi,

Does any one know how I may select between two databases running on same
machine or on different machines eg.

select colA1 from tableA1 where colA2 in (select colB1 from tableB1);

here tableA1 and tableB1 are in different databases. The two databases
might be under the same postmaster or on different machines under
different postmasters. How do I query both simultaneously? Is it possible?

Thanks,
Indraneel

/************************************************************************.
# Indraneel Majumdar                  ¡  E-mail: indraneel@123india.com  #
# Bioinformatics Unit (EMBNET node),  ¡  URL: http://scorpius.iwarp.com  #
# Centre for DNA Fingerprinting and Diagnostics,                         #
# Hyderabad, India - 500076                                              #
`************************************************************************/




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Select between two databases
@ 2000-09-25 07:01  Indraneel Majumdar <indraneel@www.cdfd.org.in>
  parent: Fredrick Bartlett <palmtreefrb@earthlink.net>
  0 siblings, 0 replies; 4+ messages in thread

From: Indraneel Majumdar @ 2000-09-25 07:01 UTC (permalink / raw)
  To: Fredrick Bartlett <palmtreefrb@earthlink.net>; +Cc: pgsql-sql

Not working, but thanks anyway. Can anyone point out the relevant area of
the source where queries are handled?

Thanks,
Indraneel 

On Sun, 24 Sep 2000, Fredrick Bartlett wrote:

> Not sure if same can be accomplished with different servers.
> Try the following for database's on one server,  use alias & dot notation...
> 
> select a1.colA1 from
> myDatabase1.tableA1 a1
> where a1.A2 in (select b1.colB1 from myDatabase2.tableB1 b1)
> 

/************************************************************************.
# Indraneel Majumdar                  ¡  E-mail: indraneel@123india.com  #
# Bioinformatics Unit (EMBNET node),  ¡  URL: http://scorpius.iwarp.com  #
# Centre for DNA Fingerprinting and Diagnostics,                         #
# Hyderabad, India - 500076                                              #
`************************************************************************/




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2000-09-25 07:01 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-09-25 00:37 Select between two databases Indraneel Majumdar <indraneel@www.cdfd.org.in>
2000-09-24 15:18 ` Fredrick Bartlett <palmtreefrb@earthlink.net>
2000-09-25 07:01   ` Indraneel Majumdar <indraneel@www.cdfd.org.in>
2000-09-24 19:46 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox