From aaae85124b001380934824eba597d1db55ec75d8 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Tue, 1 May 2012 09:08:56 +0200 Subject: - --- pgsql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgsql.c b/pgsql.c index 5a8b16b..376fad1 100644 --- a/pgsql.c +++ b/pgsql.c @@ -591,7 +591,7 @@ update_again: /* small in the middle write, keep data on both sides */ } else if( offset > 0 && offset + len < STANDARD_BLOCK_SIZE ) { - sprintf( sql, "UPDATE data set data = substring( data from %d for %d ) || $3::bytea || substring( data from %u for %u ) WHERE dir_id=$1::integer AND block_no=$2::integer", + sprintf( sql, "UPDATE data set data = substring( data from %d for %d ) || $3::bytea || substring( data from %u for %u ) WHERE dir_id=$1::bigint AND block_no=$2::bigint", 1, (unsigned int)offset, (unsigned int)offset + (unsigned int)len + 1, STANDARD_BLOCK_SIZE - ( (unsigned int)offset + (unsigned int)len ) ); -- cgit v1.2.3-54-g00ecf