Re: proposal or just idea for psql - show first N rows from relation backslash statement

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: proposal or just idea for psql - show first N rows from relation backslash statement
Дата
Msg-id 19631.1360799063@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: proposal or just idea for psql - show first N rows from relation backslash statement  (Ian Lawrence Barwick <barwick@gmail.com>)
Список pgsql-hackers
Ian Lawrence Barwick <barwick@gmail.com> writes:
> 2013/2/14 Tom Lane <tgl@sss.pgh.pa.us>:
>> Can't you pretty much do this already in psql with FETCH_COUNT?  I see
>> no good reason to invent more SQL syntax.

> Doesn't that just split up the retrieval of the result set into blocks of
> FETCH_COUNT rows, i.e. does not limit the result set?

Well, you'll get a page worth of data before your pager blocks it,
and then you can continue, or not, for relatively little cost.
I can't see that fetching a fixed number of rows is more useful
than that.

[ experiments... ]  Although I notice that psql's FETCH_COUNT logic
doesn't realize that it could be applied to a "TABLE foo" query.
That seems like it might be worth fixing.
        regards, tom lane



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

Предыдущее
От: Ian Lawrence Barwick
Дата:
Сообщение: Re: proposal or just idea for psql - show first N rows from relation backslash statement
Следующее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Re: proposal or just idea for psql - show first N rows from relation backslash statement