Re: [PATCHES] COPY for CSV documentation

2004-04-11 Thread Andrew Dunstan
Bruce Momjian said: > > COPY tablename [ ( column [, ...] ) ] > TO { 'filename' | STDOUT } > [ [ WITH ] > [ BINARY ] > [ OIDS ] > [ DELIMITER [ AS ] 'delimiter' ] > [ NULL [ AS ] 'null string' ] ] > >

Re: [PATCHES] COPY for CSV documentation

2004-04-11 Thread Andrew Dunstan
Tom Lane said: >>> COPY a FROM stdin WITH DELIMITER "," QUOTE '"' EQUOTE '"'; >> EQUOTE for embedded quote. > > ESCAPE would be better no? It's already a keyword ... much better. > > BTW, don't forget that the syntax options have to be provided in psql's > \copy as well. Did the patch cover tha

Re: [PATCHES] COPY for CSV documentation

2004-04-11 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > In other words, the string after CSV is optional. However, looking at > the COPY syntax, there isn't any case where we have an optional string > after a keyword. Is that OK? Seems better to avoid it. > However, this still has CSV using a two-character

Re: [PATCHES] Russian FAQ update

2004-04-11 Thread Bruce Momjian
Patch applied. Thanks. --- Serguei Mokhov wrote: > - Original Message - > From: "Bruce Momjian" <[EMAIL PROTECTED]> > Sent: April 11, 2004 10:25 PM > > > Serguei Mokhov wrote: > > > Hello, > > > > > > This upda

Re: [PATCHES] Russian FAQ update

2004-04-11 Thread Serguei Mokhov
- Original Message - From: "Bruce Momjian" <[EMAIL PROTECTED]> Sent: April 11, 2004 10:25 PM > Serguei Mokhov wrote: > > Hello, > > > > This update fixes a few small typos in names, > > pronouns and formatting in the Russian FAQ. > > > > To Victor: > > > > Why do you use the transl

Re: [PATCHES] COPY for CSV documentation

2004-04-11 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > That's what I was wondering. Is triggering CSV for multi-character > > delimiters a little too clever? This reminds me of the use of LIMIT X,Y > > with no indication which is limit and which is offset. > > I agree, this seems risky

Re: [PATCHES] COPY for CSV documentation

2004-04-11 Thread Bruce Momjian
Andrew Dunstan wrote: > > I am thinking just: > > > >> COPY a FROM stdin WITH CSV ',"'; > > > > or > > > >> COPY a FROM stdin WITH DELIMITER "," QUOTE '"' EQUOTE '"'; > > > > EQUOTE for embedded quote. These are used in very limited situations > > and don't have to be reserved words or anything. >

Re: [PATCHES] COPY for CSV documentation

2004-04-11 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > That's what I was wondering. Is triggering CSV for multi-character > delimiters a little too clever? This reminds me of the use of LIMIT X,Y > with no indication which is limit and which is offset. I agree, this seems risky and not at all readable to s

Re: [PATCHES] Russian FAQ update

2004-04-11 Thread Bruce Momjian
Serguei Mokhov wrote: > Hello, > > This update fixes a few small typos in names, > pronouns and formatting in the Russian FAQ. > > To Victor: > > Why do you use the translit encoding for FAQ > instead of KOI8-R as the rest of the translations > in pg? Would you please send a patch a

Re: [PATCHES] COPY for CSV documentation

2004-04-11 Thread Andrew Dunstan
Bruce Momjian said: >> >Yes, my worry is that someone will use a multibyte character that the >> >system sees as several bytes and enters CSV mode. >> > >> >> >> How about if we specify it explicitly, like BINARY, instead of it >> being implied by the length of DELIMITER? >> >> COPY a FROM stdin C