pg_timetable: Advanced PostgreSQL cron-like scheduler released!
pg_timetable: Advanced PostgreSQL cron-like scheduler released! Hello there, this is your developer speaking… I’m struggling with how to start this post, since I’ve procrastinated a lot. There should be at least 5 published posts on this topic already. But there is only one by Hans-Jürgen Schönig. I’m thanking him for trying to cover my back, […]
PSQL_EDITOR: Fighting with Sublime Text under Windows
This supposed to be just a short TIL entry about PSQL_EDITOR variable. While trying to figure out all possible pitfalls, I’ve decided to write a full blog post. You may skip to the summary though. All tests done on Windows 10 with PostgreSQL 12 installed. As you know, PostgreSQL ships with an interactive console tool […]
Building PostgreSQL (x86, x64) and OpenSSL using MSYS2 and MinGW under Windows
I’ve written already a blog post “Building PostgreSQL with MSYS2 and MinGW under Windows” a year ago. But this time I want to show you two important things: cross compiling (x86, x64) using the same run-time; compiling with the latest OpenSSL support. That’s true nowadays you won’t find binaries or installations of PostgreSQL without […]
1-to-1 relationship in PostgreSQL for real
Years ago Years ago I wrote this post describing how to implement 1-to-1 relationship in PostgreSQL. The trick was simple and obvious: You put a unique constraint on a referenced column and you’re fine. But then one of the readers noticed, that this is the 1-to-(0..1) relationship, not a true 1-to-1. And he was absolutely […]
Choose plpgsql variable names wisely
Pavel Stehule recently wrote the post “Don’t use SQL keywords as PLpgSQL variable names” describing the situation when internal stored routine variable names match PostgreSQL keywords. But the problem is not only in keywords but also for plpgsql variable names. Consider: Output: OK, at least we have no hidden error like in Pavel’s case. Let’s […]
Keyword mess
I once received a mail with question: Can you tell me why I can’t select the column `references`? Well, the quick answer will be: because REFERENCES is a keyword you should use double quotes around it, e.g. =# select references from v_table_relation; But why do you sometimes need to explicitly quote identifiers and sometimes […]
Building PostgreSQL with MSYS2 and MinGW under Windows
Preface There are several ways of building PostgreSQL under Windows. Official manual stands using Visual Studio is the simplest one, wiki describes how to use mingw and mingw-w64. As for me, using new MSYS2 building platform for Windows is a bless. With its help not only PostgreSQL sources are built smoothly, but even extensions are […]