aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2025-03-25 20:17:53 +1300
committerThomas Munro <tmunro@postgresql.org>2025-03-25 21:40:00 +1300
commit3c86223c998280ea313480d319ec39f802453218 (patch)
tree191c1546be748662e8e458f407264cc04e975bb1 /doc/src
parentbe1cc9aaf5b79f07bc0483a0c95366c77a844d0a (diff)
downloadpostgresql-3c86223c998280ea313480d319ec39f802453218.tar.gz
postgresql-3c86223c998280ea313480d319ec39f802453218.zip
libpq: Deprecate pg_int64.
Previously we used pg_int64 in three function prototypes in libpq. It was added by commit 461ef73f to expose the platform-dependent type used for int64 in the C89 era. As of commit 962da900 it is defined as standard int64_t, and the dust seems to have settled. Let's just use int64_t directly in these three client-facing functions instead of (yet) another name. We've required C99 and thus <stdint.h> since PostgreSQL 12, C89 and C++98 compilers are long gone, and client applications very likely use standard types for their own 64-bit needs. This also cleans up the obscure placement of a new #include <stdint.h> directive in postgres_ext.h, required for the new definition. The typedef was hiding in there for historical reasons, but it doesn't fit postgres_ext.h's own description of its purpose and there is no evidence of client applications including postgres_ext.h directly to see it. Keep a typedef marked deprecated for backward compatibility, but move it into libpq-fe.h where it was used. Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/CA%2BhUKGKn_EkNNGMY5RzMcKP%2Ba6urT4JF%3DCPhw_zHtQwjvX6P2g%40mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/libpq.sgml2
-rw-r--r--doc/src/sgml/lobj.sgml6
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 8fa0515c6a0..b359fbff295 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -522,7 +522,7 @@ switch(PQstatus(conn))
sequence described in the documentation of
<xref linkend="libpq-PQconnectStartParams"/>.
<synopsis>
-typedef pg_int64 pg_usec_time_t;
+typedef int64_t pg_usec_time_t;
int PQsocketPoll(int sock, int forRead, int forWrite,
pg_usec_time_t end_time);
diff --git a/doc/src/sgml/lobj.sgml b/doc/src/sgml/lobj.sgml
index 083a83b5be8..79731c6553f 100644
--- a/doc/src/sgml/lobj.sgml
+++ b/doc/src/sgml/lobj.sgml
@@ -398,7 +398,7 @@ int lo_lseek(PGconn *conn, int fd, int offset, int whence);
When dealing with large objects that might exceed 2GB in size,
instead use
<synopsis>
-pg_int64 lo_lseek64(PGconn *conn, int fd, pg_int64 offset, int whence);
+int64_t lo_lseek64(PGconn *conn, int fd, int64_t offset, int whence);
</synopsis>
This function has the same behavior
as <function>lo_lseek</function>, but it can accept an
@@ -434,7 +434,7 @@ int lo_tell(PGconn *conn, int fd);
When dealing with large objects that might exceed 2GB in size,
instead use
<synopsis>
-pg_int64 lo_tell64(PGconn *conn, int fd);
+int64_t lo_tell64(PGconn *conn, int fd);
</synopsis>
This function has the same behavior
as <function>lo_tell</function>, but it can deliver a result larger
@@ -485,7 +485,7 @@ int lo_truncate(PGconn *conn, int fd, size_t len);
When dealing with large objects that might exceed 2GB in size,
instead use
<synopsis>
-int lo_truncate64(PGconn *conn, int fd, pg_int64 len);
+int lo_truncate64(PGconn *conn, int fd, int64_t len);
</synopsis>
This function has the same
behavior as <function>lo_truncate</function>, but it can accept a