mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-30 19:00:29 +08:00
Rename libpq to use more normal field names.
This commit is contained in:
parent
6ce9c76b0a
commit
8bac4ca87b
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.57 1998/07/13 00:01:44 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.58 1998/07/13 02:41:58 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -498,21 +498,21 @@ getRowDescriptions(PGconn *conn)
|
|||||||
{
|
{
|
||||||
char typName[MAX_MESSAGE_LEN];
|
char typName[MAX_MESSAGE_LEN];
|
||||||
int adtid;
|
int adtid;
|
||||||
int adtsize;
|
int typlen;
|
||||||
int adtmod = -1;
|
int atttypmod = -1;
|
||||||
|
|
||||||
if (pqGets(typName, MAX_MESSAGE_LEN, conn) ||
|
if (pqGets(typName, MAX_MESSAGE_LEN, conn) ||
|
||||||
pqGetInt(&adtid, 4, conn) ||
|
pqGetInt(&adtid, 4, conn) ||
|
||||||
pqGetInt(&adtsize, 2, conn) ||
|
pqGetInt(&typlen, 2, conn) ||
|
||||||
pqGetInt(&adtmod, 4, conn))
|
pqGetInt(&atttypmod, 4, conn))
|
||||||
{
|
{
|
||||||
PQclear(result);
|
PQclear(result);
|
||||||
return EOF;
|
return EOF;
|
||||||
}
|
}
|
||||||
result->attDescs[i].name = strdup(typName);
|
result->attDescs[i].name = strdup(typName);
|
||||||
result->attDescs[i].adtid = adtid;
|
result->attDescs[i].adtid = adtid;
|
||||||
result->attDescs[i].adtsize = (short) adtsize;
|
result->attDescs[i].typlen = (short) typlen;
|
||||||
result->attDescs[i].adtmod = adtmod;
|
result->attDescs[i].atttypmod = atttypmod;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Success! */
|
/* Success! */
|
||||||
@ -1294,7 +1294,7 @@ PQfsize(PGresult *res, int field_num)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (res->attDescs)
|
if (res->attDescs)
|
||||||
return res->attDescs[field_num].adtsize;
|
return res->attDescs[field_num].typlen;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1316,7 +1316,7 @@ PQfmod(PGresult *res, int field_num)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (res->attDescs)
|
if (res->attDescs)
|
||||||
return res->attDescs[field_num].adtmod;
|
return res->attDescs[field_num].atttypmod;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: libpq-fe.h,v 1.32 1998/07/13 00:01:45 momjian Exp $
|
* $Id: libpq-fe.h,v 1.33 1998/07/13 02:41:59 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -78,7 +78,7 @@ extern "C"
|
|||||||
char *name; /* type name */
|
char *name; /* type name */
|
||||||
Oid adtid; /* type id */
|
Oid adtid; /* type id */
|
||||||
short adtsize; /* type size */
|
short adtsize; /* type size */
|
||||||
int adtmod; /* type-specific modifier info */
|
int atttypmod; /* type-specific modifier info */
|
||||||
} PGresAttDesc;
|
} PGresAttDesc;
|
||||||
|
|
||||||
/* use char* for Attribute values,
|
/* use char* for Attribute values,
|
||||||
|
Loading…
Reference in New Issue
Block a user