---
title: "New Postgres releases, and how to live on the Postgres edge"
publication: "Postgres Weekly"
issue: 305
published_at: "2019-05-15"
canonical_url: "https://postgresweekly.com/issues/305"
---

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

#305 — May 15, 2019 

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

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/v1557914353/gqytlwienctadmgcvky1.jpg)](https://www.depesz.com/2019/05/15/how-to-play-with-upcoming-unreleased-postgresql/)   

[How to Try Out the Cutting Edge Version of Postgres](https://www.depesz.com/2019/05/15/how-to-play-with-upcoming-unreleased-postgresql/) — We frequently link interesting posts about upcoming features in Postgres, many of which have already been baked into the project’s core source code. But if you want to play with the very latest, experimental version of Postgres, how do you do it? 

Hubert depesz Lubaczewski   

[Postgres 11.3, 10.8, 9.6.13, 9.5.17, and 9.4.22 Released](https://www.postgresql.org/about/news/1939/) — These are patch level releases focusing on bugfixes, including two security fixes, including a flaw where _“a user running PostgreSQL 11 can read arbitrary bytes of server memory by executing a purpose-crafted INSERT statement to a partitioned table.”_ Ouch. [More info here.](https://www.percona.com/blog/2019/05/13/postgresql-minor-versions-released-may-9-2019/) 

PostgreSQL Global Development Group   [![\](https://copm.s3.amazonaws.com/69ff4959.png)](https://www.strongdm.com/product/?utm_source=&utm_medium=email&utm_campaign=2019-04-24%20-%20%5BUSA%5D%20-%20%5BSchD%5D%20-%20%5BSDM%5D%20-%20%5BENT%5D%20-%20PGW) 

[If Engineers Need Access, You Need strongDM](https://www.strongdm.com/product/?utm_source=&utm_medium=email&utm_campaign=2019-04-24%20-%20%5BUSA%5D%20-%20%5BSchD%5D%20-%20%5BSDM%5D%20-%20%5BENT%5D%20-%20PGW) — strongDM works with everything in your stack. Seriously. Any database. Any server. Every environment. [Learn more](https://www.strongdm.com/product/?utm_source=&utm_medium=email&utm_campaign=2019-04-24%20-%20%5BUSA%5D%20-%20%5BSchD%5D%20-%20%5BSDM%5D%20-%20%5BENT%5D%20-%20PGW). 

strongDM sponsor   

[Quick and Dirty Address Matching with LibPostal](https://info.crunchydata.com/blog/quick-and-dirty-address-matching-with-libpostal) — [libpostal](https://github.com/openvenues/libpostal) is an interesting looking library for parsing and _normalizing_ street addresses which you can use from Postgres to make it easier to compare and search street addresses in your own datasets. 

Paul Ramsey   

[The Draft Postgres 12 Release Notes](https://www.postgresql.org/docs/devel/release-12.html) — Bruce Momijan has [announced](https://momjian.us/main/blogs/pgblog/2019.html#May_12_2019) that he has completed the first draft of Postgres 12’s release notes and that they’ll continue to get updates till the final release later this year. Also, it’s a bit of a grab-bag of items, but [these PDF slides on Postgres 12 features](http://www.sai.msu.su/~megera/postgres/talks/pg12-stachka-2019.pdf) are remarkably detailed. 

Bruce Momijan   

[A New Postgres 12 Feature: Optimizer Support for Functions](https://www.cybertec-postgresql.com/en/optimizer-support-functions/) — _“Support functions”_ allow the query optimizer to get more insight into functions which have previously been a bit of a black box. 

Laurenz Albe   

[Creating the 'Ultimate' Postgres Slug Function?](https://www.kdobson.net/2019/ultimate-postgresql-slug-function/) — This is something I usually make a client app do, but creating normalized ‘slugs’ for database entities can be easily outsourced to a Postgres function, as seen here. 

Kester Dobson   

[Importing Data into Postgres on Amazon RDS via S3](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Procedural.Importing.html#USER_PostgreSQL.S3Import) — How to import data stored in an Amazon S3 bucket into a Postgres table hosted on Amazon RDS. 

Amazon Web Services, Inc.   

[Monitor Custom PostgreSQL Metrics with Datadog](https://www.datadoghq.com/postgres-monitoring/?utm_source=Advertisement&utm_medium=CooperPress&utm_campaign=CooperPress-PostgresWeeklyS) — See real-time metrics from your databases, tools, and services in one place. Try monitoring with Datadog for free. 

Datadog sponsor   

[Operationalizing Postgres Database Health Checks using SQL Notebooks](https://azure.microsoft.com/en-us/blog/operationalizing-your-database-health-checks-using-sql-notebooks/) — A look at a technique in Azure Data Studio (yes, Azure users only, I’m afraid) for creating interactive “notebooks” of SQL queries for monitoring your Postgres installation. 

Parikshit Savjani (Microsoft)   

[Improving OLAP Workload Performance for Postgres with ClickHouse Database](https://www.percona.com/blog/2019/05/09/improving-olap-workload-performance-for-postgresql-with-clickhouse-database/) — [ClickHouse](https://clickhouse.yandex/) is an open source column-oriented DBMS focused on rapidly producing analytical data reports. 

Ibrar Ahmed   

[Postgraphile: Quickly Get a GraphQL API for Your Postgres Database](https://github.com/graphile/postgraphile) — The [latest release (4.4.0)](https://github.com/graphile/postgraphile/releases/tag/v4.4.0) has introduced support for subscriptions and live queries. 

Graphile       supported by [![pganalyze\](https://res.cloudinary.com/cpress/image/upload/v1557748476/hezz8wsdwr4k3to4ez5s.png)](https://docs.microsoft.com/en-us/azure/postgresql/overview?ocid=orcas_pw_pgs)  

💡 Tip of the Week 

Postgres has a lot more data types than you might think: A look at IP addresses and networks 

When building out a data model in a database like Postgres it's really easy to stick to the faithful old data types like `TEXT` and `INTEGER`. You might even branch out into using [arrays](https://www.postgresql.org/docs/9.1/arrays.html), [hstore](https://www.postgresql.org/docs/9.1/hstore.html) or [JSON](https://www.postgresql.org/docs/10/datatype-json.html) to make things more dynamic, but there's a _lot more_ worth discovering. 

Digging into all of Postgres's data types could fill a book, so we're focusing on one example today: **using INET for IP addresses.** 

The `INET` type is used when you want to store IPv4 or IPv6 addresses. It can also store networks by specifying a netmask. If you try to store something that isn't a valid IP address or network, Postgres will throw an error, so you're basically getting data validation for free:  

CREATE TABLE addrs (address INET);
 INSERT INTO addrs VALUES ('127.0.0.1');
 INSERT INTO addrs VALUES ('hello world');
 # ERROR: invalid input syntax for type inet: "hello world"   

The `INET` type goes a step further than data validation, though, and there are a variety of methods you can use in your SQL queries to interrogate IP and network addresses further:  

INSERT INTO addrs VALUES ('202.121.0.0/16');
 SELECT address, host(address), broadcast(address), netmask(address) FROM addrs;   

The result is a bit too wide to suit the newsletter format, but if you're familiar with IP addressing, the relevant further information about the network is returned as you would expect from the function names. There are [a lot more functions too](https://www.postgresql.org/docs/9.3/functions-net.html) for comparing IP addresses, extracting parts of an address, and masking addresses. 

**_This week's tip is sponsored by Microsoft Azure._** Want to use Postgres without worrying about managing, securing, and scaling your database? Learn about [Azure Database for PostgreSQL](https://docs.microsoft.com/en-us/azure/postgresql/overview?ocid=orcas_pw_pgs) and the [latest announcement around Hyperscale.](https://mybuild.techcommunity.microsoft.com/sessions/76988?source=sessions&ocid=orcas_pw_pgs)      

🗓 Upcoming Postgres Events 

- [PGCon 2019](https://www.pgcon.org/2019/) (May 28-31 in Ottawa, Canada)
- [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)
- **New:** [PostgresConf Beijing 2019](https://postgresconf.org/conferences/Beijing) (July 3-6 in Beijing, China)          

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
