Re: Performance question: Commit or rollback?
От | Darren Duncan |
---|---|
Тема | Re: Performance question: Commit or rollback? |
Дата | |
Msg-id | 4EF62929.4080806@darrenduncan.net обсуждение исходный текст |
Ответ на | Re: Performance question: Commit or rollback? (Chris Angelico <rosuav@gmail.com>) |
Ответы |
Re: Performance question: Commit or rollback?
|
Список | pgsql-general |
Chris Angelico wrote: > On Sat, Dec 24, 2011 at 11:46 PM, vinny <vinny@xs4all.nl> 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
В списке pgsql-general по дате отправления: