Re: [HACKERS] psql - -dry-run option

2015-12-20 Thread Jim Nasby
On 12/18/15 2:50 AM, Shulgin, Oleksandr wrote: On Thu, Dec 17, 2015 at 9:13 PM, Tom Lane > wrote: Whether we really need a feature like that isn't clear though; it's not like it's hard to test things that way now. Stick in a BEGIN with no

Re: [HACKERS] psql - -dry-run option

2015-12-20 Thread Craig Ringer
On 18 December 2015 at 16:50, Shulgin, Oleksandr < oleksandr.shul...@zalando.de> wrote: > I'm on the same line: BEGIN/ROLLBACK requires trivial effort and a > --dry-run option might give a false sense of security, but it cannot > possibly rollback side-effects of user functions which modify

Re: [HACKERS] psql - -dry-run option

2015-12-18 Thread Shulgin, Oleksandr
On Thu, Dec 17, 2015 at 9:13 PM, Tom Lane wrote: > > Whether we really need a feature like that isn't clear though; it's not > like it's hard to test things that way now. Stick in a BEGIN with no > COMMIT, you're there. The problem only comes in if you start expecting > the

[HACKERS] psql - -dry-run option

2015-12-17 Thread Pavel Stehule
Hi when I read a blog http://www.depesz.com/2015/12/14/waiting-for-9-6-psql-support-multiple-c-and-f-options-and-allow-mixing-them/ where is emulated dry-run mode, I though so we can implement it very simply. Notices, comments? Regards Pavel

Re: [HACKERS] psql - -dry-run option

2015-12-17 Thread Pavel Stehule
2015-12-17 20:14 GMT+01:00 Pavel Stehule : > > > 2015-12-17 20:03 GMT+01:00 Tom Lane : > >> Pavel Stehule writes: >> > when I read a blog >> > >>

Re: [HACKERS] psql - -dry-run option

2015-12-17 Thread Alvaro Herrera
Joe Conway wrote: > On 12/17/2015 11:58 AM, Christopher Browne wrote: > > On 17 December 2015 at 14:16, Pavel Stehule > > wrote: > >> or different idea - just enforce syntax check without execution. > > > > That seems pretty cool... I'd

Re: [HACKERS] psql - -dry-run option

2015-12-17 Thread Pavel Stehule
2015-12-17 20:03 GMT+01:00 Tom Lane : > Pavel Stehule writes: > > when I read a blog > > > http://www.depesz.com/2015/12/14/waiting-for-9-6-psql-support-multiple-c-and-f-options-and-allow-mixing-them/ > > where is emulated dry-run mode, I though so we

Re: [HACKERS] psql - -dry-run option

2015-12-17 Thread Joe Conway
On 12/17/2015 11:58 AM, Christopher Browne wrote: > On 17 December 2015 at 14:16, Pavel Stehule > wrote: >> or different idea - just enforce syntax check without execution. > > That seems pretty cool... I'd find "syntax check without

Re: [HACKERS] psql - -dry-run option

2015-12-17 Thread Tom Lane
Pavel Stehule writes: > when I read a blog > http://www.depesz.com/2015/12/14/waiting-for-9-6-psql-support-multiple-c-and-f-options-and-allow-mixing-them/ > where is emulated dry-run mode, I though so we can implement it very > simply. Not one that is actually reliable.

Re: [HACKERS] psql - -dry-run option

2015-12-17 Thread Christopher Browne
On 17 December 2015 at 14:16, Pavel Stehule wrote: > or different idea - just enforce syntax check without execution. That seems pretty cool... I'd find "syntax check without execution" to be pretty useful to test SQL (and especially DDL). -- When confronted by a

Re: [HACKERS] psql - -dry-run option

2015-12-17 Thread Tom Lane
Christopher Browne writes: > On 17 December 2015 at 14:16, Pavel Stehule wrote: >> or different idea - just enforce syntax check without execution. > That seems pretty cool... I'd find "syntax check without execution" to be > pretty useful to test