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

Re: Finding Max Value in a Row

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Finding Max Value in a Row
Date: 2012-05-11 20:05:24
Message-ID: jojrc9$uof$2@dough.gmane.org (view raw or flat)
Thread:
Lists: pgsql-sql
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).


  



In response to

pgsql-sql by date

Next:From: Viktor BojovićDate: 2012-05-11 20:42:38
Subject: Re: Finding Max Value in a Row
Previous:From: Thomas KellererDate: 2012-05-11 20:00:52
Subject: Re: Finding Max Value in a Row

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