Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf7082f2

Browse files
committed
Fix bogus Assert, per buildfarm results.
1 parent172eacb commitf7082f2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎contrib/hstore/hstore_op.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/hstore/hstore_op.c,v 1.14 2009/09/3019:50:22 tgl Exp $
2+
* $PostgreSQL: pgsql/contrib/hstore/hstore_op.c,v 1.15 2009/09/3021:26:17 tgl Exp $
33
*/
44
#include"postgres.h"
55

@@ -1236,8 +1236,10 @@ hstore_hash(PG_FUNCTION_ARGS)
12361236
* but we make it explicit here.
12371237
*/
12381238
Assert(VARSIZE(hs)==
1239-
CALCDATASIZE(HS_COUNT(hs),
1240-
HSE_ENDPOS(ARRPTR(hs)[2*HS_COUNT(hs)-1])));
1239+
(HS_COUNT(hs)!=0 ?
1240+
CALCDATASIZE(HS_COUNT(hs),
1241+
HSE_ENDPOS(ARRPTR(hs)[2*HS_COUNT(hs)-1])) :
1242+
HSHRDSIZE));
12411243

12421244
PG_FREE_IF_COPY(hs,0);
12431245
PG_RETURN_DATUM(hval);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp