From: | Greg Sabino Mullane <htamfids(at)gmail(dot)com> |
---|---|
To: | Murthy Nunna <mnunna(at)fnal(dot)gov> |
Cc: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Bash function from psql (v14) |
Date: | 2024-11-10 14:55:34 |
Message-ID: | CAKAnmmL2ib1=-x-kpqaWPL6RoLa4qbeFWAeSGEB5SZ2pyeTLPA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
What problem are you trying to solve? If you tell us that, we can guide you
to some better solutions.
There are numerous issues here, but the most important are:
1) Calling a shell via \! invokes an entirely new process: there is no link
to the parent or grandparent process
2) The run-bash-function must be declared before being called, so that bash
code was never going to work anyway. In other words, this is valid:
run-bash-function() { echo "Here we are"; }
run-bash-function
This version is not:
run-bash-function
run-bash-function() { echo "Here we are"; }
Cheers,
Greg
From | Date | Subject | |
---|---|---|---|
Next Message | JOLAPARA Urvi (SAFRAN) | 2024-11-10 15:11:57 | postgresql-17.0-1 Application - silent installation Issue |
Previous Message | user | 2024-11-10 13:18:16 | Fwd: Fwd: Postgres attach partition: AccessExclusive lock set on different tables depending on how attaching is performed |