pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedSelecting data from a table created in another database...
5+ messages / 5 participants
[nested] [flat]
* Selecting data from a table created in another database...
@ 2002-07-02 20:13 Ligia Pimentel <lmpimentel@yahoo.com>
0 siblings, 2 replies; 5+ messages in thread
From: Ligia Pimentel @ 2002-07-02 20:13 UTC (permalink / raw)
To: pgsql-sql
I don't know if this can be done...
In MSSQL Server I can access a table created in another database (on the
same server, of course) by using the following syntaxis...
select * from databasename..tablename where condition;
Can I do this in postgres?
I'm using version 7.2 on a redhat server...
Thank you for your help...
Ligia
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Selecting data from a table created in another database...
@ 2002-07-03 20:22 Bruce Momjian <pgman@candle.pha.pa.us>
parent: Ligia Pimentel <lmpimentel@yahoo.com>
1 sibling, 0 replies; 5+ messages in thread
From: Bruce Momjian @ 2002-07-03 20:22 UTC (permalink / raw)
To: Ligia Pimentel <lmpimentel@yahoo.com>; +Cc: pgsql-sql
Ligia Pimentel wrote:
> I don't know if this can be done...
>
> In MSSQL Server I can access a table created in another database (on the
> same server, of course) by using the following syntaxis...
>
> select * from databasename..tablename where condition;
>
> Can I do this in postgres?
>
> I'm using version 7.2 on a redhat server...
Sorry, you can't do cross-db queries with PostgreSQL. Take a look at
/contrib/dblink as an option.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Selecting data from a table created in another database...
@ 2002-07-04 01:47 Rudi Starcevic <rudi@oasis.net.au>
parent: Ligia Pimentel <lmpimentel@yahoo.com>
1 sibling, 1 reply; 5+ messages in thread
From: Rudi Starcevic @ 2002-07-04 01:47 UTC (permalink / raw)
To: Ligia Pimentel <lmpimentel@yahoo.com>; +Cc: pgsql-sql
Hi Ligia,
When I need to do this I use a scripting language like PHP, Perl or
ColdFusion to
select from one db and insert into another.
As a matter of fact I had to do this exercise just yesturday.
I like it as I find I have much more freedom to gather data, organise it
then insert it.
It's easy to view the output of your selects on the screen and when
happy do the insert(s).
Hope this helps.
Regards
Rudi Starcevic.
Ligia Pimentel wrote:
>I don't know if this can be done...
>
>In MSSQL Server I can access a table created in another database (on the
>same server, of course) by using the following syntaxis...
>
>select * from databasename..tablename where condition;
>
>Can I do this in postgres?
>
>I'm using version 7.2 on a redhat server...
>
>Thank you for your help...
>
>Ligia
>
>
>
>
>
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>http://archives.postgresql.org
>
>
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Selecting data from a table created in another database...
@ 2002-07-04 13:49 Ligia Pimentel <pimentel_ligia@hotmail.com>
parent: Rudi Starcevic <rudi@oasis.net.au>
0 siblings, 0 replies; 5+ messages in thread
From: Ligia Pimentel @ 2002-07-04 13:49 UTC (permalink / raw)
To: pgsql-sql
Thanks.
"Rudi Starcevic" <rudi@oasis.net.au> wrote in message
news:3D23A94E.3050208@oasis.net.au...
> Hi Ligia,
>
> When I need to do this I use a scripting language like PHP, Perl or
> ColdFusion to
> select from one db and insert into another.
> As a matter of fact I had to do this exercise just yesturday.
> I like it as I find I have much more freedom to gather data, organise it
> then insert it.
> It's easy to view the output of your selects on the screen and when
> happy do the insert(s).
>
> Hope this helps.
> Regards
> Rudi Starcevic.
>
> Ligia Pimentel wrote:
>
> >I don't know if this can be done...
> >
> >In MSSQL Server I can access a table created in another database (on the
> >same server, of course) by using the following syntaxis...
> >
> >select * from databasename..tablename where condition;
> >
> >Can I do this in postgres?
> >
> >I'm using version 7.2 on a redhat server...
> >
> >Thank you for your help...
> >
> >Ligia
> >
> >
> >
> >
> >
> >
> >
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 6: Have you searched our list archives?
> >
> >http://archives.postgresql.org
> >
> >
> >
> >
>
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Selecting data from a table created in another database...
@ 2002-07-05 12:08 Chantal Ackermann <chantal.ackermann@biomax.de>
0 siblings, 0 replies; 5+ messages in thread
From: Chantal Ackermann @ 2002-07-05 12:08 UTC (permalink / raw)
To: pgsql-sql; +Cc: lmpimentel@yahoo.com
hi Ligia,
there was a posting to this list some time ago, about the same question.
I just found it as I had the same question as you:
http://archives.postgresql.org/pgsql-sql/1998-05/msg00091.php
(in short: it is not possible in Postgres)
the mail is from 1998, but I just tried to make a select using
mydatabase.mytable as table name in a select statement and this does not
work.
Chantal
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2002-07-05 12:08 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-07-02 20:13 Selecting data from a table created in another database... Ligia Pimentel <lmpimentel@yahoo.com>
2002-07-03 20:22 ` Bruce Momjian <pgman@candle.pha.pa.us>
2002-07-04 01:47 ` Rudi Starcevic <rudi@oasis.net.au>
2002-07-04 13:49 ` Ligia Pimentel <pimentel_ligia@hotmail.com>
2002-07-05 12:08 Re: Selecting data from a table created in another database... Chantal Ackermann <chantal.ackermann@biomax.de>
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