Current CVS is broken

Started by Teodor Sigaevover 23 years ago6 messages
#1Teodor Sigaev
teodor@stack.net

% 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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Teodor Sigaev (#1)
Re: Current CVS is broken

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

#3Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tom Lane (#2)
Re: Current CVS is broken

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, Pennsylvania 19073
#4Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tom Lane (#2)
1 attachment(s)
Re: Current CVS is broken

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

Attachments:

/bjm/difftext/plainDownload
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);
#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#4)
Re: Current CVS is broken

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

#6Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Tom Lane (#5)
Re: Current CVS is broken

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, Pennsylvania 19073