Re: Deprecating RULES

From: Любен Каравелов <karavelov(at)mail(dot)bg>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Deprecating RULES
Date: 2012-10-18 21:58:42
Message-ID: 0838daae75992f1b4f0d320476ea9bdf.mailbg@beta.mail.bg
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Well, it'd be nice to be able to rewrite a query referring to a table
to still refer to that same table, but you can't, because you get
infinite recursion.

If that was possible it would be quite easy to express any row/column level
security policies with it.

If you could do that, it'd presumably be a WHOLE lot faster than
triggers. Because frankly, if triggers were infinitely fast, I don't
think we'd be having this conversation. But they're not. They're
slow; really slow, and while we may be able to improve that somewhat
by some means, they're basically always going to be slow. Being able
to rewrite queries is inside the server is useful, and rules are not a
very good solution to that problem, but right now they're the only
thing we've got.

Moreover there are no triggers fired on selects.

Best regards

--

Luben Karavelov

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-10-18 22:19:02 Re: Skip checkpoint on promoting from streaming replication
Previous Message Tom Lane 2012-10-18 20:56:07 Re: embedded list