Skip site navigation (1) Skip section navigation (2)

Re: BUG #5281: Timestamp fields not inserting from 8.3 to 8.4

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Jodi Escalante <jescalante(at)assistgroup(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5281: Timestamp fields not inserting from 8.3 to 8.4
Date: 2010-01-15 17:35:14
Message-ID: 4B50A752.6080009@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Jodi Escalante wrote:
> I am erroring out on record number one on the first timestamptz field.  I
> have tested several different tables and they all error out on the
> timestamptz field.  Below is a sample SQL.    
> 
> I downloaded the most recent JDBC driver and that did not help.  
> 
> INSERT INTO assessment (id, created, taken, current_weight, note,
> assessment_type, stay_id, 
> contact_id, estimated_discharge_date, 
> cond_chf, cond_pulm_heart, cond_endocrine_other, cond_skin_temp, ) 
> VALUES ( 50,  2008-01-11 15:06:40.257000 -07:00:00,  
> 2008-01-11 00:00:00.000000 -07:00:00,  2000.0,  NULL,  Initial,  3452, 
> 2147,  NULL,  N,  N,  N,  N) 

Not a bug. You need to quote those timestamps. As in:

INSERT INTO assessment (id, created, taken, current_weight, note,
assessment_type, stay_id,
contact_id, estimated_discharge_date,
cond_chf, cond_pulm_heart, cond_endocrine_other, cond_skin_temp, )
VALUES ( 50,  '2008-01-11 15:06:40.257000 -07:00:00',
'2008-01-11 00:00:00.000000 -07:00:00',  2000.0,  NULL,  Initial,  3452,
2147,  NULL,  N,  N,  N,  N)

-- 
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

In response to

pgsql-bugs by date

Next:From: Kevin GrittnerDate: 2010-01-15 17:38:10
Subject: Re: BUG #5281: Timestamp fields not inserting from 8.3 to 8.4
Previous:From: Jodi EscalanteDate: 2010-01-15 17:23:02
Subject: BUG #5281: Timestamp fields not inserting from 8.3 to 8.4

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group