Re: Best Practices for Managing Schema Changes Dynamically with libpq

Поиск
Список
Период
Сортировка
От Ron Johnson
Тема Re: Best Practices for Managing Schema Changes Dynamically with libpq
Дата
Msg-id CANzqJaCykFdcEqKrdHbR9wZo0wUFuA07zJXuqC68s==aUNhAXQ@mail.gmail.com
обсуждение исходный текст
Ответ на Best Practices for Managing Schema Changes Dynamically with libpq  (Sasmit Utkarsh <utkarshsasmit@gmail.com>)
Список 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 по дате отправления: