Re: How access to array component

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: How access to array component
Дата
Msg-id 3F1A06B4.6090301@joeconway.com
обсуждение исходный текст
Ответ на How access to array component  (Cristian Cappo <ccappo@cnc.una.py>)
Ответы Re: How access to array component  ("Cristian Cappo A." <ccappo@cnc.una.py>)
Список pgsql-sql
Cristian Cappo wrote:
>  >>>  select __function(10::int2, 20::int2)[1]
>                       ^^^ parsing error.
> 

Try:

create or replace function foo(int2, int2 ) returns _varchar as '
select ''{1,2}''::_varchar
' language 'sql';

regression=# select (foo(10::int2, 20::int2))[1]; foo
----- 1
(1 row)

HTH,

Joe



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

Предыдущее
От: Terence Kearns
Дата:
Сообщение: Re: (trigger function) -> ERROR: NEW used in non-rule query
Следующее
От: Chris Travers
Дата:
Сообщение: SECURITY DEFINER changes CURRENT_USER?