Re: [PATCHES] selecting large result sets in psql using

Поиск
Список
Период
Сортировка
От
Тема Re: [PATCHES] selecting large result sets in psql using
Дата
Msg-id 49337.87.6.213.195.1156281190.squirrel@www.endian.it
обсуждение исходный текст
Ответ на Re: [PATCHES] selecting large result sets in psql using  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCHES] selecting large result sets in psql using
Re: [PATCHES] selecting large result sets in psql using
Список pgsql-hackers
>> True.  They could even put it in .psqlrc if they want.  Basically need
>> a way to modify \g.  Seems a \set is the way we have always done such
>> modifications in the past.  The big question is whether this is
>> somehow different.  Personally, I don't think so.
>
> If you want a \set variable, then at least make it do something useful:
> make it an integer var that sets the fetch count, rather than
> hard-wiring the count as is done in Chris' existing patch.  Zero (or
> perhaps unset) disables.
>
>             regards, tom lane

Hello,

first I must admit that I misunderstood Bruce post. I thought he meant
to tweak \pset (psql command to set formatting). This didn't make
sense to me. Only now I realize everyone is talking about \set
(psql internal variable).

That being said, I'm a bit unsure now what we should do.

As Peter said, it is true that mostly this feature would be
used for scripting where \set and \unset are not as cumbersome
to use as in an interactive session.
Tom's idea to factor in the fetch count as an option is also
very tempting.

To cut the Gordon knot I'm going to suggest we use:

\set CURSOR_FETCH fetch_count

and \g and ; are modified such that when they see
this variable set to fetch_count > 0 and the buffer
is a select they would use the modified fetch/output code.

Does this sound reasonable to everyone?

Bye :)
Chris.


-- 
Chris Mair
http://www.1006.org




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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Tricky bugs in concurrent index build
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: BugTracker (Was: Re: 8.2 features status)