so what do you call a Linux Apache Postgresql Perl setup?
LAPP?
i always wondered why so many people used MySQL.
admittedly i started using it when i started playing with databases but i always wanted to play with Postgres and this app i am writing is allowing me to do that.
i started using MySQL initially but it was not co-operating properly so i switched to SQLite but then that was getting annoying cause Catalyst::Plugin::DBIC::Schema wasnt generating Classes for the views i was using.
so i wanted to avoid MySQL and it not working gave me a decent excuse to do that so i ported the DB to Postgres and all is happy and i get generated classes for my views. (i don't actually use the generated classes in the app but its nice to have them as reference and i just copy them across to the actual classes when i change the DB.)
oh yeah the extra perl goodness.
(yeah i rambled again hence the title of the blog)
i needed some functions in the DB to generate totals and percentages an such and conditionally adding delivery costs to the totals.
then i hit a snag cause using the Pg money data type is really annoying cause when you want to do division it refuses to work and i cant seem to cast it as anything else and division is kinda essential when doing percentages.
so i went looking for docs on how to cast money as something useful and discovered that the money data type is being phased out (probably due to the problems i encountered) but i found this plperl function (thanks dude if you ever read this) to convert money to numeric (which can be basically setup like money but without the currency tag on the front)
so i imported it and it worked like a charm.
so i thought i would try writing the functions in plperl and they are short but do exactly what i needed.
and now i am thinking i should have planned the thing a bit better and did this from the start.
but then i wouldn't have had the fun of learning as i go which is how my brain works.
ok i am gonna run off and install Kubuntu Edgy i386 so i can play with the test release of KDE4.
(i already have an Edgy install but it is amd64 and the KDE4 testing packages only got released on i386)
Friday, September 08, 2006
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment