Am 13.08.2012 22:36, schrieb hcvv:
>> I’ve also tried echoing out “stderr” and “stdout” and “EOF” and all
>> of them show blank values.
> That is not something I can realy understand. But it could be that
> Martin’s help makes your clarification unneeded.
>
I am not sure I understand that statement either, I do a lot of database
related work (including working with Postgres, Oracle, MS SQL, Sybase
and others) but have near to no experience doing such things within
bash/sh scripts (that is the friendly way to say: I have exactly
absolute zero experience doing that from within bash/sh scripts).
Most of what I do is with Java’s jdbc or lower level C API’s or Python’s
DB API, ORM and friends with direct database connections from within a
programming language which has a lot more flexibility in error handling
than the exit code of some command where you never know if the exit code
depends on whether the command psql as such succeeded (which it always
does unless you do something really hairy) or the sql command within the
session psql creates succeeded.
I can later give the whole thing myself a try with psql, until now I
have only used it as a interactive shell for sql commands and nothing else.
But that can take a while, I have no Postgres database setup on the
machine I am sitting in front of at the moment and do not plan to
install it now on it. So when I am at my PC where everything is in place
I will give it a try.
–
PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.1 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.5 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10