Re: Help! Error when calling a function

From: Joe Conway <mail(at)joeconway(dot)com>
To: bschneider(at)microdynamics(dot)cc
Cc: Postgres Admin List <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Help! Error when calling a function
Date: 2003-06-07 16:17:12
Message-ID: 3EE21008.2060201@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Mendola Gaetano 2003-06-07 18:02:41 Re: Help! Error when calling a function
Previous Message postgres timeless 2003-06-07 14:28:16 Re: Disk I/O Monitoring