pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
SQL function to validate money input
2+ messages / 2 participants
[nested] [flat]

* SQL function to validate money input
@ 2003-10-15 21:46  Zhao, Scott <scott.zhao@usask.ca>
  0 siblings, 1 reply; 2+ messages in thread

From: Zhao, Scott @ 2003-10-15 21:46 UTC (permalink / raw)
  To: pgsql-sql

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.
 
Thanks 
 
Scott
 

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: SQL function to validate money input
@ 2003-10-16 12:50  Richard Huxton <dev@archonet.com>
  parent: Zhao, Scott <scott.zhao@usask.ca>
  0 siblings, 0 replies; 2+ messages in thread

From: Richard Huxton @ 2003-10-16 12:50 UTC (permalink / raw)
  To: Zhao, Scott <scott.zhao@usask.ca>; 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-10-16 12:50 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-15 21:46 SQL function to validate money input Zhao, Scott <scott.zhao@usask.ca>
2003-10-16 12:50 ` Richard Huxton <dev@archonet.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox