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 (

[SQL] COPY command and required file permissions

2008-06-12 Thread Harold A. Giménez Ch.
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 (a Fedora core 8) and finally runs the Postgres COPY command for

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[] )

[SQL] copy command and array of composite types?

2008-03-25 Thread Jon Norman
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[] ); which is used with the following table definition: CREATE TABLE boolean_expr_table( expr_id smallint PRIMARY KEY, expr_name varchar(100)

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
Igor [mailto:[EMAIL PROTECTED] Sent: Fri 8/27/2004 1:16 PM To: [EMAIL PROTECTED] Cc: Subject:[SQL] Copy command freezes but INSERT works fine with trigger oninsert. I tried to add up records 2 different ways: 1. using command [copy messageinfo (user_id, receivedtime,

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

2004-08-27 Thread Artimenko Igor
I tried to add up records 2 different ways: 1. using command [copy messageinfo (user_id, receivedtime, filename, sendersstring, subject, hasattachments, groupmsg, msgsize, version ) FROM '/meridtemp/messageinfo.dat';] from psql 2. using simple INSERT INTO messageinfo ( user_id ) V

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
he line in question ? HTH, Greg Williamson DBA GlobeXplorer LLC -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tue 1/6/2004 10:19 PM To: [EMAIL PROTECTED] Cc: Subject: [SQL] COPY command Hi, i try to load a file into temporary table but i

[SQL] COPY command

2004-01-08 Thread azwa
Hi, i try to load a file into temporary table but it gives me an error . do u have any idea/solutions ?? the command that i've running as below : dwnc=# copy biosadm.custdo_temp dwnc-# from '/home/bios/customer_data/CustomerDO_new.CSV' dwnc-# WITH DELIMITER ',' ; ERROR: copy: line 14

[SQL] COPY command

2004-01-08 Thread azwa
Hi,   i try to load a file into temporary table but it gives me an error . do u have any idea/solutions ??  the command that i've running as below :     dwnc=# copy biosadm.custdo_temp dwnc-# from '/home/bios/customer_data/CustomerDO_new.CSV' dwnc-# WITH DELIMITER ',' ; ERROR:  copy: line 1

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

[SQL] Copy Command Error

2003-09-15 Thread Richard Sydney-Smith
I am outputting the following rows from a SYBASE database on W2000   3 '2' 'IBISFinancials' 'A.C.N. 072 378 815'8 'RK' 'Personal Accounts'    Using the command:   select cast(seq as integer) , id , cmpy, tr_n from fcont; output to d:\fcont.dat format 'ascii' delimited by '\x09'   This output

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.

[SQL] COPY command problems

2002-12-24 Thread Nikola Ivacic
I need help   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.e. 1, 30, 7, 23 etc..)   p.s. the

[SQL] COPY COMMAND -- Hanging

2001-10-05 Thread Bhuvan A
hi all, i am facing a strange problem in using COPY COMMAND. As i would like to merge 2 databases, i dumped data from one by $ pg_dump -R bhuvan -f bhuvan.sql Here i found data dumped using COPY COMMAND. now i tried to restore few of the tables. so i copied those tables alone to seperate file

[SQL] COPY COMMAND -- Hanging

2001-10-05 Thread Bhuvan A
hi all, i am facing a strange problem in using COPY COMMAND. As i would like to merge 2 databases, i dumped data from one by $ pg_dump -R bhuvan -f bhuvan.sql Here i found data dumped using COPY COMMAND. now i tried to restore few of the tables. so i copied those tables alone to seperate file