src/server/plugins/postgresql/vfs.c

branch
webdav
changeset 347
b6d71e504294
parent 346
784b24381bed
child 350
abba342112c2
equal deleted inserted replaced
346:784b24381bed 347:b6d71e504294
132 returning resource_id, lastmodified, creationdate;"; 132 returning resource_id, lastmodified, creationdate;";
133 133
134 // Update resource metadata 134 // Update resource metadata
135 // params: $1: resource_id 135 // params: $1: resource_id
136 // $2: contentlength 136 // $2: contentlength
137 static const char *sql_update_resource = "update Resource set contentlength = $2, lastmodified = now() where resource_id = $1;"; 137 static const char *sql_update_resource = "update Resource set contentlength = $2, lastmodified = now(), etag = gen_random_uuid() where resource_id = $1;";
138 138
139 // Delete a resource 139 // Delete a resource
140 // params: $1: resource_id 140 // params: $1: resource_id
141 static const char *sql_delete_res = "delete from Resource where parent_id is not null and resource_id = $1;"; 141 static const char *sql_delete_res = "delete from Resource where parent_id is not null and resource_id = $1;";
142 142

mercurial