I don't know any extension that calculate euclid distance, but it should be trivial in C - if you don't need to use generic types and generic operations.
Before messing around with that, I'd recommend trying either pl/r or pl/pythonu. -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in Analytics, Data Architecture and PostgreSQL Data in Trouble? Get it in Treble! http://BlueTreble.com