Re: [GENERAL] COPY to/from non-local file

2007-06-27 Thread Jaime Silvela
Well, for Ruby there are two Postgres drivers, a native compiled one I run in Linux, and a pure Ruby one that I use in Windows. The PGconn object in the Windows version doesn't seem to offer the methods putline, readline or endcopy. The Linux version does, but since I do development in both Lin

Re: [GENERAL] COPY to/from non-local file

2007-06-27 Thread Martijn van Oosterhout
On Wed, Jun 27, 2007 at 02:54:05PM -0400, Jaime Silvela wrote: > The problem is that the getline/readline interface, which does exist for > Ruby, doesn't seem to work so well, and anyway operates line by line; I > would have preferred to just hand a file descriptor and be done with it. Hrm, in w

Re: [GENERAL] COPY to/from non-local file

2007-06-27 Thread Enrico Sirola
Hi, Il giorno 27/giu/07, alle ore 20:54, Jaime Silvela ha scritto: The problem is that the getline/readline interface, which does exist for Ruby, doesn't seem to work so well, and anyway operates line by line; I would have preferred to just hand a file descriptor and be done with it. Tha

Re: [GENERAL] COPY to/from non-local file

2007-06-27 Thread Jaime Silvela
The problem is that the getline/readline interface, which does exist for Ruby, doesn't seem to work so well, and anyway operates line by line; I would have preferred to just hand a file descriptor and be done with it. Thanks for your suggestions too, Erik and Ted. Performance-wise the best sol

Re: [GENERAL] COPY to/from non-local file

2007-06-27 Thread Martijn van Oosterhout
On Wed, Jun 27, 2007 at 10:32:32AM -0400, Jaime Silvela wrote: > I've been looking around for this functionality: > Is it possible to use COPY with a file that doesn't reside in the DB's > filesystem? I know there is sort of a solution in using COPY from stdin/ > COPY to stdout, however that depe

Re: [GENERAL] COPY to/from non-local file

2007-06-27 Thread Erik Jones
On Jun 27, 2007, at 9:32 AM, Jaime Silvela wrote: I've been looking around for this functionality: Is it possible to use COPY with a file that doesn't reside in the DB's filesystem? I know there is sort of a solution in using COPY from stdin/ COPY to stdout, however that depends on calling

Re: [GENERAL] COPY to/from non-local file

2007-06-27 Thread Ted Byers
I just checked the manual and it says nothing about being able to use the SQL copy to access network files. But you have an option that almost works for you. I am sure others here will have some suggestions, but if I were in your place, I'd gather more information about where bottleneck

[GENERAL] COPY to/from non-local file

2007-06-27 Thread Jaime Silvela
I've been looking around for this functionality: Is it possible to use COPY with a file that doesn't reside in the DB's filesystem? I know there is sort of a solution in using COPY from stdin/ COPY to stdout, however that depends on calling the psql command, which breaks the flow of control of