Re: Bug(s) or not?

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Bug(s) or not?
Дата
Msg-id 20030526112925.GA18075@wolff.to
обсуждение исходный текст
Ответ на Bug(s) or not?  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-hackers
On Mon, May 26, 2003 at 14:17:52 +0400, Teodor Sigaev <teodor@sigaev.ru> wrote:
> 
> q=# select count(*) from q;
>  count
> -------
>      2
> (1 row)
> 
> q=# select count(*) from q limit 1;
>  count
> -------
>      2
> (1 row)
> 
> q=# select count(*) from q limit 1 offset 1;
>  count
> -------
> (0 rows)
> 
> q=# select count(*) from q  offset 1;
>  count
> -------
> (0 rows)
> 
> q=# select count(*) from q  offset 0;
>  count
> -------
>      2
> (1 row)
> 
> I understand that it isn't correct query, but why pgsql do something 
> strange instead of say 'error'?

The above queries appear to be correct. The count returns a single row
with the number of rows in the table. If you skip over that row using
offset, you aren't going to get any rows.


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

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: Bug(s) or not?
Следующее
От: XST
Дата:
Сообщение: Tom and Fernando: Status for "WITH RECURSIVE"