March 6th, 2011 by depesz | Tags: alter, alter table, char, length, limit, pg91, postgresql, text, type, varchar | No comments »
On 12th of February, Robert Haas committed patch: Teach ALTER TABLE .. SET DATA TYPE to avoid some table rewrites. When the old type is binary coercible to the new type and the using clause does not change ...
March 2nd, 2010 by depesz | Tags: char, constraint, datatype, domain, length, postgresql, text, trigger, varchar | 39 comments »
Fight! But more seriously - people tend to use various data types, and there have been some myths about them, so let's see how it really boils down. First of all - All those data types are internally saved using the same ...
February 10th, 2009 by depesz | Tags: gotcha, length, lpad, postgresql, repeat, rpad, trim, truncate | 4 comments »
I was lately writing some program for a client of mine, which used UPC codes matching. Since the codes are given in various ways, there was decision to pad the codes with leading zeros - up to 12 characters. The code has ...
