Untrusted functions on index creation.

From: Geoff Russell <geoff(at)austrics(dot)com(dot)au>
To: pgsql-general(at)postgresql(dot)org
Subject: Untrusted functions on index creation.
Date: 1999-11-01 11:17:59
Message-ID: Pine.GSO.4.05.9911012142420.21882-100000@teal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I want a case independent index on people's names and am having troubles.

Here is some output from a postgres run:

/*
* First lets drop the tables and index
*/
drop index upper_name ;
drop function myupper (text);
drop table prosb;
drop sequence prosb_brief_seq;
/*
* now make them
*/
create table prosb (
animal_s text,
brief serial primary key,
defendant_name text ,
payment_received text
... ETC
);
NOTICE: CREATE TABLE will create implicit sequence prosb_brief_seq for SERIAL column prosb.brief
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index prosb_pkey for table prosb
CREATE
create function
myupper (text)
returns text
AS 'SELECT upper($1);' LANGUAGE 'sql';
CREATE
/*
* the index creation works fine
*/
create index upper_name on prosb (myupper(defendant_name) varchar_ops);
CREATE

insert into prosb (animal_s, defendant_name) values('cat','John');
ERROR: internal error: untrusted function not supported.
insert into prosb (animal_s, defendant_name) values('cat','Steven');
ERROR: internal error: untrusted function not supported.
insert into prosb (animal_s, defendant_name) values('dog','Mike');
ERROR: internal error: untrusted function not supported.

I tried using plpgsql instead of sql, but PG tells me the language isn't
registered.

Cheers,
Geoff,

geoff(at)austrics(dot)com(dot)au | Phone: +618-8332-5069
6 Fifth Ave, St Morris, SA 5068 | Fax: +618-8364-1543

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stuart Rison 1999-11-01 13:25:24 Re: [GENERAL] Untrusted functions on index creation.
Previous Message amy cheng 1999-11-01 11:08:33 backend disconnect w/ cast in join