Re: Help! Error when calling a function

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: Help! Error when calling a function
Дата
Msg-id 3EE21008.2060201@joeconway.com
обсуждение исходный текст
Ответ на Help! Error when calling a function  ("Ben Schneider" <bschneider@microdynamics.cc>)
Список 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


В списке pgsql-admin по дате отправления:

Предыдущее
От: "Mendola Gaetano"
Дата:
Сообщение: Re: Help! Error when calling a function
Следующее
От: Rafael Mauricio González Palacios
Дата:
Сообщение: What could be the problem?