Re: Postgres config file: autocommit = off

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Postgres config file: autocommit = off
Дата
Msg-id 200306021857.h52IvnW10054@candle.pha.pa.us
обсуждение исходный текст
Ответ на Postgres config file: autocommit = off  ("Rasmus Resen Amossen" <rresena@hotmail.com>)
Ответы Re: Postgres config file: autocommit = off  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > In thinking about it, I don't see how we can ignore .psqlrc if it has
> > autocommit set to off.  Imagine I am in psql and I do '\i file', and it
> > works, so I code up psql -c in a script, and it doesn't work --- would
> > be quite strange.
> 
> What's your point?  "psql -c '\i file'" doesn't work either.
> 
> Surely you don't want to have to put back all those SET AUTOCOMMITs again.

No.

> Yeah, it's a bit warty, but psql -c is inherently different from a psql
> script.  IMHO it's not reasonable to make (shell) scripts using psql -c

How is it different, except for having no prompt?  I never assumed it
would behave differently.

> have to explicitly state the obvious, which is that they'd like their
> command committed.

They can't do that from in the file anymore (command-line arg?), or will
we have backslash commands for autocommit off?  (Yikes, a new backslash
command, or two?)

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Feature suggestions (long)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Postgres config file: autocommit = off