Re: Proposal to add --single-row to psql

Поиск
Список
Период
Сортировка
От Christopher Manning
Тема Re: Proposal to add --single-row to psql
Дата
Msg-id CAEYkp91gpZ9MdYXNHf1aZ7zfBLkXufAvd_gDRwk9_dmeSxPgqw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal to add --single-row to psql  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Ответы Re: Proposal to add --single-row to psql
Список pgsql-hackers
Fabrízio and Tom,

I know that you can use  --variable="FETCH_COUNT=10000" from the psql command line, but internally that uses a CURSOR to batch the rows and [Redshift doesn't support CURSOR](https://forums.aws.amazon.com/thread.jspa?threadID=122664&tstart=0) so it's not an option when using psql to download data from Redshift.

Pavel's idea of having a single row mode option to replace FETCH_COUNT is interesting, does anyone have any problems with that or alternative ideas?

Regards,
Christopher



On Wed, Apr 24, 2013 at 7:04 AM, Fabrízio de Royes Mello <fabriziomello@gmail.com> wrote:

On Tue, Apr 23, 2013 at 1:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Isn't there already a way to set FETCH_COUNT from the command line?
> (ie, I think there's a generic variable-assignment facility that could
> do this)
>

Christopher,

Tom is all right... from psql [1] command line we can do that:

$ bin/psql --variable=FETCH_COUNT=100
psql (9.3devel)
Type "help" for help.

fabrizio=# \echo :FETCH_COUNT
100

Regards,

[1] http://www.postgresql.org/docs/current/interactive/app-psql.html#AEN84903

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello

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

Предыдущее
От: Claudio Freire
Дата:
Сообщение: Re: Allowing parallel pg_restore from pipe
Следующее
От: Jeff Janes
Дата:
Сообщение: danger of stats_temp_directory = /dev/shm