Since SPI_modifytuple's natts argument is the number of attributes to be

changed, it should allow a zero value (implying no changes to make).
This commit is contained in:
Tom Lane 2003-09-16 00:50:09 +00:00
parent db18703b5a
commit 8723e37a26
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.103 2003/08/08 21:41:42 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.104 2003/09/16 00:50:09 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -409,7 +409,7 @@ SPI_modifytuple(Relation rel, HeapTuple tuple, int natts, int *attnum,
bool isnull; bool isnull;
int i; int i;
if (rel == NULL || tuple == NULL || natts <= 0 || attnum == NULL || Values == NULL) if (rel == NULL || tuple == NULL || natts < 0 || attnum == NULL || Values == NULL)
{ {
SPI_result = SPI_ERROR_ARGUMENT; SPI_result = SPI_ERROR_ARGUMENT;
return NULL; return NULL;