mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
Autoconfiscate selection of 64-bit int type for 64-bit large object API.
Get rid of the fundamentally indefensible assumption that "long long int" exists and is exactly 64 bits wide on every platform Postgres runs on. Instead let the configure script select the type to use for "pg_int64". This is a bit of a pain in the rear since we do not want to pollute client namespace with all the random symbols that pg_config.h defines; instead we have to create a separate generated header file, "pg_config_ext.h". But now that the infrastructure is there, we might have the ability to add some other stuff that's long been wanting in this area.
This commit is contained in:
@@ -507,24 +507,21 @@ extern unsigned char *PQescapeBytea(const unsigned char *from, size_t from_lengt
|
||||
|
||||
/* === in fe-print.c === */
|
||||
|
||||
extern void
|
||||
PQprint(FILE *fout, /* output stream */
|
||||
extern void PQprint(FILE *fout, /* output stream */
|
||||
const PGresult *res,
|
||||
const PQprintOpt *ps); /* option structure */
|
||||
|
||||
/*
|
||||
* really old printing routines
|
||||
*/
|
||||
extern void
|
||||
PQdisplayTuples(const PGresult *res,
|
||||
extern void PQdisplayTuples(const PGresult *res,
|
||||
FILE *fp, /* where to send the output */
|
||||
int fillAlign, /* pad the fields with spaces */
|
||||
const char *fieldSep, /* field separator */
|
||||
int printHeader, /* display headers? */
|
||||
int quiet);
|
||||
|
||||
extern void
|
||||
PQprintTuples(const PGresult *res,
|
||||
extern void PQprintTuples(const PGresult *res,
|
||||
FILE *fout, /* output stream */
|
||||
int printAttName, /* print attribute names */
|
||||
int terseOutput, /* delimiter bars */
|
||||
@@ -539,21 +536,18 @@ extern int lo_close(PGconn *conn, int fd);
|
||||
extern int lo_read(PGconn *conn, int fd, char *buf, size_t len);
|
||||
extern int lo_write(PGconn *conn, int fd, const char *buf, size_t len);
|
||||
extern int lo_lseek(PGconn *conn, int fd, int offset, int whence);
|
||||
extern pg_int64 lo_lseek64(PGconn *conn, int fd, pg_int64 offset, int whence);
|
||||
extern Oid lo_creat(PGconn *conn, int mode);
|
||||
extern Oid lo_create(PGconn *conn, Oid lobjId);
|
||||
extern int lo_tell(PGconn *conn, int fd);
|
||||
extern pg_int64 lo_tell64(PGconn *conn, int fd);
|
||||
extern int lo_truncate(PGconn *conn, int fd, size_t len);
|
||||
extern int lo_truncate64(PGconn *conn, int fd, pg_int64 len);
|
||||
extern int lo_unlink(PGconn *conn, Oid lobjId);
|
||||
extern Oid lo_import(PGconn *conn, const char *filename);
|
||||
extern Oid lo_import_with_oid(PGconn *conn, const char *filename, Oid lobjId);
|
||||
extern int lo_export(PGconn *conn, Oid lobjId, const char *filename);
|
||||
|
||||
#ifdef HAVE_PG_INT64
|
||||
extern pg_int64 lo_lseek64(PGconn *conn, int fd, pg_int64 offset, int whence);
|
||||
extern pg_int64 lo_tell64(PGconn *conn, int fd);
|
||||
extern int lo_truncate64(PGconn *conn, int fd, pg_int64 len);
|
||||
#endif
|
||||
|
||||
/* === in fe-misc.c === */
|
||||
|
||||
/* Get the version of the libpq library in use */
|
||||
|
||||
Reference in New Issue
Block a user