79302555

Date: 2024-12-23 08:30:36
Score: 0.5
Natty:
Report link

This is a rather old question, but I would also like to share this simpler method that uses the EXCEPT operator; worked pretty well for me:

select array(
    select unnest('{1,2,3,4}'::numeric[])
    except
    select unnest('{1,2}'::numeric[])
);

┌───────┐
│ array │
├───────┤
│ {3,4} │
└───────┘
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: iyxan23