Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCcX9-0000Va-Bj for pgsql-general@arkaria.postgresql.org; Thu, 09 Nov 2017 02:25:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eCcX8-0000Vn-OH for pgsql-general@arkaria.postgresql.org; Thu, 09 Nov 2017 02:25:34 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eCcX7-0000VL-Re for pgsql-general@postgresql.org; Thu, 09 Nov 2017 02:25:34 +0000 Received: from mail-pg0-x22c.google.com ([2607:f8b0:400e:c05::22c]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1eCcX4-0007sY-GD for pgsql-general@postgresql.org; Thu, 09 Nov 2017 02:25:32 +0000 Received: by mail-pg0-x22c.google.com with SMTP id y5so3498429pgq.7 for ; Wed, 08 Nov 2017 18:25:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lucee-org.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=e535e3LYr+Yznc105+TkHC4oUHoYPLRTMEG40SgtIwM=; b=AZmklOqRz3w/P9zDCBKvc8bvE1puyTXU8Mfc9WUx4x9dCzLN+XiLwpBlmyLVXmlASs 99YexiMdFf0L/L8JaZ9D11fpBYX4Zb5trvdV2p3TnxdfR1DD5Xp1kcIC/tYiqtdDNGcc b01YHUYrPFWa4+tOnbVFU+F8yL1be2hexjFdQrVwVWlsa6JY4YPlHHJ0IqH/OtIKDivu Tb3QpGiXpOJA4XwoHtSbScmsVgPGCMAiLgxqPpsExQoPaWsV9LK6DDGc6oEH02ytCIfl i5iT2pRlwqh8gskrzF/cJnP7aCc/HI2GOdJJCI7VkBYwqb83bi9+1cE04AZAY9prxcUy lMnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=e535e3LYr+Yznc105+TkHC4oUHoYPLRTMEG40SgtIwM=; b=FFi22sViMuVTl6y0SMurrkr7Ly2pSBtMNx/czsQ7sqvDKwwEOiavmhamZr/A4Jkkcm pMQryYMrHJlW+fZsp0C6omGRCltjzygb4gqxwphCuUiCyySWNDtP5rztJ2Cwbc1bfMyf Lus65Z+vCUI2RUoeTCoVAgpHrkA/xAe+UZobpVmnLPQwIjR7Qjk1ZlfnGA1EOHiOBkNq nefn+/wGJpJwf3fnG7oNsXyF5zW361HzcJqnsPexbHm6NqXbEBnXKy3087kbQZCfgG+u 1qIOKlY9vJiL1R2eJgZJUPvORCBuPfO6akWw1olovyomwAlRfoe7TQKlylS5voAygndn 3S9g== X-Gm-Message-State: AJaThX5HvXZugWywdn0+aYXrYK8EPRfCBSn/5OTWbMczzS4W7nXQPRLt 0rrHqWLcWrpJv4ZZrH2YSWjmDKDJ X-Google-Smtp-Source: ABhQp+S+didQ51dgrlA4uwTKQ9OlpomrDDQjc96Qjd1qauxEqgVQw1xFxr/grn2PiK4yiee3qe6Oww== X-Received: by 10.159.216.130 with SMTP id s2mr2229353plp.347.1510194328670; Wed, 08 Nov 2017 18:25:28 -0800 (PST) Received: from [192.168.1.15] (45-19-167-161.lightspeed.irvnca.sbcglobal.net. [45.19.167.161]) by smtp.googlemail.com with ESMTPSA id c184sm10276502pfg.35.2017.11.08.18.25.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Nov 2017 18:25:27 -0800 (PST) Subject: Re: Migrating money column from MS SQL Server to Postgres To: Allan Kamau Cc: Postgres General Postgres General References: <8acca674-ac7c-2b48-9a3e-8b8acf8b2c36@lucee.org> <4497.1510188301@sss.pgh.pa.us> <4b6a0bfb-0cbc-b407-feaa-0be86f06e4d9@lucee.org> From: "Igal @ Lucee.org" Message-ID: Date: Wed, 8 Nov 2017 18:25:24 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------F2866382B1E2976134930C1D" Content-Language: en-US List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org This is a multi-part message in MIME format. --------------F2866382B1E2976134930C1D Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 11/8/2017 5:27 PM, Allan Kamau wrote: > Maybe using NUMERIC without explicitly stating the precision is > recommended. This would allow for values with many decimal places to > be accepted without truncation. Your field may need to capture very > small values such as those in bitcoin trading or some banking fee or > interest. That's a very good idea.  For some reason I thought that I tried that earlier and it didn't work as expected, but I just tested it (again?) and it seems to work well, so that's what I'll do. Thank you, Igal Sapir Lucee Core Developer Lucee.org --------------F2866382B1E2976134930C1D Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit On 11/8/2017 5:27 PM, Allan Kamau wrote:
Maybe using NUMERIC without explicitly stating the precision is recommended. This would allow for values with many decimal places to be accepted without truncation. Your field may need to capture very small values such as those in bitcoin trading or some banking fee or interest.

That's a very good idea.  For some reason I thought that I tried that earlier and it didn't work as expected, but I just tested it (again?) and it seems to work well, so that's what I'll do.

Thank you,

Igal Sapir
Lucee Core Developer
Lucee.org

--------------F2866382B1E2976134930C1D--