Category: Thread

  • 2025/06/21 [Learn Postgres]

    I finished chapter about triggers and finally moving on to more interesting topic – Partitioning. The “Triggers” chapter was mainly a dry walkthrough the synopsis. I think I was missing theoretical explanation of how triggers work under the hood.On the other hand “Partitioning” chapter starts with types of partitioning (range, list, hash) – which makes…

  • 2025/06/21 [GADM-api]

    I refined logging mechanism and messages. I added severity levels (DEBUG, INFO, WARN, ERROR) and introduced middleware that logs each request. Also I installed the air package that re-builds and runs my server when I modify files.I discovered I can use Caddy for rate limiting. It seems very easy to setup and will save so…

  • 2025/06/20 [Learn Postgres]

    I started the chapter about triggers and rules. Both seem to be very powerful tools. I can see how they enable for example denormalization. I am still curious about maintainability. Let’s say table A is replicated to table B. If table A changes it’s schema it should be recognised by a linter and force programmer…

  • 25/06/20 [GADM-api]

    Yesterday evening I added level 1 /geojson endpoint. I am still not happy with all code duplication – even after abstracting header setters and query parameter parses. Also I need to create an automation for dev server re-lunch on file save.

  • 2025/06/19 [GADM-api]

    I refined how pagination parameters are parsed and standardized how headers are being set for /geojson and /feature-collection endpoints. I started working on endpoints for level 1 but before I can complete it I need to refine the way json properties are being generated in sql queries.

  • 2025/06/19 [Learn Postgres]

    I finished the chapter about postgres functions. I feel the syntax is quite cumbersome and I can’t find a good use-case for them now. I imagine they will come handy when combined with triggers or cron jobs. I am looking forward to next chapter about triggers.

  • 2025/06/18 [Learn Postgres]

    Moving on with “Learn PostgresSQL”. Today I went through a major part of “Server-side programming” chapter, including data-types (hstore, json, jsonb, dates and time) and writing functions with SQL and PL/pgSQL. Functions in database seem interesting, I can foresee certain use cases. However they also seem like a serious maintenance effort. Perhaps they require integration…

  • 2025/06/18 [GADM-api]

    I am working on abstracting my queries with squirrel package. I need to find a reusable and scalable approach before I will move on with next endpoints. At the moment I have two endpoints – one that returns FeatureCollection and one that streams new-line delimited GeoJSON. The second one will require extra abstraction for streaming…