Re: SQL function to validate money input

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Zhao, Scott" <scott(dot)zhao(at)usask(dot)ca>, pgsql-sql(at)postgresql(dot)org
Subject: Re: SQL function to validate money input
Date: 2003-10-16 12:50:21
Message-ID: 200310161350.21534.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wednesday 15 October 2003 22:46, Zhao, Scott wrote:
> Hi All,
>
> Is there a function available to validate if the input is a correct
> money format? For exapmle, "23.56" is a correct number but "23.567" is
> incorrect. I just like to do this in postgres level not in my
> application code.

Well, you can always write your own, but:

1. How were you planning to use it?
2. What were you planning to do if the value provided isn't valid as money?

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-10-16 14:43:19 Re: Alias-Error
Previous Message R. van Twisk 2003-10-16 06:25:26 Re: Sorting problem