Re: [GENERAL] COPY question

2010-10-21 Thread Craig Ringer
On 10/22/2010 05:16 AM, Szymon Guz wrote: Hi, I still get the same error while using COPY FROM 'file'. I have to pass the full directory for this to work, example: Sounds like you want to be using psql's \copy, not the server side COPY. \copy is aware of your current working directory and does

Re: [GENERAL] COPY question

2010-10-21 Thread Raymond O'Donnell
On 21/10/2010 22:16, Szymon Guz wrote: Hi, I still get the same error while using COPY FROM 'file'. I have to pass the full directory for this to work, example: COPY first (a,b,c) FROM '1st_file.csv' with csv header delimiter ','; ERROR: could not open file "1st_file.csv" for reading: No such f

Re: [GENERAL] COPY question

2010-10-21 Thread Szymon Guz
On 21 October 2010 23:28, Raymond O'Donnell wrote: > On 21/10/2010 22:16, Szymon Guz wrote: > >> Hi, >> I still get the same error while using COPY FROM 'file'. I have to pass >> the full directory for this to work, example: >> >> COPY first (a,b,c) FROM '1st_file.csv' with csv header delimiter '

[GENERAL] COPY question

2010-10-21 Thread Szymon Guz
Hi, I still get the same error while using COPY FROM 'file'. I have to pass the full directory for this to work, example: COPY first (a,b,c) FROM '1st_file.csv' with csv header delimiter ','; ERROR: could not open file "1st_file.csv" for reading: No such file or directory The same when I use: '.

Re: [GENERAL] copy question - fixed width?

2008-02-11 Thread Dimitri Fontaine
Le lundi 11 février 2008, Klint Gore a écrit : > Is there any way to make copy work with fixed width files? I'll try to see about implementing this in pgloader, shouldn't be complex. But we have some other things on the TODO (which could get formalized by now...). So at the moment the preprocess

Re: [GENERAL] copy question - fixed width?

2008-02-10 Thread Tom Lane
Klint Gore <[EMAIL PROTECTED]> writes: > Is there any way to make copy work with fixed width files? I'd suggest using a simple sed script to convert the data into the format COPY understands. regards, tom lane ---(end of broadcast)-

[GENERAL] copy question - fixed width?

2008-02-10 Thread Klint Gore
Is there any way to make copy work with fixed width files? eg create table t1 (code char(5), description char(30)); copy t1 from '/tmp/afile' delimiter as where afile looks something like 1test16789012345678901234567890 2test26789012345678901234567890 3test367890123456789012345678

RE: [GENERAL] COPY Question

2000-04-21 Thread Culberson, Philip
day, April 21, 2000 8:37 AM To: pgsql-general Subject: Re: [GENERAL] COPY Question Disregard this. I went with a temp table solution. Thanks, Sam Bruce Momjian wrote: > > > As you can see I'm delimiting the fields with a '|' character. You will > > also notice that t