Skip to content

Commit 8723e37

Browse files
committed
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).
1 parent db18703 commit 8723e37

File tree

1 file changed

+2
-2
lines changed
  • src/backend/executor

1 file changed

+2
-2
lines changed

src/backend/executor/spi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.103 2003/08/08 21:41:42 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.104 2003/09/16 00:50:09 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -409,7 +409,7 @@ SPI_modifytuple(Relation rel, HeapTuple tuple, int natts, int *attnum,
409409
bool isnull;
410410
int i;
411411

412-
if (rel == NULL || tuple == NULL || natts <= 0 || attnum == NULL || Values == NULL)
412+
if (rel == NULL || tuple == NULL || natts < 0 || attnum == NULL || Values == NULL)
413413
{
414414
SPI_result = SPI_ERROR_ARGUMENT;
415415
return NULL;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy