1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-19 13:42:17 +03:00

Inline function, rename libpq variablees, change lrel to lockrel.

This commit is contained in:
Bruce Momjian
1998-07-13 16:35:04 +00:00
parent 8bac4ca87b
commit 5aea4062d6
14 changed files with 164 additions and 190 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.58 1998/07/13 02:41:58 momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.59 1998/07/13 16:35:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -497,12 +497,12 @@ getRowDescriptions(PGconn *conn)
for (i = 0; i < nfields; i++)
{
char typName[MAX_MESSAGE_LEN];
int adtid;
int typid;
int typlen;
int atttypmod = -1;
if (pqGets(typName, MAX_MESSAGE_LEN, conn) ||
pqGetInt(&adtid, 4, conn) ||
pqGetInt(&typid, 4, conn) ||
pqGetInt(&typlen, 2, conn) ||
pqGetInt(&atttypmod, 4, conn))
{
@@ -510,7 +510,7 @@ getRowDescriptions(PGconn *conn)
return EOF;
}
result->attDescs[i].name = strdup(typName);
result->attDescs[i].adtid = adtid;
result->attDescs[i].typid = typid;
result->attDescs[i].typlen = (short) typlen;
result->attDescs[i].atttypmod = atttypmod;
}
@@ -1272,7 +1272,7 @@ PQftype(PGresult *res, int field_num)
return InvalidOid;
}
if (res->attDescs)
return res->attDescs[field_num].adtid;
return res->attDescs[field_num].typid;
else
return InvalidOid;
}

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: libpq-fe.h,v 1.33 1998/07/13 02:41:59 momjian Exp $
* $Id: libpq-fe.h,v 1.34 1998/07/13 16:35:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -76,8 +76,8 @@ extern "C"
typedef struct pgresAttDesc
{
char *name; /* type name */
Oid adtid; /* type id */
short adtsize; /* type size */
Oid typid; /* type id */
short typlen; /* type size */
int atttypmod; /* type-specific modifier info */
} PGresAttDesc;

View File

@@ -223,7 +223,7 @@ mylog("getCharPrecision: type=%d, col=%d, unknown = %d\n", type,col,handle_unkno
if (stmt->manual_result) {
flds = result->fields;
if (flds)
return flds->adtsize[col];
return flds->typlen[col];
else
return maxsize;
}