Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / General PostgreSQL Topics / November 2006

Tip: Looking for answers? Try searching our database.

money Data Type and pgadmin frustrations

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark Drummond - 04 Nov 2006 21:19 GMT
1. I'm trying to use the money data type in a table. Just playing around
with this stuff. I have a table with two fields defined, a varchar field
for an identifier, and a single money field. Using pgadmin, I am unable
to enter any reasonable value in the money field. pgadmin will not allow
me to include the "$" character. And it bitches about not being able to
cast and INT to type money if I just put a plain number in.

How do I put a monetary value in this field?

2. When building a new table, if I create a field that is technically
incorrect (e.g., a money field with a default value of "0"), pgadmin
doesn't say anything about it until I try to save the new table. Then it
errors. But I cannot then edit the broken field. I have to delete the
field and try again.

I am trying very hard to move from MySQL to PostgreSQL, for many
reasons. But pgadmin is being a huge pain in the a.s.
Mark Drummond - 04 Nov 2006 21:26 GMT
> 1. I'm trying to use the money data type in a table. Just playing around
> with this stuff. I have a table with two fields defined, a varchar field
[quoted text clipped - 4 lines]
>
> How do I put a monetary value in this field?

Scratch that one ... I just saw I should be using numeric or decimal.
But even that is a problem ... the docs talk about precision and scale.
The pgadmin interface, for numeric type, has length and precision. Is
length supposed to be scale? The wording sucks.

> 2. When building a new table, if I create a field that is technically
> incorrect (e.g., a money field with a default value of "0"), pgadmin
[quoted text clipped - 4 lines]
> I am trying very hard to move from MySQL to PostgreSQL, for many
> reasons. But pgadmin is being a huge pain in the a.s.
Mark Drummond - 04 Nov 2006 21:33 GMT
>> 1. I'm trying to use the money data type in a table. Just playing
>> around with this stuff. I have a table with two fields defined, a
[quoted text clipped - 10 lines]
> The pgadmin interface, for numeric type, has length and precision. Is
> length supposed to be scale? The wording sucks.

I'm sure this is common knowledge, but what pgadmin calls the "length"
of a numeric is what the docs call the "precision" and what pgadmin
calls the "precision" is what the docs call the scale.

>> 2. When building a new table, if I create a field that is technically
>> incorrect (e.g., a money field with a default value of "0"), pgadmin
[quoted text clipped - 4 lines]
>> I am trying very hard to move from MySQL to PostgreSQL, for many
>> reasons. But pgadmin is being a huge pain in the a.s.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.