There is an array[10,20] and I want to know is it a subset of array[20,30,10] or not?
Examples:
[10,20] and [30,20,10] - yes
[10,20] and [10,30] - no
[10,20] and [20,10] - yes
[10,20] and [10,20] - yes
Join Stack Overflow to learn, share knowledge, and build your career.
There is an array[10,20] and I want to know is it a subset of array[20,30,10] or not?
Examples:
[10,20] and [30,20,10] - yes
[10,20] and [10,30] - no
[10,20] and [20,10] - yes
[10,20] and [10,20] - yes
This question appears to be off-topic. The users who voted to close gave this specific reason:
Like this,perhaps:
SELECT ARRAY[10,20] <@ ARRAY[30,20,10];
http://www.postgresql.org/docs/current/static/functions-array.html