Re: BUG #8242: No way to debug "subquery must return only one column" error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #8242: No way to debug "subquery must return only one column" error
Дата
Msg-id 24774.1371756513@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #8242: No way to debug "subquery must return only one column" error  (boraldomaster@gmail.com)
Ответы Re: BUG #8242: No way to debug "subquery must return only one column" error  (Борис Ромашов<boraldomaster@gmail.com>)
Список pgsql-bugs
boraldomaster@gmail.com writes:
> When I get this message I cannot guess from it's description what really
> causes this error.
> I would like to see exactly the subquery that returned more than one column
> and the row where this happened.

That's a parse-time error, so it's nonsensical to ask for "the row where
it happened".  AFAICS, the parser should give back a syntax-error
pointer for this error; for example, when I try to provoke the error in
psql, I get

=# select * from table1 where id = any(array(select c1,c2 from table2));
ERROR:  subquery must return only one column
LINE 1: select * from table1 where id = any(array(select c1,c2 ...
                                            ^

which shows me that the problem is associated with the ARRAY() construct
not accepting multiple input columns.  If you're not seeing such an
error pointer, it's the fault of whatever client-side software you're
working in.

            regards, tom lane

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

Предыдущее
От: jannevelink@anwb.nl
Дата:
Сообщение: BUG #8244: Stack Builder 3.1.0 fails with an http proxy because of an incorrect HTTP Host header value
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: BUG #8241: submisson