Solving the Knapsack Problem with Recursive Queries and PostgreSQL