Search Postgresql Archives

Re: Performance question: Commit or rollback?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Angelico wrote:
On Sat, Dec 24, 2011 at 11:46 PM, vinny <vinny@xxxxxxxxx> wrote:
How about using a databaseuser that has it's create/update/delete rights
revoked? That will cause an error if the supposedly read-only routine
does try to change data.

Also, we want to minimize debugging time by having
both read-only and read-write access use almost exactly the same code
and DB access, meaning that we should not need to test every module in
every mode.

You can do it correctly while reusing all of your code; you just have different arguments at connect time and otherwise your code uses the connection handle in the same way afterwards. Its fine to have flags in the app so the app just tries acceptable things, but privileges in the database are the only way to actually be safe and resilient against accidental changes. -- Darren Duncan

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux