Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit aa82ac8

Browse files
author
Hiroshi Inoue
committed
Fix a lo_manage()'s bug.
1 parent 9992f2b commit aa82ac8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/lo/lo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* PostgreSQL type definitions for managed LargeObjects.
33
*
4-
* $Header: /cvsroot/pgsql/contrib/lo/lo.c,v 1.10 2001/10/28 06:25:40 momjian Exp $
4+
* $Header: /cvsroot/pgsql/contrib/lo/lo.c,v 1.11 2001/12/07 04:18:31 inoue Exp $
55
*
66
*/
77

@@ -176,7 +176,7 @@ lo_manage(PG_FUNCTION_ARGS)
176176
char *orig = SPI_getvalue(trigtuple, tupdesc, attnum);
177177
char *newv = SPI_getvalue(newtuple, tupdesc, attnum);
178178

179-
if ((orig != newv && (orig == NULL || newv == NULL)) || (orig != NULL && newv != NULL && strcmp(orig, newv)))
179+
if (orig != NULL && (newv == NULL || strcmp(orig, newv)))
180180
DirectFunctionCall1(lo_unlink,
181181
ObjectIdGetDatum(atooid(orig)));
182182

0 commit comments

Comments
 (0)