pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedhandling money type
3+ messages / 3 participants
[nested] [flat]
* handling money type
@ 2005-10-27 06:05 padmanabha konkodi <konkodi221@rediffmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: padmanabha konkodi @ 2005-10-27 06:05 UTC (permalink / raw)
To: pgsql-sql
hello developers,
i have facing one major problem handling sql money dataType in the java
i have tried many permutation and combination but still i dint got correct data type to use in java to pass money data
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: handling money type
@ 2005-10-27 09:14 Richard Huxton <dev@archonet.com>
parent: padmanabha konkodi <konkodi221@rediffmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Richard Huxton @ 2005-10-27 09:14 UTC (permalink / raw)
To: padmanabha konkodi <konkodi221@rediffmail.com>; +Cc: pgsql-sql
padmanabha konkodi wrote:
> hello developers,
>
> i have facing one major problem handling sql money dataType in the
> java
>
> i have tried many permutation and combination but still i dint got
> correct data type to use in java to pass money data
Have you tried PG's "numeric" type? What problems did you encounter with it?
--
Richard Huxton
Archonet Ltd
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: handling money type
@ 2005-10-27 15:34 codeWarrior <gpatnude@hotmail.com>
parent: padmanabha konkodi <konkodi221@rediffmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: codeWarrior @ 2005-10-27 15:34 UTC (permalink / raw)
To: pgsql-sql
The SQL data type "money" in postgreSQL was deprecated several versions
ago... however -- it is still available in the system. The definitions is:
CREATE TYPE money
(INPUT=cash_in, OUTPUT=cash_out, DEFAULT='',
INTERNALLENGTH=4, ALIGNMENT=int4, STORAGE=PLAIN);
ALTER TYPE money OWNER TO postgres;
COMMENT ON TYPE money IS 'monetary amounts, $d,ddd.cc';
8.2. Monetary Types
Note
The money type is deprecated. Use numeric or decimal instead, in combination
with the to_char function.
The money type stores a currency amount with a fixed fractional precision;
see Table 8.3, "Monetary Types". Input is accepted in a variety of formats,
including integer and floating-point literals, as well as "typical" currency
formatting, such as '$1,000.00'. Output is generally in the latter form but
depends on the locale.
When you "SELECT money('1000');"
the type cast returns: $1,000.00
HTH...
""padmanabha konkodi"" <konkodi221@rediffmail.com> wrote in message
news:20051027060554.19450.qmail@webmail49.rediffmail.com...
hello developers,
i have facing one major problem handling sql money dataType in the java
i have tried many permutation and combination but still i dint got correct
data type to use in java to pass money data
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-10-27 15:34 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-10-27 06:05 handling money type padmanabha konkodi <konkodi221@rediffmail.com>
2005-10-27 09:14 ` Richard Huxton <dev@archonet.com>
2005-10-27 15:34 ` codeWarrior <gpatnude@hotmail.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