summaryrefslogtreecommitdiff
path: root/src/sql
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-08-23 17:28:37 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2025-08-25 16:02:41 +0100
commit7ec58bf3f72fd7e0396a37f43ff023731697ff8a (patch)
tree067bea2150c1efc9423d06e784cd0a19f29f3397 /src/sql
parentb9b25dc52ad73f1be70f42d649b7b52bc4807208 (diff)
downloadwebstat-7ec58bf3f72fd7e0396a37f43ff023731697ff8a.tar.bz2
webstat-7ec58bf3f72fd7e0396a37f43ff023731697ff8a.tar.xz
webstat-7ec58bf3f72fd7e0396a37f43ff023731697ff8a.zip
Store log lines in full using entity ids
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/accessLogInsert.sql4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sql/accessLogInsert.sql b/src/sql/accessLogInsert.sql
new file mode 100644
index 0000000..e0c39b8
--- /dev/null
+++ b/src/sql/accessLogInsert.sql
@@ -0,0 +1,4 @@
+INSERT INTO
+access_log(hostname, virtual_host, remoteip, request_time, method, path, query_string, protocol, status, size, duration,
+ referrer, user_agent)
+VALUES(?, ?, ?, TO_TIMESTAMP(? / 1000000.0) at time zone 'utc', ?, ?, ?, ?, ?, ?, ? * '1us'::interval, ?, ?)