plpgsql and intarray extension; int[] - int[] operator does notexist ?

Поиск
Список
Период
Сортировка
От Day, David
Тема plpgsql and intarray extension; int[] - int[] operator does notexist ?
Дата
Msg-id 0fd14b7dff1741b988d4f907af745cc4@exch-02.redcom.com
обсуждение исходный текст
Ответы Re: plpgsql and intarray extension; int[] - int[] operator does not exist ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general

I have installed the intarray extension installed in the public schema and am attempting to  use this in a plpgsql
triggerfunction from another schema. 
When the triggers executes this I get an exception to the effect

{
    "hint": "No operator matches the given name and argument type(s). You might need to add explicit type casts.",
    "details": null,
    "code": "42883",
    "message": "operator does not exist: integer[] - integer[]"
}

However,  If I write a similar test function and attempt similar array arithmetic successfully from a different schema
ina non-trigger function It recognizes the intarray methods. 

CREATE OR REPLACE FUNCTION admin.djd_test()
  RETURNS integer[] AS
$BODY$
DECLARE
    _old_tag_ids INTEGER[];
    _new_tag_ids INTEGER[];


BEGIN
    _old_tag_ids := ARRAY[1,2,3];
    _new_tag_ids := ARRAY[3,4,5];

    RETURN _old_tag_ids - _new_tag_ids;

END;
$BODY$
  LANGUAGE plpgsql VOLATILE


Of course in the trigger function  the declared int[] arrays  the content is dynamically initialized.
Any suggestions as to why the int[] operations are not understood in the trigger context.?

.
Thanks


Dave Day




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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: pgconf eu 2018 slides entry missing fromhttps://wiki.postgresql.org/wiki/PostgreSQL_Related_Slides_and_Presentations
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: pgconf eu 2018 slides entry missing from https://wiki.postgresql.org/wiki/PostgreSQL_Related_Slides_and_Presentations