Skip to content

Commit 6ce9c76

Browse files
committed
Fix libpq because it was reading from the backend as a short.
1 parent dc18918 commit 6ce9c76

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/interfaces/libpq/fe-exec.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.56 1998/07/09 03:29:08 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.57 1998/07/13 00:01:44 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -504,15 +504,15 @@ getRowDescriptions(PGconn *conn)
504504
if (pqGets(typName, MAX_MESSAGE_LEN, conn) ||
505505
pqGetInt(&adtid, 4, conn) ||
506506
pqGetInt(&adtsize, 2, conn) ||
507-
pqGetInt(&adtmod, 2, conn))
507+
pqGetInt(&adtmod, 4, conn))
508508
{
509509
PQclear(result);
510510
return EOF;
511511
}
512512
result->attDescs[i].name = strdup(typName);
513513
result->attDescs[i].adtid = adtid;
514514
result->attDescs[i].adtsize = (short) adtsize;
515-
result->attDescs[i].adtmod = (short) adtmod;
515+
result->attDescs[i].adtmod = adtmod;
516516
}
517517

518518
/* Success! */

src/interfaces/libpq/libpq-fe.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: libpq-fe.h,v 1.31 1998/07/09 03:29:09 scrappy Exp $
9+
* $Id: libpq-fe.h,v 1.32 1998/07/13 00:01:45 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -78,7 +78,7 @@ extern "C"
7878
char *name; /* type name */
7979
Oid adtid; /* type id */
8080
short adtsize; /* type size */
81-
short adtmod; /* type-specific modifier info */
81+
int adtmod; /* type-specific modifier info */
8282
} PGresAttDesc;
8383

8484
/* use char* for Attribute values,

0 commit comments

Comments
 (0)