Re: Re: Lock up on 7.0.2 involving CREATE FUNCTION/INDEX..

From: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
To: Philip Hallstrom <philip(at)adhesivemedia(dot)com>
Cc: Mike Mascari <mascarm(at)mascari(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Re: Lock up on 7.0.2 involving CREATE FUNCTION/INDEX..
Date: 2000-08-10 03:26:00
Message-ID: 399220C8.62EAC20A@wgcr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Philip Hallstrom 2000-08-10 03:40:14 Re: Re: Lock up on 7.0.2 involving CREATE FUNCTION/INDEX..
Previous Message Philip Hallstrom 2000-08-10 03:08:10 Re: Re: Lock up on 7.0.2 involving CREATE FUNCTION/INDEX..