How to guard PostgreSQL from overcharged and/or malicious (read-only) queries?

From: Stefan Keller <sfkeller(at)gmail(dot)com>
To: pgsql-general List <pgsql-general(at)postgresql(dot)org>
Subject: How to guard PostgreSQL from overcharged and/or malicious (read-only) queries?
Date: 2010-12-20 09:05:56
Message-ID: AANLkTi=B7aRvBDCOZONYgSPVVVb6OuTTOe8QmOejKc-O@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'd like to guard postgres from overcharged and/or malicious queries.

The queries are strinctly read-only (from a SQL users perspective).
For doing this I'd like to code two functions (preferrably pl/pgsql):

1. Filter out all SQL commands which are *not* read-only (no
DROP/DELETE/UPDATE/TRUNCATE).
2. Get the estimated time (units) from PostgreSQL planner in a
reliable way (if possible standard/ANSI).

Can someone give me some hints?

Yours, S.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message AI Rumman 2010-12-20 09:47:37 pg_statsinfo problem
Previous Message Oleg Bartunov 2010-12-20 08:56:15 Re: FTS phrase searches