CAST truncates without warning

From: Mike G <mike(at)thegodshalls(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: CAST truncates without warning
Date: 2004-05-13 20:44:15
Message-ID: 20040513204415.GA22637@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

If a column, data type text, with 22 characters of data, is then CAST(column_name as varchar(20)) shouldn't a warning or error be generated?

If the source is a variable defined as text instead of directly from a table, using plpsql, would that matter?

Mike

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-05-13 22:50:35 Re: CAST truncates without warning
Previous Message Bruno Wolff III 2004-05-13 20:31:10 Re: setting local time without restarting server