Re: [GENERAL] Run statements before pg_dump in same transaction?

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: [GENERAL] Run statements before pg_dump in same transaction?
Дата
Msg-id 877bb7cc-f7ba-8c26-62ac-edd4845f5d06@hogranch.com
обсуждение исходный текст
Ответ на [GENERAL] Run statements before pg_dump in same transaction?  (François Beausoleil <francois@teksol.info>)
Список pgsql-general
On 3/23/2017 12:06 PM, François Beausoleil wrote:
BEGIN;
UPDATE users SET email = 'dev+' || id || '@example.com', password_hash = '/* hash of "password" */', ...;
-- launch pg_dump as usual, ensuring a ROLLBACK at the end
-- pg_dump must run with the *same* connection, obviously

-- if not already done by pg_dump
ROLLBACK;

there is no way to get pg_dump to use the same connection as your script.... its a standalone program, and will open its own connection, hence run its own transactions.


-- 
john r pierce, recycling bits in santa cruz

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

Предыдущее
От: François Beausoleil
Дата:
Сообщение: [GENERAL] Run statements before pg_dump in same transaction?
Следующее
От: John R Pierce
Дата:
Сообщение: Re: [GENERAL] Run statements before pg_dump in same transaction?