From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jeff Davis <list-pgsql-general(at)empires(dot)org> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: missed features and unhappy changes when pg 7.1->7.2 |
Date: | 2002-09-20 14:37:22 |
Message-ID: | 16133.1032532642@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Jeff Davis <list-pgsql-general(at)empires(dot)org> writes:
> A fair number of people were a little bugged about the change from silent
> truncation to throwing an error, including me.
BTW, after further study of the SQL spec we concluded that we still
didn't have it quite right. 7.3 will throw an error only during
implicit coercion to char(N) or varchar(N); an explicit coercion will
silently truncate. For example:
update foo set varchar4col = '12345'; -- throws error
update foo set varchar4col = '12345'::varchar(4); -- stores '1234'
Dunno if this will help either of you at this point; you've probably
already changed your apps to not need it.
>> And yet, what is the Right Way to deal with timestamp?
> Try, for example, replacing "timestamp" with datetime in the query you
> showed me.
Datetime is an obsolete alias for timestamptz ... it will go away in
7.3, so I'd recommend not using it now ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2002-09-20 14:38:25 | Re: timestamp parse error |
Previous Message | Stephan Szabo | 2002-09-20 14:34:44 | Re: missed features and unhappy changes when pg 7.1->7.2 |