summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi Inoue2001-12-07 04:18:31 +0000
committerHiroshi Inoue2001-12-07 04:18:31 +0000
commitaa82ac8ab265818392f38b280d22047cb80f7bc9 (patch)
tree894387d64d6b0448b651a0504cacd6c69d38c0db
parent9992f2b104cb25248e7387d10ddd6134e52feeec (diff)
Fix a lo_manage()'s bug.
-rw-r--r--contrib/lo/lo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/lo/lo.c b/contrib/lo/lo.c
index b2c3af699a..8215c4cbbc 100644
--- a/contrib/lo/lo.c
+++ b/contrib/lo/lo.c
@@ -1,7 +1,7 @@
/*
* PostgreSQL type definitions for managed LargeObjects.
*
- * $Header: /cvsroot/pgsql/contrib/lo/lo.c,v 1.10 2001/10/28 06:25:40 momjian Exp $
+ * $Header: /cvsroot/pgsql/contrib/lo/lo.c,v 1.11 2001/12/07 04:18:31 inoue Exp $
*
*/
@@ -176,7 +176,7 @@ lo_manage(PG_FUNCTION_ARGS)
char *orig = SPI_getvalue(trigtuple, tupdesc, attnum);
char *newv = SPI_getvalue(newtuple, tupdesc, attnum);
- if ((orig != newv && (orig == NULL || newv == NULL)) || (orig != NULL && newv != NULL && strcmp(orig, newv)))
+ if (orig != NULL && (newv == NULL || strcmp(orig, newv)))
DirectFunctionCall1(lo_unlink,
ObjectIdGetDatum(atooid(orig)));