Test for array slice?

From: Peter Fein <pfein(at)pobox(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Test for array slice?
Date: 2005-06-03 16:09:29
Message-ID: 42A080B9.7070901@pobox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi-

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?

--Pete

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2005-06-03 16:11:33 Re: PG Lightning Admin running on Linux via WINE 2005524
Previous Message Tony Caduto 2005-06-03 15:59:18 Re: PG Lightning Admin running on Linux via WINE 2005524