From: Joe Conway <mail@joeconway.com>
To: bschneider@microdynamics.cc
Cc: Postgres Admin List <pgsql-admin@postgresql.org>
Subject: Re: Help! Error when calling a function
Date: Sat, 07 Jun 2003 09:17:12 -0700
Message-ID: <3EE21008.2060201@joeconway.com> (raw)
In-Reply-To: <000001c32c68$05a00560$5011a8c0@micronpc>
References: <000001c32c68$05a00560$5011a8c0@micronpc>
Ben Schneider wrote:
> fine. The only change I made to the DB was to drop the feedback_notes table
> and recreate it with an additional column (New column = 'status'). The
> select was working before I made this change and now it doesn't.
I can't explain the exact cause in this case, because I don't see right
off how it fits, but cache lookup failure is typically caused by
dropping and recreating some object that is referenced somewhere else.
Are there views referencing that table somewhere in this? BTW, you could
have done ALTER TABLE ADD COLUMN.
In any case, this might fix it:
CREATE OR REPLACE FUNCTION "fn_concat"(text, text) RETURNS text AS
'begin return $1 || $2; end;' LANGUAGE 'plpgsql';
But I'm not sure why you'd want to use plpgsql for that; I'd use:
DROP FUNCTION "fn_concat"(text, text);
CREATE OR REPLACE FUNCTION "fn_concat"(text, text) RETURNS text AS
'SELECT $1 || $2' LANGUAGE 'sql';
HTH,
Joe
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: mail@joeconway.com, bschneider@microdynamics.cc
Subject: Re: Help! Error when calling a function
In-Reply-To: <3EE21008.2060201@joeconway.com>
References: <000001c32c68$05a00560$5011a8c0@micronpc> <3EE21008.2060201@joeconway.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