Naomi Walker wrote:
> Can we add unload/load functionality to the list, please?
>
>
>
> > > >Yes, agreed, it would be nice to have WHERE as part of COPY. In fact, I
> > > >like Informix's solution, which merges data in/out with INSERT/SELECT:
> > > >
> > > > UNLOAD TO '/tmp/x'
> > > >
file
to a pg table, are you? THAT is going to take a temporary table in any case,
it seems, so why not do it yourself?
Cheers,
Murthy
-Original Message-
From: Bruce Momjian [mailto:pgman@;candle.pha.pa.us]
Sent: Saturday, November 02, 2002 20:24
To: Naomi Walker
Cc: Bhuvan A; [EMA
Can we add unload/load functionality to the list, please?
> >Yes, agreed, it would be nice to have WHERE as part of COPY. In fact, I
> >like Informix's solution, which merges data in/out with INSERT/SELECT:
> >
> > UNLOAD TO '/tmp/x'
> > SELECT *
> > FROM tab;
> >
> >an
We do have /contrib/dblink in 7.3 that allows cross-db query access. We
don't have any pass-data-between-db's capability that I know of.
---
Naomi Walker wrote:
> Exactly. My Informix background is showing. Is there a way
Exactly. My Informix background is showing. Is there a way to officially
get this put on a to do list? I'd be most appreciative of the value this adds.
Slightly off subject, is there a way to read from one cluster and insert
into a database in another cluster (local or remote)? I think I rea
Yes, agreed, it would be nice to have WHERE as part of COPY. In fact, I
like Informix's solution, which merges data in/out with INSERT/SELECT:
UNLOAD TO '/tmp/x'
SELECT *
FROM tab;
and
LOAD FROM '/tmp/x'
INSERT INTO tab;
It is tough to beat this flexibi
It is possible. Delimiters can be used while restoring the data file.
Null string specification can also be specified. See,
test_db=> \h COPY
for more details.
The problem with COPY, I think, is that I cannot use a WHERE
statement. I'd like to just unload certain rows from a table. If I wan
> So, I ran psql, did a \o to capture the output,
> did a select * from table where x=y
> whacked the first row in the output file, and added the COPY statement.
test_db=> \pset tuples_only -- does whacking for you
> This seems way too klunky, so I must be going about it all wrong. In
> Informix
This might sound silly, but I am trying something basic, and having
trouble. What I want to do is unload selected rows from a table, and load
them somewhere else.
pg_dump works great if you want the whole table. I suppose I could from
one table, dump into a temp, and then pg_dump it, but tha