mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
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:
parent
db18703b5a
commit
8723e37a26
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user