summaryrefslogtreecommitdiff
path: root/pgsql.h
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-04-19 15:17:58 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-04-19 15:17:58 +0200
commit018784958ae6a4e77b23a5ddfe7959123afcadff (patch)
treed953a914269041cd210513f9cd7922e70f2e950c /pgsql.h
parenta5923caf474983e14477498117fabb041805fd04 (diff)
downloadpgfuse-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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/pgsql.h b/pgsql.h
index c5d4b2f..daab34b 100644
--- a/pgsql.h
+++ b/pgsql.h
@@ -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 );