From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: save to another database |
Date: | 2006-01-20 06:20:00 |
Message-ID: | 20060120061959.GB18233@webserv.wug-glas.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
am 19.01.2006, um 22:07:38 -0800 mailte First Last folgendes:
Good morning, First Last,
> how do i save the result of a query into a new table in another database? the IN database doesn't seem to work for in postgresql;
> "SELECT * INTO newtable IN newdatabase FROM mytable";
Impossible.
Solutions:
- use dblink from contrib
http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dblink/
http://pgfoundry.org/projects/dblink-tds/
- save the result in a table, create a dump from this table with
pg_dump, open the other database, restore the dump.
You can do this steps in a shell-script.
HTH, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47212, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===
From | Date | Subject | |
---|---|---|---|
Next Message | Agnes Bocchino | 2006-01-20 06:50:32 | Initdb panic: invalid record offset at 0/0 creating template1 |
Previous Message | First Last | 2006-01-20 06:07:38 | save to another database |