---
title: "This Week's PostgreSQL Treats (#3)"
publication: "Postgres Weekly"
issue: 3
published_at: "2013-03-27"
canonical_url: "https://postgresweekly.com/issues/3"
---

Postgres Weekly Issue 3 - March 27, 2013

[Archives](http://postgresweekly.com/issues) [Read this issue on the Web](http://postgresweekly.com/issues/3)**Postgres Weekly****Issue 3**
March 27, 2013Featured[Batch Update](http://tapoueh.org/blog/2013/03/15-batch-update.html?utm_source=postgresweekly&utm_medium=email)SQL is much better at handling many rows in a single statement than handling single rows across many statements. [Dmitri Fontaine](http://tapoueh.org/index.html) of 2nd Quadrant France shows how to take better advantage of batch updates within Postgres.[![\](http://s3.amazonaws.com/nlga/uploads/item/image/9733/thumb_Home-Brewing.jpg)](http://tapoueh.org/blog/2013/03/15-batch-update.html?utm_source=postgresweekly&utm_medium=email)[Scaling PostgreSQL at Braintree: Four Years of Evolution](https://www.braintreepayments.com/braintrust/scaling-postgresql-at-braintree-four-years-of-evolution?utm_source=postgresweekly&utm_medium=email)Braintree has run a variety of data stores over the year including Riak, MongoDB, MySQL, and others. They highlight here their four year journey with Postgres which includes sharding their data and now running an automated failover setup.From our sponsor[Try New Relic at no charge](http://launchbit.com/taz/9177-2593-111?utm_source=postgresweekly&utm_medium=email)Deploy New Relic and get your Nerd Life t-shirt. Monitor your Ruby, PHP, Python, Java and .NET web apps in less than 2 minutes.
([Sponsor this newsletter](http://launchbit.com/sp/13571-9177/))![](http://launchbit.com/taz-pixel/9177-2593-111)[![\](http://launchbit.com/taz-i/2593-nrr-text.jpeg)](http://launchbit.com/taz/9177-2593-111?utm_source=postgresweekly&utm_medium=email)The rest for this week[PostgreSQL, Python, and Squid](http://thebuild.com/presentations/pg-py-and-squid-pypgday.pdf?utm_source=postgresweekly&utm_medium=email)In his talk from PyPgDay Christophe Pettus of PG Experts shows the flexibility of Postgres with custom datatypes. In this example he creates a custom squid datatype using Python inside Postgres.[![\](http://s3.amazonaws.com/nlga/uploads/item/image/9568/thumb_Screenshot_3_25_13_2_21_PM-3.png)](http://thebuild.com/presentations/pg-py-and-squid-pypgday.pdf?utm_source=postgresweekly&utm_medium=email)[Autoupdating Full Text Search in Ruby](http://1fifty9.com/post/42878706283/auto-updating-full-text-search-with-postgres?utm_source=postgresweekly&utm_medium=email)Postgres' Full Text Search is powerful and directly built-in. This simple migration for Ruby creates a trigger to automatically update your index, and the same principle could be applied in any language.[Sharding with the Django ORM](http://mike-clarke.com/2013/03/sharding-with-the-django-orm/?utm_source=postgresweekly&utm_medium=email)Sharding, the process of horizontally partitioning rows of a table across multiple DB instances, is a point that so many applications hope to reach. This post along with [slides](https://speakerdeck.com/mikeclarke/sharding-with-the-django-orm) from [PyPgDay](http://wiki.postgresql.org/wiki/PyPgDay2013) and an [example application](https://github.com/disqus/sharding-example) do a great job covering how Disqus has implemented this.[UPSERT/MERGE using Writable CTE in PostgreSQL 9.1](http://vibhorkumar.wordpress.com/2011/10/26/upsertmerge-using-writable-cte-in-postgresql-9-1/?utm_source=postgresweekly&utm_medium=email)Upsert or merge is a common feature request of Postgres. While we can wait and hope for it to come in future versions with writeable CTEs (Common Table Expressions) a form of this functionality is available today. Read how to begin using or if a rubyist check out the [library we included last week](https://github.com/seamusabshere/upsert)Curated by [Craig Kerstiens](http://craigkerstiens.com/) and published by [Cooper Press](https://cooperpress.com/).
Want to sponsor an issue? See our [media kit.](https://cooperpress.com/mediakit2014q2.pdf)

 © 2017 Cooper Press Ltd. [Email policy](https://cooperpress.com/spam.html) [Privacy policy](https://cooperpress.com/privacy.html)
Office 30, Fairfield Enterprise Centre, Louth, LN11 0LS, UK[Update your email address](*|UPDATE_PROFILE|*)
or [unsubscribe here](*|UNSUB|*)
