Re: [GENERAL] Trigger / constraint issue

2012-12-06 Thread Adrian Klaver
On 12/06/2012 10:31 AM, Glenn Pierce wrote: OK I have got it down to a simple test #connect_string = 'dbname=bmos user=bmos' connect_string = 'dbname=bmos user=postgres' if __name__ == "__main__": conn = psycopg2.connect(connect_string) cur = conn.cursor(cursor_factory=psycopg2.extras

Re: [GENERAL] Trigger / constraint issue

2012-12-06 Thread Glenn Pierce
OK I have got it down to a simple test #connect_string = 'dbname=bmos user=bmos' connect_string = 'dbname=bmos user=postgres' if __name__ == "__main__": conn = psycopg2.connect(connect_string) cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) cur.execute("INSERT INTO senso

Re: [GENERAL] Trigger / constraint issue

2012-12-05 Thread Adrian Klaver
On 12/05/2012 02:24 PM, Glenn Pierce wrote: The error I get is new row for relation "sensor_values_2011q3" violates check constraint "sensor_values_2011q3_timestamp_check"CONTEXT: SQL statement "INSERT INTO sensor_values_2011q3 VALUES (NEW.*)"PL/pgSQL function "sensor_values_timestamp_sensor_

[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