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

Commitfac3dd5

Browse files
committed
Group-manipulating code neglected to fill in array element type,
which is now required.
1 parente107f3a commitfac3dd5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎src/backend/commands/user.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.108 2002/08/25 17:20:01 tgl Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.109 2002/08/30 01:01:02 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -20,10 +20,11 @@
2020

2121
#include"access/heapam.h"
2222
#include"catalog/catname.h"
23+
#include"catalog/indexing.h"
2324
#include"catalog/pg_database.h"
24-
#include"catalog/pg_shadow.h"
2525
#include"catalog/pg_group.h"
26-
#include"catalog/indexing.h"
26+
#include"catalog/pg_shadow.h"
27+
#include"catalog/pg_type.h"
2728
#include"commands/user.h"
2829
#include"libpq/crypt.h"
2930
#include"miscadmin.h"
@@ -1398,6 +1399,7 @@ IdListToArray(List *members)
13981399
newarray=palloc(ARR_OVERHEAD(1)+nmembers*sizeof(int32));
13991400
newarray->size=ARR_OVERHEAD(1)+nmembers*sizeof(int32);
14001401
newarray->flags=0;
1402+
newarray->elemtype=INT4OID;
14011403
ARR_NDIM(newarray)=1;/* one dimensional array */
14021404
ARR_LBOUND(newarray)[0]=1;/* axis starts at one */
14031405
ARR_DIMS(newarray)[0]=nmembers;/* axis is this long */
@@ -1424,14 +1426,15 @@ IdArrayToList(IdList *oldarray)
14241426
returnNIL;
14251427

14261428
Assert(ARR_NDIM(oldarray)==1);
1429+
Assert(ARR_ELEMTYPE(oldarray)==INT4OID);
14271430

14281431
hibound=ARR_DIMS(oldarray)[0];
14291432

14301433
for (i=0;i<hibound;i++)
14311434
{
14321435
int32sysid;
14331436

1434-
sysid= ((int*)ARR_DATA_PTR(oldarray))[i];
1437+
sysid= ((int32*)ARR_DATA_PTR(oldarray))[i];
14351438
/* filter out any duplicates --- probably a waste of time */
14361439
if (!intMember(sysid,newlist))
14371440
newlist=lappendi(newlist,sysid);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp