"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > On Tue, Jun 06, 2006 at 09:48:43AM -0400, Tom Lane wrote: >>> psql --cursor -c "select ..." | myprogram >>> there would be no very good way for myprogram to find out that it'd >>> been sent an incomplete result due to error partway through the SELECT.
> So if an error occurs partway through reading a cursor, no error message > is generated? That certainly sounds like a bug to me... Sure an error is generated. But it goes to stderr. The guy at the downstream end of the stdout pipe cannot see either the error message, or the nonzero status that psql will (hopefully) exit with. You can theoretically deal with this by having the shell script calling this combination check psql exit status and discard the results of myprogram on failure, but it's not easy or simple. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings