Introducing Crunchy Data Warehouse: A next-generation Postgres-native data warehouse. Crunchy Data Warehouse Learn more

  • 15 min read

    Active-Active PostgreSQL Federation on Kubernetes

    Jonathan S. Katz

    What if I told you that you can create an out-of-the-box active-active, federated PostgreSQL cluster on Kubernetes?

    Since logical decoding was introduced in PostgreSQL 9.4, I have been fascinated by the various applications it has. In fact, I've used this feature to apply the concepts of change data capture

    Read More
  • PostGIS Raster and Crunchy Bridge

    Paul Ramsey

    The PostGIS raster extension has a steep learning curve, but it opens up some unique possibilities for data analysis and accessing non-standard data from within PostgreSQL. Here's an example that shows how to access raster data from PostGIS running on Crunchy Bridge

    Read More
  • Using the Postgres bytea Type with Django

    Kat Batuigas

    I'm not someone who spends a lot of time or energy on digital images and photography. I'm usually set with my phone's camera app and maybe applying a filter as I upload to Instagram. But when you work at a database company like Crunchy Data, anything in your life can inspire a demo application. How about a simple image upload app built with Django 3.1

    Read More
  • 8 min read

    Using PL/pgSQL to Calculate New Postgres Columns

    Steve Pousty

    In our last blog post on using Postgres for statistics, I covered some of the decisions on how to handle calculated columns in PostgreSQL. I chose to go with adding extra columns to the same table and inserting the calculated values into these new columns. Today’s post is going to cover how to implement this solution using PL/pgSQL

    Read More
  • 4 min read

    Waiting for PostGIS 3.1: GEOS 3.9

    Paul Ramsey

    While we talk about "PostGIS" like it's one thing, it's actually the collection of a number of specialized geospatial libraries, along with a bunch of code of its own.

    • PostGIS provides core functionality
      • bindings to PostgreSQL, the types and indexes
    Read More
  • 7 min read

    Replacing Lines of Code with 2 Little Regexs in Postgres

    Steve Pousty

    Greetings readers, today we're going to take a semi-break from my “doing data science in SQL” series to cover a really cool use case I just solved with regular expressions

    Read More
  • 7 min read

    PostGIS Day 2020 Roundup

    Kat Batuigas

    Crunchy Data's second annual PostGIS Day took place a couple weeks ago on November 19th, and as a first-time attendee I was blown away by the knowledge-sharing and sense of community that I saw, even as I was tuning in remotely from my computer at home. This year's PostGIS Day

    Read More
  • 8 min read

    Using Postgres for Statistics: Centering and Standardizing Data

    Steve Pousty

    In the last two blog posts on data science in Postgres, we got our data ready for regression analysis and had predictive variables that are on wildly different scales. Another example of data on different scales would be annual income versus age. The former is usually at least tens of thousands while age rarely gets to a hundred.

    If you do the regression with non-transformed variables, it becomes hard to compare the effect of the different variables. Statisticians account for this by converting raw data values into a Z-score

    Read More
  • 8 min read

    Postgres: The batteries included database

    Craig Kerstiens

    At most of the places I've worked, the primary language used was not what I gravitated to naturally. If you're going to ask for a language of choice personally, it's python. I appreciate the explicit nature, that it's often pseudocode that can execute and it has a rich ecosystem of libraries (though that’s most languages these days). But as much as anything I latched onto Django

    Read More
  • 2 min read

    Waiting for PostGIS 3.1: Grid Generators

    Paul Ramsey

    Summarizing data against a fixed grid is a common way of preparing data for analysis. Fixed grids have some advantages over natural and administrative boundaries:

    • No appeal to higher authorities
    • Equal unit areas
    • Equal distances between cells
    • Good for passing data from the "spatial" computational realm to a "non-spatial" realm
    Read More