Re: [HACKERS] Proposal: new pg_dump options --copy-delimiter and

2006-02-02 Thread David Fetter
On Fri, Jan 27, 2006 at 01:12:35PM -0500, Greg Stark wrote: > > "Joshua D. Drake" <[EMAIL PROTECTED]> writes: > > > David I don't get this... what are you copying from/to that would > > wouldn't just script? If you throw into a script you can change > > the delimiter on the fly using translation.

Re: [HACKERS] Proposal: new pg_dump options --copy-delimiter and --copy-null

2006-01-30 Thread Bruce Momjian
David Fetter wrote: > On Thu, Jan 26, 2006 at 10:17:05PM -0500, Tom Lane wrote: > > David Fetter <[EMAIL PROTECTED]> writes: > > > I have seed database scripts quasi-generated from pg_dump which > > > include COPY statements, but the data is hard to edit (especially > > > cut & paste operations) wh

Re: [HACKERS] Proposal: new pg_dump options --copy-delimiter and

2006-01-27 Thread Andrew Dunstan
On Fri, 2006-01-27 at 14:08 -0500, Tom Lane wrote: > Andrew Dunstan <[EMAIL PROTECTED]> writes: > > On Fri, 2006-01-27 at 13:43 -0500, Tom Lane wrote: > >> That line of argument leads to the suggestion that pg_dump should just > >> use something else (I'd vote for "|"), all the time, in order to pr

Re: [HACKERS] Proposal: new pg_dump options --copy-delimiter and

2006-01-27 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Andrew Dunstan <[EMAIL PROTECTED]> writes: > > On Fri, 2006-01-27 at 13:43 -0500, Tom Lane wrote: > >> That line of argument leads to the suggestion that pg_dump should just > >> use something else (I'd vote for "|"), all the time, in order to produce > >> m

Re: [HACKERS] Proposal: new pg_dump options --copy-delimiter and

2006-01-27 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > On Fri, 2006-01-27 at 13:43 -0500, Tom Lane wrote: >> That line of argument leads to the suggestion that pg_dump should just >> use something else (I'd vote for "|"), all the time, in order to produce >> more robust dump files. I still don't see the arg

Re: [HACKERS] Proposal: new pg_dump options --copy-delimiter and

2006-01-27 Thread Andrew Dunstan
On Fri, 2006-01-27 at 13:43 -0500, Tom Lane wrote: > Andrew Dunstan <[EMAIL PROTECTED]> writes: > > I could not disagree more. The invisibility of tabs makes their use as a > > delimiter wholly evil. I have lost count of the number of corrupted > > makefiles etc. I have seen because a tab got conve

Re: [HACKERS] Proposal: new pg_dump options --copy-delimiter and

2006-01-27 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > I could not disagree more. The invisibility of tabs makes their use as a > delimiter wholly evil. I have lost count of the number of corrupted > makefiles etc. I have seen because a tab got converted to a space and it > was impossible to tell. > More te

Re: [HACKERS] Proposal: new pg_dump options --copy-delimiter and

2006-01-27 Thread Andrew Dunstan
On Fri, 2006-01-27 at 13:12 -0500, Greg Stark wrote: > > Personally I find anything that would encourage people to use anything other > than tabs evil anyways. All those people who think | is somehow a reasonable > choice or want to use commas and then get all confused trying to escape them > and

Re: [HACKERS] Proposal: new pg_dump options --copy-delimiter and

2006-01-27 Thread Greg Stark
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > David I don't get this... what are you copying from/to that would > wouldn't just script? If you throw into a script you can change > the delimiter on the fly using translation. I think what he's getting at is for things like, say, a contrib packag

Re: [HACKERS] Proposal: new pg_dump options --copy-delimiter and

2006-01-27 Thread Joshua D. Drake
Those who don't use it will never see it. It does however add more maintenance to the code. Furthermore, it's quite unclear why you'd use pg_dump at all to generate a data file that you intend to feed to some other program. In my case, it's about being copy/paste friendly. Davi

Re: [HACKERS] Proposal: new pg_dump options --copy-delimiter and --copy-null

2006-01-27 Thread Tom Lane
David Fetter <[EMAIL PROTECTED]> writes: > On Thu, Jan 26, 2006 at 10:17:05PM -0500, Tom Lane wrote: >> Seems to me that "psql -c 'COPY ...'" is a more likely front-end for >> such a process. > Actually, it's not. I'm attaching my preliminary patch, as I see I > haven't explained it well enough.

Re: [HACKERS] Proposal: new pg_dump options --copy-delimiter and --copy-null

2006-01-26 Thread David Fetter
On Thu, Jan 26, 2006 at 10:17:05PM -0500, Tom Lane wrote: > David Fetter <[EMAIL PROTECTED]> writes: > > I have seed database scripts quasi-generated from pg_dump which > > include COPY statements, but the data is hard to edit (especially > > cut & paste operations) when the COPY delimiter is some

Re: [HACKERS] Proposal: new pg_dump options --copy-delimiter and --copy-null

2006-01-26 Thread Tom Lane
David Fetter <[EMAIL PROTECTED]> writes: > I have seed database scripts quasi-generated from pg_dump which > include COPY statements, but the data is hard to edit (especially cut > & paste operations) when the COPY delimiter is some non-visible > character like \t. This seems like an awfully weak

[HACKERS] Proposal: new pg_dump options --copy-delimiter and --copy-null

2006-01-26 Thread David Fetter
Folks, This came up at work... I have seed database scripts quasi-generated from pg_dump which include COPY statements, but the data is hard to edit (especially cut & paste operations) when the COPY delimiter is some non-visible character like \t. So I thought it would be handy to be able to con