Re: BUG #3269: PSQL does not display error output

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #3269: PSQL does not display error output
Дата
Msg-id 26456.1179003159@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #3269: PSQL does not display error output  (Bojan Jovanovic <bjovanovic@bjovanovic.com>)
Список pgsql-bugs
Bojan Jovanovic <bjovanovic@bjovanovic.com> writes:
> Here is the full strace of: echo "select * from sadfasdfas;" | strace psql -U ***** *****
> (no sadfasfaf table..)

Well, it's sending the query as expected:

> read(0, "select * from sadfasdfas;\n", 4096) = 26
> rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
> send(3, "Q\0\0\0\36select * from sadfasdfas;\0", 31, 0) = 31
> rt_sigaction(SIGPIPE, {SIG_DFL}, {SIG_IGN}, 8) = 0

and getting the error response as expected:

> poll([{fd=3, events=POLLIN|POLLERR, revents=POLLIN}], 1, -1) = 1
> recv(3, "E\0\0\0]SERROR\0C42P01\0Mrelation \"sa"..., 16384, 0) = 100

and making absolutely no effort to write anything on stderr:

> rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
> read(0, "", 4096)                       = 0
> rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
> send(3, "X\0\0\0\4", 5, 0)              = 5
> rt_sigaction(SIGPIPE, {SIG_DFL}, {SIG_IGN}, 8) = 0
> close(3)                                = 0
> rt_sigaction(SIGPIPE, {SIG_DFL}, {SIG_DFL}, 8) = 0
> exit_group(0)                           = ?

That's just bizarre.  I don't see any way that psql wouldn't try to
print the error, unless libpq is giving it bad information about the
PGresult's status (or maybe an empty error message?).  I think maybe
there is something busted about your libpq, though it's hard to think of
something that would only affect error reporting.  Did you build with
debug enabled, such that you could step through AcceptResult() in psql
and see what's happening?

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bojan Jovanovic
Дата:
Сообщение: Re: BUG #3269: PSQL does not display error output
Следующее
От: "Alan Mercer"
Дата:
Сообщение: BUG #3274: Failed to run initdb