Received: from mail01.phoenixdsl.com (mail.phoenixdsl.com [216.178.151.24]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f03IB8706903 for ; Wed, 3 Jan 2001 13:11:08 -0500 (EST) (envelope-from mdavis@sevainc.com) Received: (qmail 24080 invoked by uid 89); 3 Jan 2001 18:11:41 -0000 Received: from unknown (HELO SALLY) (64.32.157.45) by 0 with SMTP; 3 Jan 2001 18:11:41 -0000 Received: by localhost with Microsoft MAPI; Wed, 3 Jan 2001 11:11:40 -0700 Message-ID: <01C07575.F26395D0.mdavis@sevainc.com> From: Michael Davis Reply-To: "mdavis@sevainc.com" To: "'pgsql-sql@postgresql.org'" , "'pgsql-admin@postgresql.org'" , "'pgsql-interfaces@postgresql.org'" , "'pgsql-general@postgresql.org'" Subject: Numeric and money Date: Wed, 3 Jan 2001 11:11:36 -0700 Organization: Seva Inc. X-Mailer: Microsoft Internet E-mail/MAPI - 8.0.0.4211 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Archive-Number: 200101/17 X-Sequence-Number: 387 Hello Everyone, I am in the process of migrating my Access97 application to PostgreSQL. So far everything looks great with one exception. I converted my currency fields in Access to numeric(9,2) as recommended in the PostgreSQL documentation. Many things to don't play well with the numeric the data type. Here are some examples: create table tst (id int, amount numeric(9,2)); insert into tst values (1, 1.10); insert into tst values (2, 1.00); insert into tst values (2, 2.00); select * from tst where amount = 1; -- works select * from tst where amount = 1.1; -- fails select * from tst where amount = 1.10; -- fails select amount::varchar from tst; -- fails select amount::money from tst; -- fails select id || ', ' || id from tst; -- works select id || ', ' || amount from tst; -- fails