In article <[EMAIL PROTECTED]>,
Prasanth A. Kumar <[EMAIL PROTECTED]> wrote:
>Philip Hallstrom <[EMAIL PROTECTED]> writes:
>
>> Hi -
>>      The following statements lock up my machine completely (I can
>> ping, but can't telnet, nothing).  This is FreeBSD 3.4-STABLE running
>> 7.0.2.
>> 
>> rolo_entry.fname is of type VARCHAR(30).
>> 
>> devloki=> CREATE FUNCTION upper(VARCHAR) RETURNS TEXT AS '
>> devloki'>   BEGIN
>> devloki'>   RETURN UPPER($1);
>> devloki'>   END;
>> devloki'> ' LANGUAGE 'plpgsql';
>> CREATE
>> devloki=> CREATE INDEX foo_idx ON rolo_entry (upper(fname));
>> 
>> If I rename the function to say "am_upper" it works just fine.
>> 
>> ???
>
>I'm guessing that since sql is case insensitive, that results in
>infinite recursion because you have a function upper() which calls
>UPPER().
Oh... Duh!!!  Geesh... for some reason I figured it would call the
"built-in" UPPER, but obviously it won't. ha ha ha.  *sigh*
My next question then is how to get around this?  I could just rename my
function but it's nice to leave it UPPER since that is what it does.  Is
there another function that will uppercase?  Or is there some way to
call the other UPPER function?  Or something within plpgsql I don't know
about.
Thanks!
-philip

Reply via email to