diff options
Diffstat (limited to 'contrib/spi/moddatetime.c')
-rw-r--r-- | contrib/spi/moddatetime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/spi/moddatetime.c b/contrib/spi/moddatetime.c index c6d33b73557..cd700fe6d13 100644 --- a/contrib/spi/moddatetime.c +++ b/contrib/spi/moddatetime.c @@ -84,9 +84,9 @@ moddatetime(PG_FUNCTION_ARGS) /* * This is where we check to see if the field we are supposed to update - * even exists. The above function must return -1 if name not found? + * even exists. */ - if (attnum < 0) + if (attnum <= 0) ereport(ERROR, (errcode(ERRCODE_TRIGGERED_ACTION_EXCEPTION), errmsg("\"%s\" has no attribute \"%s\"", |