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

From Philip Hallstrom
Subject Re: Re: Lock up on 7.0.2 involving CREATE FUNCTION/INDEX..
Date
Msg-id Pine.BSF.4.21.0008092039420.80432-100000@illiad.adhesivemedia.com
Whole thread Raw
In response to Re: Re: Lock up on 7.0.2 involving CREATE FUNCTION/INDEX..  (Lamar Owen <lamar.owen@wgcr.org>)
List pgsql-general
Yes... it is odd... especially since the following works fine:

SELECT UPPER(field) FROM test;

-philip

On Wed, 9 Aug 2000, Lamar Owen wrote:

> Philip Hallstrom wrote:
> > CREATE INDEX test_idx ON test (UPPER(field));
>
> > devloki=> create index foo on rolo_entry (UPPER(fname));
> > ERROR:  DefineIndex: function 'upper(varchar)' does not exist
> > devloki=> create index foo on rolo_entry (UPPER(varchar(fname)));
> > ERROR:  parser: parse error at or near "varchar"
> > devloki=> create index foo on rolo_entry (UPPER(text(fname)));
> > ERROR:  parser: parse error at or near "("
> > devloki=> create index foo on rolo_entry (UPPER(text fname));
> > ERROR:  parser: parse error at or near "fname"
> > devloki=> create index foo on rolo_entry (UPPER(fname::text));
> > ERROR:  parser: parse error at or near "::"
> > devloki=> create index foo on rolo_entry (UPPER(CAST(fname AS TEXT)));
> > ERROR:  parser: parse error at or near "cast"
>
> > So, by creating a function such as UPPER(varchar) instead of the built-in
> > UPPER(text), I can do what I want.
>
> > What's odd, is that I can create the function UPPER(varchar) which then
> > calls UPPER(text) and use it all I want.  However, if I then try to create
> > an index (like my first example above) it locks up the entire machine.
>
> That is wild.  I'd say bring this up in the hackers list -- as upper
> should also work with varchar by default.
>
> --
> Lamar Owen
> WGCR Internet Radio
> 1 Peter 4:11
>


pgsql-general by date:

Previous
From: Lamar Owen
Date:
Subject: Re: Re: Lock up on 7.0.2 involving CREATE FUNCTION/INDEX..
Next
From: Dale Walker
Date:
Subject: insert into table from select..