aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-05-09 17:46:11 +0000
committerBruce Momjian <bruce@momjian.us>2001-05-09 17:46:11 +0000
commitb0546a25547f22c44bbaba7bb7f0ef663bb23ffd (patch)
tree1d49866292329a374aed7ed3d880f1dbf5600bf4
parent9668b948f7a8f24b5cf05c114710e23ab146d464 (diff)
downloadpostgresql-b0546a25547f22c44bbaba7bb7f0ef663bb23ffd.tar.gz
postgresql-b0546a25547f22c44bbaba7bb7f0ef663bb23ffd.zip
Fix libpq++'s FieldSize to return int, not short.
-rw-r--r--doc/src/sgml/libpq++.sgml6
-rw-r--r--src/interfaces/libpq++/TODO1
-rw-r--r--src/interfaces/libpq++/pgdatabase.cc6
-rw-r--r--src/interfaces/libpq++/pgdatabase.h6
4 files changed, 9 insertions, 10 deletions
diff --git a/doc/src/sgml/libpq++.sgml b/doc/src/sgml/libpq++.sgml
index d4b53557ddc..2bcb5003f0e 100644
--- a/doc/src/sgml/libpq++.sgml
+++ b/doc/src/sgml/libpq++.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.29 2001/05/09 17:29:09 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.30 2001/05/09 17:46:11 momjian Exp $
-->
<chapter id="libpqplusplus">
@@ -430,7 +430,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.29 2001/05/09 17:29:
Returns the size in bytes of the field associated with the given
field index. Field indices start at 0.
<synopsis>
- short PgDatabase::FieldSize(int field_num) const
+ int PgDatabase::FieldSize(int field_num) const
</synopsis>
Returns the space allocated for this field in a database tuple given
the field number. In other words the size of the server's binary
@@ -444,7 +444,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.29 2001/05/09 17:29:
Returns the size in bytes of the field associated with the given
field index. Field indices start at 0.
<synopsis>
- short PgDatabase::FieldSize(const char *field_name) const
+ int PgDatabase::FieldSize(const char *field_name) const
</synopsis>
Returns the space allocated for this field in a database tuple given
the field name. In other words the size of the server's binary
diff --git a/src/interfaces/libpq++/TODO b/src/interfaces/libpq++/TODO
index 7cf2e4fa17c..8f2ca7082a8 100644
--- a/src/interfaces/libpq++/TODO
+++ b/src/interfaces/libpq++/TODO
@@ -1,5 +1,4 @@
* Implement exceptions
* Many other things I have yet to discover
-* fix getLength to return an int and not a short
diff --git a/src/interfaces/libpq++/pgdatabase.cc b/src/interfaces/libpq++/pgdatabase.cc
index 73eab788629..72cec48cf2f 100644
--- a/src/interfaces/libpq++/pgdatabase.cc
+++ b/src/interfaces/libpq++/pgdatabase.cc
@@ -10,7 +10,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgdatabase.cc,v 1.10 2001/05/09 17:29:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgdatabase.cc,v 1.11 2001/05/09 17:46:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -106,13 +106,13 @@ return PQftype(pgResult, FieldNum(field_name));
}
-short PgDatabase::FieldSize(int field_num) const
+int PgDatabase::FieldSize(int field_num) const
{
return PQfsize(pgResult, field_num);
}
-short PgDatabase::FieldSize(const char* field_name) const
+int PgDatabase::FieldSize(const char* field_name) const
{
return PQfsize(pgResult, FieldNum(field_name));
}
diff --git a/src/interfaces/libpq++/pgdatabase.h b/src/interfaces/libpq++/pgdatabase.h
index 3815a8641e7..2c502bd7847 100644
--- a/src/interfaces/libpq++/pgdatabase.h
+++ b/src/interfaces/libpq++/pgdatabase.h
@@ -14,7 +14,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
*
- * $Id: pgdatabase.h,v 1.10 2001/05/09 17:29:10 momjian Exp $
+ * $Id: pgdatabase.h,v 1.11 2001/05/09 17:46:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -51,8 +51,8 @@ public:
int FieldNum(const char* field_name) const;
Oid FieldType(int field_num) const;
Oid FieldType(const char* field_name) const;
- short FieldSize(int field_num) const;
- short FieldSize(const char* field_name) const;
+ int FieldSize(int field_num) const;
+ int FieldSize(const char* field_name) const;
const char* GetValue(size_type tup_num, int field_num) const;
const char* GetValue(size_type tup_num, const char* field_name) const;
bool GetIsNull(size_type tup_num, int field_num) const;