From: Josh Berkus <josh@agliodbs.com>
To: Richard Sydney-Smith <richard@ibisaustralia.com>
To: pgsql-sql@postgresql.org
Subject: Re: Mystery function error
Date: Sat, 27 Sep 2003 22:28:07 -0700
Message-ID: <200309272228.07762.josh@agliodbs.com> (raw)
In-Reply-To: <000c01c38572$73c03c50$251a32d2@athlon2000>
References: <000c01c38572$73c03c50$251a32d2@athlon2000>
Richard,
>--------------------------- CREATE OR REPLACE FUNCTION public.locate(bpchar,
> bpchar)
> RETURNS int4 AS
> '
> -- search for the position of $2 in $1
>
> declare
> srcstr alias for $1;
> searchstr alias for $2;
>
> begin
> return position(searchstr in srcstr);
You're missing "END;".
> '
> LANGUAGE 'plpgsql' VOLATILE;
Also, the function is not VOLATILE. It's IMMUTABLE, and STRICT as well.
--
Josh Berkus
Aglio Database Solutions
San Francisco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, richard@ibisaustralia.com
Subject: Re: Mystery function error
In-Reply-To: <200309272228.07762.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox