Code

collectd_insert.sql: Use timestamptz rather than timestamp.
authorSebastian Harl <sh@tokkee.org>
Thu, 15 Nov 2012 14:14:45 +0000 (15:14 +0100)
committerSebastian Harl <sh@tokkee.org>
Thu, 15 Nov 2012 14:14:45 +0000 (15:14 +0100)
Don't want to get messed-up values after daylight-savings changes.

contrib/postgresql/collectd_insert.sql

index 778de864eed13606e45bda2ab7f0a9b8f8e09944..fb44bb4fe82bdc7f68cfc53a8263e8c260208b93 100644 (file)
@@ -85,7 +85,7 @@ CREATE INDEX identifiers_type_inst ON identifiers USING btree (type_inst);
 
 CREATE TABLE "values" (
     id integer NOT NULL,
-    tstamp timestamp without time zone NOT NULL,
+    tstamp timestamp with time zone NOT NULL,
     name character varying(64) NOT NULL,
     value double precision NOT NULL
 );
@@ -188,7 +188,7 @@ CREATE TRIGGER insert_values_trigger
 -- SET constraint_exclusion = on;
 
 CREATE OR REPLACE FUNCTION collectd_insert(
-        timestamp, character varying,
+        timestamp with time zone, character varying,
         character varying, character varying,
         character varying, character varying,
         character varying[], character varying[], double precision[]