Re: [GENERAL] Exporting Data

2013-06-20 Thread David Johnston
guilherme wrote I need to get some information in database and export it. Is there a way to make PostgreSQL to export one data line to a new file? Like this: 1 FIRST LINE -- line1.txt; 2 SECOND LINE -- line2.txt; 3 THIRD LINE -- line3.txt ... and so... I know that I can import all

Re: [GENERAL] Exporting Data

2013-06-20 Thread Adrian Klaver
On 06/20/2013 06:06 AM, David Johnston wrote: guilherme wrote I need to get some information in database and export it. Is there a way to make PostgreSQL to export one data line to a new file? Like this: 1 FIRST LINE -- line1.txt; 2 SECOND LINE -- line2.txt; 3 THIRD LINE -- line3.txt ... and

[GENERAL] Exporting Data

2013-06-20 Thread guilherme
I need to get some information in database and export it. Is there a way to make PostgreSQL to export one data line to a new file? Like this: 1 FIRST LINE -- line1.txt; 2 SECOND LINE -- line2.txt; 3 THIRD LINE -- line3.txt ... and so... I know that I can import all information into a unique

Re: [GENERAL] Exporting Data

2013-06-20 Thread Alban Hertroys
On Jun 20, 2013, at 14:33, guilherme guilhe...@quirius.com.br wrote: I need to get some information in database and export it. Is there a way to make PostgreSQL to export one data line to a new file? Like this: 1 FIRST LINE -- line1.txt; 2 SECOND LINE -- line2.txt; 3 THIRD LINE --

Re: [GENERAL] Exporting data from view

2006-06-22 Thread Brent Wood
I read recently about the efforts underway to COPY from a view, however I was wondering what the current best-practices are for being able to copy out of a view and import that data into an actual table elsewhere. I am currently doing psql -c SELECT ... and the using a bit of perl to

[GENERAL] Exporting data from view

2006-06-20 Thread Worky Workerson
I read recently about the efforts underway to COPY from a view, however I was wondering what the current best-practices are for being able to copy out of a view and import that data into an actual table elsewhere. I am currently doing psql -c SELECT ... and the using a bit of perl to transform

Re: [GENERAL] Exporting data from view

2006-06-20 Thread Worky Workerson
On 6/20/06, Aaron Koning [EMAIL PROTECTED] wrote: google pg_dump Really? What command do you use? I've tried the following: pg_dump -t viewname dbname and I get the view definition, whereas I would like the data. Is there an option to pg_dump that I'm missing?

Re: [GENERAL] Exporting data from view

2006-06-20 Thread Aaron Koning
CREATE TABLE sometable AS SELECT * FROM someview; pg_dump -t sometable dbname DROP TABLE sometable Que? Si!On 6/20/06, Worky Workerson [EMAIL PROTECTED] wrote: On 6/20/06, Aaron Koning [EMAIL PROTECTED] wrote: google pg_dumpReally?What command do you use?I've tried the following:pg_dump -t

Re: [GENERAL] Exporting data from view

2006-06-20 Thread Martijn van Oosterhout
On Tue, Jun 20, 2006 at 10:29:21AM -0700, Aaron Koning wrote: CREATE TABLE sometable AS SELECT * FROM someview; pg_dump -t sometable dbname DROP TABLE sometable Que? Si! Eh? If you're going to create the table anyway, I'd use psql: psql -c COPY table TO STDOUT If you put CSV there you can

Re: [GENERAL] Exporting data from view

2006-06-20 Thread Aaron Koning
copyable, importable... into Excel or another postgres db?On 6/20/06, Martijn van Oosterhout kleptog@svana.org wrote:On Tue, Jun 20, 2006 at 10:29:21AM -0700, Aaron Koning wrote: CREATE TABLE sometable AS SELECT * FROM someview; pg_dump -t sometable dbname DROP TABLE sometable Que? Si!Eh? If

Re: [GENERAL] Exporting data from view

2006-06-20 Thread Martijn van Oosterhout
On Tue, Jun 20, 2006 at 12:44:24PM -0700, Aaron Koning wrote: copyable, importable... into Excel or another postgres db? Ofcourse. It doesn't have the table definition ofcourse, just the data. The CSV format was added specifically for importing into Excel and similar programs... -- Martijn van