Search Postgresql Archives

Re: Best Practices for Managing Schema Changes Dynamically with libpq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 3, 2024 at 12:44 PM Sasmit Utkarsh <utkarshsasmit@xxxxxxxxx> 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!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux