On Thu, Aug 11, 2022 at 8:59 PM Mike Orr <[email protected]> wrote:
> Somebody in our local Python group was doing that, although not with
> Pyramid. He ran a PostgreSQL consultancy, and one of his staff gave a
> talk about the benefits of using Postges' role system for user
> accounts and permissions, and custom Postgres functions for querying
> and modifying data.

I'm not saying I necessarily agree with the approach, just saying it exists.

The tradeoff is you lose the ability to run it on non-Postgres
databases, but you gain the ability to use Posgres' unique features.
Their attitude is that Postgres' code and its account system is
well-tested and secure, so why not use it to the max.

But it's not necessarily either/or. SQLAlchemy has several calls and
field types for features that only Postgres or a few databases
implement, so you can get the best of both worlds. You can call custom
Postgres functions from SQLAlchemy, both to query and to modify data.
I have some database views (virtual tables over real tables) that I
create in a raw SQL script, and then access them through SQLAlchemy
table/class objects. I do that because I have one site that
reads/writes a database, and another site that only reads a subset of
that database. So the views restrict the fields that can be seen.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/CAH9f%3DuoQMGe4MEpJbEeiq8%3D47KndwLnrR6zQRWhf_F7_-jjbiQ%40mail.gmail.com.

Reply via email to