Universal PostgreSQL CRUD Query
Budget: ₹1,500 – ₹12,500 INR
I need a single, fully-parametric SQL solution that can handle Select, Update and Delete operations—as well as Insert—against any table in my PostgreSQL database. The goal is to pass in a table name, a dynamic list of column names, variable data types and the necessary filter or value clauses, then have the function build and execute the correct statement on the fly.
Here is what I expect:
• A PL/pgSQL function (or clear alternative, such as a prepared statement generator) that accepts:
– target table
– columns and their values or filters
– operation flag (select / insert / update / delete)
– optional returning clause for selects
• Robust handling of variable data types so the same call works for integers, text, timestamps, JSON, etc.
• Protection against SQL injection through proper use of format(), quote_ident() and parameter binding.
• Comments or a short README showing sample calls for each operation and explaining required parameters.
If the script installs cleanly and every sample call executes as expected, I’ll consider the job complete.
Here is what I expect:
• A PL/pgSQL function (or clear alternative, such as a prepared statement generator) that accepts:
– target table
– columns and their values or filters
– operation flag (select / insert / update / delete)
– optional returning clause for selects
• Robust handling of variable data types so the same call works for integers, text, timestamps, JSON, etc.
• Protection against SQL injection through proper use of format(), quote_ident() and parameter binding.
• Comments or a short README showing sample calls for each operation and explaining required parameters.
If the script installs cleanly and every sample call executes as expected, I’ll consider the job complete.