---
title: "COPY to gain a WHERE condition in Postgres 12"
publication: "Postgres Weekly"
issue: 309
published_at: "2019-06-12"
canonical_url: "https://postgresweekly.com/issues/309"
---

The latest Postgres news, articles, tools, and projects.       

#309 — June 12, 2019 

[Read on the Web](https://postgresweekly.com/issues/309)   

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/v1560346213/fg5y56anj1ybanycy7h3.jpg)](https://www.youtube.com/watch?v=vFq9Yg8a3CE)   

▶[Exploring 10 Postgres Tips and Tricks](https://www.youtube.com/watch?v=vFq9Yg8a3CE) — The audio is a little _telephonic_ as it's from a webinar, but some [slides are here](https://momjian.us/main/writings/pgsql/tips.pdf) if you prefer. The talk itself is good, though, with Bruce digging into a variety of smaller but practical and interesting Postgres tips. 

Bruce Momijan   

[How `COPY` and Bulk Loading Will Be Improved in Postgres 12](https://www.cybertec-postgresql.com/en/tech-preview-improving-copy-and-bulkloading-in-postgresql-12/) — In Postgres 12, the `COPY` command, commonly used to load data into Postgres quickly, will introduce a handy `WHERE` condition. 

Hans-Jürgen Schönig   [![\](https://copm.s3.amazonaws.com/cbd9bc82.png)](https://www.strongdm.com/postgresql-logging-best-practices/?utm_source=PG%20Weekly&utm_medium=email&utm_campaign=2019-06-07%20-%20%5BRBLP%5D%20-%20%5BSDM%5D%20-%20postrgres) 

[PostgreSQL Logging Best Practices](https://www.strongdm.com/postgresql-logging-best-practices/?utm_source=PG%20Weekly&utm_medium=email&utm_campaign=2019-06-07%20-%20%5BRBLP%5D%20-%20%5BSDM%5D%20-%20postrgres) — There are several reasons why you might want an audit trail of users’ activity on a PostgreSQL database, we put together some best practices to keep everyone on the same page. 

strongDM sponsor   

[A Look at Postgres' Bloom Index Support](https://habr.com/en/company/postgrespro/blog/452968/) — The last in a fantastic series of articles digging deep into each type of index that Postgres provides. This time, it’s the turn of bloom indexes which are based on [bloom filters](https://en.wikipedia.org/wiki/Bloom_filter), a type of data structure that can provide very rapid membership checks but with a chance of false positives. 

Egor Rogov   

▶[How AWS Provides Managed PostgreSQL Databases](https://www.youtube.com/watch?v=hdQ-geGBsq4) — A high level 50 minute session that covers the history of AWS RDS and how AWS has provided managed Postgres services over the years. Covers how encryption works, instance types, replication.. basically a ‘101’ class on using Postgres with AWS. 

Kevin Jernigan   

[How Postgres 12 Will Handle Prepared Plans](https://www.cybertec-postgresql.com/en/tech-preview-how-postgresql-12-handles-prepared-plans/) — Using the same plan for prepared queries can provide a performance boost and Postgres intelligently makes a decision as to which plan to use for queries that are executed with different parameter values. Postgres 12 will let you more explicitly control what happens, however. 

Hans-Jürgen Schönig   

[A Look at PostgreSQL's BRIN Indexes](https://habr.com/en/company/postgrespro/blog/452900/) — BRIN (Block Range Index) indexes are a powerful way to accelerate sequential scans of tables where the indexed values can be grouped into ‘ranges’ of values (e.g. ZIP codes, ages, order totals). 

Egor Rogov   

[Incremental Backup and Point-In-Time Recovery in Postgres](https://pgdash.io/blog/postgres-incremental-backup-recovery.html) — How to use WAL archiving for point-in-time recovery (PITR). 

RapidLoop   

▶[A Deep Dive into Amazon Aurora PostgreSQL Performance Tuning](https://www.youtube.com/watch?v=XKPHbYe-fHQ) — An hour long talk where the speaker promises that you will truly learn something. 

James Finnerty   

[Why the RDMBS Is the Future of Distributed Databases](https://www.citusdata.com/blog/2018/11/30/why-rdbms-is-the-future-of-distributed-databases/?utm_source=PG_Weekly&utm_medium=email&utm_campaign=sponsor_blog) — An exploration of how a distributed Postgres RDBMS can lower development costs for applications developers. 

CITUS DATA, NOW PART OF MICROSOFT sponsor   

[A Recursive CTE to Get Information About Partitions](https://fluca1978.github.io/2019/06/12/PartitioningCTE.html) — A look at a rather beefy SQL query that will let you see information about all of the partitions in your database. 

Luca Ferrari   

[BoxBall: Load A Complete Baseball History Dataset Into Postgres](https://github.com/droher/boxball) — Looking for a bit dataset with which to play more with Postgres and, particularly, `cstore_fdw`? This pre-built Docker image could be just the ticket. 

David Roher     

🗓 Upcoming Postgres Events 

- [PostgreSQL Ibiza](https://www.pgibz.io/index.html) (Jun 19-21 on Ibiza) — Spain's famous _party island_ promises you both "Postgres on the beach" while still having talks and training in a neat looking venue.
- [Postgres Vision 2019](https://postgresvision.com/) (June 24-26 in Boston, MA) — Sir Tim Berners-Lee, the inventor of the Web, is delivering the keynote.
- [PostgresLondon 2019](https://postgreslondon.org/) (July 2-3 in London, UK)
- [PostgresConf Beijing 2019](https://postgresconf.org/conferences/Beijing) (July 3-6 in Beijing, China)
- [PGConf.Brasil 2019](https://www.pgconf.com.br/2019/en/) (August 1-3 in São Paulo) — A three day PG conference with talks, tutorials, courses, Couch Clinic, and lightning talks.
- [PGDay Austria 2019](https://pgday.at/en/) (September 6 in Wiener Neustadt, Austria)    

🔬 A Periodic Table of `psql` Commands (Again!) 

Last week we included this table of `psql` commands (courtesy of Marcelo Diaz of [Cybertec](https://www.cybertec-postgresql.com/en/)) but failed to link to [a higher resolution version](http://no.gd/cheatsheet.png) for your own printing or safe-keeping! 

Thanks to everyone who emailed in pointing out this problem.. this has now been resolved, so here is the chart again and it now links to a higher resolution copy [here](http://no.gd/cheatsheet.png) :-) 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/v1559733987/y74anviavcgujchlknif.png)](http://no.gd/cheatsheet.png)        

Curated by [Cooperpress](https://cooperpress.com/) and [Craig Kerstiens](https://twitter.com/craigkerstiens). 

[Change your email address](https://postgresweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://postgresweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
