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

Commiteb5bf51

Browse files
committed
> intarray and ltree both seem to be mapping their own declarations onto
> arrays using largely-similar code. But while intarray fails its> regression test, I find ltree still passes. So I'm confused about what> that code is really doing and don't want to touch it.Please, apply attached patch, it solves the problem.Teodor Sigaev
1 parentb3f5232 commiteb5bf51

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎contrib/intarray/_int.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#include<float.h>
1616

17+
#include"catalog/pg_type.h"
1718
#include"access/gist.h"
1819
#include"access/itup.h"
1920
#include"access/rtree.h"
@@ -919,8 +920,10 @@ new_intArrayType(int num)
919920
r= (ArrayType*)palloc(nbytes);
920921

921922
MemSet(r,0,nbytes);
922-
r->size=nbytes;
923-
r->ndim=NDIM;
923+
924+
ARR_SIZE(r)=nbytes;
925+
ARR_NDIM(r)=NDIM;
926+
ARR_ELEMTYPE(r)=INT4OID;
924927
r->flags &= ~LEAFKEY;
925928
*((int*)ARR_DIMS(r))=num;
926929
*((int*)ARR_LBOUND(r))=1;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp