Permalink
Browse files

edit

  • Loading branch information...
1 parent 7e9fb42 commit 4ebb32f2cdb0f03370774ddc59afb4d409eecdca @Zbuben Zbuben committed with anandology Aug 6, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 cookbook/unpack_postgres_session.md
@@ -11,10 +11,12 @@ When using session and storing some ids or any kind of stuff referencing a datab
"select foo, bar from foobar_table where id=%s and id_foor=%s" % (session.id, session.id_foo)
That's not a real problem, but if your session is stored in a postgresql database, this is wierd to take these fields in your database to unpack them in web.py and then re-use them in your queries.
-A clean approach would be to access directly these informations in postgresql to read and/or write them.
At the other end, this is also weird to take data in your database to bring them in web.py and then repack them in your database.
+A cleaner approach would be to access directly these informations in postgresql to read and/or write them.
+
+
##Solution:
To apply this recipe, you'll need to use postgresql DBStore for your sessions.

0 comments on commit 4ebb32f

Please sign in to comment.