Re: What have I done!?!?!? :-)

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: What have I done!?!?!? :-)
Дата
Msg-id 0e4ea8e7-bfe2-b3ce-1edb-baa247bac0ca@wi3ck.info
обсуждение исходный текст
Ответ на Re: What have I done!?!?!? :-)  (Nikolay Samokhvalov <samokhvalov@gmail.com>)
Ответы Re: What have I done!?!?!? :-)  (Perry Smith <pedz@easesoftware.com>)
Список pgsql-general
On 4/8/22 01:57, Nikolay Samokhvalov wrote:
> On Thu, Apr 7, 2022 at 8:10 AM Jan Wieck <jan@wi3ck.info 
> <mailto:jan@wi3ck.info>> wrote:
> 
>     So **IF** Active Record is using that feature, then it can dump any
>     amount of garbage into your PostgreSQL database and PostgreSQL will
>     happily accept it with zero integrity checking.
> 
> 
> It's DISABLE TRIGGER ALL 
>
https://github.com/rails/rails/blob/831031a8cec5bfe59ef653ae2857d4fe64c5698d/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity.rb#L12

>
<https://github.com/rails/rails/blob/831031a8cec5bfe59ef653ae2857d4fe64c5698d/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity.rb#L12>

Similar poison, same side effect.

Looking further at that code it also directly updates the PostgreSQL 
system catalog. This is a big, red flag.

Why do the Rails developers think they need a sledgehammer like that? It 
seems to be doing that for over 7 years, so it is hard to tell from the 
commit log why they need to disable RI at all.


Regards, Jan



В списке pgsql-general по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: How to get updated order data
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: What have I done!?!?!? :-)