• 5 min read

    Spatial Filters in pg_featureserv with CQL

    Martin Davis

    provides access to the powerful spatial database capabilities of PostGIS and PostgreSQL via a lightweight web service. To do this, it implements the OGC API for Features ( OAPIF ) RESTful protocol. OAPIF is part of the Open Geospatial Consortium ( OGC ) OGC API suite of standards. In a previous post, we announced an exciting new capability for : support for CQL filters . CQL ( Common Query Language ) is another OGC standard that provides the equivalent of SQL clauses for web q...

    Read More
  • 5 min read

    PostGIS vs GPU: Performance and Spatial Joins

    Paul Ramsey

    Every once in a while, a post shows up online about someone using GPUs for common spatial analysis tasks, and I get a burst of techno-enthusiasm. Maybe this is truly the new way! This week it was a post on GPU-assisted spatial joins that caught my eye. In summary, the author took a 9M record set of parking infractions data from Philadelphia and joined it to a 150 record set of Philadelphia neighborhoods . The process involved building up a little execution engine in Python. It was pretty ma...

    Read More
  • 4 min read

    CQL Filtering in pg_featureserv

    Martin Davis

    The goal of is to provide easy and efficient access to PostGIS from web clients. To do this, it uses the emerging OGC API for Features ( OAPIF ) RESTful protocol. This is a natural fit for systems which need to query and communicate spatial data. The core OAPIF specification provides a basic framework for querying spatial datasets, but it has only limited capability to express filtering subsets of spatial tables. In particular, it only allows filtering on single attribute values, and it...

    Read More
  • 13 min read

    How to Cheat at WORDLE with PostgreSQL

    Jean-Paul Argudo

    Wordle became very popular on the internet very quickly. It's a 5 letter word game to guess among all possible words in a given language. The French version is like the English one, except words aren't be written with the accents we have in French, like “é, è, ê, ë, à, ô,” etc. Words with the special character “œ” are written with 2 characters like “oe”. The French language has 7980 5-letter words. At least according to this website . Yes, I did copy/paste every 21 pages of the words in a...

    Read More
  • 5 min read

    Cloud Data Sources for the Postgres Operator for Kubernetes

    Andrew L'Ecuyer

    One of the many powerful features in PGO , the open source Postgres Operator from Crunchy Data , is the ability to use an existing data source to initialize a new Postgres cluster. If you are cloning an existing cluster or migrating volumes, PGO data sources make cluster initialization easy. New in PGO v5.0.5, we've expanded support for data sources even further with the introduction of cloud data sources! We’re excited to offer this new feature to customers onboarding to Crunchy Postgres for...

    Read More
  • 8 min read

    Safer Application Users in Postgres

    Mike Palmiotto

    We deleted our database. Two years ago on a Friday afternoon around 4pm I had a customer open a support ticket. The customer thought they were running their test suite against a dev environment. In reality they were running on production. One of the early steps in many test suites is to ensure a clean state: 1. all tables or schemas 2. from scratch all tables or schemas from scratch With disaster recovery and point-in-time recovery in place, we could roll the database back to any exact m...

    Read More
  • Postgres Constraints for Newbies

    Elizabeth Christensen

    One of the things that makes Postgres so awesome for software development is the incredibly useful system of constraints. Constraints are a way to tell Postgres which kinds of data can be inserted into tables, columns, or rows. As an application developer, you're going to build in this logic to your application as well and that’s great. However…adding this logic into your database protects your data long-term from bad data, null statements, or application code that isn't working quite right and...

    Read More
  • 14 min read

    Secure Permissions for pgBackRest

    Greg Sabino Mullane

    The pgBackRest tool is a fantastic backup solution for Postgres, with many features including encryption, compression, automatic expiration, PITR, asynchronous archiving, and lots more. By default it runs as the Unix user "postgres" and connects to the database as the "postgres" superuser. In working with one of our finance clients on Crunchy High Availability Postgres , we needed to limit the access of the pgBackRest program for security and compliance on the database cluster. This article d...

    Read More
  • 5 min read

    Elevation Profiles and Flightlines with PostGIS

    Paul Ramsey

    A community member on the postgis-users mailing list had a question recently: I have a table of elevation points, and I would like to figure out an elevation profile for a flightline running through those points. How? This question is a nice showcase of some of my favorite spatial tools with indexing, point to point distance queries on a sphere, and nearest neighbor queries. I thought it would make a great post. The original question author was nice enough to share his elevation data, so I c...

    Read More
  • Postgres Indexes for Newbies

    Elizabeth Christensen

    If you’ve read Crunchy blogs recently you probably noticed by now that we’re all big fans of indexing. Indexing is key to optimizing your database workloads and reducing query times. Postgres now supports quite a few types of indexes and knowing the basics is a key part of working with Postgres. The role of database indexes is similar to the index section at the back of a book. A database index stores information on where a data row is located in a table so the database doesn't have to scan...

    Read More