Searched CASE expression in PostgreSQL – with examples.

In this blog post, we will look at one type of ‘conditional formatting’ that enables you to perform complex calculations. PostgreSQL (and SQL in general) provides us with a couple of variants of the CASE statement which could be used for this very thing, among many many others. Learn with me as I make my way through writing this post…

[Head this way for great PostgresSQL blogging >>>]
Advertisements

Handy string functions: right() and left() with examples in PostgreSQL

In this blog post, I will visit a couple of handy string functions for extracting a specified number of characters from a string of text. Yet, with both functions, you can start from a certain position. Either left (beginning) or right (the end). Let’s see them in action with some examples…

[Head this way for great PostgresSQL blogging >>>]

PostgreSQL TRIGGERS and \copy working in tandem.

After coming off of an injury-ridden June, July turned out to be a more promising (except the sweltering Louisiana heat) month with me getting in plenty of solid hikes as I try to stay active and maintain better weight. I also began tracking my hiking stats a little differently. This blog post will cover how I bulk-uploaded them into my database at months end…

Continue reading…

PostgreSQL Subquery as predicate in WHERE clause.

In Exploring subqueries in PostgreSQL – Column names and expressions, I discussed generating SELECT statement columns and expressions with subqueries. This blog post will visit another common pattern. Subqueries as predicate filters in the WHERE clause.

For the full post, continue reading…

Digging into PLpgSQL – Scratching the surface with easy functions.

I’m quite intrigued when it comes to PostgreSQL’s procedural language, PLpgSQL (honestly, SQL stored procedures and functions in general). I’ve grown fond of writing functions on the ‘server-side’, exploring their use and benefit. But what are some things you can do with simple(er) functions? Let’s learn together.

(more…)