Re: BUG #9198: psql -c 'SET; ...' not working
От | Tom Lane |
---|---|
Тема | Re: BUG #9198: psql -c 'SET; ...' not working |
Дата | |
Msg-id | 5270.1392309900@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: BUG #9198: psql -c 'SET; ...' not working (Christoph Berg <christoph.berg@credativ.de>) |
Список | pgsql-bugs |
Christoph Berg <christoph.berg@credativ.de> writes: > ... I'd propose something like this doc update: > <application>psql</application>'s standard input. Also, only > ! the result of the last SQL command is returned. <command>SET</> > ! commands that modify statement behavior will be ineffective because > ! they are part of the already running statement. Most notably, > ! <literal>psql -c 'SET statement_timeout = 0; SELECT ...'</literal> > ! will not work as expected. (Use <literal>echo '...' | psql</literal> > ! as above instead.) This is incorrect though; most variables you can set via SET actually will work unsurprisingly in this context. statement_timeout is different because its value is only inspected at the start of a statement (where "statement" is defined as "query string received from the client"). regards, tom lane
В списке pgsql-bugs по дате отправления: