Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 0317A17B105B for ; Fri, 11 May 2012 17:05:18 -0300 (ADT) Received: from plane.gmane.org ([80.91.229.3]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SSw5V-0000ir-Qc for pgsql-sql@postgresql.org; Fri, 11 May 2012 20:05:18 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SSw5I-0005C5-Ck for pgsql-sql@postgresql.org; Fri, 11 May 2012 22:05:04 +0200 Received: from ppp-188-174-5-97.dynamic.mnet-online.de ([188.174.5.97]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 May 2012 22:05:04 +0200 Received: from spam_eater by ppp-188-174-5-97.dynamic.mnet-online.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 May 2012 22:05:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: Thomas Kellerer Subject: Re: Finding Max Value in a Row Date: Fri, 11 May 2012 22:05:24 +0200 Lines: 19 Message-ID: References: <00ee01cd2fab$1b528b80$51f7a280$@yahoo.com> <4FAD6BFE.3090905@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ppp-188-174-5-97.dynamic.mnet-online.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 In-Reply-To: X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201205/20 X-Sequence-Number: 36568 Carlos Mennens wrote on 11.05.2012 21:53: > Very good question and asked by myself to the original SQL author and > he explained while he didn't use the most efficient data types, he > used ones "he" felt would be more transparent across a multitude of > RDBMS vendors. So the answer is no, it would not be an issue > considering I use and will always use PostgreSQL. If someone else uses > a different vendor, they can manage that import/export process then. You should tell those people that char is a bad choice in _any_ DBMS due to the padding that is involved. varchar would have been slightly better. But it's never, ever a good idea to store numbers in a character column. *Every* RDBMS has some kind of integer datatype (they might just have different names).