Re: Lock up on 7.0.2 involving CREATE FUNCTION/INDEX.. - Mailing list pgsql-general

From kumar1@home.com (Prasanth A. Kumar)
Subject Re: Lock up on 7.0.2 involving CREATE FUNCTION/INDEX..
Date
Msg-id m3d7jiez77.fsf@C654771-a.frmt1.sfba.home.com
Whole thread Raw
In response to Lock up on 7.0.2 involving CREATE FUNCTION/INDEX..  (Philip Hallstrom <philip@adhesivemedia.com>)
List pgsql-general
Philip Hallstrom <philip@adhesivemedia.com> 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().

--
Prasanth Kumar
kumar1@home.com

pgsql-general by date:

Previous
From: Paulo Henrique Rodrigues Pinheiro
Date:
Subject: initdb fail
Next
From: philip@adhesivemedia.com (Philip Hallstrom)
Date:
Subject: Re: Lock up on 7.0.2 involving CREATE FUNCTION/INDEX..