[Flask] FYI--put up a blog post on managing PostgreSQL Materialized Views with Flask-SQLAlchemy

Jeff Widman jeff at jeffwidman.com
Fri Jan 8 15:43:57 EST 2016


Thanks.

Mike Bayer, who leads SQLAlchemy development, helped me a lot with this
recipe, so he's very aware of it. However, he's said in the past that
including commands for managing views (normal or materialized) is currently
out of scope for the main project.

There's currently too little standardization amongst the various RDMS
vendors, and the topic is advanced enough that it'd create ton of bug
reports/support requests from people who aren't actually hitting bugs,
they're simply mis-understanding some nuance of how views work. The support
expectations from users when something is part of core are much higher vs a
random recipe on a blog post.

I agree with his thought process, and very impressed that he's built a
flexible system supporting custom DDL, events, etc that allows us to build
extra goodies on top of it like this.
ᐧ

On Fri, Jan 8, 2016 at 6:23 AM, David Baumgold <david at davidbaumgold.com>
wrote:

> Jeff, this is really cool! Thank you for sharing! Any chance that this
> work can be merged back into SQLAlchemy, so that anyone using SQLAlchemy
> can benefit without having to write custom code?
>
> David Baumgold
>
>
> From: Jeff Widman <jeff at jeffwidman.com> <jeff at jeffwidman.com>
> Reply: Jeff Widman <jeff at jeffwidman.com> <jeff at jeffwidman.com>
> Date: January 8, 2016 at 12:46:11 AM
> To: flask at python.org <flask at python.org> <flask at python.org>
> Subject:  [Flask] FYI--put up a blog post on managing PostgreSQL
> Materialized Views with Flask-SQLAlchemy
>
> PostgreSQL materialized views have been extremely useful as a caching
> layer for some of my projects. They're fast, easy to setup, don't require
> extra infrastructure, and easy to refresh.
>
> However, it took me forever to figure out how to manage the materialized
> views using Flask-SQLAlchemy, so I wrote it up in the hopes of saving
> others some time.
>
> If interested, you can see the code here:
> https://github.com/jeffwidman/sqlalchemy-postgresql-materialized-views
>
> And my blog post of explanatory notes here:
>
> http://www.jeffwidman.com/blog/847/using-sqlalchemy-to-create-and-manage-postgresql-materialized-views/
>
>
> --
>
> * Jeff Widman*
> jeffwidman.com <http://www.jeffwidman.com/> | 740-WIDMAN-J (943-6265)
> <><
>> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask
>
>


-- 

*Jeff Widman*
jeffwidman.com <http://www.jeffwidman.com/> | 740-WIDMAN-J (943-6265)
<><
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20160108/22037f48/attachment.html>


More information about the Flask mailing list