Blog Archives

Get PostgreSQL sources using SVN

As you probably know PostgreSQL sources are managed by Git version control system. Which is great, but for me as SVN user it would be much better to get access to the sources using familiar tools, e.g. TortoiseSVN. Mainly because

Tagged with: , , , ,
Posted in Coding, PostgreSQL

Number into words convertion in PostgreSQL

I was playing with some unit tests for PostgresDAC recently. And one test case was to check TPSQLDataset.Locate routine which allows partial-string and case-sensitive matching options. So I want to have some test result set with integer and text columns.

Tagged with: , ,
Posted in Coding, PostgresDAC

Factorial using CTE in PostgreSQL

Not so long ago I used Common Table Expressions for Fibonacci Numbers calculation. Today I had a conversation with one client about SQL in general and about PosgreSQL dialect in particular. We talked about SQL’s Turing completeness also. Well my

Tagged with: , , , , ,
Posted in Coding, PostgreSQL

Determination of a leap year in PostgreSQL

From Wikipedia: A leap year (or intercalary or bissextile year) is a year containing one extra day (or, in the case of lunisolar calendars, a month) in order to keep the calendar year synchronized with the astronomical or seasonal year.

Tagged with: , , , ,
Posted in Coding

Delete tuple from libpq’s PGresult

I wrote how to modify result set in underlying libpq’s PGresult object with new ones. But there was no solution for deletion. Here I want to propose one solution. The main idea is to copy existing PGresult content to the

Tagged with: , , , , , ,
Posted in Coding, PostgresDAC

Editing result set using libpq functions

Many of us use libpq client library to access PostgreSQL. And so we do in our PostgresDAC component suite. Very often you don’t want to refresh result set on client side after insert\update\delete some row especially if result set is

Tagged with: , , , ,
Posted in Coding

Looking through the scan.l

Recently I was browsing the scan.l source code for changes since PostgreSQL 9.0 version. I always do so for new minor and major releases because I use PostgreSQL grammar in my project. Well if you’ll look closer you may find

Tagged with: , , ,
Posted in Coding
Map of wandering

Get every new post delivered to your Inbox.

Join 83 other followers