Hello David,
Question: is there any way to really abort a psql script from an
included file?
Under what circumstances would it be appropriate for a script to take
it on itself to decide that? It has no way of knowing what the next -f
option is or what the user intended.
Can we add an
Hello David,
vagrant@vagrant:~$ /usr/local/pgsql/bin/psql -v ON_ERROR_STOP=1 -f two.psql
-f three.psql postgres
?column?
--
2
(1 row)
?column?
--
3
(1 row)
(there is a \quit at the end of two.psql)
Yep, that summarizes my issues!
ON_ERROR_STOP is only of SQL
Hello Tom,
- when the current script is included from something,
you quit the current script and proceed after the \i of next -f, BAD
Question: is there any way to really abort a psql script from an included
file?
Under what circumstances would it be appropriate for a script to take
On Sat, Nov 19, 2022 at 12:59 PM David G. Johnston <
david.g.johns...@gmail.com> wrote:
> On Sat, Nov 19, 2022 at 12:49 PM Tom Lane wrote:
>
>> Greg Stark writes:
>> > On Sat, 19 Nov 2022 at 14:10, Tom Lane wrote:
>> >> Under what circumstances would it be appropriate for a script to take
>>
On Sat, Nov 19, 2022 at 12:49 PM Tom Lane wrote:
> Greg Stark writes:
> > On Sat, 19 Nov 2022 at 14:10, Tom Lane wrote:
> >> Under what circumstances would it be appropriate for a script to take
> >> it on itself to decide that? It has no way of knowing what the next -f
> >> option is or what
Greg Stark writes:
> On Sat, 19 Nov 2022 at 14:10, Tom Lane wrote:
>> Under what circumstances would it be appropriate for a script to take
>> it on itself to decide that? It has no way of knowing what the next -f
>> option is or what the user intended.
> Presumably when they're written by the
On Sat, 19 Nov 2022 at 14:10, Tom Lane wrote:
> Under what circumstances would it be appropriate for a script to take
> it on itself to decide that? It has no way of knowing what the next -f
> option is or what the user intended.
Presumably when they're written by the same person so the script
On Sat, Nov 19, 2022 at 12:10 PM Tom Lane wrote:
> Fabien COELHO writes:
> > - when the current script is included from something,
> > you quit the current script and proceed after the \i of next -f, BAD
>
> > Question: is there any way to really abort a psql script from an
> included
> >
Fabien COELHO writes:
> - when the current script is included from something,
> you quit the current script and proceed after the \i of next -f, BAD
> Question: is there any way to really abort a psql script from an included
> file?
Under what circumstances would it be appropriate for a
Hello devs,
I want to abort a psql script. How can I do that? The answer seems to be
\quit, but it is not so simple:
- when the current script is from a terminal, you exit psql, OK
- when the current script is from a file (-f, <), you exit psql, OK
- when the current script is included
10 matches
Mail list logo