Sun, 17 Apr 2022 11:22:34 +0200
add pg_vfs_io_tell
src/server/plugins/postgresql/vfs.c | file | annotate | diff | comparison | revisions | |
src/server/plugins/postgresql/vfs.h | file | annotate | diff | comparison | revisions |
--- a/src/server/plugins/postgresql/vfs.c Sun Apr 17 11:19:13 2022 +0200 +++ b/src/server/plugins/postgresql/vfs.c Sun Apr 17 11:22:34 2022 +0200 @@ -640,6 +640,12 @@ return lo_lseek64(pgvfs->connection, pg->fd, offset, whence); } +off_t pg_vfs_io_tell(SYS_FILE fd) { + PgVFS *pgvfs = fd->ctx->vfs->instance; + PgFile *pg = fd->data; + return lo_tell64(pgvfs->connection, pg->fd); +} + void pg_vfs_io_close(SYS_FILE fd) { pool_handle_t *pool = fd->ctx->pool; PgFile *pg = fd->data;
--- a/src/server/plugins/postgresql/vfs.h Sun Apr 17 11:19:13 2022 +0200 +++ b/src/server/plugins/postgresql/vfs.h Sun Apr 17 11:22:34 2022 +0200 @@ -116,6 +116,7 @@ ssize_t pg_vfs_io_pread(SYS_FILE fd, void *buf, size_t nbyte, off_t offset); ssize_t pg_vfs_io_pwrite(SYS_FILE fd, const void *buf, size_t nbyte, off_t offset); off_t pg_vfs_io_seek(SYS_FILE fd, off_t offset, int whence); +off_t pg_vfs_io_tell(SYS_FILE fd); void pg_vfs_io_close(SYS_FILE fd);