Re: Critical Bug

Поиск
Список
Период
Сортировка
От tv@fuzzy.cz
Тема Re: Critical Bug
Дата
Msg-id cdb9717556d96778f0b964c5fc78bea9.squirrel@sq.gransy.com
обсуждение исходный текст
Ответ на Critical Bug  (tejas tank <tejas.tank.mca@gmail.com>)
Список pgsql-general
> Hello,
>
>
> I have hug postgresql database and when i going to search for a query
> with database retrieve with limit of 669 is allow
>
> If my query fetch records more over 669 records then error is comming...
>
>
> RROR:  more than one row returned by a subquery used as an expression
>
> ********** Error **********
>
> ERROR: more than one row returned by a subquery used as an expression
> SQL state: 21000
>
>
> What should I have to do.?????
>
>
> Its urgent ....

Fix it.

The 'bug' is actually your falt - you're using a subselect in the place
where an expression is expected, and the subselect returns more than one
row (which is causing the problem).

See for example this:

   SELECT * FROM employees WHERE name = (SELECT name FROM ...)

if the subselect returns more than one row, what should the database do?
The only reasonable solution is to throw an error. The same holds for
subselects used instead of columns, i.e.

   SELECT name, (SELECT ... FROM ...) FROM employees

So you have to find the subselect that returns more than one row and fix
it (rewrite it or something).

regards
Tomas


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Critical Bug
Следующее
От: Jon Smark
Дата:
Сообщение: Functions as first-class values