Re: [GENERAL] Need help on how to backup a table

2008-03-28 Thread ajcity
ashish-21 wrote: > > ajcity wrote: >> If I wanted to use that with a command like "COPY (SELECT * FROM country >> WHERE country_name LIKE 'A%') TO ''; " do I specify the file >> location for the remote machine as the or do I specify the >> location for local machine? >> And what if the psql c

Re: [GENERAL] Need help on how to backup a table

2008-03-28 Thread Adam Rich
> Hi all, > I am trying to backup a large table with about 6 million rows. I want > to > export the data from the table and be able to import it into another > table > on a different database server (from pgsql 8.1 to 8.2). I need to > export the > data through SQL query 'cause I want to do a gr

Re: [GENERAL] Need help on how to backup a table

2008-03-28 Thread A. Kretschmer
am Fri, dem 28.03.2008, um 3:01:43 -0700 mailte ajcity folgendes: > > > > > Local file systems, and the user postgres needs write-access. I'm using > /tmp/... for such. > And yes: COPY from a select works only for 8.2 up, not for 8.1. Create a > table via 'create table as select ...' and COP

Re: [GENERAL] Need help on how to backup a table

2008-03-28 Thread ajcity
Local file systems, and the user postgres needs write-access. I'm using /tmp/... for such. And yes: COPY from a select works only for 8.2 up, not for 8.1. Create a table via 'create table as select ...' and COPY this table. I'm trying to avoid exporting to the local machine before uploadin

Re: [GENERAL] Need help on how to backup a table

2008-03-28 Thread ashish
ajcity wrote: > If I wanted to use that with a command like "COPY (SELECT * FROM country > WHERE country_name LIKE 'A%') TO ''; " do I specify the file > location for the remote machine as the or do I specify the > location for local machine? > And what if the psql clients are different (local: 8

Re: [GENERAL] Need help on how to backup a table

2008-03-28 Thread A. Kretschmer
am Fri, dem 28.03.2008, um 2:08:17 -0700 mailte ajcity folgendes: > > > If I wanted to use that with a command like "COPY (SELECT * FROM country > WHERE country_name LIKE 'A%') TO ''; " do I specify the file > location for the remote machine as the or do I specify the > location for local mach

Re: [GENERAL] Need help on how to backup a table

2008-03-28 Thread ajcity
If I wanted to use that with a command like "COPY (SELECT * FROM country WHERE country_name LIKE 'A%') TO ''; " do I specify the file location for the remote machine as the or do I specify the location for local machine? And what if the psql clients are different (local: 8.1.5 remote:8.2.6)?

Re: [GENERAL] Need help on how to backup a table

2008-03-28 Thread ashish
ajcity wrote: > Thanks all. The COPY command seems to do the work. > One more thing, say I want the data dumped on a remote machine rather than > on the current machine, how would I do that without having to first dump it > on the local machine then uploading to the remote machine? > Install ps

Re: [GENERAL] Need help on how to backup a table

2008-03-28 Thread ajcity
Thanks all. The COPY command seems to do the work. One more thing, say I want the data dumped on a remote machine rather than on the current machine, how would I do that without having to first dump it on the local machine then uploading to the remote machine? -- View this message in context: h

Re: [GENERAL] Need help on how to backup a table

2008-03-28 Thread ashish
ajcity wrote: > > > CAJ CAJ wrote: > >> Have you looked at "pg_dump -t" >> http://www.postgresql.org/docs/8.2/static/app-pgdump.html >> >> Joey >> >> >> > > Thanks for quick response but "pg_dump" does not allow me to dump from a > SQL SELECT query which is what I wanna do. > > Ma

Re: [GENERAL] Need help on how to backup a table

2008-03-28 Thread ajcity
CAJ CAJ wrote: > > > Have you looked at "pg_dump -t" > http://www.postgresql.org/docs/8.2/static/app-pgdump.html > > Joey > > Thanks for quick response but "pg_dump" does not allow me to dump from a SQL SELECT query which is what I wanna do. -- View this message in context: http://w

Re: [GENERAL] Need help on how to backup a table

2008-03-27 Thread Joey K.
On Thu, Mar 27, 2008 at 11:05 PM, ajcity <[EMAIL PROTECTED]> wrote: > > Hi all, > I am trying to backup a large table with about 6 million rows. I want to > export the data from the table and be able to import it into another table > on a different database server (from pgsql 8.1 to 8.2). I need