Re: [GENERAL] Simple query fail

2017-10-17 Thread Glenn Pierce
Ok I needed a ::timestamptz at time zone 'UTC' and a >= :) On 17 October 2017 at 22:29, Glenn Pierce wrote: > Hi so I have a simple table as > > \d sensor_values_days; > Table "public.sensor_values_days" > Column |

[GENERAL] Simple query fail

2017-10-17 Thread Glenn Pierce
Hi so I have a simple table as \d sensor_values_days; Table "public.sensor_values_days" Column | Type | Modifiers ---+--+-- ts| timestamp with time zone | not null value | d

Re: [GENERAL] timezone datetime issue

2014-04-16 Thread Glenn Pierce
Although I guess something like this would do it ? UPDATE sensor_values ts = ts - interval (1 hour) WHERE ts BETWEEN ('2014-03-30 01:00', '2014-10-26 02:00') On 16 April 2014 11:56, Glenn Pierce wrote: > Hi I have an issue with adjusting a timestamp. > > I have a

[GENERAL] timezone datetime issue

2014-04-16 Thread Glenn Pierce
Hi I have an issue with adjusting a timestamp. I have a table like CREATE TABLE sensor_values ( ts timestamp with time zone NOT NULL, value double precision NOT NULL DEFAULT 'NaN'::real, ) It was intended that ts timestamps would be the time we wanted to store in UTC. Clients would

[GENERAL] Passing array of range literals

2014-03-21 Thread Glenn Pierce
Hi I am try to create a function that returns true if a timestamp is within working hours. The function will take the following parameters. 1, timestamp - The timestamp I want to check 2, days_of_week - An array of integers that tells us what days are work days. 3, time_ranges - An array of my c

[GENERAL] Case insensitive hstore.

2013-02-15 Thread Glenn Pierce
Hi Does anyone know how one would select from a table with a hstore field treating the key of the hstore as case insensitive. ie SELECT id, lower(additional_info->'type') AS type FROM table I would like this to work even if if the store tyoe is 'Type' -> 'original' failing that is there a wa

Re: [GENERAL] Trigger / constraint issue

2012-12-06 Thread Glenn Pierce
ent "INSERT INTO sensor_values_2010q4 VALUES ( $1 .*)" PL/pgSQL function "sensor_values_timestamp_sensor_func_insert_trigger" line 25 at SQL statement Why does the connecting user effect things ? On 6 December 2012 16:34, Glenn Pierce wrote: > so the issue comes down to this

[GENERAL] Trigger / constraint issue

2012-12-05 Thread Glenn Pierce
Hi I wonder if someone can help me I am getting a bit confused about an error I am getting. I have a partitioned table called sensor_values which is partitioned on a timestamp entry. The parent and some of the child tables are defined like so (The child tables are yearly quarters and in my actual