Re: [PATCHES] BUG #2221: Bad delimiters allowed in COPY ...
От | David Fetter |
---|---|
Тема | Re: [PATCHES] BUG #2221: Bad delimiters allowed in COPY ... |
Дата | |
Msg-id | 20060201024810.GB7231@fetter.org обсуждение исходный текст |
Ответ на | Re: [PATCHES] BUG #2221: Bad delimiters allowed in COPY ... (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: [PATCHES] BUG #2221: Bad delimiters allowed in COPY ...
|
Список | pgsql-bugs |
On Tue, Jan 31, 2006 at 08:03:41PM -0500, Bruce Momjian wrote: > Uh, couldn't the delimiter be a backslash in CVS mode? I don't think so. Folks? Anyhow, if there are different sets, I could do something like: #define BADCHARS "\r\n\\" #define BADCHARS_CSV "\r\n" and then check for csv_mode, etc. > + #define BADCHARS "\r\n\\" > > Also, should we disable DELIMITER and NULL from sharing characters? That's on about line 916, post-patch: /* Don't allow the delimiter to appear in the null string. */ if (strchr(cstate->null_print, cstate->delim[0]) != NULL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("COPY delimiter must not appear in the NULL specification"))); I suppose that a different error code might be The Right Thing⢠here. Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 415 235 3778 Remember to vote!
В списке pgsql-bugs по дате отправления: