diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2012-04-19 15:17:58 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2012-04-19 15:17:58 +0200 |
commit | 018784958ae6a4e77b23a5ddfe7959123afcadff (patch) | |
tree | d953a914269041cd210513f9cd7922e70f2e950c /pgsql.h | |
parent | a5923caf474983e14477498117fabb041805fd04 (diff) | |
download | pgfuse-018784958ae6a4e77b23a5ddfe7959123afcadff.tar.gz pgfuse-018784958ae6a4e77b23a5ddfe7959123afcadff.tar.bz2 |
added a first multi-threaded version with a databse pool
Diffstat (limited to 'pgsql.h')
-rw-r--r-- | pgsql.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -26,6 +26,8 @@ #include <libpq-fe.h> /* for Postgresql database access */ +/* --- metadata stored about a file/directory/synlink --- */ + typedef struct PgMeta { size_t size; /* the size of the file */ mode_t mode; /* type and permissions of file/directory */ @@ -37,6 +39,7 @@ typedef struct PgMeta { int ref_count; /* how many open file handles exist for this file */ } PgMeta; +/* --- transaction management and policies --- */ #define PSQL_BEGIN( T ) \ { \ int __res; \ @@ -64,6 +67,8 @@ int psql_commit( PGconn *conn ); int psql_rollback( PGconn *conn ); +/* --- the filesystem functions --- */ + int psql_get_meta( PGconn *conn, const char *path, PgMeta *meta ); int psql_write_meta( PGconn *conn, const int id, const char *path, PgMeta meta ); |