add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
id unnest
1 a
1 b
1 c
1 d
1 e
1 f
2 g
2 h
2 i
2 j
2 k
2 l
SELECT 12
id element
1 a
1 b
1 c
1 d
1 e
1 f
2 g
2 h
2 i
2 j
2 k
2 l
SELECT 12
id element
1 a
1 c
1 d
1 e
1 f
2 g
2 i
2 j
2 l
SELECT 9
id unnest
1 a
1 c
1 d
1 e
1 f
2 g
2 h
2 i
2 j
2 k
2 l
SELECT 11
id arr
2 {g,h,i,j,k,l}
SELECT 1
id arr
2 {g,h,i,j,k,l}
SELECT 1
id position element
2 6 l
SELECT 1
ERROR:  function array_position(text[], unknown, integer) does not exist
LINE 6: where array_position(b.arr,'k',1) is not null;
              ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.