aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-09-16 00:50:09 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-09-16 00:50:09 +0000
commit8723e37a26a3cfffe716c975eb33b6b1c3e8822a (patch)
tree250a210e99f2c39c6bffe871f0ab2070a702350b /src/backend/executor
parentdb18703b5a7970f96142ede2f166513274075f8f (diff)
downloadpostgresql-8723e37a26a3cfffe716c975eb33b6b1c3e8822a.tar.gz
postgresql-8723e37a26a3cfffe716c975eb33b6b1c3e8822a.zip
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).
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c
index 44d2e1ab06d..aed70ee4bca 100644
--- a/src/backend/executor/spi.c
+++ b/src/backend/executor/spi.c
@@ -8,7 +8,7 @@
*
*
* 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;
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;
return NULL;