Subject RE: [IB-Architect] Spatial objects in IB
Author Claudio Valderrama C.
I don't think UDFs are a bad idea for *some* (not all) pending extensions.
Only concern is I wouldn't want to see reports of memory leaks or database
corruptions or memory hangs due to misbehaved UDFs, for example.
And for the missing built-in functions that are most important, perhaps
cast could be enhanced. If this goes against the current SQL specification,
I would vote for a new keyword like ib_cast or something more clever to do
the conversions.
Actually, it's an annoyance that there's no way to tell IB not to raise the
dreaded "string truncation or numeric overflow" exception. If such cast
extension were implemented, some trimming problems with disappears. One
major function that I need is substr or whatever you want to name it.
I'm surprised to see round() in the list. AFAICT, every cast() is a round
and not a trunc. This is why you see some public known stored procs
(probably some examples at Dunstan Thomas) to use the cumbersome expression
newval = cast(val + 0.5 as int) - 1
to trunc a value.
Even in IB6/Dialect3, cast still has the same behavior. IMHO, we need a
real trunc or a cast_trunc, so numeric(10,5) can be casted to numeric(10,3)
choosing whether to trunc or round.

Claudio Valderrama C.
Ingeniero en Informática - Consultor independiente

> -----Original Message-----
> From: Markus Kemper [mailto:mkemper@...]
> Sent: Martes 21 de Marzo de 2000 18:09
> To:
> Subject: Re: [IB-Architect] Spatial objects in IB
> RE: UDFs vs core functions
> I think there is a balance here. I'd like to see more 'basic'
> functions in the engine. My top 10 (in order) are:
> str_to_blob()
> blob_to_str()
> sub_str()
> r_trim()
> sqrt()
> l_trim()
> str_len()
> trim()
> lower()
> round()
> > Don't you think that people would prefer a functionnality be
> implemented
> > by Interbase rather than by a company they never heard of before ?
> Perhaps we could encourage projects in the community to
> develop targeted open source UDF libraries (eg. math, spatial,
> multi-media, encryption, etc.) and InterBase Corp could
> certify, endorse and support them officially.
> Markus
> ------------------------------------------------------------------------
> You have a voice mail message waiting for you at
> ------------------------------------------------------------------------
> To unsubscribe from this group, send an email to: