Thread: Current CVS is broken
% uname -a FreeBSD xor 4.6-STABLE FreeBSD 4.6-STABLE #2: Tue Jun 18 20:48:48 MSD 2002 teodor@xor:/usr/src/sys/compile/XOR i386 ... gmake[3]: `/spool/home/teodor/pgsql/src/backend/commands' gcc -g -O -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/include -c -o aggregatecmds.o aggregatecmds.c gcc -g -O -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/include -c -o analyze.o analyze.c gcc -g -O -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/include -c -o async.o async.c gcc -g -O -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/include -c -o cluster.o cluster.c gcc -g -O -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/include -c -o comment.o comment.c gcc -g -O -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/include -c -o conversioncmds.o conversioncmds.c gcc -g -O -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/include -c -o copy.o copy.c copy.c: In function `CopyFrom': copy.c:1130: warning: passing arg 1 of `coerce_type_constraints' from incompatible pointer type copy.c:1130: warning: passing arg 2 of `coerce_type_constraints' makes integer from pointer without a cast copy.c:1130: too many arguments to function `coerce_type_constraints' -- Teodor Sigaev teodor@stack.net
Teodor Sigaev <teodor@stack.net> writes: > gcc -g -O -Wall -Wmissing-prototypes -Wmissing-declarations > -I../../../src/include -c -o copy.o copy.c > copy.c: In function `CopyFrom': > copy.c:1130: warning: passing arg 1 of `coerce_type_constraints' from > incompatible pointer type > copy.c:1130: warning: passing arg 2 of `coerce_type_constraints' makes integer > from pointer without a cast > copy.c:1130: too many arguments to function `coerce_type_constraints' Looks like Rod's domain-constraints-in-COPY patch was stale after my recent casting changes. Will work on it ... (Bruce, you really oughta do some minimal testing on patches before committing 'em.) regards, tom lane
Tom Lane wrote: > Teodor Sigaev <teodor@stack.net> writes: > > gcc -g -O -Wall -Wmissing-prototypes -Wmissing-declarations > > -I../../../src/include -c -o copy.o copy.c > > copy.c: In function `CopyFrom': > > copy.c:1130: warning: passing arg 1 of `coerce_type_constraints' from > > incompatible pointer type > > copy.c:1130: warning: passing arg 2 of `coerce_type_constraints' makes integer > > from pointer without a cast > > copy.c:1130: too many arguments to function `coerce_type_constraints' > > Looks like Rod's domain-constraints-in-COPY patch was stale after my > recent casting changes. Will work on it ... > > (Bruce, you really oughta do some minimal testing on patches before > committing 'em.) Sorry, forgot this time. I do normally test. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
Tom Lane wrote: > Teodor Sigaev <teodor@stack.net> writes: > > gcc -g -O -Wall -Wmissing-prototypes -Wmissing-declarations > > -I../../../src/include -c -o copy.o copy.c > > copy.c: In function `CopyFrom': > > copy.c:1130: warning: passing arg 1 of `coerce_type_constraints' from > > incompatible pointer type > > copy.c:1130: warning: passing arg 2 of `coerce_type_constraints' makes integer > > from pointer without a cast > > copy.c:1130: too many arguments to function `coerce_type_constraints' > > Looks like Rod's domain-constraints-in-COPY patch was stale after my > recent casting changes. Will work on it ... > > (Bruce, you really oughta do some minimal testing on patches before > committing 'em.) OK, patch attached. Tom, what is the proper third parameter in COPY, COERCE_DONTCARE? -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 Index: src/backend/commands/copy.c =================================================================== RCS file: /cvsroot/pgsql-server/src/backend/commands/copy.c,v retrieving revision 1.172 diff -c -c -r1.172 copy.c *** src/backend/commands/copy.c 20 Sep 2002 03:52:50 -0000 1.172 --- src/backend/commands/copy.c 20 Sep 2002 15:28:42 -0000 *************** *** 1126,1133 **** false); /* not coerced */ /* Process constraints */ ! node = coerce_type_constraints(pstate, (Node *) con, ! attr[m]->atttypid, true); values[m] = ExecEvalExpr(node, econtext, &isNull, NULL); --- 1126,1133 ---- false); /* not coerced */ /* Process constraints */ ! node = coerce_type_constraints((Node *) con, attr[m]->atttypid, ! COERCE_DONTCARE); values[m] = ExecEvalExpr(node, econtext, &isNull, NULL);
Bruce Momjian <pgman@candle.pha.pa.us> writes: > OK, patch attached. Tom, what is the proper third parameter in COPY, > COERCE_DONTCARE? It would be COERCE_IMPLICIT_CAST. But I don't like the patch as it stands anyway, because it is repeating a ton of catalog lookups for every input row. I have more extensive changes in mind ... regards, tom lane
Tom Lane wrote: > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > OK, patch attached. Tom, what is the proper third parameter in COPY, > > COERCE_DONTCARE? > > It would be COERCE_IMPLICIT_CAST. But I don't like the patch as it > stands anyway, because it is repeating a ton of catalog lookups for > every input row. I have more extensive changes in mind ... OK, I changed it to COERCE_IMPLICIT_CAST. The patch did fix a COPY failure for NULL's and DOMAIN so I didn't remove the patch. Feel free to wack it around. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073