Re: Best Practices for Managing Schema Changes Dynamically with libpq

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Best Practices for Managing Schema Changes Dynamically with libpq
Date: 2024-12-03 18:10:05
Message-ID: CANzqJaCykFdcEqKrdHbR9wZo0wUFuA07zJXuqC68s==aUNhAXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Dec 3, 2024 at 12:44 PM Sasmit Utkarsh <utkarshsasmit(at)gmail(dot)com>
wrote:
[snip]

> How can we efficiently handle table additions/updates while keeping the
> application and database in sync dynamically?
>

Enumerate all relevant column names in SELECT and INSERT statements. That
way, the application still works when you add columns or alter(*) data
types. Dropping columns will still break your app.

*Altering to from a numeric type to a text type might still kill your app,
if it can't convert the string into your app's int or float type..

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tefft, Michael J 2024-12-03 18:11:21 RE: Autovacuum and visibility maps
Previous Message Ron Johnson 2024-12-03 17:57:28 Re: Autovacuum and visibility maps