Re: Best Practices for Managing Schema Changes Dynamically with libpq - Mailing list pgsql-general

From Ron Johnson
Subject Re: Best Practices for Managing Schema Changes Dynamically with libpq
Date
Msg-id CANzqJaCykFdcEqKrdHbR9wZo0wUFuA07zJXuqC68s==aUNhAXQ@mail.gmail.com
Whole thread Raw
In response to Best Practices for Managing Schema Changes Dynamically with libpq  (Sasmit Utkarsh <utkarshsasmit@gmail.com>)
List pgsql-general
On Tue, Dec 3, 2024 at 12:44 PM Sasmit Utkarsh <utkarshsasmit@gmail.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!

pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Autovacuum and visibility maps
Next
From: "Tefft, Michael J"
Date:
Subject: RE: Autovacuum and visibility maps