Re: [SQL] COPY command and required file permissions

2010-06-25 Thread Adrian Klaver
On Friday 25 June 2010 6:07:35 pm Bruno Scovoli Santos wrote: > * Are you connecting to the database as a superuser to run the COPY > command? * > > Yes. This \copy command is in the database build script (create table > blablabla). So it almost (I think) must have to be a superuser. > > But he

Re: [SQL] COPY command and required file permissions

2010-06-25 Thread Adrian Klaver
On 06/23/2010 02:01 PM, bruno.scovoli wrote: I have an script with many "\copy" commands. For example: \copy privilegios from '/work/eclipse-workspace/Canoan Server/database/load/privilegios.dat' \copy privilegios_de_usuarios from '/work/eclipse-workspace/Canoan Server/database/load/privilegios

Re: [SQL] COPY command and required file permissions

2010-06-25 Thread bruno.scovoli
I have an script with many "\copy" commands. For example: \copy privilegios from '/work/eclipse-workspace/Canoan Server/database/load/privilegios.dat' \copy privilegios_de_usuarios from '/work/eclipse-workspace/Canoan Server/database/load/privilegios_de_usuarios.dat' \copy classificacoes from '/w

Re: [SQL] COPY command and required file permissions

2008-06-12 Thread Harold A. Giménez Ch.
Thanks for the info. SELinux was the guilty party... On Thu, Jun 12, 2008 at 10:48 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > "=?ISO-8859-1?Q?Harold_A._Gim=E9nez_Ch.?=" <[EMAIL PROTECTED]> > writes: > > In migrating an application from sql server to Postgres, I created a ruby > > script that extra

Re: [SQL] COPY command and required file permissions

2008-06-12 Thread Tom Lane
"=?ISO-8859-1?Q?Harold_A._Gim=E9nez_Ch.?=" <[EMAIL PROTECTED]> writes: > In migrating an application from sql server to Postgres, I created a ruby > script that extracts csv files from sql server (from a windows box), then > SCPs them into a directory (/home/ruby_process) on the server running > Po

Re: [SQL] COPY command and required file permissions

2008-06-12 Thread Pavel Stehule
2008/6/12 Harold A. Giménez Ch. <[EMAIL PROTECTED]>: > Hi all, > In migrating an application from sql server to Postgres, I created a ruby > script that extracts csv files from sql server (from a windows box), then > SCPs them into a directory (/home/ruby_process) on the server running > Postgres (

Re: [SQL] copy command and array of composite types?

2008-03-25 Thread Guy Fraser
Try to export some data from the table using "copy from ..." to see what it looks like. On 2008-Mar-25, at 12:19, Jon Norman wrote: I'm using PostgreSQL 8.3.1. I've created the following composite type: CREATE TYPE expression_event_type AS ( event_id varchar(10), expr_indices smallint[] )

Re: [SQL] Copy command freezes but INSERT works fine with trigger on insert.

2004-08-27 Thread Artimenko Igor
Copy from .. works fine for 1000 records to load. For data set of 6 records I could never get it finish. And I'm planing to reload 1000,000 records. So there is a limit somewhere between 1,000 & 60,000 since it starts working slower. The only question for me left is. What config parameter(s)

Re: [SQL] Copy command freezes but INSERT works fine with trigger oninsert.

2004-08-27 Thread Gregory S. Williamson
The copy command will run as a single transaction -- all succeed or all fail, I think, so if you interrupt it no rows will be loaded. The inserts -- unless wrapped into a transaction with a "begin; ... commit;" block will each be a single transaction. Check you postgres log file for the time wh

Re: [SQL] COPY command

2004-01-08 Thread Michael Glaesemann
On Jan 9, 2004, at 1:11 PM, [EMAIL PROTECTED] wrote: how do we run the COPY command from file which has several null columns in each field.   thanks. example :    dwnc=# copy biosadm.custinv_temp dwnc-# from '/home/bios/customer_data/CustomerInvoice_5Dec03_tab.txt' ; ERROR:  copy: line 1, Missing

Re: [SQL] COPY command

2004-01-08 Thread azwa
ST Yesterday         To:        <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>         cc:                 Subject:        RE: [SQL] COPY command This sounds as if the last character in each line might be a delimiter (a ",") which is standard for data unloaded from some sources; if

Re: [SQL] COPY command

2004-01-08 Thread Gregory S. Williamson
This sounds as if the last character in each line might be a delimiter (a ",") which is standard for data unloaded from some sources; if this is the case try removing it and your data should load. Or you may have a comma in a character field and that is throwing off the count for the line in que

Re: [SQL] Copy Command Error

2003-09-15 Thread Richard Huxton
On Monday 15 September 2003 09:57, Richard Sydney-Smith wrote: > I am outputting the following rows from a SYBASE database on W2000 > The problem is that each string is imported with the inverted commas. > > eg field ID = ''RK'' instead of 'RK' > > Can someone please help? A short bit of perl. So

Re: [SQL] COPY command problems

2002-12-27 Thread Rajesh Kumar Mallah.
it with splited file > > thanks > > Nikola > > - Original Message - > From: "Tom Lane" <[EMAIL PROTECTED]> > To: "Nikola Ivacic" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Tuesday, December 24, 2002 4:24 PM > Subject:

Re: [SQL] COPY command problems

2002-12-24 Thread Nikola Ivacic
TECTED]> Sent: Tuesday, December 24, 2002 4:24 PM Subject: Re: [SQL] COPY command problems > "Nikola Ivacic" <[EMAIL PROTECTED]> writes: > > Has somebody experienced difficulties using COPY command on large files. > > I have a large (250MB) file and each time I inse

Re: [SQL] COPY command problems

2002-12-24 Thread Tom Lane
"Nikola Ivacic" <[EMAIL PROTECTED]> writes: > Has somebody experienced difficulties using COPY command on large files. > I have a large (250MB) file and each time I insert records I've got one or = > more (< 30 of cca 1079000) corrupted > records. The number of corrupted records is not constant (i.