Thread: COPY command documentation
I have driven myself to distraction for the last 30 minutes trying to get COPY to work on Windows XP. The Unix style c:/afolder/afile instead of c:\afolder\afile was a desperation attempt. I had tried all sorts of double slashes \\ putting the whole path in quotes basically all sorts of foolishness. I would suggest the there should be a Windows example(s) in the documents as well as a *NIX style one(s) where necessary. Did I miss this somewhere or should I put a comment on the doc or what can I do to help the next Windows user. Oisin P.S. I just discovered that the comments from 8.0 had the answer I was looking for but these comments are not in the 8.1 docs. Should the comments be rolled forward as new versions are created? Or if valid comments added to the docs themselves? http://www.postgresql.org/docs/8.1/interactive/sql-copy.html http://www.postgresql.org/docs/8.0/interactive/sql-copy.html Now happily using COPY, Oisin
On Mar 23, 2006, at 4:08 PM, Oisin Glynn wrote: > I just discovered that the comments from 8.0 had the answer I was > looking for but these comments are not in the 8.1 docs. Should the > comments be rolled forward as new versions are created? Or if valid > comments added to the docs themselves? > > http://www.postgresql.org/docs/8.1/interactive/sql-copy.html > > http://www.postgresql.org/docs/8.0/interactive/sql-copy.html No, comments don't roll forward. Generally someone will try and pull out comments that should be included in the docs and add them, but this comment barely touches on the backslash issue, so that's probably why it wasn't brought in. Care to submit a documentation patch? -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
On Thu, Mar 23, 2006 at 07:00:13PM +0100, Jim Nasby wrote: > On Mar 23, 2006, at 4:08 PM, Oisin Glynn wrote: > > >I just discovered that the comments from 8.0 had the answer I was > >looking for but these comments are not in the 8.1 docs. Should the > >comments be rolled forward as new versions are created? Or if valid > >comments added to the docs themselves? > > > >http://www.postgresql.org/docs/8.1/interactive/sql-copy.html > > > >http://www.postgresql.org/docs/8.0/interactive/sql-copy.html > > No, comments don't roll forward. ...and it's unlikely that they will, now or later, without somebody whose whole job is to monitor those comments and make patches. I'd like to make a Modest Proposalâ¢: Let's take down the interactive documents and, in their place, put up a request that doc patches be sent to -docs. What say? Cheers, D -- David Fetter <david@fetter.org> http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote!
On Thu, 2006-03-23 at 14:12, David Fetter wrote: > On Thu, Mar 23, 2006 at 07:00:13PM +0100, Jim Nasby wrote: > > On Mar 23, 2006, at 4:08 PM, Oisin Glynn wrote: > > > > >I just discovered that the comments from 8.0 had the answer I was > > >looking for but these comments are not in the 8.1 docs. Should the > > >comments be rolled forward as new versions are created? Or if valid > > >comments added to the docs themselves? > > > > > >http://www.postgresql.org/docs/8.1/interactive/sql-copy.html > > > > > >http://www.postgresql.org/docs/8.0/interactive/sql-copy.html > > > > No, comments don't roll forward. > > ...and it's unlikely that they will, now or later, without somebody > whose whole job is to monitor those comments and make patches. > > I'd like to make a Modest Proposalâ„¢: Let's take down the interactive > documents and, in their place, put up a request that doc patches be > sent to -docs. Heck, why not a form that does it for somebody, takes their email address, and possibly even enrolls them in the -docs newsgroup. It can't be that hard to code up.
Scott Marlowe wrote: > On Thu, 2006-03-23 at 14:12, David Fetter wrote: > >> On Thu, Mar 23, 2006 at 07:00:13PM +0100, Jim Nasby wrote: >> >>> On Mar 23, 2006, at 4:08 PM, Oisin Glynn wrote: >>> >>> >>>> I just discovered that the comments from 8.0 had the answer I was >>>> looking for but these comments are not in the 8.1 docs. Should the >>>> comments be rolled forward as new versions are created? Or if valid >>>> comments added to the docs themselves? >>>> >>>> http://www.postgresql.org/docs/8.1/interactive/sql-copy.html >>>> >>>> http://www.postgresql.org/docs/8.0/interactive/sql-copy.html >>>> >>> No, comments don't roll forward. >>> >> ...and it's unlikely that they will, now or later, without somebody >> whose whole job is to monitor those comments and make patches. >> >> I'd like to make a Modest Proposalâ„¢: Let's take down the interactive >> documents and, in their place, put up a request that doc patches be >> sent to -docs. >> > > Heck, why not a form that does it for somebody, takes their email > address, and possibly even enrolls them in the -docs newsgroup. It > can't be that hard to code up. > > ---------------------------(end of broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > I am a Windows only developer (for my sins) and to be honest we are using postgres allot and are impressed by it but the *NIX centric examples in the docs can sometimes be a challenge, if there is a clear difference between Windows/*NIX operation and it is not obvious what the Windows equivalent is then there should be a Windows example or a note within the example explaining the difference. It seems like the viewing docs with notes is far less useful if we loose all the wisdom every time there is a new release, and personally I have found the notes useful more than once. Maybe a did you find this note useful button and useful notes get priority for doc inclusion? What is the process for submitting a doc patch? I am sure I should be asking that on the doc list. Oisin
On Thu, Mar 23, 2006 at 03:31:42PM -0500, Oisin Glynn wrote: > I am a Windows only developer (for my sins) and to be honest we are > using postgres allot and are impressed by it but the *NIX centric > examples in the docs can sometimes be a challenge, if there is a clear > difference between Windows/*NIX operation and it is not obvious what the > Windows equivalent is then there should be a Windows example or a note > within the example explaining the difference. You're right, but the number of UNIX developers here far exceeds the number of Windows developers. Most UNIX developers (like me) would have absolutly no idea which examples would not translate obviously to Windows. For that you need someone experienced in Windows programming to indicate that. We could probably use a section in the docs indicating the major differences. Maybe it's there already, I can't see it straight off. > Maybe a did you find this note useful button and useful notes get > priority for doc inclusion? That would be nice, no idea how to implement it though. Maybe even sharing the comments across version would be good, except that the page names have changed over time. > What is the process for submitting a doc patch? I am sure I should be > asking that on the doc list. Go to the source tree, edit the SGML files and send the diff to pgsql-patches. Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.
Attachment
On Thursday 23 March 2006 15:12, David Fetter wrote: > On Thu, Mar 23, 2006 at 07:00:13PM +0100, Jim Nasby wrote: > > On Mar 23, 2006, at 4:08 PM, Oisin Glynn wrote: > > >I just discovered that the comments from 8.0 had the answer I was > > >looking for but these comments are not in the 8.1 docs. Should the > > >comments be rolled forward as new versions are created? Or if valid > > >comments added to the docs themselves? > > > > > >http://www.postgresql.org/docs/8.1/interactive/sql-copy.html > > > > > >http://www.postgresql.org/docs/8.0/interactive/sql-copy.html > > > > No, comments don't roll forward. > The general consensus is that comments should not automatically roll forward, since many comments are version specific. People are of course free to repost comments if they find them appropriate. > ...and it's unlikely that they will, now or later, without somebody > whose whole job is to monitor those comments and make patches. > Well, we do make some attempt at rolling comments into the docs where appropriate, but we could certainly use more dedicated contributors in that area. > I'd like to make a Modest Proposalâ¢: Let's take down the interactive > documents and, in their place, put up a request that doc patches be > sent to -docs. > > What say? > I'd say you're anti-interactive comments :-) More importantly, people just aren't going to to write patches for doc additions... the overhead is several orders of magnitudes greater than filling at a web form... so getting rid of the comments is sure to lose any gains that we receive. What I have tried to garner support for in the past was to either direct those submission to this group for approval/rejection, which would make the folks generally interested in docs directly involved in the process. The other option would be to mail approved doc comments to this group so that someone could work them up into doc patches if applicable. That really is a factor, most of the comments would need to be reworded to be added into the docs proper. In the past these ideas were rejected as either off-topic or that it would turn this list into a high traffic list... if peoples opinions have changed, it could be arranged. -- Robert Treat Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
On Thu, Mar 23, 2006 at 04:46:02PM -0500, Robert Treat wrote: > > ...and it's unlikely that they will, now or later, without > > somebody whose whole job is to monitor those comments and make > > patches. > > Well, we do make some attempt at rolling comments into the docs > where appropriate, but we could certainly use more dedicated > contributors in that area. If we're going to get dedicated contributors, we could direct their efforts to things a *lot* more productive than this. Improving the formal docs, for example. > > I'd like to make a Modest Proposalâ¢: Let's take down the > > interactive documents and, in their place, put up a request that > > doc patches be sent to -docs. > > > > What say? > > I'd say you're anti-interactive comments :-) I'm not against them. I'm just *for* improving the existing docs, and those comments don't (and won't, very likely) have any pipeline into those. Are you personally volunteering for this task, Robert? > More importantly, people just aren't going to to write patches for > doc additions... the overhead is several orders of magnitudes > greater than filling at a web form... so getting rid of the comments > is sure to lose any gains that we receive. What gains? As I said, I'm not against it, but right now, those things just go down the memory hole to the benefit of nobody. The detriment, I'd say, because somebody has wasted their time. > What I have tried to garner support for in the past was to either > direct those submission to this group for approval/rejection, which > would make the folks generally interested in docs directly involved > in the process. Somebody has to vet this. Please feel free to step up :) > The other option would be to mail approved doc comments to this > group so that someone could work them up into doc patches if > applicable. That really is a factor, most of the comments would need > to be reworded to be added into the docs proper. > > In the past these ideas were rejected as either off-topic or that it > would turn this list into a high traffic list... if peoples opinions > have changed, it could be arranged. I'm voicing a rejection for 'em again on the same grounds. Until we have a person whose paid, full-time job is web-comment rassling, this is a non-starter. Cheers, D -- David Fetter <david@fetter.org> http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote!
On Thursday 23 March 2006 17:46, David Fetter wrote: > On Thu, Mar 23, 2006 at 04:46:02PM -0500, Robert Treat wrote: > > > ...and it's unlikely that they will, now or later, without > > > somebody whose whole job is to monitor those comments and make > > > patches. > > > > Well, we do make some attempt at rolling comments into the docs > > where appropriate, but we could certainly use more dedicated > > contributors in that area. > > If we're going to get dedicated contributors, we could direct their > efforts to things a *lot* more productive than this. Improving the > formal docs, for example. > Uh, that's what we're talking about David, having someone who would be willing to take doc comments and roll them into the formal docs. > > > I'd like to make a Modest Proposalâ¢: Let's take down the > > > interactive documents and, in their place, put up a request that > > > doc patches be sent to -docs. > > > > > > What say? > > > > I'd say you're anti-interactive comments :-) > > I'm not against them. I'm just *for* improving the existing docs, and > those comments don't (and won't, very likely) have any pipeline into > those. Are you personally volunteering for this task, Robert? > Well David, I have actually already submitted multiple patches to the docs directly based on documentation comments, check the archives. Also I know Tom has gone through a number of times in the past in an attempt to cull improvements. The things is, we're busy guys, so we can't exactly do it alone. If we could get some more volunteers, the process would be better. Even if we can't I still think it is worthwhile, but I'll cover that more in a bit. > > More importantly, people just aren't going to to write patches for > > doc additions... the overhead is several orders of magnitudes > > greater than filling at a web form... so getting rid of the comments > > is sure to lose any gains that we receive. > > What gains? As I said, I'm not against it, but right now, those > things just go down the memory hole to the benefit of nobody. The > detriment, I'd say, because somebody has wasted their time. > Not true. First, there have been doc improvements based on those comments. Furthermore, people do find the doc comments helpful; they find information clearing things up online and when google searching. In fact more people could be helped if things like the docbot pointed to the interactive docs, though for some reason the guys running that thing refuse to do so. > > What I have tried to garner support for in the past was to either > > direct those submission to this group for approval/rejection, which > > would make the folks generally interested in docs directly involved > > in the process. > > Somebody has to vet this. Please feel free to step up :) Um, maybe I wasn't clear when I said "I have tried to garner support", but I have tried to garner support, and it got shot down. Can it be your turn now? > > > The other option would be to mail approved doc comments to this > > group so that someone could work them up into doc patches if > > applicable. That really is a factor, most of the comments would need > > to be reworded to be added into the docs proper. > > > > In the past these ideas were rejected as either off-topic or that it > > would turn this list into a high traffic list... if peoples opinions > > have changed, it could be arranged. > > I'm voicing a rejection for 'em again on the same grounds. Until we > have a person whose paid, full-time job is web-comment rassling, this > is a non-starter. > Well there you go. You complain that the interactive docs aren't merged upstream enough, but protest any effort to get subscribers from the _docs mailing list_ involved. -- Robert Treat Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
On 23/3/06 20:12, "David Fetter" <david@fetter.org> wrote: > On Thu, Mar 23, 2006 at 07:00:13PM +0100, Jim Nasby wrote: >> On Mar 23, 2006, at 4:08 PM, Oisin Glynn wrote: >> >>> I just discovered that the comments from 8.0 had the answer I was >>> looking for but these comments are not in the 8.1 docs. Should the >>> comments be rolled forward as new versions are created? Or if valid >>> comments added to the docs themselves? >>> >>> http://www.postgresql.org/docs/8.1/interactive/sql-copy.html >>> >>> http://www.postgresql.org/docs/8.0/interactive/sql-copy.html >> >> No, comments don't roll forward. > > ...and it's unlikely that they will, now or later, without somebody > whose whole job is to monitor those comments and make patches. > > I'd like to make a Modest Proposalâ¢: Let's take down the interactive > documents and, in their place, put up a request that doc patches be > sent to -docs. > > What say? I say no, because whilst some comments should (and do) end up in the docs, many are simply useful real-world code examples and related information that people post. It's useful stuff, but would clutter the docs. Regards, Dave.
On Fri, Mar 24, 2006 at 08:58:55AM +0000, Dave Page wrote: > On 23/3/06 20:12, "David Fetter" <david@fetter.org> wrote: > > > On Thu, Mar 23, 2006 at 07:00:13PM +0100, Jim Nasby wrote: > >> On Mar 23, 2006, at 4:08 PM, Oisin Glynn wrote: > >> > >>> I just discovered that the comments from 8.0 had the answer I was > >>> looking for but these comments are not in the 8.1 docs. Should the > >>> comments be rolled forward as new versions are created? Or if valid > >>> comments added to the docs themselves? > >>> > >>> http://www.postgresql.org/docs/8.1/interactive/sql-copy.html > >>> > >>> http://www.postgresql.org/docs/8.0/interactive/sql-copy.html > >> > >> No, comments don't roll forward. > > > > ...and it's unlikely that they will, now or later, without somebody > > whose whole job is to monitor those comments and make patches. > > > > I'd like to make a Modest Proposal???: Let's take down the interactive > > documents and, in their place, put up a request that doc patches be > > sent to -docs. > > > > What say? > > I say no, because whilst some comments should (and do) end up in the docs, > many are simply useful real-world code examples and related information that > people post. It's useful stuff, but would clutter the docs. But now that stuff gets 'lost' with ever new major version. It'd probably be better if it was posted somewhere like http://www.pervasivepostgres.com/instantkb13/ -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
> -----Original Message----- > From: Jim C. Nasby [mailto:jnasby@pervasive.com] > Sent: 24 March 2006 12:28 > To: Dave Page > Cc: David Fetter; Oisin Glynn; pgsql general; PostgreSQL Docs > Subject: Re: [GENERAL] COPY command documentation > > But now that stuff gets 'lost' with ever new major version. It'd > probably be better if it was posted somewhere like > http://www.pervasivepostgres.com/instantkb13/ That's the way it has worked, well, forever. But yes, more formal user documententation should be stored elsewhere - that's why the new user documentation system on the main website has been developed and will be going live soon. Regards, Dave.
I have added the following patch for 8.2 that suggests using E'' strings and doubling backslashes used as path separators, and backpatched the later suggestion to 8.1. Thanks. --------------------------------------------------------------------------- Oisin Glynn wrote: > I have driven myself to distraction for the last 30 minutes trying to > get COPY to work on Windows XP. The Unix style c:/afolder/afile > instead of c:\afolder\afile was a desperation attempt. > > I had tried all sorts of double slashes \\ putting the whole path in > quotes basically all sorts of foolishness. I would suggest the there > should be a Windows example(s) in the documents as well as a *NIX style > one(s) where necessary. Did I miss this somewhere or should I put a > comment on the doc or what can I do to help the next Windows user. > > Oisin > > > P.S. > I just discovered that the comments from 8.0 had the answer I was > looking for but these comments are not in the 8.1 docs. Should the > comments be rolled forward as new versions are created? Or if valid > comments added to the docs themselves? > > http://www.postgresql.org/docs/8.1/interactive/sql-copy.html > > http://www.postgresql.org/docs/8.0/interactive/sql-copy.html > > Now happily using COPY, > Oisin > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > -- Bruce Momjian http://candle.pha.pa.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + Index: doc/src/sgml/ref/copy.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v retrieving revision 1.73 diff -c -c -r1.73 copy.sgml *** doc/src/sgml/ref/copy.sgml 3 Mar 2006 19:54:10 -0000 1.73 --- doc/src/sgml/ref/copy.sgml 22 Apr 2006 02:58:39 -0000 *************** *** 106,112 **** <term><replaceable class="parameter">filename</replaceable></term> <listitem> <para> ! The absolute path name of the input or output file. </para> </listitem> </varlistentry> --- 106,114 ---- <term><replaceable class="parameter">filename</replaceable></term> <listitem> <para> ! The absolute path name of the input or output file. Windows users ! might need to use an <literal>E''</> string and double backslashes ! used as path separators. </para> </listitem> </varlistentry>
Hi Oisin, I am right in the condition you described, but nowadays the 8.0 documentation is only available without comments. I tried the way suggested by Richard Sydney-Smith (*eliminating the spaces in the path*), but unsuccessfully. Could you please help me? thanks, Fabio *hint from Richard Sydney-Smith* ( http://postgresql.1045698.n5.nabble.com/Windows-file-path-for-copy-tt1847135.html ): /Windows XP SP2 with Postgresql 8.0.3 Two commands on fails the other succeeds: *Fails *: select import_sharedata('C:\\Documents and Settings\\Richard\\Desktop\\EzyChart-20050721'); *Succeeds*: select import_sharedata('C:\\EzyChart-20050721'); / Oisin Glynn wrote: > > I have driven myself to distraction for the last 30 minutes trying to > get COPY to work on Windows XP. The Unix style c:/afolder/afile > instead of c:\afolder\afile was a desperation attempt. > > I had tried all sorts of double slashes \\ putting the whole path in > quotes basically all sorts of foolishness. [...] > Oisin > > > P.S. > I just discovered that the comments from 8.0 had the answer I was > looking for but these comments are not in the 8.1 docs. Should the > comments be rolled forward as new versions are created? Or if valid > comments added to the docs themselves? > > http://www.postgresql.org/docs/8.1/interactive/sql-copy.html > > http://www.postgresql.org/docs/8.0/interactive/sql-copy.html > > Now happily using COPY, > Oisin > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > -- View this message in context: http://postgresql.1045698.n5.nabble.com/GENERAL-COPY-command-documentation-tp1858906p4590548.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.