MainPersonal InfoInterestsRandom FactsJournal
26 Apr 2005
More Monkeys

Whoa, that was a grueling April!

Still got the bluesBut let's start off by saying this: one day I'm gonna get one of those Les Pauls. Especially now that we can safely conclude I'll never be as good as Gary Moore *sighs*. Oh well, at least I'm confident I can beat him in a programming contest at any given time.

Whoa, that was a grueling April! In case you're wondering what could possibly take place in a month, check this out: the Lakers managed to miss the playoffs for the first time in dunno how many years, Ferrari managed to win none of the concluded races, Liverpool and ManU each managed to lose twice, Anwar was outlasted by Scott, Romber wedded, we Catholics got ourselves a new pope, Firefox launched 1.0.3 -- and screwed my fav extension in the process (no worries, it has been fixed since, thank God for good people on the Net) -- and I? I learned more than I could care of about MQSeries, Tuxedo, and WebLogic Server installation on AIX. That, and how to migrate the friggin' data from PostgreSQL 6.5 to version 8.0 -- finally!

About that last one. Yes, it was long overdue. Yes, it was stupid to keep running on 6.5, with so many stability issues and limited features. Yes, it was mainly my own laziness -- as I always say, lazy people invented wheel and computer -- not to have done it sooner, seeing how long it would take.

A bit of background. Starting from version 7 Pg no longer has the datetime data type. The site sadly has utilized this data type a lot. Which wouldn't be so bad if only the conversion into the new timestamp data type were supported. So that's problem #1. Problem #2: even Pg documents suggest using their pg_dump and pg_dumpall tools; unfortunately, the dump output generated from 6.5 can't be imported directly into the newer version, again due to the datetime-timestamp difference. So this is what I came up with -- who knows, someone who stumbles upon this site might find it useful.

But, wait. There's problem #3. After the data migration, I still had to go through hundreds of scripts -- well, technically, grep went through them for me -- because of the newer Pg's slightly different syntax. Other than, obviously, the different formatting functions for timestamp, I found these thus far:

1. LIMIT <limit> OFFSET <offset>, instead of LIMIT <limit>, <offset> -- the OFFSETkeyword is required now if <offset> is specified. Example:
select * from DODOL limit 10 offset 5;

2. SELECT DISTINCT ON(<field name1>) <field name1, field name2, field name 3>, instead of SELECT DISTINCT ON <field name1> <field name1, field name2, field name 3> -- the brackets are required now. Example:
select distinct on(NAME, ADDRESS) NAME, ADDRESS, PHONE from DODOL;

3. Fields specified in the ORDER BY expression must match those in the SELECT DISTINCT ON. That is to say, having a SELECT DISTINCT ON you can't order the result by other fields. I don't know why Pg developers enforce this, but they've been doing a great job so far, so I'm not complaining.

I found more, but at the moment they elude me.

I mentioned the Pope. After all these years I have just realized how powerful Pope is. If this site is anything to go by, 17% of the world population are Roman Catholics, who supposedly acknowledge Pope as their mortal leader. That's more than one billion (American term) living people! Who on paper would do anything Pope told 'em to do. Imagine if he told all Catholics to each donate 50 cents to me. I would end up with more than 500 million bucks! Enough to get me in the tender for SG's first casino.

Then again, Vatican has been telling people not to use contraception for years now.

Current music: Casiopea - Magic Ray
Current mood: happy

Posted by at 10:02 PM WIB
Comments

Gary Moore Mudjiatmodjo ?

Posted by on Apr 28, 2005 3:46 PM WIB

Weeehhh!!! Canggih dia sekarang!

Posted by on Apr 28, 2005 6:41 PM WIB

holly crap! screw with Anwar!
how can they eliminate CONSTANTINE?????!!!
aaaaaaaaarrrghhhhh!!!
*frustrasi mode : on*

kalo elu jadi ikut tender kasino bilang ya. kali gue bisa ikut tender dirno, eh... indro nya.

Posted by on Apr 29, 2005 9:54 AM WIB

Sudahlah, Dettol. Namanya juga orang Amrik.

Posted by on Apr 29, 2005 12:10 PM WIB
Post a Comment

(sorry, it's the spam)