# Postgres 9.5 - The feature rundown

DevFeed: [Postgres 9.5 - The feature rundown](<https://devfeed.tech/articles/postgres-9-5-the-feature-rundown-41184.md>)

Original publisher: [Read original article](<https://www.craigkerstiens.com/2015/12/27/Postgres-9.5-The-feature-rundown/>)

Author: Map

Published: 2015-12-27T20:55:56Z

Content type: article

Language: en

Sources: [Craig Kerstiens](<https://devfeed.tech/sources/craig-kerstiens.md>)

Topics: [Database](<https://devfeed.tech/topics/database.md>), [Replication](<https://devfeed.tech/topics/replication.md>), [import](<https://devfeed.tech/topics/import.md>), [etl](<https://devfeed.tech/topics/etl.md>)

Tags: [count](<https://devfeed.tech/tags/count.md>), [cube](<https://devfeed.tech/tags/cube.md>), [databases](<https://devfeed.tech/tags/databases.md>), [etl](<https://devfeed.tech/tags/etl.md>), [examples](<https://devfeed.tech/tags/examples.md>), [feature](<https://devfeed.tech/tags/feature.md>), [import](<https://devfeed.tech/tags/import.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [replication](<https://devfeed.tech/tags/replication.md>), [schema](<https://devfeed.tech/tags/schema.md>)

## AI overview

This article reviews notable features planned for Postgres 9.5, including upsert behavior, grouping sets, cube and rollup, importing foreign schemas, and pg_rewind for PostgreSQL replication management.

## Source excerpt

The headline of Postgres 9.5 is undoubtedly: Insert... on conflict do nothing/update or more commonly known as Upsert or Merge. This removes one of the last remaining features which other databases had over Postgres. Sure we'll take a look at it, but first let's browse through some of the other features you can look forward to when Postgres 9.5 lands: Grouping sets, cube, rollup Pivoting in Postgres has sort of been possible as has rolling up data, but it required you to know what those values and what you were projecting to, to be known. With the new functionality to allow you to group various sets together rollups as you'd normally expect to do in something like Excel become trivial. So now instead you simply add the grouping type just as you would on a normal group by: SELECT department, role, gender, count(*) FROM employees GROUP BY your_grouping_type_here; By simply selecting the type of rollup you want to do Postgres will do the hard work for you. Let's take a look at the given example of department, role, gender: grouping sets will project out the count for each specific key. As a result you'd get each department key, with other keys as null, and the count for each that met that department. cube will give you the same values as above, but also the rollups of every individual combination. So in addition to the total for each department, you'd get breakups by the department and gender, and department and role, and department and role and gender. rollup will give you a slightly similar version to cube but only give you the detailed groupings in the order they're presented. So if you specified roll (department, role, gender) you'd have no rollup for department and gender alone. Check the what's new wiki for a bit more clarity on examples and output Import foreign schemas I only use foreign tables about once a month, but when I do use them they've inevitably saved many hours of creating a one off ETL process. Even still the effort to setup new foreign tables has sho