Re: Test for array slice?

Поиск
Список
Период
Сортировка
От Sean Davis
Тема Re: Test for array slice?
Дата
Msg-id e95c307299a9944b5fe742203c3052ea@mail.nih.gov
обсуждение исходный текст
Ответ на Re: Test for array slice?  (Joe Conway <mail@joeconway.com>)
Ответы Re: Test for array slice?  (Peter Fein <pfein@pobox.com>)
Список pgsql-general
On Jun 3, 2005, at 12:32 PM, Joe Conway wrote:

> Peter Fein wrote:
>> I want to do something like this (pardon my pseudocode):
>> A=ARRAY[4, 5, 6, 7, 8]
>> B=ARRAY[5, 6]
>> is_sliceof(A, B), i.e., there exists a slice of A that equals B.  My
>> best thought ATM is to convert both to strings and use pattern
>> matching
>> - any better ideas?
>
> I can't think of a really good way to do that directly in Postgres,
> but I'd bet (still not sure though) there is a way in R.
>   http://www.r-project.org/index.html
> If so, you could use PL/R:
>   http://www.joeconway.com/plr/

This is probably also easy in perl and python as well.

Sean


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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: Test for array slice?
Следующее
От: Rich Shepard
Дата:
Сообщение: Referencing Serial Type as Foreign Key