Hi Karl,
Thanks again for your replying !
Now I have a sql like this :
"COPY TABLE "test_char" (
id=char(0)comma WITH NULL ('[NULL]') ,
test_char=char(0)comma WITH NULL ('[NULL]') ,
test_varchar=text(0)nl WITH NULL ('[NULL]') )
FROM
'E:/tuj/tIngresOutputBulkExec_Bug20194/ingres_bulk.csv'
WITH
ROLLBACK=ENABLED,
ON_ERROR=CONTINUE;
COMMIT
\p\g"
id ---->Integer , chartest---> char, name---->varchar
It works well , but if I changed like this :
"COPY TABLE "test_char" (
id=char(0)comma WITH NULL ('[NULL]') ,
test_char=char(0)comma WITH NULL ('[NULL]') ,
test_varchar=varchar(0)nl )
FROM
'E:/tuj/tIngresOutputBulkExec_Bug20194/ingres_bulk.csv'
WITH
ROLLBACK=ENABLED,
ON_ERROR=CONTINUE;
COMMIT
\p\g"
when I executing the SQL , I got this error : "bad varchar length
specifier found while filling domain 'test_varchar' " for row 1.
Error processing row 2. Cannot conver column 'id' to tmple format,
....................
I looked up the document ,and found that :
text(0) : Read as variable-length character string terminated by the
specified delimiter. If a delimiter is not specified, the first comma,
tab, or newline encountered ends the value.
varchar(0): Read as a variable-length string, "preceded by a
5-character", right-justified length specifier. If a delimiter is
specified, additional input is discarded until the delimiter is found.
So I want to know what's the difference between the varchar(0) and
text(0) ,and could you please explain the "preceded by a 5-character"
detail for me ?
Thanks and best regards,
roger666888