Re: Data Type for Money

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com>
Subject: Re: Data Type for Money
Date: 2011-12-30 17:46:25
Message-ID: 201112300946.25910.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday, December 30, 2011 9:41:18 am Carlos Mennens wrote:
> I'm trying to understand what is the recommended data type for $ in
> PostgreSQL. I've done some research and from what I've gathered, there
> are a few options:
>
> 1. decimal
> 2. money
>
> I've read the 'money' data type is non-standard and I should avoid
> using this. I see it a bunch of Microsoft SQL Server which I assume
> works great but I'm using PostgreSQL and want to make sure I'm ANSI
> SQL compliant. I would normally just use 'decimal' however when I'm in
> doubt, I use pgAdmin3 as a cheat sheet and upon building a new column,
> under 'data type', there is no option for decimal but there is for
> money. I'm very confused as I assumed 'money' was a non-standard
> option for SQL Server and 'decimal' was the correct value but it's not
> an option in the pgAdmin3 GUI.
>
> Any tips and or advice?

My guess is it is listed as numeric which is equivalent to decimal:

http://www.postgresql.org/docs/9.1/interactive/datatype-numeric.html

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Devrim GÜNDÜZ 2011-12-30 17:47:56 Re: Dated Version of PostgreSQL
Previous Message Carlos Mennens 2011-12-30 17:42:59 Re: Dated Version of PostgreSQL